From 095a106323444a9cc3e05d981797097916df91c1 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Mon, 27 Oct 2025 16:19:23 -0700 Subject: [PATCH 01/13] pypi workflow --- .github/workflows/pypi.yml | 184 +++++++++++++++++++++++++++++++++++++ pyproject.toml | 46 ++++++---- 2 files changed, 213 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..eebaa31 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,184 @@ +name: Build and Publish to PyPI + +on: + push: + branches: + - test + - release + tags: + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-*' + workflow_dispatch: + inputs: + environment: + description: 'Deployment environment' + required: true + type: choice + options: + - test + - release + +jobs: + build: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + environment: ${{ steps.determine-env.outputs.environment }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for hatch-vcs versioning + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Install build dependencies + run: | + uv pip install --system build hatch hatch-vcs twine + + - name: Determine environment + id: determine-env + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT + elif [[ "${{ github.ref }}" == "refs/heads/test" ]]; then + echo "environment=test" >> $GITHUB_OUTPUT + elif [[ "${{ github.ref }}" == "refs/heads/release" ]] || [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "environment=release" >> $GITHUB_OUTPUT + fi + + - name: Get version and configure for environment + id: version + run: | + BASE_VERSION=$(python -c "from hatchling.metadata.core import ProjectMetadata; print(ProjectMetadata('.', None).version)") + echo "Base version: $BASE_VERSION" + + if [[ "${{ steps.determine-env.outputs.environment }}" == "test" ]]; then + # Test environment: append .devN + VERSION="${BASE_VERSION}.dev${{ github.run_number }}" + echo "Development version: $VERSION" + echo "SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}" >> $GITHUB_ENV + else + # Production environment: use version as-is + VERSION="${BASE_VERSION}" + echo "Production version: $VERSION" + + # Verify no dev suffix for production + if [[ "$VERSION" =~ "dev" ]]; then + echo "Error: Version contains 'dev' suffix. Production releases must be clean versions." + echo "Current version: $VERSION" + echo "Please create a git tag (e.g., v1.0.0) on the release branch." + exit 1 + fi + fi + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + + - name: Build package + run: python -m build + + - name: Check package + run: | + twine check dist/* + ls -lh dist/ + echo "Package version: ${{ steps.version.outputs.version }}" + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: dist-${{ steps.determine-env.outputs.environment }} + path: dist/ + + publish-test: + needs: build + if: needs.build.outputs.environment == 'test' + runs-on: ubuntu-latest + environment: + name: test + url: https://test.pypi.org/project/workato-platform-cli/ + + permissions: + id-token: write # Required for trusted publishing + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist-test + path: dist/ + + - name: Publish to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + print-hash: true + + - name: Set up Python for testing + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Test installation + run: | + echo "Waiting for Test PyPI to process the package..." + sleep 30 + + echo "Attempting to install workato-platform-cli==${{ needs.build.outputs.version }}" + uv pip install --system \ + --index-url https://test.pypi.org/simple/ \ + --extra-index-url https://pypi.org/simple/ \ + workato-platform-cli==${{ needs.build.outputs.version }} || echo "Package not yet available on Test PyPI" + + # Verify CLI if installation succeeded + workato --version || echo "CLI check skipped" + + publish-release: + needs: build + if: needs.build.outputs.environment == 'release' + runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/project/workato-platform-cli/ + + permissions: + id-token: write # Required for trusted publishing + contents: write # For creating GitHub releases + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist-release + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + print-hash: true + + - name: Create GitHub Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + files: dist/* + generate_release_notes: true + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 681988e..00e7857 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ readme = "README.md" requires-python = ">=3.11" license = { text = "MIT" } authors = [ - { name = "Workato CLI Team" }, + { name = "Workato CLI Team", email = "workato-devs@workato.com" }, ] keywords = ["workato", "cli", "automation", "api"] classifiers = [ @@ -63,15 +63,15 @@ test = [ ] [project.scripts] -workato = "workato_platform.cli:cli" +workato = "workato_platform_cli.cli:cli" [project.urls] -Homepage = "https://github.com/workato/workato-platform-cli" -Repository = "https://github.com/workato/workato-platform-cli.git" -Issues = "https://github.com/workato/workato-platform-cli/issues" +Homepage = "https://github.com/workato-devs/workato-platform-cli" +Repository = "https://github.com/workato-devs/workato-platform-cli.git" +Issues = "https://github.com/workato-devs/workato-platform-cli/issues" [tool.hatch.build.targets.wheel] -packages = ["src/workato_platform"] +packages = ["src/workato_platform_cli"] [tool.hatch.build.targets.wheel.sources] "src" = "" @@ -100,7 +100,7 @@ exclude = [ "dist", "node_modules", "venv", - "src/workato_platform/client/", + "src/workato_platform_cli/client/", ] [tool.ruff.lint] @@ -123,14 +123,14 @@ ignore = [ [tool.ruff.lint.per-file-ignores] "tests/**/*.py" = ["B011", "S101", "S105", "S106"] -"src/workato_platform/_version.py" = ["ALL"] +"src/workato_platform_cli/_version.py" = ["ALL"] # Ruff isort configuration [tool.ruff.lint.isort] force-single-line = false lines-between-types = 1 lines-after-imports = 2 -known-first-party = ["workato_platform"] +known-first-party = ["workato_platform_cli"] known-third-party = ["workato_api"] section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] @@ -141,8 +141,8 @@ indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" exclude = [ - "src/workato_platform/_version.py", - "src/workato_platform/client/" + "src/workato_platform_cli/_version.py", + "src/workato_platform_cli/client/" ] # MyPy configuration @@ -164,16 +164,16 @@ namespace_packages = true explicit_package_bases = true mypy_path = "src" files = [ - "src/workato_platform", + "src/workato_platform_cli", "tests", ] plugins = ["pydantic.mypy"] exclude = [ - "src/workato_platform/client/*", + "src/workato_platform_cli/client/*", ] [[tool.mypy.overrides]] -module = "workato_platform.client.workato_api.*" +module = "workato_platform_cli.client.workato_api.*" ignore_errors = true [[tool.mypy.overrides]] @@ -203,11 +203,11 @@ pythonpath = ["src"] # Coverage configuration [tool.coverage.run] -source = ["src/workato_platform"] +source = ["src/workato_platform_cli"] omit = [ "tests/*", - "src/workato_platform/client/*", - "src/workato_platform/_version.py", + "src/workato_platform_cli/client/*", + "src/workato_platform_cli/_version.py", ] [tool.coverage.report] @@ -226,10 +226,22 @@ exclude_lines = [ [tool.hatch.version] source = "vcs" +# Use the tag-based version directly, no local version +raw-options = { local_scheme = "no-local-version" } [tool.hatch.build.hooks.vcs] version-file = "src/workato_platform/_version.py" +# Optional: Configure version pattern matching +# This ensures hatch-vcs recognizes your version tags correctly +[tool.hatch.version.raw-options] +# Match tags like 1.0.0, 1.0.0-alpha, 1.0.0-beta.1, etc. +# No "v" prefix expected +tag-regex = "^(?P\\d+\\.\\d+\\.\\d+(?:[\\-\\.]\\w+(?:\\.\\d+)?)?)$" + +[tool.hatch.build.hooks.vcs] +version-file = "src/workato_platform_cli/_version.py" + [dependency-groups] dev = [ From 99ffd3c6afdfd8904edc220bff81a6bf931bd5c2 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 10:19:19 -0700 Subject: [PATCH 02/13] Rename workato_platform to workato_platform_cli for consistency --- pyproject.toml | 14 +------------- .../__init__.py | 0 .../cli/__init__.py | 0 .../cli/commands/__init__.py | 0 .../cli/commands/api_clients.py | 0 .../cli/commands/api_collections.py | 0 .../cli/commands/assets.py | 0 .../cli/commands/connections.py | 0 .../cli/commands/connectors/__init__.py | 0 .../cli/commands/connectors/command.py | 0 .../cli/commands/connectors/connector_manager.py | 0 .../cli/commands/data_tables.py | 0 .../cli/commands/guide.py | 0 .../cli/commands/init.py | 0 .../cli/commands/profiles.py | 0 .../cli/commands/projects/__init__.py | 0 .../cli/commands/projects/command.py | 0 .../cli/commands/projects/project_manager.py | 0 .../cli/commands/properties.py | 0 .../cli/commands/pull.py | 0 .../cli/commands/push/__init__.py | 0 .../cli/commands/push/command.py | 0 .../cli/commands/recipes/__init__.py | 0 .../cli/commands/recipes/command.py | 0 .../cli/commands/recipes/validator.py | 0 .../cli/commands/workspace.py | 0 .../cli/containers.py | 0 .../cli/resources/data/connection-data.json | 0 .../cli/resources/data/picklist-data.json | 0 .../cli/resources/docs/README.md | 0 .../cli/resources/docs/actions.md | 0 .../cli/resources/docs/block-structure.md | 0 .../cli/resources/docs/connections-parameters.md | 0 .../cli/resources/docs/data-mapping.md | 0 .../cli/resources/docs/formulas.md | 0 .../resources/docs/formulas/array-list-formulas.md | 0 .../cli/resources/docs/formulas/conditions.md | 0 .../cli/resources/docs/formulas/date-formulas.md | 0 .../cli/resources/docs/formulas/number-formulas.md | 0 .../cli/resources/docs/formulas/other-formulas.md | 0 .../cli/resources/docs/formulas/string-formulas.md | 0 .../cli/resources/docs/naming-conventions.md | 0 .../resources/docs/recipe-deployment-workflow.md | 0 .../cli/resources/docs/recipe-fundamentals.md | 0 .../cli/resources/docs/triggers.md | 0 .../cli/utils/__init__.py | 0 .../cli/utils/config/__init__.py | 0 .../cli/utils/config/manager.py | 0 .../cli/utils/config/models.py | 0 .../cli/utils/config/profiles.py | 0 .../cli/utils/config/workspace.py | 0 .../cli/utils/exception_handler.py | 0 .../cli/utils/gitignore.py | 0 .../cli/utils/ignore_patterns.py | 0 .../cli/utils/spinner.py | 0 .../cli/utils/version_checker.py | 0 .../client/__init__.py | 0 .../client/workato_api/__init__.py | 0 .../client/workato_api/api/__init__.py | 0 .../client/workato_api/api/api_platform_api.py | 0 .../client/workato_api/api/connections_api.py | 0 .../client/workato_api/api/connectors_api.py | 0 .../client/workato_api/api/data_tables_api.py | 0 .../client/workato_api/api/export_api.py | 0 .../client/workato_api/api/folders_api.py | 0 .../client/workato_api/api/packages_api.py | 0 .../client/workato_api/api/projects_api.py | 0 .../client/workato_api/api/properties_api.py | 0 .../client/workato_api/api/recipes_api.py | 0 .../client/workato_api/api/users_api.py | 0 .../client/workato_api/api_client.py | 0 .../client/workato_api/api_response.py | 0 .../client/workato_api/configuration.py | 0 .../client/workato_api/docs/APIPlatformApi.md | 0 .../client/workato_api/docs/ApiClient.md | 0 .../docs/ApiClientApiCollectionsInner.md | 0 .../workato_api/docs/ApiClientApiPoliciesInner.md | 0 .../workato_api/docs/ApiClientCreateRequest.md | 0 .../workato_api/docs/ApiClientListResponse.md | 0 .../client/workato_api/docs/ApiClientResponse.md | 0 .../client/workato_api/docs/ApiCollection.md | 0 .../workato_api/docs/ApiCollectionCreateRequest.md | 0 .../client/workato_api/docs/ApiEndpoint.md | 0 .../client/workato_api/docs/ApiKey.md | 0 .../client/workato_api/docs/ApiKeyCreateRequest.md | 0 .../client/workato_api/docs/ApiKeyListResponse.md | 0 .../client/workato_api/docs/ApiKeyResponse.md | 0 .../client/workato_api/docs/Asset.md | 0 .../client/workato_api/docs/AssetReference.md | 0 .../client/workato_api/docs/Connection.md | 0 .../workato_api/docs/ConnectionCreateRequest.md | 0 .../workato_api/docs/ConnectionUpdateRequest.md | 0 .../client/workato_api/docs/ConnectionsApi.md | 0 .../client/workato_api/docs/ConnectorAction.md | 0 .../client/workato_api/docs/ConnectorVersion.md | 0 .../client/workato_api/docs/ConnectorsApi.md | 0 .../docs/CreateExportManifestRequest.md | 0 .../client/workato_api/docs/CreateFolderRequest.md | 0 .../client/workato_api/docs/CustomConnector.md | 0 .../docs/CustomConnectorCodeResponse.md | 0 .../docs/CustomConnectorCodeResponseData.md | 0 .../docs/CustomConnectorListResponse.md | 0 .../client/workato_api/docs/DataTable.md | 0 .../client/workato_api/docs/DataTableColumn.md | 0 .../workato_api/docs/DataTableColumnRequest.md | 0 .../workato_api/docs/DataTableCreateRequest.md | 0 .../workato_api/docs/DataTableCreateResponse.md | 0 .../workato_api/docs/DataTableListResponse.md | 0 .../client/workato_api/docs/DataTableRelation.md | 0 .../client/workato_api/docs/DataTablesApi.md | 0 .../workato_api/docs/DeleteProject403Response.md | 0 .../client/workato_api/docs/Error.md | 0 .../client/workato_api/docs/ExportApi.md | 0 .../workato_api/docs/ExportManifestRequest.md | 0 .../workato_api/docs/ExportManifestResponse.md | 0 .../docs/ExportManifestResponseResult.md | 0 .../client/workato_api/docs/Folder.md | 0 .../workato_api/docs/FolderAssetsResponse.md | 0 .../workato_api/docs/FolderAssetsResponseResult.md | 0 .../workato_api/docs/FolderCreationResponse.md | 0 .../client/workato_api/docs/FoldersApi.md | 0 .../client/workato_api/docs/ImportResults.md | 0 .../client/workato_api/docs/OAuthUrlResponse.md | 0 .../workato_api/docs/OAuthUrlResponseData.md | 0 .../client/workato_api/docs/OpenApiSpec.md | 0 .../workato_api/docs/PackageDetailsResponse.md | 0 .../PackageDetailsResponseRecipeStatusInner.md | 0 .../client/workato_api/docs/PackageResponse.md | 0 .../client/workato_api/docs/PackagesApi.md | 0 .../client/workato_api/docs/PicklistRequest.md | 0 .../client/workato_api/docs/PicklistResponse.md | 0 .../client/workato_api/docs/PlatformConnector.md | 0 .../docs/PlatformConnectorListResponse.md | 0 .../client/workato_api/docs/Project.md | 0 .../client/workato_api/docs/ProjectsApi.md | 0 .../client/workato_api/docs/PropertiesApi.md | 0 .../client/workato_api/docs/Recipe.md | 0 .../client/workato_api/docs/RecipeConfigInner.md | 0 .../docs/RecipeConnectionUpdateRequest.md | 0 .../client/workato_api/docs/RecipeListResponse.md | 0 .../client/workato_api/docs/RecipeStartResponse.md | 0 .../client/workato_api/docs/RecipesApi.md | 0 .../docs/RuntimeUserConnectionCreateRequest.md | 0 .../docs/RuntimeUserConnectionResponse.md | 0 .../docs/RuntimeUserConnectionResponseData.md | 0 .../client/workato_api/docs/SuccessResponse.md | 0 .../docs/UpsertProjectPropertiesRequest.md | 0 .../client/workato_api/docs/User.md | 0 .../client/workato_api/docs/UsersApi.md | 0 .../client/workato_api/docs/ValidationError.md | 0 .../workato_api/docs/ValidationErrorErrorsValue.md | 0 .../client/workato_api/exceptions.py | 0 .../client/workato_api/models/__init__.py | 0 .../client/workato_api/models/api_client.py | 0 .../models/api_client_api_collections_inner.py | 0 .../models/api_client_api_policies_inner.py | 0 .../models/api_client_create_request.py | 0 .../workato_api/models/api_client_list_response.py | 0 .../workato_api/models/api_client_response.py | 0 .../client/workato_api/models/api_collection.py | 0 .../models/api_collection_create_request.py | 0 .../client/workato_api/models/api_endpoint.py | 0 .../client/workato_api/models/api_key.py | 0 .../workato_api/models/api_key_create_request.py | 0 .../workato_api/models/api_key_list_response.py | 0 .../client/workato_api/models/api_key_response.py | 0 .../client/workato_api/models/asset.py | 0 .../client/workato_api/models/asset_reference.py | 0 .../client/workato_api/models/connection.py | 0 .../models/connection_create_request.py | 0 .../models/connection_update_request.py | 0 .../client/workato_api/models/connector_action.py | 0 .../client/workato_api/models/connector_version.py | 0 .../models/create_export_manifest_request.py | 0 .../workato_api/models/create_folder_request.py | 0 .../client/workato_api/models/custom_connector.py | 0 .../models/custom_connector_code_response.py | 0 .../models/custom_connector_code_response_data.py | 0 .../models/custom_connector_list_response.py | 0 .../client/workato_api/models/data_table.py | 0 .../client/workato_api/models/data_table_column.py | 0 .../models/data_table_column_request.py | 0 .../models/data_table_create_request.py | 0 .../models/data_table_create_response.py | 0 .../workato_api/models/data_table_list_response.py | 0 .../workato_api/models/data_table_relation.py | 0 .../models/delete_project403_response.py | 0 .../client/workato_api/models/error.py | 0 .../workato_api/models/export_manifest_request.py | 0 .../workato_api/models/export_manifest_response.py | 0 .../models/export_manifest_response_result.py | 0 .../client/workato_api/models/folder.py | 0 .../workato_api/models/folder_assets_response.py | 0 .../models/folder_assets_response_result.py | 0 .../workato_api/models/folder_creation_response.py | 0 .../client/workato_api/models/import_results.py | 0 .../workato_api/models/o_auth_url_response.py | 0 .../workato_api/models/o_auth_url_response_data.py | 0 .../client/workato_api/models/open_api_spec.py | 0 .../workato_api/models/package_details_response.py | 0 ...package_details_response_recipe_status_inner.py | 0 .../client/workato_api/models/package_response.py | 0 .../client/workato_api/models/picklist_request.py | 0 .../client/workato_api/models/picklist_response.py | 0 .../workato_api/models/platform_connector.py | 0 .../models/platform_connector_list_response.py | 0 .../client/workato_api/models/project.py | 0 .../client/workato_api/models/recipe.py | 0 .../workato_api/models/recipe_config_inner.py | 0 .../models/recipe_connection_update_request.py | 0 .../workato_api/models/recipe_list_response.py | 0 .../workato_api/models/recipe_start_response.py | 0 .../runtime_user_connection_create_request.py | 0 .../models/runtime_user_connection_response.py | 0 .../runtime_user_connection_response_data.py | 0 .../client/workato_api/models/success_response.py | 0 .../models/upsert_project_properties_request.py | 0 .../client/workato_api/models/user.py | 0 .../client/workato_api/models/validation_error.py | 0 .../models/validation_error_errors_value.py | 0 .../client/workato_api/rest.py | 0 .../client/workato_api/test/__init__.py | 0 .../client/workato_api/test/test_api_client.py | 0 .../test/test_api_client_api_collections_inner.py | 0 .../test/test_api_client_api_policies_inner.py | 0 .../test/test_api_client_create_request.py | 0 .../test/test_api_client_list_response.py | 0 .../workato_api/test/test_api_client_response.py | 0 .../client/workato_api/test/test_api_collection.py | 0 .../test/test_api_collection_create_request.py | 0 .../client/workato_api/test/test_api_endpoint.py | 0 .../client/workato_api/test/test_api_key.py | 0 .../test/test_api_key_create_request.py | 0 .../workato_api/test/test_api_key_list_response.py | 0 .../workato_api/test/test_api_key_response.py | 0 .../workato_api/test/test_api_platform_api.py | 0 .../client/workato_api/test/test_asset.py | 0 .../workato_api/test/test_asset_reference.py | 0 .../client/workato_api/test/test_connection.py | 0 .../test/test_connection_create_request.py | 0 .../test/test_connection_update_request.py | 0 .../workato_api/test/test_connections_api.py | 0 .../workato_api/test/test_connector_action.py | 0 .../workato_api/test/test_connector_version.py | 0 .../client/workato_api/test/test_connectors_api.py | 0 .../test/test_create_export_manifest_request.py | 0 .../workato_api/test/test_create_folder_request.py | 0 .../workato_api/test/test_custom_connector.py | 0 .../test/test_custom_connector_code_response.py | 0 .../test_custom_connector_code_response_data.py | 0 .../test/test_custom_connector_list_response.py | 0 .../client/workato_api/test/test_data_table.py | 0 .../workato_api/test/test_data_table_column.py | 0 .../test/test_data_table_column_request.py | 0 .../test/test_data_table_create_request.py | 0 .../test/test_data_table_create_response.py | 0 .../test/test_data_table_list_response.py | 0 .../workato_api/test/test_data_table_relation.py | 0 .../workato_api/test/test_data_tables_api.py | 0 .../test/test_delete_project403_response.py | 0 .../client/workato_api/test/test_error.py | 0 .../client/workato_api/test/test_export_api.py | 0 .../test/test_export_manifest_request.py | 0 .../test/test_export_manifest_response.py | 0 .../test/test_export_manifest_response_result.py | 0 .../client/workato_api/test/test_folder.py | 0 .../test/test_folder_assets_response.py | 0 .../test/test_folder_assets_response_result.py | 0 .../test/test_folder_creation_response.py | 0 .../client/workato_api/test/test_folders_api.py | 0 .../client/workato_api/test/test_import_results.py | 0 .../workato_api/test/test_o_auth_url_response.py | 0 .../test/test_o_auth_url_response_data.py | 0 .../client/workato_api/test/test_open_api_spec.py | 0 .../test/test_package_details_response.py | 0 ...package_details_response_recipe_status_inner.py | 0 .../workato_api/test/test_package_response.py | 0 .../client/workato_api/test/test_packages_api.py | 0 .../workato_api/test/test_picklist_request.py | 0 .../workato_api/test/test_picklist_response.py | 0 .../workato_api/test/test_platform_connector.py | 0 .../test/test_platform_connector_list_response.py | 0 .../client/workato_api/test/test_project.py | 0 .../client/workato_api/test/test_projects_api.py | 0 .../client/workato_api/test/test_properties_api.py | 0 .../client/workato_api/test/test_recipe.py | 0 .../workato_api/test/test_recipe_config_inner.py | 0 .../test/test_recipe_connection_update_request.py | 0 .../workato_api/test/test_recipe_list_response.py | 0 .../workato_api/test/test_recipe_start_response.py | 0 .../client/workato_api/test/test_recipes_api.py | 0 .../test_runtime_user_connection_create_request.py | 0 .../test/test_runtime_user_connection_response.py | 0 .../test_runtime_user_connection_response_data.py | 0 .../workato_api/test/test_success_response.py | 0 .../test/test_upsert_project_properties_request.py | 0 .../client/workato_api/test/test_user.py | 0 .../client/workato_api/test/test_users_api.py | 0 .../workato_api/test/test_validation_error.py | 0 .../test/test_validation_error_errors_value.py | 0 .../client/workato_api_README.md | 0 .../py.typed | 0 302 files changed, 1 insertion(+), 13 deletions(-) rename src/{workato_platform => workato_platform_cli}/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/api_clients.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/api_collections.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/assets.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/connections.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/connectors/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/connectors/command.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/connectors/connector_manager.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/data_tables.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/guide.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/init.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/profiles.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/projects/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/projects/command.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/projects/project_manager.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/properties.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/pull.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/push/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/push/command.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/recipes/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/recipes/command.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/recipes/validator.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/commands/workspace.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/containers.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/data/connection-data.json (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/data/picklist-data.json (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/README.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/actions.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/block-structure.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/connections-parameters.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/data-mapping.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/array-list-formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/conditions.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/date-formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/number-formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/other-formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/formulas/string-formulas.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/naming-conventions.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/recipe-deployment-workflow.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/recipe-fundamentals.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/resources/docs/triggers.md (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/config/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/config/manager.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/config/models.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/config/profiles.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/config/workspace.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/exception_handler.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/gitignore.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/ignore_patterns.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/spinner.py (100%) rename src/{workato_platform => workato_platform_cli}/cli/utils/version_checker.py (100%) rename src/{workato_platform => workato_platform_cli}/client/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/api_platform_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/connections_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/connectors_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/data_tables_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/export_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/folders_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/packages_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/projects_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/properties_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/recipes_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api/users_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api_client.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/api_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/configuration.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/APIPlatformApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClient.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClientApiCollectionsInner.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClientApiPoliciesInner.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClientCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClientListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiClientResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiCollection.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiCollectionCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiEndpoint.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiKey.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiKeyCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiKeyListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ApiKeyResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Asset.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/AssetReference.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Connection.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectionCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectionUpdateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectionsApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectorAction.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectorVersion.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ConnectorsApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CreateExportManifestRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CreateFolderRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CustomConnector.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CustomConnectorCodeResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CustomConnectorCodeResponseData.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/CustomConnectorListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTable.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableColumn.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableColumnRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableCreateResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTableRelation.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DataTablesApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/DeleteProject403Response.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Error.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ExportApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ExportManifestRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ExportManifestResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ExportManifestResponseResult.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Folder.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/FolderAssetsResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/FolderAssetsResponseResult.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/FolderCreationResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/FoldersApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ImportResults.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/OAuthUrlResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/OAuthUrlResponseData.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/OpenApiSpec.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PackageDetailsResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PackageResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PackagesApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PicklistRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PicklistResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PlatformConnector.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PlatformConnectorListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Project.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ProjectsApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/PropertiesApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/Recipe.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RecipeConfigInner.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RecipeConnectionUpdateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RecipeListResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RecipeStartResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RecipesApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RuntimeUserConnectionResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/RuntimeUserConnectionResponseData.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/SuccessResponse.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/UpsertProjectPropertiesRequest.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/User.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/UsersApi.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ValidationError.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/docs/ValidationErrorErrorsValue.md (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/exceptions.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client_api_collections_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client_api_policies_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_client_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_collection.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_collection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_endpoint.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_key.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_key_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_key_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/api_key_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/asset.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/asset_reference.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/connection.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/connection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/connection_update_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/connector_action.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/connector_version.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/create_export_manifest_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/create_folder_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/custom_connector.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/custom_connector_code_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/custom_connector_code_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/custom_connector_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_column.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_column_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_create_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/data_table_relation.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/delete_project403_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/error.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/export_manifest_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/export_manifest_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/export_manifest_response_result.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/folder.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/folder_assets_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/folder_assets_response_result.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/folder_creation_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/import_results.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/o_auth_url_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/o_auth_url_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/open_api_spec.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/package_details_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/package_details_response_recipe_status_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/package_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/picklist_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/picklist_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/platform_connector.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/platform_connector_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/project.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/recipe.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/recipe_config_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/recipe_connection_update_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/recipe_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/recipe_start_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/runtime_user_connection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/runtime_user_connection_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/runtime_user_connection_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/success_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/upsert_project_properties_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/user.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/validation_error.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/models/validation_error_errors_value.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/rest.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/__init__.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client_api_collections_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client_api_policies_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_client_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_collection.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_collection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_endpoint.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_key.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_key_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_key_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_key_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_api_platform_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_asset.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_asset_reference.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connection.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connection_update_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connections_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connector_action.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connector_version.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_connectors_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_create_export_manifest_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_create_folder_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_custom_connector.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_custom_connector_code_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_custom_connector_code_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_custom_connector_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_column.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_column_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_create_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_table_relation.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_data_tables_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_delete_project403_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_error.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_export_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_export_manifest_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_export_manifest_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_export_manifest_response_result.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_folder.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_folder_assets_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_folder_assets_response_result.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_folder_creation_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_folders_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_import_results.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_o_auth_url_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_o_auth_url_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_open_api_spec.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_package_details_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_package_details_response_recipe_status_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_package_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_packages_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_picklist_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_picklist_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_platform_connector.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_platform_connector_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_project.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_projects_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_properties_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipe.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipe_config_inner.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipe_connection_update_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipe_list_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipe_start_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_recipes_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_runtime_user_connection_create_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_runtime_user_connection_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_runtime_user_connection_response_data.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_success_response.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_upsert_project_properties_request.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_user.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_users_api.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_validation_error.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api/test/test_validation_error_errors_value.py (100%) rename src/{workato_platform => workato_platform_cli}/client/workato_api_README.md (100%) rename src/{workato_platform => workato_platform_cli}/py.typed (100%) diff --git a/pyproject.toml b/pyproject.toml index 00e7857..a810b75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,23 +226,11 @@ exclude_lines = [ [tool.hatch.version] source = "vcs" -# Use the tag-based version directly, no local version -raw-options = { local_scheme = "no-local-version" } - -[tool.hatch.build.hooks.vcs] -version-file = "src/workato_platform/_version.py" - -# Optional: Configure version pattern matching -# This ensures hatch-vcs recognizes your version tags correctly -[tool.hatch.version.raw-options] -# Match tags like 1.0.0, 1.0.0-alpha, 1.0.0-beta.1, etc. -# No "v" prefix expected -tag-regex = "^(?P\\d+\\.\\d+\\.\\d+(?:[\\-\\.]\\w+(?:\\.\\d+)?)?)$" +raw-options = { local_scheme = "no-local-version", tag_regex = "^(?P\\d+\\.\\d+\\.\\d+(?:[\\-\\.]\\w+(?:\\.\\d+)?)?)$" } [tool.hatch.build.hooks.vcs] version-file = "src/workato_platform_cli/_version.py" - [dependency-groups] dev = [ "build>=1.3.0", diff --git a/src/workato_platform/__init__.py b/src/workato_platform_cli/__init__.py similarity index 100% rename from src/workato_platform/__init__.py rename to src/workato_platform_cli/__init__.py diff --git a/src/workato_platform/cli/__init__.py b/src/workato_platform_cli/cli/__init__.py similarity index 100% rename from src/workato_platform/cli/__init__.py rename to src/workato_platform_cli/cli/__init__.py diff --git a/src/workato_platform/cli/commands/__init__.py b/src/workato_platform_cli/cli/commands/__init__.py similarity index 100% rename from src/workato_platform/cli/commands/__init__.py rename to src/workato_platform_cli/cli/commands/__init__.py diff --git a/src/workato_platform/cli/commands/api_clients.py b/src/workato_platform_cli/cli/commands/api_clients.py similarity index 100% rename from src/workato_platform/cli/commands/api_clients.py rename to src/workato_platform_cli/cli/commands/api_clients.py diff --git a/src/workato_platform/cli/commands/api_collections.py b/src/workato_platform_cli/cli/commands/api_collections.py similarity index 100% rename from src/workato_platform/cli/commands/api_collections.py rename to src/workato_platform_cli/cli/commands/api_collections.py diff --git a/src/workato_platform/cli/commands/assets.py b/src/workato_platform_cli/cli/commands/assets.py similarity index 100% rename from src/workato_platform/cli/commands/assets.py rename to src/workato_platform_cli/cli/commands/assets.py diff --git a/src/workato_platform/cli/commands/connections.py b/src/workato_platform_cli/cli/commands/connections.py similarity index 100% rename from src/workato_platform/cli/commands/connections.py rename to src/workato_platform_cli/cli/commands/connections.py diff --git a/src/workato_platform/cli/commands/connectors/__init__.py b/src/workato_platform_cli/cli/commands/connectors/__init__.py similarity index 100% rename from src/workato_platform/cli/commands/connectors/__init__.py rename to src/workato_platform_cli/cli/commands/connectors/__init__.py diff --git a/src/workato_platform/cli/commands/connectors/command.py b/src/workato_platform_cli/cli/commands/connectors/command.py similarity index 100% rename from src/workato_platform/cli/commands/connectors/command.py rename to src/workato_platform_cli/cli/commands/connectors/command.py diff --git a/src/workato_platform/cli/commands/connectors/connector_manager.py b/src/workato_platform_cli/cli/commands/connectors/connector_manager.py similarity index 100% rename from src/workato_platform/cli/commands/connectors/connector_manager.py rename to src/workato_platform_cli/cli/commands/connectors/connector_manager.py diff --git a/src/workato_platform/cli/commands/data_tables.py b/src/workato_platform_cli/cli/commands/data_tables.py similarity index 100% rename from src/workato_platform/cli/commands/data_tables.py rename to src/workato_platform_cli/cli/commands/data_tables.py diff --git a/src/workato_platform/cli/commands/guide.py b/src/workato_platform_cli/cli/commands/guide.py similarity index 100% rename from src/workato_platform/cli/commands/guide.py rename to src/workato_platform_cli/cli/commands/guide.py diff --git a/src/workato_platform/cli/commands/init.py b/src/workato_platform_cli/cli/commands/init.py similarity index 100% rename from src/workato_platform/cli/commands/init.py rename to src/workato_platform_cli/cli/commands/init.py diff --git a/src/workato_platform/cli/commands/profiles.py b/src/workato_platform_cli/cli/commands/profiles.py similarity index 100% rename from src/workato_platform/cli/commands/profiles.py rename to src/workato_platform_cli/cli/commands/profiles.py diff --git a/src/workato_platform/cli/commands/projects/__init__.py b/src/workato_platform_cli/cli/commands/projects/__init__.py similarity index 100% rename from src/workato_platform/cli/commands/projects/__init__.py rename to src/workato_platform_cli/cli/commands/projects/__init__.py diff --git a/src/workato_platform/cli/commands/projects/command.py b/src/workato_platform_cli/cli/commands/projects/command.py similarity index 100% rename from src/workato_platform/cli/commands/projects/command.py rename to src/workato_platform_cli/cli/commands/projects/command.py diff --git a/src/workato_platform/cli/commands/projects/project_manager.py b/src/workato_platform_cli/cli/commands/projects/project_manager.py similarity index 100% rename from src/workato_platform/cli/commands/projects/project_manager.py rename to src/workato_platform_cli/cli/commands/projects/project_manager.py diff --git a/src/workato_platform/cli/commands/properties.py b/src/workato_platform_cli/cli/commands/properties.py similarity index 100% rename from src/workato_platform/cli/commands/properties.py rename to src/workato_platform_cli/cli/commands/properties.py diff --git a/src/workato_platform/cli/commands/pull.py b/src/workato_platform_cli/cli/commands/pull.py similarity index 100% rename from src/workato_platform/cli/commands/pull.py rename to src/workato_platform_cli/cli/commands/pull.py diff --git a/src/workato_platform/cli/commands/push/__init__.py b/src/workato_platform_cli/cli/commands/push/__init__.py similarity index 100% rename from src/workato_platform/cli/commands/push/__init__.py rename to src/workato_platform_cli/cli/commands/push/__init__.py diff --git a/src/workato_platform/cli/commands/push/command.py b/src/workato_platform_cli/cli/commands/push/command.py similarity index 100% rename from src/workato_platform/cli/commands/push/command.py rename to src/workato_platform_cli/cli/commands/push/command.py diff --git a/src/workato_platform/cli/commands/recipes/__init__.py b/src/workato_platform_cli/cli/commands/recipes/__init__.py similarity index 100% rename from src/workato_platform/cli/commands/recipes/__init__.py rename to src/workato_platform_cli/cli/commands/recipes/__init__.py diff --git a/src/workato_platform/cli/commands/recipes/command.py b/src/workato_platform_cli/cli/commands/recipes/command.py similarity index 100% rename from src/workato_platform/cli/commands/recipes/command.py rename to src/workato_platform_cli/cli/commands/recipes/command.py diff --git a/src/workato_platform/cli/commands/recipes/validator.py b/src/workato_platform_cli/cli/commands/recipes/validator.py similarity index 100% rename from src/workato_platform/cli/commands/recipes/validator.py rename to src/workato_platform_cli/cli/commands/recipes/validator.py diff --git a/src/workato_platform/cli/commands/workspace.py b/src/workato_platform_cli/cli/commands/workspace.py similarity index 100% rename from src/workato_platform/cli/commands/workspace.py rename to src/workato_platform_cli/cli/commands/workspace.py diff --git a/src/workato_platform/cli/containers.py b/src/workato_platform_cli/cli/containers.py similarity index 100% rename from src/workato_platform/cli/containers.py rename to src/workato_platform_cli/cli/containers.py diff --git a/src/workato_platform/cli/resources/data/connection-data.json b/src/workato_platform_cli/cli/resources/data/connection-data.json similarity index 100% rename from src/workato_platform/cli/resources/data/connection-data.json rename to src/workato_platform_cli/cli/resources/data/connection-data.json diff --git a/src/workato_platform/cli/resources/data/picklist-data.json b/src/workato_platform_cli/cli/resources/data/picklist-data.json similarity index 100% rename from src/workato_platform/cli/resources/data/picklist-data.json rename to src/workato_platform_cli/cli/resources/data/picklist-data.json diff --git a/src/workato_platform/cli/resources/docs/README.md b/src/workato_platform_cli/cli/resources/docs/README.md similarity index 100% rename from src/workato_platform/cli/resources/docs/README.md rename to src/workato_platform_cli/cli/resources/docs/README.md diff --git a/src/workato_platform/cli/resources/docs/actions.md b/src/workato_platform_cli/cli/resources/docs/actions.md similarity index 100% rename from src/workato_platform/cli/resources/docs/actions.md rename to src/workato_platform_cli/cli/resources/docs/actions.md diff --git a/src/workato_platform/cli/resources/docs/block-structure.md b/src/workato_platform_cli/cli/resources/docs/block-structure.md similarity index 100% rename from src/workato_platform/cli/resources/docs/block-structure.md rename to src/workato_platform_cli/cli/resources/docs/block-structure.md diff --git a/src/workato_platform/cli/resources/docs/connections-parameters.md b/src/workato_platform_cli/cli/resources/docs/connections-parameters.md similarity index 100% rename from src/workato_platform/cli/resources/docs/connections-parameters.md rename to src/workato_platform_cli/cli/resources/docs/connections-parameters.md diff --git a/src/workato_platform/cli/resources/docs/data-mapping.md b/src/workato_platform_cli/cli/resources/docs/data-mapping.md similarity index 100% rename from src/workato_platform/cli/resources/docs/data-mapping.md rename to src/workato_platform_cli/cli/resources/docs/data-mapping.md diff --git a/src/workato_platform/cli/resources/docs/formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas.md diff --git a/src/workato_platform/cli/resources/docs/formulas/array-list-formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas/array-list-formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/array-list-formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas/array-list-formulas.md diff --git a/src/workato_platform/cli/resources/docs/formulas/conditions.md b/src/workato_platform_cli/cli/resources/docs/formulas/conditions.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/conditions.md rename to src/workato_platform_cli/cli/resources/docs/formulas/conditions.md diff --git a/src/workato_platform/cli/resources/docs/formulas/date-formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas/date-formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/date-formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas/date-formulas.md diff --git a/src/workato_platform/cli/resources/docs/formulas/number-formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas/number-formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/number-formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas/number-formulas.md diff --git a/src/workato_platform/cli/resources/docs/formulas/other-formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas/other-formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/other-formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas/other-formulas.md diff --git a/src/workato_platform/cli/resources/docs/formulas/string-formulas.md b/src/workato_platform_cli/cli/resources/docs/formulas/string-formulas.md similarity index 100% rename from src/workato_platform/cli/resources/docs/formulas/string-formulas.md rename to src/workato_platform_cli/cli/resources/docs/formulas/string-formulas.md diff --git a/src/workato_platform/cli/resources/docs/naming-conventions.md b/src/workato_platform_cli/cli/resources/docs/naming-conventions.md similarity index 100% rename from src/workato_platform/cli/resources/docs/naming-conventions.md rename to src/workato_platform_cli/cli/resources/docs/naming-conventions.md diff --git a/src/workato_platform/cli/resources/docs/recipe-deployment-workflow.md b/src/workato_platform_cli/cli/resources/docs/recipe-deployment-workflow.md similarity index 100% rename from src/workato_platform/cli/resources/docs/recipe-deployment-workflow.md rename to src/workato_platform_cli/cli/resources/docs/recipe-deployment-workflow.md diff --git a/src/workato_platform/cli/resources/docs/recipe-fundamentals.md b/src/workato_platform_cli/cli/resources/docs/recipe-fundamentals.md similarity index 100% rename from src/workato_platform/cli/resources/docs/recipe-fundamentals.md rename to src/workato_platform_cli/cli/resources/docs/recipe-fundamentals.md diff --git a/src/workato_platform/cli/resources/docs/triggers.md b/src/workato_platform_cli/cli/resources/docs/triggers.md similarity index 100% rename from src/workato_platform/cli/resources/docs/triggers.md rename to src/workato_platform_cli/cli/resources/docs/triggers.md diff --git a/src/workato_platform/cli/utils/__init__.py b/src/workato_platform_cli/cli/utils/__init__.py similarity index 100% rename from src/workato_platform/cli/utils/__init__.py rename to src/workato_platform_cli/cli/utils/__init__.py diff --git a/src/workato_platform/cli/utils/config/__init__.py b/src/workato_platform_cli/cli/utils/config/__init__.py similarity index 100% rename from src/workato_platform/cli/utils/config/__init__.py rename to src/workato_platform_cli/cli/utils/config/__init__.py diff --git a/src/workato_platform/cli/utils/config/manager.py b/src/workato_platform_cli/cli/utils/config/manager.py similarity index 100% rename from src/workato_platform/cli/utils/config/manager.py rename to src/workato_platform_cli/cli/utils/config/manager.py diff --git a/src/workato_platform/cli/utils/config/models.py b/src/workato_platform_cli/cli/utils/config/models.py similarity index 100% rename from src/workato_platform/cli/utils/config/models.py rename to src/workato_platform_cli/cli/utils/config/models.py diff --git a/src/workato_platform/cli/utils/config/profiles.py b/src/workato_platform_cli/cli/utils/config/profiles.py similarity index 100% rename from src/workato_platform/cli/utils/config/profiles.py rename to src/workato_platform_cli/cli/utils/config/profiles.py diff --git a/src/workato_platform/cli/utils/config/workspace.py b/src/workato_platform_cli/cli/utils/config/workspace.py similarity index 100% rename from src/workato_platform/cli/utils/config/workspace.py rename to src/workato_platform_cli/cli/utils/config/workspace.py diff --git a/src/workato_platform/cli/utils/exception_handler.py b/src/workato_platform_cli/cli/utils/exception_handler.py similarity index 100% rename from src/workato_platform/cli/utils/exception_handler.py rename to src/workato_platform_cli/cli/utils/exception_handler.py diff --git a/src/workato_platform/cli/utils/gitignore.py b/src/workato_platform_cli/cli/utils/gitignore.py similarity index 100% rename from src/workato_platform/cli/utils/gitignore.py rename to src/workato_platform_cli/cli/utils/gitignore.py diff --git a/src/workato_platform/cli/utils/ignore_patterns.py b/src/workato_platform_cli/cli/utils/ignore_patterns.py similarity index 100% rename from src/workato_platform/cli/utils/ignore_patterns.py rename to src/workato_platform_cli/cli/utils/ignore_patterns.py diff --git a/src/workato_platform/cli/utils/spinner.py b/src/workato_platform_cli/cli/utils/spinner.py similarity index 100% rename from src/workato_platform/cli/utils/spinner.py rename to src/workato_platform_cli/cli/utils/spinner.py diff --git a/src/workato_platform/cli/utils/version_checker.py b/src/workato_platform_cli/cli/utils/version_checker.py similarity index 100% rename from src/workato_platform/cli/utils/version_checker.py rename to src/workato_platform_cli/cli/utils/version_checker.py diff --git a/src/workato_platform/client/__init__.py b/src/workato_platform_cli/client/__init__.py similarity index 100% rename from src/workato_platform/client/__init__.py rename to src/workato_platform_cli/client/__init__.py diff --git a/src/workato_platform/client/workato_api/__init__.py b/src/workato_platform_cli/client/workato_api/__init__.py similarity index 100% rename from src/workato_platform/client/workato_api/__init__.py rename to src/workato_platform_cli/client/workato_api/__init__.py diff --git a/src/workato_platform/client/workato_api/api/__init__.py b/src/workato_platform_cli/client/workato_api/api/__init__.py similarity index 100% rename from src/workato_platform/client/workato_api/api/__init__.py rename to src/workato_platform_cli/client/workato_api/api/__init__.py diff --git a/src/workato_platform/client/workato_api/api/api_platform_api.py b/src/workato_platform_cli/client/workato_api/api/api_platform_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/api_platform_api.py rename to src/workato_platform_cli/client/workato_api/api/api_platform_api.py diff --git a/src/workato_platform/client/workato_api/api/connections_api.py b/src/workato_platform_cli/client/workato_api/api/connections_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/connections_api.py rename to src/workato_platform_cli/client/workato_api/api/connections_api.py diff --git a/src/workato_platform/client/workato_api/api/connectors_api.py b/src/workato_platform_cli/client/workato_api/api/connectors_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/connectors_api.py rename to src/workato_platform_cli/client/workato_api/api/connectors_api.py diff --git a/src/workato_platform/client/workato_api/api/data_tables_api.py b/src/workato_platform_cli/client/workato_api/api/data_tables_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/data_tables_api.py rename to src/workato_platform_cli/client/workato_api/api/data_tables_api.py diff --git a/src/workato_platform/client/workato_api/api/export_api.py b/src/workato_platform_cli/client/workato_api/api/export_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/export_api.py rename to src/workato_platform_cli/client/workato_api/api/export_api.py diff --git a/src/workato_platform/client/workato_api/api/folders_api.py b/src/workato_platform_cli/client/workato_api/api/folders_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/folders_api.py rename to src/workato_platform_cli/client/workato_api/api/folders_api.py diff --git a/src/workato_platform/client/workato_api/api/packages_api.py b/src/workato_platform_cli/client/workato_api/api/packages_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/packages_api.py rename to src/workato_platform_cli/client/workato_api/api/packages_api.py diff --git a/src/workato_platform/client/workato_api/api/projects_api.py b/src/workato_platform_cli/client/workato_api/api/projects_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/projects_api.py rename to src/workato_platform_cli/client/workato_api/api/projects_api.py diff --git a/src/workato_platform/client/workato_api/api/properties_api.py b/src/workato_platform_cli/client/workato_api/api/properties_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/properties_api.py rename to src/workato_platform_cli/client/workato_api/api/properties_api.py diff --git a/src/workato_platform/client/workato_api/api/recipes_api.py b/src/workato_platform_cli/client/workato_api/api/recipes_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/recipes_api.py rename to src/workato_platform_cli/client/workato_api/api/recipes_api.py diff --git a/src/workato_platform/client/workato_api/api/users_api.py b/src/workato_platform_cli/client/workato_api/api/users_api.py similarity index 100% rename from src/workato_platform/client/workato_api/api/users_api.py rename to src/workato_platform_cli/client/workato_api/api/users_api.py diff --git a/src/workato_platform/client/workato_api/api_client.py b/src/workato_platform_cli/client/workato_api/api_client.py similarity index 100% rename from src/workato_platform/client/workato_api/api_client.py rename to src/workato_platform_cli/client/workato_api/api_client.py diff --git a/src/workato_platform/client/workato_api/api_response.py b/src/workato_platform_cli/client/workato_api/api_response.py similarity index 100% rename from src/workato_platform/client/workato_api/api_response.py rename to src/workato_platform_cli/client/workato_api/api_response.py diff --git a/src/workato_platform/client/workato_api/configuration.py b/src/workato_platform_cli/client/workato_api/configuration.py similarity index 100% rename from src/workato_platform/client/workato_api/configuration.py rename to src/workato_platform_cli/client/workato_api/configuration.py diff --git a/src/workato_platform/client/workato_api/docs/APIPlatformApi.md b/src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/APIPlatformApi.md rename to src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClient.md b/src/workato_platform_cli/client/workato_api/docs/ApiClient.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClient.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClient.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClientListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/ApiClientResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiClientResponse.md rename to src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md diff --git a/src/workato_platform/client/workato_api/docs/ApiCollection.md b/src/workato_platform_cli/client/workato_api/docs/ApiCollection.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiCollection.md rename to src/workato_platform_cli/client/workato_api/docs/ApiCollection.md diff --git a/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ApiEndpoint.md b/src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiEndpoint.md rename to src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md diff --git a/src/workato_platform/client/workato_api/docs/ApiKey.md b/src/workato_platform_cli/client/workato_api/docs/ApiKey.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiKey.md rename to src/workato_platform_cli/client/workato_api/docs/ApiKey.md diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ApiKeyResponse.md rename to src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md diff --git a/src/workato_platform/client/workato_api/docs/Asset.md b/src/workato_platform_cli/client/workato_api/docs/Asset.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Asset.md rename to src/workato_platform_cli/client/workato_api/docs/Asset.md diff --git a/src/workato_platform/client/workato_api/docs/AssetReference.md b/src/workato_platform_cli/client/workato_api/docs/AssetReference.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/AssetReference.md rename to src/workato_platform_cli/client/workato_api/docs/AssetReference.md diff --git a/src/workato_platform/client/workato_api/docs/Connection.md b/src/workato_platform_cli/client/workato_api/docs/Connection.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Connection.md rename to src/workato_platform_cli/client/workato_api/docs/Connection.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectionsApi.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectionsApi.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectorAction.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectorAction.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectorVersion.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectorVersion.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md diff --git a/src/workato_platform/client/workato_api/docs/ConnectorsApi.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ConnectorsApi.md rename to src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md diff --git a/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md b/src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md rename to src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md diff --git a/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md b/src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CreateFolderRequest.md rename to src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md diff --git a/src/workato_platform/client/workato_api/docs/CustomConnector.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnector.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CustomConnector.md rename to src/workato_platform_cli/client/workato_api/docs/CustomConnector.md diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md rename to src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md rename to src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/DataTable.md b/src/workato_platform_cli/client/workato_api/docs/DataTable.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTable.md rename to src/workato_platform_cli/client/workato_api/docs/DataTable.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumn.md b/src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableColumn.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md b/src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableListResponse.md b/src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/DataTableRelation.md b/src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTableRelation.md rename to src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md diff --git a/src/workato_platform/client/workato_api/docs/DataTablesApi.md b/src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DataTablesApi.md rename to src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md diff --git a/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md b/src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/DeleteProject403Response.md rename to src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md diff --git a/src/workato_platform/client/workato_api/docs/Error.md b/src/workato_platform_cli/client/workato_api/docs/Error.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Error.md rename to src/workato_platform_cli/client/workato_api/docs/Error.md diff --git a/src/workato_platform/client/workato_api/docs/ExportApi.md b/src/workato_platform_cli/client/workato_api/docs/ExportApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ExportApi.md rename to src/workato_platform_cli/client/workato_api/docs/ExportApi.md diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ExportManifestRequest.md rename to src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ExportManifestResponse.md rename to src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md rename to src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md diff --git a/src/workato_platform/client/workato_api/docs/Folder.md b/src/workato_platform_cli/client/workato_api/docs/Folder.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Folder.md rename to src/workato_platform_cli/client/workato_api/docs/Folder.md diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md rename to src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md rename to src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md diff --git a/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md b/src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/FolderCreationResponse.md rename to src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md diff --git a/src/workato_platform/client/workato_api/docs/FoldersApi.md b/src/workato_platform_cli/client/workato_api/docs/FoldersApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/FoldersApi.md rename to src/workato_platform_cli/client/workato_api/docs/FoldersApi.md diff --git a/src/workato_platform/client/workato_api/docs/ImportResults.md b/src/workato_platform_cli/client/workato_api/docs/ImportResults.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ImportResults.md rename to src/workato_platform_cli/client/workato_api/docs/ImportResults.md diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md rename to src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md rename to src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md diff --git a/src/workato_platform/client/workato_api/docs/OpenApiSpec.md b/src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/OpenApiSpec.md rename to src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md rename to src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md rename to src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md diff --git a/src/workato_platform/client/workato_api/docs/PackageResponse.md b/src/workato_platform_cli/client/workato_api/docs/PackageResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PackageResponse.md rename to src/workato_platform_cli/client/workato_api/docs/PackageResponse.md diff --git a/src/workato_platform/client/workato_api/docs/PackagesApi.md b/src/workato_platform_cli/client/workato_api/docs/PackagesApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PackagesApi.md rename to src/workato_platform_cli/client/workato_api/docs/PackagesApi.md diff --git a/src/workato_platform/client/workato_api/docs/PicklistRequest.md b/src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PicklistRequest.md rename to src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md diff --git a/src/workato_platform/client/workato_api/docs/PicklistResponse.md b/src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PicklistResponse.md rename to src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnector.md b/src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PlatformConnector.md rename to src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md b/src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/Project.md b/src/workato_platform_cli/client/workato_api/docs/Project.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Project.md rename to src/workato_platform_cli/client/workato_api/docs/Project.md diff --git a/src/workato_platform/client/workato_api/docs/ProjectsApi.md b/src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ProjectsApi.md rename to src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md diff --git a/src/workato_platform/client/workato_api/docs/PropertiesApi.md b/src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/PropertiesApi.md rename to src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md diff --git a/src/workato_platform/client/workato_api/docs/Recipe.md b/src/workato_platform_cli/client/workato_api/docs/Recipe.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/Recipe.md rename to src/workato_platform_cli/client/workato_api/docs/Recipe.md diff --git a/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md b/src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RecipeConfigInner.md rename to src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md diff --git a/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md b/src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/RecipeListResponse.md b/src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RecipeListResponse.md rename to src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md diff --git a/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md b/src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RecipeStartResponse.md rename to src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md diff --git a/src/workato_platform/client/workato_api/docs/RecipesApi.md b/src/workato_platform_cli/client/workato_api/docs/RecipesApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RecipesApi.md rename to src/workato_platform_cli/client/workato_api/docs/RecipesApi.md diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md rename to src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md rename to src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md rename to src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md diff --git a/src/workato_platform/client/workato_api/docs/SuccessResponse.md b/src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/SuccessResponse.md rename to src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md diff --git a/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md b/src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md rename to src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md diff --git a/src/workato_platform/client/workato_api/docs/User.md b/src/workato_platform_cli/client/workato_api/docs/User.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/User.md rename to src/workato_platform_cli/client/workato_api/docs/User.md diff --git a/src/workato_platform/client/workato_api/docs/UsersApi.md b/src/workato_platform_cli/client/workato_api/docs/UsersApi.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/UsersApi.md rename to src/workato_platform_cli/client/workato_api/docs/UsersApi.md diff --git a/src/workato_platform/client/workato_api/docs/ValidationError.md b/src/workato_platform_cli/client/workato_api/docs/ValidationError.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ValidationError.md rename to src/workato_platform_cli/client/workato_api/docs/ValidationError.md diff --git a/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md b/src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md similarity index 100% rename from src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md rename to src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md diff --git a/src/workato_platform/client/workato_api/exceptions.py b/src/workato_platform_cli/client/workato_api/exceptions.py similarity index 100% rename from src/workato_platform/client/workato_api/exceptions.py rename to src/workato_platform_cli/client/workato_api/exceptions.py diff --git a/src/workato_platform/client/workato_api/models/__init__.py b/src/workato_platform_cli/client/workato_api/models/__init__.py similarity index 100% rename from src/workato_platform/client/workato_api/models/__init__.py rename to src/workato_platform_cli/client/workato_api/models/__init__.py diff --git a/src/workato_platform/client/workato_api/models/api_client.py b/src/workato_platform_cli/client/workato_api/models/api_client.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client.py rename to src/workato_platform_cli/client/workato_api/models/api_client.py diff --git a/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py b/src/workato_platform_cli/client/workato_api/models/api_client_api_collections_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py rename to src/workato_platform_cli/client/workato_api/models/api_client_api_collections_inner.py diff --git a/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py b/src/workato_platform_cli/client/workato_api/models/api_client_api_policies_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py rename to src/workato_platform_cli/client/workato_api/models/api_client_api_policies_inner.py diff --git a/src/workato_platform/client/workato_api/models/api_client_create_request.py b/src/workato_platform_cli/client/workato_api/models/api_client_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client_create_request.py rename to src/workato_platform_cli/client/workato_api/models/api_client_create_request.py diff --git a/src/workato_platform/client/workato_api/models/api_client_list_response.py b/src/workato_platform_cli/client/workato_api/models/api_client_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client_list_response.py rename to src/workato_platform_cli/client/workato_api/models/api_client_list_response.py diff --git a/src/workato_platform/client/workato_api/models/api_client_response.py b/src/workato_platform_cli/client/workato_api/models/api_client_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_client_response.py rename to src/workato_platform_cli/client/workato_api/models/api_client_response.py diff --git a/src/workato_platform/client/workato_api/models/api_collection.py b/src/workato_platform_cli/client/workato_api/models/api_collection.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_collection.py rename to src/workato_platform_cli/client/workato_api/models/api_collection.py diff --git a/src/workato_platform/client/workato_api/models/api_collection_create_request.py b/src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_collection_create_request.py rename to src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py diff --git a/src/workato_platform/client/workato_api/models/api_endpoint.py b/src/workato_platform_cli/client/workato_api/models/api_endpoint.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_endpoint.py rename to src/workato_platform_cli/client/workato_api/models/api_endpoint.py diff --git a/src/workato_platform/client/workato_api/models/api_key.py b/src/workato_platform_cli/client/workato_api/models/api_key.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_key.py rename to src/workato_platform_cli/client/workato_api/models/api_key.py diff --git a/src/workato_platform/client/workato_api/models/api_key_create_request.py b/src/workato_platform_cli/client/workato_api/models/api_key_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_key_create_request.py rename to src/workato_platform_cli/client/workato_api/models/api_key_create_request.py diff --git a/src/workato_platform/client/workato_api/models/api_key_list_response.py b/src/workato_platform_cli/client/workato_api/models/api_key_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_key_list_response.py rename to src/workato_platform_cli/client/workato_api/models/api_key_list_response.py diff --git a/src/workato_platform/client/workato_api/models/api_key_response.py b/src/workato_platform_cli/client/workato_api/models/api_key_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/api_key_response.py rename to src/workato_platform_cli/client/workato_api/models/api_key_response.py diff --git a/src/workato_platform/client/workato_api/models/asset.py b/src/workato_platform_cli/client/workato_api/models/asset.py similarity index 100% rename from src/workato_platform/client/workato_api/models/asset.py rename to src/workato_platform_cli/client/workato_api/models/asset.py diff --git a/src/workato_platform/client/workato_api/models/asset_reference.py b/src/workato_platform_cli/client/workato_api/models/asset_reference.py similarity index 100% rename from src/workato_platform/client/workato_api/models/asset_reference.py rename to src/workato_platform_cli/client/workato_api/models/asset_reference.py diff --git a/src/workato_platform/client/workato_api/models/connection.py b/src/workato_platform_cli/client/workato_api/models/connection.py similarity index 100% rename from src/workato_platform/client/workato_api/models/connection.py rename to src/workato_platform_cli/client/workato_api/models/connection.py diff --git a/src/workato_platform/client/workato_api/models/connection_create_request.py b/src/workato_platform_cli/client/workato_api/models/connection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/connection_create_request.py rename to src/workato_platform_cli/client/workato_api/models/connection_create_request.py diff --git a/src/workato_platform/client/workato_api/models/connection_update_request.py b/src/workato_platform_cli/client/workato_api/models/connection_update_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/connection_update_request.py rename to src/workato_platform_cli/client/workato_api/models/connection_update_request.py diff --git a/src/workato_platform/client/workato_api/models/connector_action.py b/src/workato_platform_cli/client/workato_api/models/connector_action.py similarity index 100% rename from src/workato_platform/client/workato_api/models/connector_action.py rename to src/workato_platform_cli/client/workato_api/models/connector_action.py diff --git a/src/workato_platform/client/workato_api/models/connector_version.py b/src/workato_platform_cli/client/workato_api/models/connector_version.py similarity index 100% rename from src/workato_platform/client/workato_api/models/connector_version.py rename to src/workato_platform_cli/client/workato_api/models/connector_version.py diff --git a/src/workato_platform/client/workato_api/models/create_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/create_export_manifest_request.py rename to src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py diff --git a/src/workato_platform/client/workato_api/models/create_folder_request.py b/src/workato_platform_cli/client/workato_api/models/create_folder_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/create_folder_request.py rename to src/workato_platform_cli/client/workato_api/models/create_folder_request.py diff --git a/src/workato_platform/client/workato_api/models/custom_connector.py b/src/workato_platform_cli/client/workato_api/models/custom_connector.py similarity index 100% rename from src/workato_platform/client/workato_api/models/custom_connector.py rename to src/workato_platform_cli/client/workato_api/models/custom_connector.py diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response.py b/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/custom_connector_code_response.py rename to src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py b/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py rename to src/workato_platform_cli/client/workato_api/models/custom_connector_code_response_data.py diff --git a/src/workato_platform/client/workato_api/models/custom_connector_list_response.py b/src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/custom_connector_list_response.py rename to src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py diff --git a/src/workato_platform/client/workato_api/models/data_table.py b/src/workato_platform_cli/client/workato_api/models/data_table.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table.py rename to src/workato_platform_cli/client/workato_api/models/data_table.py diff --git a/src/workato_platform/client/workato_api/models/data_table_column.py b/src/workato_platform_cli/client/workato_api/models/data_table_column.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_column.py rename to src/workato_platform_cli/client/workato_api/models/data_table_column.py diff --git a/src/workato_platform/client/workato_api/models/data_table_column_request.py b/src/workato_platform_cli/client/workato_api/models/data_table_column_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_column_request.py rename to src/workato_platform_cli/client/workato_api/models/data_table_column_request.py diff --git a/src/workato_platform/client/workato_api/models/data_table_create_request.py b/src/workato_platform_cli/client/workato_api/models/data_table_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_create_request.py rename to src/workato_platform_cli/client/workato_api/models/data_table_create_request.py diff --git a/src/workato_platform/client/workato_api/models/data_table_create_response.py b/src/workato_platform_cli/client/workato_api/models/data_table_create_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_create_response.py rename to src/workato_platform_cli/client/workato_api/models/data_table_create_response.py diff --git a/src/workato_platform/client/workato_api/models/data_table_list_response.py b/src/workato_platform_cli/client/workato_api/models/data_table_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_list_response.py rename to src/workato_platform_cli/client/workato_api/models/data_table_list_response.py diff --git a/src/workato_platform/client/workato_api/models/data_table_relation.py b/src/workato_platform_cli/client/workato_api/models/data_table_relation.py similarity index 100% rename from src/workato_platform/client/workato_api/models/data_table_relation.py rename to src/workato_platform_cli/client/workato_api/models/data_table_relation.py diff --git a/src/workato_platform/client/workato_api/models/delete_project403_response.py b/src/workato_platform_cli/client/workato_api/models/delete_project403_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/delete_project403_response.py rename to src/workato_platform_cli/client/workato_api/models/delete_project403_response.py diff --git a/src/workato_platform/client/workato_api/models/error.py b/src/workato_platform_cli/client/workato_api/models/error.py similarity index 100% rename from src/workato_platform/client/workato_api/models/error.py rename to src/workato_platform_cli/client/workato_api/models/error.py diff --git a/src/workato_platform/client/workato_api/models/export_manifest_request.py b/src/workato_platform_cli/client/workato_api/models/export_manifest_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/export_manifest_request.py rename to src/workato_platform_cli/client/workato_api/models/export_manifest_request.py diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response.py b/src/workato_platform_cli/client/workato_api/models/export_manifest_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/export_manifest_response.py rename to src/workato_platform_cli/client/workato_api/models/export_manifest_response.py diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response_result.py b/src/workato_platform_cli/client/workato_api/models/export_manifest_response_result.py similarity index 100% rename from src/workato_platform/client/workato_api/models/export_manifest_response_result.py rename to src/workato_platform_cli/client/workato_api/models/export_manifest_response_result.py diff --git a/src/workato_platform/client/workato_api/models/folder.py b/src/workato_platform_cli/client/workato_api/models/folder.py similarity index 100% rename from src/workato_platform/client/workato_api/models/folder.py rename to src/workato_platform_cli/client/workato_api/models/folder.py diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response.py b/src/workato_platform_cli/client/workato_api/models/folder_assets_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/folder_assets_response.py rename to src/workato_platform_cli/client/workato_api/models/folder_assets_response.py diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response_result.py b/src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py similarity index 100% rename from src/workato_platform/client/workato_api/models/folder_assets_response_result.py rename to src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py diff --git a/src/workato_platform/client/workato_api/models/folder_creation_response.py b/src/workato_platform_cli/client/workato_api/models/folder_creation_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/folder_creation_response.py rename to src/workato_platform_cli/client/workato_api/models/folder_creation_response.py diff --git a/src/workato_platform/client/workato_api/models/import_results.py b/src/workato_platform_cli/client/workato_api/models/import_results.py similarity index 100% rename from src/workato_platform/client/workato_api/models/import_results.py rename to src/workato_platform_cli/client/workato_api/models/import_results.py diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response.py b/src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/o_auth_url_response.py rename to src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py b/src/workato_platform_cli/client/workato_api/models/o_auth_url_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/models/o_auth_url_response_data.py rename to src/workato_platform_cli/client/workato_api/models/o_auth_url_response_data.py diff --git a/src/workato_platform/client/workato_api/models/open_api_spec.py b/src/workato_platform_cli/client/workato_api/models/open_api_spec.py similarity index 100% rename from src/workato_platform/client/workato_api/models/open_api_spec.py rename to src/workato_platform_cli/client/workato_api/models/open_api_spec.py diff --git a/src/workato_platform/client/workato_api/models/package_details_response.py b/src/workato_platform_cli/client/workato_api/models/package_details_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/package_details_response.py rename to src/workato_platform_cli/client/workato_api/models/package_details_response.py diff --git a/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py b/src/workato_platform_cli/client/workato_api/models/package_details_response_recipe_status_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py rename to src/workato_platform_cli/client/workato_api/models/package_details_response_recipe_status_inner.py diff --git a/src/workato_platform/client/workato_api/models/package_response.py b/src/workato_platform_cli/client/workato_api/models/package_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/package_response.py rename to src/workato_platform_cli/client/workato_api/models/package_response.py diff --git a/src/workato_platform/client/workato_api/models/picklist_request.py b/src/workato_platform_cli/client/workato_api/models/picklist_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/picklist_request.py rename to src/workato_platform_cli/client/workato_api/models/picklist_request.py diff --git a/src/workato_platform/client/workato_api/models/picklist_response.py b/src/workato_platform_cli/client/workato_api/models/picklist_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/picklist_response.py rename to src/workato_platform_cli/client/workato_api/models/picklist_response.py diff --git a/src/workato_platform/client/workato_api/models/platform_connector.py b/src/workato_platform_cli/client/workato_api/models/platform_connector.py similarity index 100% rename from src/workato_platform/client/workato_api/models/platform_connector.py rename to src/workato_platform_cli/client/workato_api/models/platform_connector.py diff --git a/src/workato_platform/client/workato_api/models/platform_connector_list_response.py b/src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/platform_connector_list_response.py rename to src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py diff --git a/src/workato_platform/client/workato_api/models/project.py b/src/workato_platform_cli/client/workato_api/models/project.py similarity index 100% rename from src/workato_platform/client/workato_api/models/project.py rename to src/workato_platform_cli/client/workato_api/models/project.py diff --git a/src/workato_platform/client/workato_api/models/recipe.py b/src/workato_platform_cli/client/workato_api/models/recipe.py similarity index 100% rename from src/workato_platform/client/workato_api/models/recipe.py rename to src/workato_platform_cli/client/workato_api/models/recipe.py diff --git a/src/workato_platform/client/workato_api/models/recipe_config_inner.py b/src/workato_platform_cli/client/workato_api/models/recipe_config_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/models/recipe_config_inner.py rename to src/workato_platform_cli/client/workato_api/models/recipe_config_inner.py diff --git a/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py b/src/workato_platform_cli/client/workato_api/models/recipe_connection_update_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/recipe_connection_update_request.py rename to src/workato_platform_cli/client/workato_api/models/recipe_connection_update_request.py diff --git a/src/workato_platform/client/workato_api/models/recipe_list_response.py b/src/workato_platform_cli/client/workato_api/models/recipe_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/recipe_list_response.py rename to src/workato_platform_cli/client/workato_api/models/recipe_list_response.py diff --git a/src/workato_platform/client/workato_api/models/recipe_start_response.py b/src/workato_platform_cli/client/workato_api/models/recipe_start_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/recipe_start_response.py rename to src/workato_platform_cli/client/workato_api/models/recipe_start_response.py diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py b/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py rename to src/workato_platform_cli/client/workato_api/models/runtime_user_connection_create_request.py diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py b/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/runtime_user_connection_response.py rename to src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py b/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py rename to src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response_data.py diff --git a/src/workato_platform/client/workato_api/models/success_response.py b/src/workato_platform_cli/client/workato_api/models/success_response.py similarity index 100% rename from src/workato_platform/client/workato_api/models/success_response.py rename to src/workato_platform_cli/client/workato_api/models/success_response.py diff --git a/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py b/src/workato_platform_cli/client/workato_api/models/upsert_project_properties_request.py similarity index 100% rename from src/workato_platform/client/workato_api/models/upsert_project_properties_request.py rename to src/workato_platform_cli/client/workato_api/models/upsert_project_properties_request.py diff --git a/src/workato_platform/client/workato_api/models/user.py b/src/workato_platform_cli/client/workato_api/models/user.py similarity index 100% rename from src/workato_platform/client/workato_api/models/user.py rename to src/workato_platform_cli/client/workato_api/models/user.py diff --git a/src/workato_platform/client/workato_api/models/validation_error.py b/src/workato_platform_cli/client/workato_api/models/validation_error.py similarity index 100% rename from src/workato_platform/client/workato_api/models/validation_error.py rename to src/workato_platform_cli/client/workato_api/models/validation_error.py diff --git a/src/workato_platform/client/workato_api/models/validation_error_errors_value.py b/src/workato_platform_cli/client/workato_api/models/validation_error_errors_value.py similarity index 100% rename from src/workato_platform/client/workato_api/models/validation_error_errors_value.py rename to src/workato_platform_cli/client/workato_api/models/validation_error_errors_value.py diff --git a/src/workato_platform/client/workato_api/rest.py b/src/workato_platform_cli/client/workato_api/rest.py similarity index 100% rename from src/workato_platform/client/workato_api/rest.py rename to src/workato_platform_cli/client/workato_api/rest.py diff --git a/src/workato_platform/client/workato_api/test/__init__.py b/src/workato_platform_cli/client/workato_api/test/__init__.py similarity index 100% rename from src/workato_platform/client/workato_api/test/__init__.py rename to src/workato_platform_cli/client/workato_api/test/__init__.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client.py b/src/workato_platform_cli/client/workato_api/test/test_api_client.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_api_client_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_client_response.py rename to src/workato_platform_cli/client/workato_api/test/test_api_client_response.py diff --git a/src/workato_platform/client/workato_api/test/test_api_collection.py b/src/workato_platform_cli/client/workato_api/test/test_api_collection.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_collection.py rename to src/workato_platform_cli/client/workato_api/test/test_api_collection.py diff --git a/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_collection_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_api_endpoint.py b/src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_endpoint.py rename to src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py diff --git a/src/workato_platform/client/workato_api/test/test_api_key.py b/src/workato_platform_cli/client/workato_api/test/test_api_key.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_key.py rename to src/workato_platform_cli/client/workato_api/test/test_api_key.py diff --git a/src/workato_platform/client/workato_api/test/test_api_key_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_key_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_api_key_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_key_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_api_key_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_key_response.py rename to src/workato_platform_cli/client/workato_api/test/test_api_key_response.py diff --git a/src/workato_platform/client/workato_api/test/test_api_platform_api.py b/src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_api_platform_api.py rename to src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py diff --git a/src/workato_platform/client/workato_api/test/test_asset.py b/src/workato_platform_cli/client/workato_api/test/test_asset.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_asset.py rename to src/workato_platform_cli/client/workato_api/test/test_asset.py diff --git a/src/workato_platform/client/workato_api/test/test_asset_reference.py b/src/workato_platform_cli/client/workato_api/test/test_asset_reference.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_asset_reference.py rename to src/workato_platform_cli/client/workato_api/test/test_asset_reference.py diff --git a/src/workato_platform/client/workato_api/test/test_connection.py b/src/workato_platform_cli/client/workato_api/test/test_connection.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connection.py rename to src/workato_platform_cli/client/workato_api/test/test_connection.py diff --git a/src/workato_platform/client/workato_api/test/test_connection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connection_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_connection_update_request.py b/src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connection_update_request.py rename to src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py diff --git a/src/workato_platform/client/workato_api/test/test_connections_api.py b/src/workato_platform_cli/client/workato_api/test/test_connections_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connections_api.py rename to src/workato_platform_cli/client/workato_api/test/test_connections_api.py diff --git a/src/workato_platform/client/workato_api/test/test_connector_action.py b/src/workato_platform_cli/client/workato_api/test/test_connector_action.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connector_action.py rename to src/workato_platform_cli/client/workato_api/test/test_connector_action.py diff --git a/src/workato_platform/client/workato_api/test/test_connector_version.py b/src/workato_platform_cli/client/workato_api/test/test_connector_version.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connector_version.py rename to src/workato_platform_cli/client/workato_api/test/test_connector_version.py diff --git a/src/workato_platform/client/workato_api/test/test_connectors_api.py b/src/workato_platform_cli/client/workato_api/test/test_connectors_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_connectors_api.py rename to src/workato_platform_cli/client/workato_api/test/test_connectors_api.py diff --git a/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py rename to src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py diff --git a/src/workato_platform/client/workato_api/test/test_create_folder_request.py b/src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_create_folder_request.py rename to src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_custom_connector.py rename to src/workato_platform_cli/client/workato_api/test/test_custom_connector.py diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py rename to src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py rename to src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table.py b/src/workato_platform_cli/client/workato_api/test/test_data_table.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_column.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_column.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_column.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column_request.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_column_request.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_response.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_create_response.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_data_table_relation.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_table_relation.py rename to src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py diff --git a/src/workato_platform/client/workato_api/test/test_data_tables_api.py b/src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_data_tables_api.py rename to src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py diff --git a/src/workato_platform/client/workato_api/test/test_delete_project403_response.py b/src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_delete_project403_response.py rename to src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py diff --git a/src/workato_platform/client/workato_api/test/test_error.py b/src/workato_platform_cli/client/workato_api/test/test_error.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_error.py rename to src/workato_platform_cli/client/workato_api/test/test_error.py diff --git a/src/workato_platform/client/workato_api/test/test_export_api.py b/src/workato_platform_cli/client/workato_api/test/test_export_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_export_api.py rename to src/workato_platform_cli/client/workato_api/test/test_export_api.py diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_export_manifest_request.py rename to src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_export_manifest_response.py rename to src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py rename to src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py diff --git a/src/workato_platform/client/workato_api/test/test_folder.py b/src/workato_platform_cli/client/workato_api/test/test_folder.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_folder.py rename to src/workato_platform_cli/client/workato_api/test/test_folder.py diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response.py b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_folder_assets_response.py rename to src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py rename to src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py diff --git a/src/workato_platform/client/workato_api/test/test_folder_creation_response.py b/src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_folder_creation_response.py rename to src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py diff --git a/src/workato_platform/client/workato_api/test/test_folders_api.py b/src/workato_platform_cli/client/workato_api/test/test_folders_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_folders_api.py rename to src/workato_platform_cli/client/workato_api/test/test_folders_api.py diff --git a/src/workato_platform/client/workato_api/test/test_import_results.py b/src/workato_platform_cli/client/workato_api/test/test_import_results.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_import_results.py rename to src/workato_platform_cli/client/workato_api/test/test_import_results.py diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_o_auth_url_response.py rename to src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py rename to src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py diff --git a/src/workato_platform/client/workato_api/test/test_open_api_spec.py b/src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_open_api_spec.py rename to src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response.py b/src/workato_platform_cli/client/workato_api/test/test_package_details_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_package_details_response.py rename to src/workato_platform_cli/client/workato_api/test/test_package_details_response.py diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py b/src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py rename to src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py diff --git a/src/workato_platform/client/workato_api/test/test_package_response.py b/src/workato_platform_cli/client/workato_api/test/test_package_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_package_response.py rename to src/workato_platform_cli/client/workato_api/test/test_package_response.py diff --git a/src/workato_platform/client/workato_api/test/test_packages_api.py b/src/workato_platform_cli/client/workato_api/test/test_packages_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_packages_api.py rename to src/workato_platform_cli/client/workato_api/test/test_packages_api.py diff --git a/src/workato_platform/client/workato_api/test/test_picklist_request.py b/src/workato_platform_cli/client/workato_api/test/test_picklist_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_picklist_request.py rename to src/workato_platform_cli/client/workato_api/test/test_picklist_request.py diff --git a/src/workato_platform/client/workato_api/test/test_picklist_response.py b/src/workato_platform_cli/client/workato_api/test/test_picklist_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_picklist_response.py rename to src/workato_platform_cli/client/workato_api/test/test_picklist_response.py diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector.py b/src/workato_platform_cli/client/workato_api/test/test_platform_connector.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_platform_connector.py rename to src/workato_platform_cli/client/workato_api/test/test_platform_connector.py diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_project.py b/src/workato_platform_cli/client/workato_api/test/test_project.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_project.py rename to src/workato_platform_cli/client/workato_api/test/test_project.py diff --git a/src/workato_platform/client/workato_api/test/test_projects_api.py b/src/workato_platform_cli/client/workato_api/test/test_projects_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_projects_api.py rename to src/workato_platform_cli/client/workato_api/test/test_projects_api.py diff --git a/src/workato_platform/client/workato_api/test/test_properties_api.py b/src/workato_platform_cli/client/workato_api/test/test_properties_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_properties_api.py rename to src/workato_platform_cli/client/workato_api/test/test_properties_api.py diff --git a/src/workato_platform/client/workato_api/test/test_recipe.py b/src/workato_platform_cli/client/workato_api/test/test_recipe.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipe.py rename to src/workato_platform_cli/client/workato_api/test/test_recipe.py diff --git a/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipe_config_inner.py rename to src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py diff --git a/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py rename to src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py diff --git a/src/workato_platform/client/workato_api/test/test_recipe_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipe_list_response.py rename to src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py diff --git a/src/workato_platform/client/workato_api/test/test_recipe_start_response.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipe_start_response.py rename to src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py diff --git a/src/workato_platform/client/workato_api/test/test_recipes_api.py b/src/workato_platform_cli/client/workato_api/test/test_recipes_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_recipes_api.py rename to src/workato_platform_cli/client/workato_api/test/test_recipes_api.py diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py rename to src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py rename to src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py rename to src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py diff --git a/src/workato_platform/client/workato_api/test/test_success_response.py b/src/workato_platform_cli/client/workato_api/test/test_success_response.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_success_response.py rename to src/workato_platform_cli/client/workato_api/test/test_success_response.py diff --git a/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py b/src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py rename to src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py diff --git a/src/workato_platform/client/workato_api/test/test_user.py b/src/workato_platform_cli/client/workato_api/test/test_user.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_user.py rename to src/workato_platform_cli/client/workato_api/test/test_user.py diff --git a/src/workato_platform/client/workato_api/test/test_users_api.py b/src/workato_platform_cli/client/workato_api/test/test_users_api.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_users_api.py rename to src/workato_platform_cli/client/workato_api/test/test_users_api.py diff --git a/src/workato_platform/client/workato_api/test/test_validation_error.py b/src/workato_platform_cli/client/workato_api/test/test_validation_error.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_validation_error.py rename to src/workato_platform_cli/client/workato_api/test/test_validation_error.py diff --git a/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py b/src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py similarity index 100% rename from src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py rename to src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py diff --git a/src/workato_platform/client/workato_api_README.md b/src/workato_platform_cli/client/workato_api_README.md similarity index 100% rename from src/workato_platform/client/workato_api_README.md rename to src/workato_platform_cli/client/workato_api_README.md diff --git a/src/workato_platform/py.typed b/src/workato_platform_cli/py.typed similarity index 100% rename from src/workato_platform/py.typed rename to src/workato_platform_cli/py.typed From ff10e9053370575ae601c83e7bc30993f8825f68 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 12:12:17 -0700 Subject: [PATCH 03/13] Update version to PyPI-compatible format with dev suffix --- pyproject.toml | 2 +- src/workato_platform_cli/_version.py | 34 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/workato_platform_cli/_version.py diff --git a/pyproject.toml b/pyproject.toml index 3f28078..317c046 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "workato-platform-cli" -dynamic = ["version"] +version = "1.0.0rc2.dev8" description = "CLI tool for the Workato Platform" readme = "README.md" requires-python = ">=3.11" diff --git a/src/workato_platform_cli/_version.py b/src/workato_platform_cli/_version.py new file mode 100644 index 0000000..8922add --- /dev/null +++ b/src/workato_platform_cli/_version.py @@ -0,0 +1,34 @@ +# file generated by setuptools-scm +# don't change, don't track in version control + +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple + from typing import Union + + VERSION_TUPLE = Tuple[Union[int, str], ...] + COMMIT_ID = Union[str, None] +else: + VERSION_TUPLE = object + COMMIT_ID = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE +commit_id: COMMIT_ID +__commit_id__: COMMIT_ID + +__version__ = version = '1.0.0rc2.dev8' +__version_tuple__ = version_tuple = (1, 0, 0, 'rc2', 'dev8') + +__commit_id__ = commit_id = None From 9f8be9fb6aac80fcc84748de8094f69520c6b084 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 15:35:24 -0700 Subject: [PATCH 04/13] Fix hatch-vcs configuration and use git tags for versioning --- .github/workflows/pypi.yml | 4 ++-- pyproject.toml | 4 ++-- src/workato_platform_cli/_version.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index eebaa31..d6866b9 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -136,11 +136,11 @@ jobs: echo "Waiting for Test PyPI to process the package..." sleep 30 - echo "Attempting to install workato-platform-cli==${{ needs.build.outputs.version }}" + echo "Attempting to install latest workato-platform-cli from TestPyPI" uv pip install --system \ --index-url https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ \ - workato-platform-cli==${{ needs.build.outputs.version }} || echo "Package not yet available on Test PyPI" + workato-platform-cli || echo "Package not yet available on Test PyPI" # Verify CLI if installation succeeded workato --version || echo "CLI check skipped" diff --git a/pyproject.toml b/pyproject.toml index 317c046..8f5e8ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "workato-platform-cli" -version = "1.0.0rc2.dev8" +dynamic = ["version"] description = "CLI tool for the Workato Platform" readme = "README.md" requires-python = ">=3.11" @@ -226,7 +226,7 @@ exclude_lines = [ [tool.hatch.version] source = "vcs" -raw-options = { local_scheme = "no-local-version", tag_regex = "^(?P\\d+\\.\\d+\\.\\d+(?:[\\-\\.]\\w+(?:\\.\\d+)?)?)$" } +raw-options = { local_scheme = "no-local-version" } [tool.hatch.build.hooks.vcs] version-file = "src/workato_platform_cli/_version.py" diff --git a/src/workato_platform_cli/_version.py b/src/workato_platform_cli/_version.py index 8922add..923dfa2 100644 --- a/src/workato_platform_cli/_version.py +++ b/src/workato_platform_cli/_version.py @@ -28,7 +28,7 @@ commit_id: COMMIT_ID __commit_id__: COMMIT_ID -__version__ = version = '1.0.0rc2.dev8' -__version_tuple__ = version_tuple = (1, 0, 0, 'rc2', 'dev8') +__version__ = version = '1.0.0rc4.dev0' +__version_tuple__ = version_tuple = (1, 0, 0, 'rc4', 'dev0') __commit_id__ = commit_id = None From ba513212a8485c0911df47c25d0ebc7563dbc19a Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 15:38:33 -0700 Subject: [PATCH 05/13] Install hatch-vcs in CI before version extraction --- .github/workflows/pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d6866b9..070f832 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -59,6 +59,7 @@ jobs: - name: Get version and configure for environment id: version run: | + pip install hatch-vcs BASE_VERSION=$(python -c "from hatchling.metadata.core import ProjectMetadata; print(ProjectMetadata('.', None).version)") echo "Base version: $BASE_VERSION" From 1105a97a321784ad7721462c554c576604823b75 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 15:40:11 -0700 Subject: [PATCH 06/13] Use git describe for version extraction instead of hatchling --- .github/workflows/pypi.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 070f832..935e3fc 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -59,8 +59,15 @@ jobs: - name: Get version and configure for environment id: version run: | - pip install hatch-vcs - BASE_VERSION=$(python -c "from hatchling.metadata.core import ProjectMetadata; print(ProjectMetadata('.', None).version)") + # Get version from git tags + BASE_VERSION=$(git describe --tags --always --match="*.*.*" | sed 's/^v//') + if [[ -z "$BASE_VERSION" || "$BASE_VERSION" == *"-"* ]]; then + # Fallback: use the latest tag or default + BASE_VERSION=$(git tag --sort=-version:refname | head -n1 | sed 's/^v//') + if [[ -z "$BASE_VERSION" ]]; then + BASE_VERSION="1.0.0rc4" + fi + fi echo "Base version: $BASE_VERSION" if [[ "${{ steps.determine-env.outputs.environment }}" == "test" ]]; then From f766624b8f79470b72a10ac5c3136092e113e6c2 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 15:44:43 -0700 Subject: [PATCH 07/13] Trigger new deployment with fixed imports From 496692b961ea7ee56e50a7e6a546001eb873eb00 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 16:44:26 -0700 Subject: [PATCH 08/13] Trigger test deployment From 179d8b46d4e6c0e307628a6ebbeaf6b441cc4e1b Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 16:57:50 -0700 Subject: [PATCH 09/13] Fix uv cache dependency glob to use pyproject.toml --- .github/workflows/pypi.yml | 4 + Makefile | 4 +- src/.openapi-generator/FILES | 78 + src/workato_platform/client/__init__.py | 0 .../client/workato_api/__init__.py | 202 ++ .../client/workato_api/api/__init__.py | 15 + .../workato_api/api/api_platform_api.py | 2875 +++++++++++++++++ .../client/workato_api/api/connections_api.py | 1807 +++++++++++ .../client/workato_api/api/connectors_api.py | 840 +++++ .../client/workato_api/api/data_tables_api.py | 604 ++++ .../client/workato_api/api/export_api.py | 621 ++++ .../client/workato_api/api/folders_api.py | 621 ++++ .../client/workato_api/api/packages_api.py | 1197 +++++++ .../client/workato_api/api/projects_api.py | 590 ++++ .../client/workato_api/api/properties_api.py | 620 ++++ .../client/workato_api/api/recipes_api.py | 1379 ++++++++ .../client/workato_api/api/users_api.py | 285 ++ .../client/workato_api/api_client.py | 807 +++++ .../client/workato_api/api_response.py | 21 + .../client/workato_api/configuration.py | 601 ++++ .../client/workato_api/docs/APIPlatformApi.md | 844 +++++ .../client/workato_api/docs/ApiClient.md | 46 + .../docs/ApiClientApiCollectionsInner.md | 30 + .../docs/ApiClientApiPoliciesInner.md | 30 + .../docs/ApiClientCreateRequest.md | 46 + .../workato_api/docs/ApiClientListResponse.md | 32 + .../workato_api/docs/ApiClientResponse.md | 29 + .../client/workato_api/docs/ApiCollection.md | 38 + .../docs/ApiCollectionCreateRequest.md | 32 + .../client/workato_api/docs/ApiEndpoint.md | 41 + .../client/workato_api/docs/ApiKey.md | 36 + .../workato_api/docs/ApiKeyCreateRequest.md | 32 + .../workato_api/docs/ApiKeyListResponse.md | 32 + .../client/workato_api/docs/ApiKeyResponse.md | 29 + .../client/workato_api/docs/Asset.md | 39 + .../client/workato_api/docs/AssetReference.md | 37 + .../client/workato_api/docs/Connection.md | 44 + .../docs/ConnectionCreateRequest.md | 35 + .../docs/ConnectionUpdateRequest.md | 34 + .../client/workato_api/docs/ConnectionsApi.md | 526 +++ .../workato_api/docs/ConnectorAction.md | 33 + .../workato_api/docs/ConnectorVersion.md | 32 + .../client/workato_api/docs/ConnectorsApi.md | 249 ++ .../docs/CreateExportManifestRequest.md | 29 + .../workato_api/docs/CreateFolderRequest.md | 30 + .../workato_api/docs/CustomConnector.md | 35 + .../docs/CustomConnectorCodeResponse.md | 29 + .../docs/CustomConnectorCodeResponseData.md | 29 + .../docs/CustomConnectorListResponse.md | 29 + .../client/workato_api/docs/DataTable.md | 34 + .../workato_api/docs/DataTableColumn.md | 37 + .../docs/DataTableColumnRequest.md | 37 + .../docs/DataTableCreateRequest.md | 31 + .../docs/DataTableCreateResponse.md | 29 + .../workato_api/docs/DataTableListResponse.md | 29 + .../workato_api/docs/DataTableRelation.md | 30 + .../client/workato_api/docs/DataTablesApi.md | 172 + .../docs/DeleteProject403Response.md | 29 + .../client/workato_api/docs/Error.md | 29 + .../client/workato_api/docs/ExportApi.md | 175 + .../workato_api/docs/ExportManifestRequest.md | 35 + .../docs/ExportManifestResponse.md | 29 + .../docs/ExportManifestResponseResult.md | 36 + .../client/workato_api/docs/Folder.md | 35 + .../workato_api/docs/FolderAssetsResponse.md | 29 + .../docs/FolderAssetsResponseResult.md | 29 + .../docs/FolderCreationResponse.md | 35 + .../client/workato_api/docs/FoldersApi.md | 176 + .../client/workato_api/docs/ImportResults.md | 32 + .../workato_api/docs/OAuthUrlResponse.md | 29 + .../workato_api/docs/OAuthUrlResponseData.md | 29 + .../client/workato_api/docs/OpenApiSpec.md | 30 + .../docs/PackageDetailsResponse.md | 35 + ...PackageDetailsResponseRecipeStatusInner.md | 30 + .../workato_api/docs/PackageResponse.md | 33 + .../client/workato_api/docs/PackagesApi.md | 364 +++ .../workato_api/docs/PicklistRequest.md | 30 + .../workato_api/docs/PicklistResponse.md | 29 + .../workato_api/docs/PlatformConnector.md | 36 + .../docs/PlatformConnectorListResponse.md | 32 + .../client/workato_api/docs/Project.md | 32 + .../client/workato_api/docs/ProjectsApi.md | 173 + .../client/workato_api/docs/PropertiesApi.md | 186 ++ .../client/workato_api/docs/Recipe.md | 58 + .../workato_api/docs/RecipeConfigInner.md | 33 + .../docs/RecipeConnectionUpdateRequest.md | 30 + .../workato_api/docs/RecipeListResponse.md | 29 + .../workato_api/docs/RecipeStartResponse.md | 31 + .../client/workato_api/docs/RecipesApi.md | 367 +++ .../RuntimeUserConnectionCreateRequest.md | 34 + .../docs/RuntimeUserConnectionResponse.md | 29 + .../docs/RuntimeUserConnectionResponseData.md | 30 + .../workato_api/docs/SuccessResponse.md | 29 + .../docs/UpsertProjectPropertiesRequest.md | 29 + .../client/workato_api/docs/User.md | 48 + .../client/workato_api/docs/UsersApi.md | 84 + .../workato_api/docs/ValidationError.md | 30 + .../docs/ValidationErrorErrorsValue.md | 28 + .../client/workato_api/exceptions.py | 216 ++ .../client/workato_api/models/__init__.py | 83 + .../client/workato_api/models/api_client.py | 185 ++ .../api_client_api_collections_inner.py | 89 + .../models/api_client_api_policies_inner.py | 89 + .../models/api_client_create_request.py | 138 + .../models/api_client_list_response.py | 101 + .../workato_api/models/api_client_response.py | 91 + .../workato_api/models/api_collection.py | 110 + .../models/api_collection_create_request.py | 97 + .../client/workato_api/models/api_endpoint.py | 117 + .../client/workato_api/models/api_key.py | 102 + .../models/api_key_create_request.py | 93 + .../models/api_key_list_response.py | 101 + .../workato_api/models/api_key_response.py | 91 + .../client/workato_api/models/asset.py | 124 + .../workato_api/models/asset_reference.py | 110 + .../client/workato_api/models/connection.py | 173 + .../models/connection_create_request.py | 99 + .../models/connection_update_request.py | 97 + .../workato_api/models/connector_action.py | 100 + .../workato_api/models/connector_version.py | 99 + .../models/create_export_manifest_request.py | 91 + .../models/create_folder_request.py | 89 + .../workato_api/models/custom_connector.py | 117 + .../models/custom_connector_code_response.py | 91 + .../custom_connector_code_response_data.py | 87 + .../models/custom_connector_list_response.py | 95 + .../client/workato_api/models/data_table.py | 107 + .../workato_api/models/data_table_column.py | 125 + .../models/data_table_column_request.py | 130 + .../models/data_table_create_request.py | 99 + .../models/data_table_create_response.py | 91 + .../models/data_table_list_response.py | 95 + .../workato_api/models/data_table_relation.py | 90 + .../models/delete_project403_response.py | 87 + .../client/workato_api/models/error.py | 87 + .../models/export_manifest_request.py | 107 + .../models/export_manifest_response.py | 91 + .../models/export_manifest_response_result.py | 112 + .../client/workato_api/models/folder.py | 110 + .../models/folder_assets_response.py | 91 + .../models/folder_assets_response_result.py | 95 + .../models/folder_creation_response.py | 110 + .../workato_api/models/import_results.py | 93 + .../workato_api/models/o_auth_url_response.py | 91 + .../models/o_auth_url_response_data.py | 87 + .../workato_api/models/open_api_spec.py | 96 + .../models/package_details_response.py | 126 + ...ge_details_response_recipe_status_inner.py | 99 + .../workato_api/models/package_response.py | 109 + .../workato_api/models/picklist_request.py | 89 + .../workato_api/models/picklist_response.py | 88 + .../workato_api/models/platform_connector.py | 116 + .../platform_connector_list_response.py | 101 + .../client/workato_api/models/project.py | 93 + .../client/workato_api/models/recipe.py | 174 + .../workato_api/models/recipe_config_inner.py | 100 + .../recipe_connection_update_request.py | 89 + .../models/recipe_list_response.py | 95 + .../models/recipe_start_response.py | 91 + .../runtime_user_connection_create_request.py | 97 + .../runtime_user_connection_response.py | 91 + .../runtime_user_connection_response_data.py | 89 + .../workato_api/models/success_response.py | 87 + .../upsert_project_properties_request.py | 88 + .../client/workato_api/models/user.py | 151 + .../workato_api/models/validation_error.py | 102 + .../models/validation_error_errors_value.py | 143 + .../client/workato_api/rest.py | 213 ++ .../client/workato_api/test/__init__.py | 0 .../workato_api/test/test_api_client.py | 94 + .../test_api_client_api_collections_inner.py | 52 + .../test_api_client_api_policies_inner.py | 52 + .../test/test_api_client_create_request.py | 75 + .../test/test_api_client_list_response.py | 114 + .../test/test_api_client_response.py | 104 + .../workato_api/test/test_api_collection.py | 72 + .../test_api_collection_create_request.py | 57 + .../workato_api/test/test_api_endpoint.py | 75 + .../client/workato_api/test/test_api_key.py | 64 + .../test/test_api_key_create_request.py | 56 + .../test/test_api_key_list_response.py | 78 + .../workato_api/test/test_api_key_response.py | 68 + .../workato_api/test/test_api_platform_api.py | 101 + .../client/workato_api/test/test_asset.py | 67 + .../workato_api/test/test_asset_reference.py | 62 + .../workato_api/test/test_connection.py | 81 + .../test/test_connection_create_request.py | 59 + .../test/test_connection_update_request.py | 56 + .../workato_api/test/test_connections_api.py | 73 + .../workato_api/test/test_connector_action.py | 59 + .../test/test_connector_version.py | 58 + .../workato_api/test/test_connectors_api.py | 52 + .../test_create_export_manifest_request.py | 88 + .../test/test_create_folder_request.py | 53 + .../workato_api/test/test_custom_connector.py | 76 + .../test_custom_connector_code_response.py | 54 + ...est_custom_connector_code_response_data.py | 52 + .../test_custom_connector_list_response.py | 82 + .../workato_api/test/test_data_table.py | 88 + .../test/test_data_table_column.py | 72 + .../test/test_data_table_column_request.py | 64 + .../test/test_data_table_create_request.py | 82 + .../test/test_data_table_create_response.py | 90 + .../test/test_data_table_list_response.py | 94 + .../test/test_data_table_relation.py | 54 + .../workato_api/test/test_data_tables_api.py | 45 + .../test/test_delete_project403_response.py | 51 + .../client/workato_api/test/test_error.py | 52 + .../workato_api/test/test_export_api.py | 45 + .../test/test_export_manifest_request.py | 69 + .../test/test_export_manifest_response.py | 68 + .../test_export_manifest_response_result.py | 66 + .../client/workato_api/test/test_folder.py | 64 + .../test/test_folder_assets_response.py | 80 + .../test_folder_assets_response_result.py | 78 + .../test/test_folder_creation_response.py | 64 + .../workato_api/test/test_folders_api.py | 45 + .../workato_api/test/test_import_results.py | 58 + .../test/test_o_auth_url_response.py | 54 + .../test/test_o_auth_url_response_data.py | 52 + .../workato_api/test/test_open_api_spec.py | 54 + .../test/test_package_details_response.py | 64 + ...ge_details_response_recipe_status_inner.py | 52 + .../workato_api/test/test_package_response.py | 58 + .../workato_api/test/test_packages_api.py | 59 + .../workato_api/test/test_picklist_request.py | 53 + .../test/test_picklist_response.py | 52 + .../test/test_platform_connector.py | 94 + .../test_platform_connector_list_response.py | 106 + .../client/workato_api/test/test_project.py | 57 + .../workato_api/test/test_projects_api.py | 45 + .../workato_api/test/test_properties_api.py | 45 + .../client/workato_api/test/test_recipe.py | 124 + .../test/test_recipe_config_inner.py | 55 + .../test_recipe_connection_update_request.py | 54 + .../test/test_recipe_list_response.py | 134 + .../test/test_recipe_start_response.py | 54 + .../workato_api/test/test_recipes_api.py | 59 + ..._runtime_user_connection_create_request.py | 59 + .../test_runtime_user_connection_response.py | 56 + ...t_runtime_user_connection_response_data.py | 54 + .../workato_api/test/test_success_response.py | 52 + .../test_upsert_project_properties_request.py | 52 + .../client/workato_api/test/test_user.py | 85 + .../client/workato_api/test/test_users_api.py | 38 + .../workato_api/test/test_validation_error.py | 52 + .../test_validation_error_errors_value.py | 50 + .../client/workato_api_README.md | 205 ++ 248 files changed, 31592 insertions(+), 2 deletions(-) create mode 100644 src/workato_platform/client/__init__.py create mode 100644 src/workato_platform/client/workato_api/__init__.py create mode 100644 src/workato_platform/client/workato_api/api/__init__.py create mode 100644 src/workato_platform/client/workato_api/api/api_platform_api.py create mode 100644 src/workato_platform/client/workato_api/api/connections_api.py create mode 100644 src/workato_platform/client/workato_api/api/connectors_api.py create mode 100644 src/workato_platform/client/workato_api/api/data_tables_api.py create mode 100644 src/workato_platform/client/workato_api/api/export_api.py create mode 100644 src/workato_platform/client/workato_api/api/folders_api.py create mode 100644 src/workato_platform/client/workato_api/api/packages_api.py create mode 100644 src/workato_platform/client/workato_api/api/projects_api.py create mode 100644 src/workato_platform/client/workato_api/api/properties_api.py create mode 100644 src/workato_platform/client/workato_api/api/recipes_api.py create mode 100644 src/workato_platform/client/workato_api/api/users_api.py create mode 100644 src/workato_platform/client/workato_api/api_client.py create mode 100644 src/workato_platform/client/workato_api/api_response.py create mode 100644 src/workato_platform/client/workato_api/configuration.py create mode 100644 src/workato_platform/client/workato_api/docs/APIPlatformApi.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClient.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClientListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiClientResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiCollection.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiEndpoint.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiKey.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/Asset.md create mode 100644 src/workato_platform/client/workato_api/docs/AssetReference.md create mode 100644 src/workato_platform/client/workato_api/docs/Connection.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectionsApi.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectorAction.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectorVersion.md create mode 100644 src/workato_platform/client/workato_api/docs/ConnectorsApi.md create mode 100644 src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/CreateFolderRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/CustomConnector.md create mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md create mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTable.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableColumn.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTableRelation.md create mode 100644 src/workato_platform/client/workato_api/docs/DataTablesApi.md create mode 100644 src/workato_platform/client/workato_api/docs/DeleteProject403Response.md create mode 100644 src/workato_platform/client/workato_api/docs/Error.md create mode 100644 src/workato_platform/client/workato_api/docs/ExportApi.md create mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md create mode 100644 src/workato_platform/client/workato_api/docs/Folder.md create mode 100644 src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md create mode 100644 src/workato_platform/client/workato_api/docs/FolderCreationResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/FoldersApi.md create mode 100644 src/workato_platform/client/workato_api/docs/ImportResults.md create mode 100644 src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md create mode 100644 src/workato_platform/client/workato_api/docs/OpenApiSpec.md create mode 100644 src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md create mode 100644 src/workato_platform/client/workato_api/docs/PackageResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/PackagesApi.md create mode 100644 src/workato_platform/client/workato_api/docs/PicklistRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/PicklistResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/PlatformConnector.md create mode 100644 src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/Project.md create mode 100644 src/workato_platform/client/workato_api/docs/ProjectsApi.md create mode 100644 src/workato_platform/client/workato_api/docs/PropertiesApi.md create mode 100644 src/workato_platform/client/workato_api/docs/Recipe.md create mode 100644 src/workato_platform/client/workato_api/docs/RecipeConfigInner.md create mode 100644 src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/RecipeListResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/RecipeStartResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/RecipesApi.md create mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md create mode 100644 src/workato_platform/client/workato_api/docs/SuccessResponse.md create mode 100644 src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md create mode 100644 src/workato_platform/client/workato_api/docs/User.md create mode 100644 src/workato_platform/client/workato_api/docs/UsersApi.md create mode 100644 src/workato_platform/client/workato_api/docs/ValidationError.md create mode 100644 src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md create mode 100644 src/workato_platform/client/workato_api/exceptions.py create mode 100644 src/workato_platform/client/workato_api/models/__init__.py create mode 100644 src/workato_platform/client/workato_api/models/api_client.py create mode 100644 src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py create mode 100644 src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py create mode 100644 src/workato_platform/client/workato_api/models/api_client_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/api_client_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/api_client_response.py create mode 100644 src/workato_platform/client/workato_api/models/api_collection.py create mode 100644 src/workato_platform/client/workato_api/models/api_collection_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/api_endpoint.py create mode 100644 src/workato_platform/client/workato_api/models/api_key.py create mode 100644 src/workato_platform/client/workato_api/models/api_key_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/api_key_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/api_key_response.py create mode 100644 src/workato_platform/client/workato_api/models/asset.py create mode 100644 src/workato_platform/client/workato_api/models/asset_reference.py create mode 100644 src/workato_platform/client/workato_api/models/connection.py create mode 100644 src/workato_platform/client/workato_api/models/connection_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/connection_update_request.py create mode 100644 src/workato_platform/client/workato_api/models/connector_action.py create mode 100644 src/workato_platform/client/workato_api/models/connector_version.py create mode 100644 src/workato_platform/client/workato_api/models/create_export_manifest_request.py create mode 100644 src/workato_platform/client/workato_api/models/create_folder_request.py create mode 100644 src/workato_platform/client/workato_api/models/custom_connector.py create mode 100644 src/workato_platform/client/workato_api/models/custom_connector_code_response.py create mode 100644 src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py create mode 100644 src/workato_platform/client/workato_api/models/custom_connector_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/data_table.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_column.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_column_request.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_create_response.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/data_table_relation.py create mode 100644 src/workato_platform/client/workato_api/models/delete_project403_response.py create mode 100644 src/workato_platform/client/workato_api/models/error.py create mode 100644 src/workato_platform/client/workato_api/models/export_manifest_request.py create mode 100644 src/workato_platform/client/workato_api/models/export_manifest_response.py create mode 100644 src/workato_platform/client/workato_api/models/export_manifest_response_result.py create mode 100644 src/workato_platform/client/workato_api/models/folder.py create mode 100644 src/workato_platform/client/workato_api/models/folder_assets_response.py create mode 100644 src/workato_platform/client/workato_api/models/folder_assets_response_result.py create mode 100644 src/workato_platform/client/workato_api/models/folder_creation_response.py create mode 100644 src/workato_platform/client/workato_api/models/import_results.py create mode 100644 src/workato_platform/client/workato_api/models/o_auth_url_response.py create mode 100644 src/workato_platform/client/workato_api/models/o_auth_url_response_data.py create mode 100644 src/workato_platform/client/workato_api/models/open_api_spec.py create mode 100644 src/workato_platform/client/workato_api/models/package_details_response.py create mode 100644 src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py create mode 100644 src/workato_platform/client/workato_api/models/package_response.py create mode 100644 src/workato_platform/client/workato_api/models/picklist_request.py create mode 100644 src/workato_platform/client/workato_api/models/picklist_response.py create mode 100644 src/workato_platform/client/workato_api/models/platform_connector.py create mode 100644 src/workato_platform/client/workato_api/models/platform_connector_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/project.py create mode 100644 src/workato_platform/client/workato_api/models/recipe.py create mode 100644 src/workato_platform/client/workato_api/models/recipe_config_inner.py create mode 100644 src/workato_platform/client/workato_api/models/recipe_connection_update_request.py create mode 100644 src/workato_platform/client/workato_api/models/recipe_list_response.py create mode 100644 src/workato_platform/client/workato_api/models/recipe_start_response.py create mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py create mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_response.py create mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py create mode 100644 src/workato_platform/client/workato_api/models/success_response.py create mode 100644 src/workato_platform/client/workato_api/models/upsert_project_properties_request.py create mode 100644 src/workato_platform/client/workato_api/models/user.py create mode 100644 src/workato_platform/client/workato_api/models/validation_error.py create mode 100644 src/workato_platform/client/workato_api/models/validation_error_errors_value.py create mode 100644 src/workato_platform/client/workato_api/rest.py create mode 100644 src/workato_platform/client/workato_api/test/__init__.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_client_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_collection.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_collection_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_endpoint.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_key.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_key_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_key_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_key_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_api_platform_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_asset.py create mode 100644 src/workato_platform/client/workato_api/test/test_asset_reference.py create mode 100644 src/workato_platform/client/workato_api/test/test_connection.py create mode 100644 src/workato_platform/client/workato_api/test/test_connection_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_connection_update_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_connections_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_connector_action.py create mode 100644 src/workato_platform/client/workato_api/test/test_connector_version.py create mode 100644 src/workato_platform/client/workato_api/test/test_connectors_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_create_folder_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector.py create mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py create mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_column.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_column_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_create_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_table_relation.py create mode 100644 src/workato_platform/client/workato_api/test/test_data_tables_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_delete_project403_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_error.py create mode 100644 src/workato_platform/client/workato_api/test/test_export_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py create mode 100644 src/workato_platform/client/workato_api/test/test_folder.py create mode 100644 src/workato_platform/client/workato_api/test/test_folder_assets_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py create mode 100644 src/workato_platform/client/workato_api/test/test_folder_creation_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_folders_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_import_results.py create mode 100644 src/workato_platform/client/workato_api/test/test_o_auth_url_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py create mode 100644 src/workato_platform/client/workato_api/test/test_open_api_spec.py create mode 100644 src/workato_platform/client/workato_api/test/test_package_details_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py create mode 100644 src/workato_platform/client/workato_api/test/test_package_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_packages_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_picklist_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_picklist_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_platform_connector.py create mode 100644 src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_project.py create mode 100644 src/workato_platform/client/workato_api/test/test_projects_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_properties_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipe.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipe_config_inner.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipe_list_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipe_start_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_recipes_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py create mode 100644 src/workato_platform/client/workato_api/test/test_success_response.py create mode 100644 src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py create mode 100644 src/workato_platform/client/workato_api/test/test_user.py create mode 100644 src/workato_platform/client/workato_api/test/test_users_api.py create mode 100644 src/workato_platform/client/workato_api/test/test_validation_error.py create mode 100644 src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py create mode 100644 src/workato_platform/client/workato_api_README.md diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 935e3fc..eac6e4d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -40,6 +40,7 @@ jobs: uses: astral-sh/setup-uv@v5 with: enable-cache: true + cache-dependency-glob: "pyproject.toml" - name: Install build dependencies run: | @@ -138,6 +139,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: "pyproject.toml" - name: Test installation run: | diff --git a/Makefile b/Makefile index 250d5db..53dae42 100644 --- a/Makefile +++ b/Makefile @@ -48,10 +48,10 @@ test-integration: uv run pytest tests/integration/ -v test-client: - uv run pytest src/workato_platform/client/workato_api/test/ -v + uv run pytest src/workato_platform_cli/client/workato_api/test/ -v test-cov: - uv run pytest tests/ --cov=src/workato_platform --cov-report=html --cov-report=term --cov-report=xml + uv run pytest tests/ --cov=src/workato_platform_cli --cov-report=html --cov-report=term --cov-report=xml test-watch: uv run pytest tests/ -v --tb=short -x --lf diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index be7a418..0759a61 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -164,4 +164,82 @@ workato_platform/client/workato_api/models/validation_error.py workato_platform/client/workato_api/models/validation_error_errors_value.py workato_platform/client/workato_api/rest.py workato_platform/client/workato_api/test/__init__.py +workato_platform/client/workato_api/test/test_api_client.py +workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py +workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py +workato_platform/client/workato_api/test/test_api_client_create_request.py +workato_platform/client/workato_api/test/test_api_client_list_response.py +workato_platform/client/workato_api/test/test_api_client_response.py +workato_platform/client/workato_api/test/test_api_collection.py +workato_platform/client/workato_api/test/test_api_collection_create_request.py +workato_platform/client/workato_api/test/test_api_endpoint.py +workato_platform/client/workato_api/test/test_api_key.py +workato_platform/client/workato_api/test/test_api_key_create_request.py +workato_platform/client/workato_api/test/test_api_key_list_response.py +workato_platform/client/workato_api/test/test_api_key_response.py +workato_platform/client/workato_api/test/test_api_platform_api.py +workato_platform/client/workato_api/test/test_asset.py +workato_platform/client/workato_api/test/test_asset_reference.py +workato_platform/client/workato_api/test/test_connection.py +workato_platform/client/workato_api/test/test_connection_create_request.py +workato_platform/client/workato_api/test/test_connection_update_request.py +workato_platform/client/workato_api/test/test_connections_api.py +workato_platform/client/workato_api/test/test_connector_action.py +workato_platform/client/workato_api/test/test_connector_version.py +workato_platform/client/workato_api/test/test_connectors_api.py +workato_platform/client/workato_api/test/test_create_export_manifest_request.py +workato_platform/client/workato_api/test/test_create_folder_request.py +workato_platform/client/workato_api/test/test_custom_connector.py +workato_platform/client/workato_api/test/test_custom_connector_code_response.py +workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py +workato_platform/client/workato_api/test/test_custom_connector_list_response.py +workato_platform/client/workato_api/test/test_data_table.py +workato_platform/client/workato_api/test/test_data_table_column.py +workato_platform/client/workato_api/test/test_data_table_column_request.py +workato_platform/client/workato_api/test/test_data_table_create_request.py +workato_platform/client/workato_api/test/test_data_table_create_response.py +workato_platform/client/workato_api/test/test_data_table_list_response.py +workato_platform/client/workato_api/test/test_data_table_relation.py +workato_platform/client/workato_api/test/test_data_tables_api.py +workato_platform/client/workato_api/test/test_delete_project403_response.py +workato_platform/client/workato_api/test/test_error.py +workato_platform/client/workato_api/test/test_export_api.py +workato_platform/client/workato_api/test/test_export_manifest_request.py +workato_platform/client/workato_api/test/test_export_manifest_response.py +workato_platform/client/workato_api/test/test_export_manifest_response_result.py +workato_platform/client/workato_api/test/test_folder.py +workato_platform/client/workato_api/test/test_folder_assets_response.py +workato_platform/client/workato_api/test/test_folder_assets_response_result.py +workato_platform/client/workato_api/test/test_folder_creation_response.py +workato_platform/client/workato_api/test/test_folders_api.py +workato_platform/client/workato_api/test/test_import_results.py +workato_platform/client/workato_api/test/test_o_auth_url_response.py +workato_platform/client/workato_api/test/test_o_auth_url_response_data.py +workato_platform/client/workato_api/test/test_open_api_spec.py +workato_platform/client/workato_api/test/test_package_details_response.py +workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py +workato_platform/client/workato_api/test/test_package_response.py +workato_platform/client/workato_api/test/test_packages_api.py +workato_platform/client/workato_api/test/test_picklist_request.py +workato_platform/client/workato_api/test/test_picklist_response.py +workato_platform/client/workato_api/test/test_platform_connector.py +workato_platform/client/workato_api/test/test_platform_connector_list_response.py +workato_platform/client/workato_api/test/test_project.py +workato_platform/client/workato_api/test/test_projects_api.py +workato_platform/client/workato_api/test/test_properties_api.py +workato_platform/client/workato_api/test/test_recipe.py +workato_platform/client/workato_api/test/test_recipe_config_inner.py +workato_platform/client/workato_api/test/test_recipe_connection_update_request.py +workato_platform/client/workato_api/test/test_recipe_list_response.py +workato_platform/client/workato_api/test/test_recipe_start_response.py +workato_platform/client/workato_api/test/test_recipes_api.py +workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py +workato_platform/client/workato_api/test/test_runtime_user_connection_response.py +workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py +workato_platform/client/workato_api/test/test_success_response.py +workato_platform/client/workato_api/test/test_upsert_project_properties_request.py +workato_platform/client/workato_api/test/test_user.py +workato_platform/client/workato_api/test/test_users_api.py +workato_platform/client/workato_api/test/test_validation_error.py +workato_platform/client/workato_api/test/test_validation_error_errors_value.py workato_platform/client/workato_api_README.md diff --git a/src/workato_platform/client/__init__.py b/src/workato_platform/client/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/workato_platform/client/workato_api/__init__.py b/src/workato_platform/client/workato_api/__init__.py new file mode 100644 index 0000000..279a191 --- /dev/null +++ b/src/workato_platform/client/workato_api/__init__.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# Define package exports +__all__ = [ + "APIPlatformApi", + "ConnectionsApi", + "ConnectorsApi", + "DataTablesApi", + "ExportApi", + "FoldersApi", + "PackagesApi", + "ProjectsApi", + "PropertiesApi", + "RecipesApi", + "UsersApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ApiClient", + "ApiClientApiCollectionsInner", + "ApiClientApiPoliciesInner", + "ApiClientCreateRequest", + "ApiClientListResponse", + "ApiClientResponse", + "ApiCollection", + "ApiCollectionCreateRequest", + "ApiEndpoint", + "ApiKey", + "ApiKeyCreateRequest", + "ApiKeyListResponse", + "ApiKeyResponse", + "Asset", + "AssetReference", + "Connection", + "ConnectionCreateRequest", + "ConnectionUpdateRequest", + "ConnectorAction", + "ConnectorVersion", + "CreateExportManifestRequest", + "CreateFolderRequest", + "CustomConnector", + "CustomConnectorCodeResponse", + "CustomConnectorCodeResponseData", + "CustomConnectorListResponse", + "DataTable", + "DataTableColumn", + "DataTableColumnRequest", + "DataTableCreateRequest", + "DataTableCreateResponse", + "DataTableListResponse", + "DataTableRelation", + "DeleteProject403Response", + "Error", + "ExportManifestRequest", + "ExportManifestResponse", + "ExportManifestResponseResult", + "Folder", + "FolderAssetsResponse", + "FolderAssetsResponseResult", + "FolderCreationResponse", + "ImportResults", + "OAuthUrlResponse", + "OAuthUrlResponseData", + "OpenApiSpec", + "PackageDetailsResponse", + "PackageDetailsResponseRecipeStatusInner", + "PackageResponse", + "PicklistRequest", + "PicklistResponse", + "PlatformConnector", + "PlatformConnectorListResponse", + "Project", + "Recipe", + "RecipeConfigInner", + "RecipeConnectionUpdateRequest", + "RecipeListResponse", + "RecipeStartResponse", + "RuntimeUserConnectionCreateRequest", + "RuntimeUserConnectionResponse", + "RuntimeUserConnectionResponseData", + "SuccessResponse", + "UpsertProjectPropertiesRequest", + "User", + "ValidationError", + "ValidationErrorErrorsValue", +] + +# import apis into sdk package +from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi as APIPlatformApi +from workato_platform.client.workato_api.api.connections_api import ConnectionsApi as ConnectionsApi +from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi as ConnectorsApi +from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi as DataTablesApi +from workato_platform.client.workato_api.api.export_api import ExportApi as ExportApi +from workato_platform.client.workato_api.api.folders_api import FoldersApi as FoldersApi +from workato_platform.client.workato_api.api.packages_api import PackagesApi as PackagesApi +from workato_platform.client.workato_api.api.projects_api import ProjectsApi as ProjectsApi +from workato_platform.client.workato_api.api.properties_api import PropertiesApi as PropertiesApi +from workato_platform.client.workato_api.api.recipes_api import RecipesApi as RecipesApi +from workato_platform.client.workato_api.api.users_api import UsersApi as UsersApi + +# import ApiClient +from workato_platform.client.workato_api.api_response import ApiResponse as ApiResponse +from workato_platform.client.workato_api.api_client import ApiClient as ApiClient +from workato_platform.client.workato_api.configuration import Configuration as Configuration +from workato_platform.client.workato_api.exceptions import OpenApiException as OpenApiException +from workato_platform.client.workato_api.exceptions import ApiTypeError as ApiTypeError +from workato_platform.client.workato_api.exceptions import ApiValueError as ApiValueError +from workato_platform.client.workato_api.exceptions import ApiKeyError as ApiKeyError +from workato_platform.client.workato_api.exceptions import ApiAttributeError as ApiAttributeError +from workato_platform.client.workato_api.exceptions import ApiException as ApiException + +# import models into sdk package +from workato_platform.client.workato_api.models.api_client import ApiClient as ApiClient +from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner as ApiClientApiCollectionsInner +from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner as ApiClientApiPoliciesInner +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest as ApiClientCreateRequest +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse as ApiClientListResponse +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse as ApiClientResponse +from workato_platform.client.workato_api.models.api_collection import ApiCollection as ApiCollection +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest as ApiCollectionCreateRequest +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint as ApiEndpoint +from workato_platform.client.workato_api.models.api_key import ApiKey as ApiKey +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest as ApiKeyCreateRequest +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse as ApiKeyListResponse +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse as ApiKeyResponse +from workato_platform.client.workato_api.models.asset import Asset as Asset +from workato_platform.client.workato_api.models.asset_reference import AssetReference as AssetReference +from workato_platform.client.workato_api.models.connection import Connection as Connection +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest as ConnectionCreateRequest +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest as ConnectionUpdateRequest +from workato_platform.client.workato_api.models.connector_action import ConnectorAction as ConnectorAction +from workato_platform.client.workato_api.models.connector_version import ConnectorVersion as ConnectorVersion +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest as CreateExportManifestRequest +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest as CreateFolderRequest +from workato_platform.client.workato_api.models.custom_connector import CustomConnector as CustomConnector +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse as CustomConnectorCodeResponse +from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData as CustomConnectorCodeResponseData +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse as CustomConnectorListResponse +from workato_platform.client.workato_api.models.data_table import DataTable as DataTable +from workato_platform.client.workato_api.models.data_table_column import DataTableColumn as DataTableColumn +from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest as DataTableColumnRequest +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest as DataTableCreateRequest +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse as DataTableCreateResponse +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse as DataTableListResponse +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation as DataTableRelation +from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response as DeleteProject403Response +from workato_platform.client.workato_api.models.error import Error as Error +from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest as ExportManifestRequest +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse as ExportManifestResponse +from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult as ExportManifestResponseResult +from workato_platform.client.workato_api.models.folder import Folder as Folder +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse as FolderAssetsResponse +from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult as FolderAssetsResponseResult +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse as FolderCreationResponse +from workato_platform.client.workato_api.models.import_results import ImportResults as ImportResults +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse as OAuthUrlResponse +from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData as OAuthUrlResponseData +from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec as OpenApiSpec +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse as PackageDetailsResponse +from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner as PackageDetailsResponseRecipeStatusInner +from workato_platform.client.workato_api.models.package_response import PackageResponse as PackageResponse +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest as PicklistRequest +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse as PicklistResponse +from workato_platform.client.workato_api.models.platform_connector import PlatformConnector as PlatformConnector +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse as PlatformConnectorListResponse +from workato_platform.client.workato_api.models.project import Project as Project +from workato_platform.client.workato_api.models.recipe import Recipe as Recipe +from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner as RecipeConfigInner +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest as RecipeConnectionUpdateRequest +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse as RecipeListResponse +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse as RecipeStartResponse +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest as RuntimeUserConnectionCreateRequest +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse as RuntimeUserConnectionResponse +from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData as RuntimeUserConnectionResponseData +from workato_platform.client.workato_api.models.success_response import SuccessResponse as SuccessResponse +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest as UpsertProjectPropertiesRequest +from workato_platform.client.workato_api.models.user import User as User +from workato_platform.client.workato_api.models.validation_error import ValidationError as ValidationError +from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue as ValidationErrorErrorsValue + diff --git a/src/workato_platform/client/workato_api/api/__init__.py b/src/workato_platform/client/workato_api/api/__init__.py new file mode 100644 index 0000000..a0e5380 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/__init__.py @@ -0,0 +1,15 @@ +# flake8: noqa + +# import apis into api package +from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi +from workato_platform.client.workato_api.api.connections_api import ConnectionsApi +from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi +from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi +from workato_platform.client.workato_api.api.export_api import ExportApi +from workato_platform.client.workato_api.api.folders_api import FoldersApi +from workato_platform.client.workato_api.api.packages_api import PackagesApi +from workato_platform.client.workato_api.api.projects_api import ProjectsApi +from workato_platform.client.workato_api.api.properties_api import PropertiesApi +from workato_platform.client.workato_api.api.recipes_api import RecipesApi +from workato_platform.client.workato_api.api.users_api import UsersApi + diff --git a/src/workato_platform/client/workato_api/api/api_platform_api.py b/src/workato_platform/client/workato_api/api/api_platform_api.py new file mode 100644 index 0000000..8103398 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/api_platform_api.py @@ -0,0 +1,2875 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt +from typing import List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform.client.workato_api.models.success_response import SuccessResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class APIPlatformApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_api_client( + self, + api_client_create_request: ApiClientCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiClientResponse: + """Create API client (v2) + + Create a new API client within a project with various authentication methods + + :param api_client_create_request: (required) + :type api_client_create_request: ApiClientCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_client_serialize( + api_client_create_request=api_client_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_api_client_with_http_info( + self, + api_client_create_request: ApiClientCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiClientResponse]: + """Create API client (v2) + + Create a new API client within a project with various authentication methods + + :param api_client_create_request: (required) + :type api_client_create_request: ApiClientCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_client_serialize( + api_client_create_request=api_client_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_api_client_without_preload_content( + self, + api_client_create_request: ApiClientCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create API client (v2) + + Create a new API client within a project with various authentication methods + + :param api_client_create_request: (required) + :type api_client_create_request: ApiClientCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_client_serialize( + api_client_create_request=api_client_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_api_client_serialize( + self, + api_client_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if api_client_create_request is not None: + _body_params = api_client_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/api_clients', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_api_collection( + self, + api_collection_create_request: ApiCollectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiCollection: + """Create API collection + + Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. + + :param api_collection_create_request: (required) + :type api_collection_create_request: ApiCollectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_collection_serialize( + api_collection_create_request=api_collection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiCollection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_api_collection_with_http_info( + self, + api_collection_create_request: ApiCollectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiCollection]: + """Create API collection + + Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. + + :param api_collection_create_request: (required) + :type api_collection_create_request: ApiCollectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_collection_serialize( + api_collection_create_request=api_collection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiCollection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_api_collection_without_preload_content( + self, + api_collection_create_request: ApiCollectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create API collection + + Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. + + :param api_collection_create_request: (required) + :type api_collection_create_request: ApiCollectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_collection_serialize( + api_collection_create_request=api_collection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiCollection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_api_collection_serialize( + self, + api_collection_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if api_collection_create_request is not None: + _body_params = api_collection_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/api_collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_api_key( + self, + api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], + api_key_create_request: ApiKeyCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiKeyResponse: + """Create an API key + + Create a new API key for an API client + + :param api_client_id: Specify the ID of the API client to create the API key for (required) + :type api_client_id: int + :param api_key_create_request: (required) + :type api_key_create_request: ApiKeyCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_key_serialize( + api_client_id=api_client_id, + api_key_create_request=api_key_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_api_key_with_http_info( + self, + api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], + api_key_create_request: ApiKeyCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiKeyResponse]: + """Create an API key + + Create a new API key for an API client + + :param api_client_id: Specify the ID of the API client to create the API key for (required) + :type api_client_id: int + :param api_key_create_request: (required) + :type api_key_create_request: ApiKeyCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_key_serialize( + api_client_id=api_client_id, + api_key_create_request=api_key_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_api_key_without_preload_content( + self, + api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], + api_key_create_request: ApiKeyCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an API key + + Create a new API key for an API client + + :param api_client_id: Specify the ID of the API client to create the API key for (required) + :type api_client_id: int + :param api_key_create_request: (required) + :type api_key_create_request: ApiKeyCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_api_key_serialize( + api_client_id=api_client_id, + api_key_create_request=api_key_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_api_key_serialize( + self, + api_client_id, + api_key_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_client_id is not None: + _path_params['api_client_id'] = api_client_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if api_key_create_request is not None: + _body_params = api_key_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v2/api_clients/{api_client_id}/api_keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def disable_api_endpoint( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Disable an API endpoint + + Disables an active API endpoint. The endpoint can no longer be called by a client. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._disable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def disable_api_endpoint_with_http_info( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Disable an API endpoint + + Disables an active API endpoint. The endpoint can no longer be called by a client. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._disable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def disable_api_endpoint_without_preload_content( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Disable an API endpoint + + Disables an active API endpoint. The endpoint can no longer be called by a client. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._disable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _disable_api_endpoint_serialize( + self, + api_endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_endpoint_id is not None: + _path_params['api_endpoint_id'] = api_endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/api_endpoints/{api_endpoint_id}/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def enable_api_endpoint( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Enable an API endpoint + + Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def enable_api_endpoint_with_http_info( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Enable an API endpoint + + Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def enable_api_endpoint_without_preload_content( + self, + api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable an API endpoint + + Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. + + :param api_endpoint_id: ID of the API endpoint (required) + :type api_endpoint_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enable_api_endpoint_serialize( + api_endpoint_id=api_endpoint_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enable_api_endpoint_serialize( + self, + api_endpoint_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_endpoint_id is not None: + _path_params['api_endpoint_id'] = api_endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/api_endpoints/{api_endpoint_id}/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_api_clients( + self, + project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, + cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiClientListResponse: + """List API clients (v2) + + List all API clients. This endpoint includes the project_id of the API client in the response. + + :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint + :type project_id: int + :param page: Page number + :type page: int + :param per_page: Page size. The maximum page size is 100 + :type per_page: int + :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles + :type cert_bundle_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_clients_serialize( + project_id=project_id, + page=page, + per_page=per_page, + cert_bundle_ids=cert_bundle_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_api_clients_with_http_info( + self, + project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, + cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiClientListResponse]: + """List API clients (v2) + + List all API clients. This endpoint includes the project_id of the API client in the response. + + :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint + :type project_id: int + :param page: Page number + :type page: int + :param per_page: Page size. The maximum page size is 100 + :type per_page: int + :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles + :type cert_bundle_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_clients_serialize( + project_id=project_id, + page=page, + per_page=per_page, + cert_bundle_ids=cert_bundle_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_api_clients_without_preload_content( + self, + project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, + cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List API clients (v2) + + List all API clients. This endpoint includes the project_id of the API client in the response. + + :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint + :type project_id: int + :param page: Page number + :type page: int + :param per_page: Page size. The maximum page size is 100 + :type per_page: int + :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles + :type cert_bundle_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_clients_serialize( + project_id=project_id, + page=page, + per_page=per_page, + cert_bundle_ids=cert_bundle_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiClientListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_api_clients_serialize( + self, + project_id, + page, + per_page, + cert_bundle_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'cert_bundle_ids': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('project_id', project_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + if cert_bundle_ids is not None: + + _query_params.append(('cert_bundle_ids', cert_bundle_ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/api_clients', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_api_collections( + self, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiCollection]: + """List API collections + + List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. + + :param per_page: Number of API collections to return in a single page + :type per_page: int + :param page: Page number of the API collections to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_collections_serialize( + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiCollection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_api_collections_with_http_info( + self, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiCollection]]: + """List API collections + + List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. + + :param per_page: Number of API collections to return in a single page + :type per_page: int + :param page: Page number of the API collections to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_collections_serialize( + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiCollection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_api_collections_without_preload_content( + self, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List API collections + + List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. + + :param per_page: Number of API collections to return in a single page + :type per_page: int + :param page: Page number of the API collections to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_collections_serialize( + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiCollection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_api_collections_serialize( + self, + per_page, + page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + if page is not None: + + _query_params.append(('page', page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/api_collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_api_endpoints( + self, + api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiEndpoint]: + """List API endpoints + + Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. + + :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned + :type api_collection_id: int + :param per_page: Number of API endpoints to return in a single page + :type per_page: int + :param page: Page number of the API endpoints to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_endpoints_serialize( + api_collection_id=api_collection_id, + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiEndpoint]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_api_endpoints_with_http_info( + self, + api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiEndpoint]]: + """List API endpoints + + Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. + + :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned + :type api_collection_id: int + :param per_page: Number of API endpoints to return in a single page + :type per_page: int + :param page: Page number of the API endpoints to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_endpoints_serialize( + api_collection_id=api_collection_id, + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiEndpoint]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_api_endpoints_without_preload_content( + self, + api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List API endpoints + + Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. + + :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned + :type api_collection_id: int + :param per_page: Number of API endpoints to return in a single page + :type per_page: int + :param page: Page number of the API endpoints to fetch + :type page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_endpoints_serialize( + api_collection_id=api_collection_id, + per_page=per_page, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiEndpoint]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_api_endpoints_serialize( + self, + api_collection_id, + per_page, + page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if api_collection_id is not None: + + _query_params.append(('api_collection_id', api_collection_id)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + if page is not None: + + _query_params.append(('page', page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/api_endpoints', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_api_keys( + self, + api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiKeyListResponse: + """List API keys + + Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. + + :param api_client_id: Filter API keys for a specific API client (required) + :type api_client_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_keys_serialize( + api_client_id=api_client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_api_keys_with_http_info( + self, + api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiKeyListResponse]: + """List API keys + + Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. + + :param api_client_id: Filter API keys for a specific API client (required) + :type api_client_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_keys_serialize( + api_client_id=api_client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_api_keys_without_preload_content( + self, + api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List API keys + + Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. + + :param api_client_id: Filter API keys for a specific API client (required) + :type api_client_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_api_keys_serialize( + api_client_id=api_client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_api_keys_serialize( + self, + api_client_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_client_id is not None: + _path_params['api_client_id'] = api_client_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/api_clients/{api_client_id}/api_keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def refresh_api_key_secret( + self, + api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], + api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiKeyResponse: + """Refresh API key secret + + Refresh the authentication token or OAuth 2.0 client secret for an API key. + + :param api_client_id: ID of the API client that owns the API key (required) + :type api_client_id: int + :param api_key_id: ID of the API key to refresh (required) + :type api_key_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refresh_api_key_secret_serialize( + api_client_id=api_client_id, + api_key_id=api_key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def refresh_api_key_secret_with_http_info( + self, + api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], + api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiKeyResponse]: + """Refresh API key secret + + Refresh the authentication token or OAuth 2.0 client secret for an API key. + + :param api_client_id: ID of the API client that owns the API key (required) + :type api_client_id: int + :param api_key_id: ID of the API key to refresh (required) + :type api_key_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refresh_api_key_secret_serialize( + api_client_id=api_client_id, + api_key_id=api_key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def refresh_api_key_secret_without_preload_content( + self, + api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], + api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Refresh API key secret + + Refresh the authentication token or OAuth 2.0 client secret for an API key. + + :param api_client_id: ID of the API client that owns the API key (required) + :type api_client_id: int + :param api_key_id: ID of the API key to refresh (required) + :type api_key_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refresh_api_key_secret_serialize( + api_client_id=api_client_id, + api_key_id=api_key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiKeyResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _refresh_api_key_secret_serialize( + self, + api_client_id, + api_key_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_client_id is not None: + _path_params['api_client_id'] = api_client_id + if api_key_id is not None: + _path_params['api_key_id'] = api_key_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/connections_api.py b/src/workato_platform/client/workato_api/api/connections_api.py new file mode 100644 index 0000000..467e9a4 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/connections_api.py @@ -0,0 +1,1807 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.connection import Connection +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class ConnectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_connection( + self, + connection_create_request: ConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Connection: + """Create a connection + + Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. + + :param connection_create_request: (required) + :type connection_create_request: ConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_connection_serialize( + connection_create_request=connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_connection_with_http_info( + self, + connection_create_request: ConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Connection]: + """Create a connection + + Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. + + :param connection_create_request: (required) + :type connection_create_request: ConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_connection_serialize( + connection_create_request=connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_connection_without_preload_content( + self, + connection_create_request: ConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a connection + + Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. + + :param connection_create_request: (required) + :type connection_create_request: ConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_connection_serialize( + connection_create_request=connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_connection_serialize( + self, + connection_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if connection_create_request is not None: + _body_params = connection_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_runtime_user_connection( + self, + runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RuntimeUserConnectionResponse: + """Create OAuth runtime user connection + + Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. + + :param runtime_user_connection_create_request: (required) + :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_runtime_user_connection_serialize( + runtime_user_connection_create_request=runtime_user_connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RuntimeUserConnectionResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_runtime_user_connection_with_http_info( + self, + runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RuntimeUserConnectionResponse]: + """Create OAuth runtime user connection + + Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. + + :param runtime_user_connection_create_request: (required) + :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_runtime_user_connection_serialize( + runtime_user_connection_create_request=runtime_user_connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RuntimeUserConnectionResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_runtime_user_connection_without_preload_content( + self, + runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create OAuth runtime user connection + + Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. + + :param runtime_user_connection_create_request: (required) + :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_runtime_user_connection_serialize( + runtime_user_connection_create_request=runtime_user_connection_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RuntimeUserConnectionResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_runtime_user_connection_serialize( + self, + runtime_user_connection_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if runtime_user_connection_create_request is not None: + _body_params = runtime_user_connection_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/connections/runtime_user_connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_connection_oauth_url( + self, + connection_id: Annotated[StrictInt, Field(description="Connection ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuthUrlResponse: + """Get OAuth URL for connection + + Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. + + :param connection_id: Connection ID (required) + :type connection_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_oauth_url_serialize( + connection_id=connection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthUrlResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_connection_oauth_url_with_http_info( + self, + connection_id: Annotated[StrictInt, Field(description="Connection ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuthUrlResponse]: + """Get OAuth URL for connection + + Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. + + :param connection_id: Connection ID (required) + :type connection_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_oauth_url_serialize( + connection_id=connection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthUrlResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_connection_oauth_url_without_preload_content( + self, + connection_id: Annotated[StrictInt, Field(description="Connection ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OAuth URL for connection + + Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. + + :param connection_id: Connection ID (required) + :type connection_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_oauth_url_serialize( + connection_id=connection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuthUrlResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_connection_oauth_url_serialize( + self, + connection_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/connections/runtime_user_connections/{connection_id}/get_oauth_url', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_connection_picklist( + self, + connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], + picklist_request: PicklistRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PicklistResponse: + """Get picklist values + + Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. + + :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) + :type connection_id: int + :param picklist_request: (required) + :type picklist_request: PicklistRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_picklist_serialize( + connection_id=connection_id, + picklist_request=picklist_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PicklistResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_connection_picklist_with_http_info( + self, + connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], + picklist_request: PicklistRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PicklistResponse]: + """Get picklist values + + Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. + + :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) + :type connection_id: int + :param picklist_request: (required) + :type picklist_request: PicklistRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_picklist_serialize( + connection_id=connection_id, + picklist_request=picklist_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PicklistResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_connection_picklist_without_preload_content( + self, + connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], + picklist_request: PicklistRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get picklist values + + Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. + + :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) + :type connection_id: int + :param picklist_request: (required) + :type picklist_request: PicklistRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_picklist_serialize( + connection_id=connection_id, + picklist_request=picklist_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PicklistResponse", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_connection_picklist_serialize( + self, + connection_id, + picklist_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if picklist_request is not None: + _body_params = picklist_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/connections/{connection_id}/pick_list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_connections( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, + external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, + include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Connection]: + """List connections + + Returns all connections and associated data for the authenticated user + + :param folder_id: Folder ID of the connection + :type folder_id: int + :param parent_id: Parent ID of the connection (must be same provider) + :type parent_id: int + :param external_id: External identifier for the connection + :type external_id: str + :param include_runtime_connections: When \"true\", include all runtime user connections + :type include_runtime_connections: bool + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connections_serialize( + folder_id=folder_id, + parent_id=parent_id, + external_id=external_id, + include_runtime_connections=include_runtime_connections, + includes=includes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Connection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_connections_with_http_info( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, + external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, + include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Connection]]: + """List connections + + Returns all connections and associated data for the authenticated user + + :param folder_id: Folder ID of the connection + :type folder_id: int + :param parent_id: Parent ID of the connection (must be same provider) + :type parent_id: int + :param external_id: External identifier for the connection + :type external_id: str + :param include_runtime_connections: When \"true\", include all runtime user connections + :type include_runtime_connections: bool + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connections_serialize( + folder_id=folder_id, + parent_id=parent_id, + external_id=external_id, + include_runtime_connections=include_runtime_connections, + includes=includes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Connection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_connections_without_preload_content( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, + external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, + include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List connections + + Returns all connections and associated data for the authenticated user + + :param folder_id: Folder ID of the connection + :type folder_id: int + :param parent_id: Parent ID of the connection (must be same provider) + :type parent_id: int + :param external_id: External identifier for the connection + :type external_id: str + :param include_runtime_connections: When \"true\", include all runtime user connections + :type include_runtime_connections: bool + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connections_serialize( + folder_id=folder_id, + parent_id=parent_id, + external_id=external_id, + include_runtime_connections=include_runtime_connections, + includes=includes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Connection]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_connections_serialize( + self, + folder_id, + parent_id, + external_id, + include_runtime_connections, + includes, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'includes[]': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if folder_id is not None: + + _query_params.append(('folder_id', folder_id)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if external_id is not None: + + _query_params.append(('external_id', external_id)) + + if include_runtime_connections is not None: + + _query_params.append(('include_runtime_connections', include_runtime_connections)) + + if includes is not None: + + _query_params.append(('includes[]', includes)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_connection( + self, + connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], + connection_update_request: Optional[ConnectionUpdateRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Connection: + """Update a connection + + Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. + + :param connection_id: The ID of the connection (required) + :type connection_id: int + :param connection_update_request: + :type connection_update_request: ConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_connection_serialize( + connection_id=connection_id, + connection_update_request=connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_connection_with_http_info( + self, + connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], + connection_update_request: Optional[ConnectionUpdateRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Connection]: + """Update a connection + + Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. + + :param connection_id: The ID of the connection (required) + :type connection_id: int + :param connection_update_request: + :type connection_update_request: ConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_connection_serialize( + connection_id=connection_id, + connection_update_request=connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_connection_without_preload_content( + self, + connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], + connection_update_request: Optional[ConnectionUpdateRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a connection + + Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. + + :param connection_id: The ID of the connection (required) + :type connection_id: int + :param connection_update_request: + :type connection_update_request: ConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_connection_serialize( + connection_id=connection_id, + connection_update_request=connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Connection", + '400': "ValidationError", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_connection_serialize( + self, + connection_id, + connection_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if connection_update_request is not None: + _body_params = connection_update_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/connections/{connection_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/connectors_api.py b/src/workato_platform/client/workato_api/api/connectors_api.py new file mode 100644 index 0000000..e51fcb8 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/connectors_api.py @@ -0,0 +1,840 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt +from typing import Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class ConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def get_custom_connector_code( + self, + id: Annotated[StrictInt, Field(description="The ID of the custom connector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomConnectorCodeResponse: + """Get custom connector code + + Fetch the code for a specific custom connector + + :param id: The ID of the custom connector (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_custom_connector_code_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorCodeResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_custom_connector_code_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The ID of the custom connector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomConnectorCodeResponse]: + """Get custom connector code + + Fetch the code for a specific custom connector + + :param id: The ID of the custom connector (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_custom_connector_code_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorCodeResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_custom_connector_code_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The ID of the custom connector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get custom connector code + + Fetch the code for a specific custom connector + + :param id: The ID of the custom connector (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_custom_connector_code_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorCodeResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_custom_connector_code_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/custom_connectors/{id}/code', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_custom_connectors( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomConnectorListResponse: + """List custom connectors + + Returns a list of all custom connectors + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_custom_connectors_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_custom_connectors_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomConnectorListResponse]: + """List custom connectors + + Returns a list of all custom connectors + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_custom_connectors_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_custom_connectors_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List custom connectors + + Returns a list of all custom connectors + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_custom_connectors_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_custom_connectors_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/custom_connectors', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_platform_connectors( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PlatformConnectorListResponse: + """List platform connectors + + Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. + + :param page: Page number + :type page: int + :param per_page: Number of records per page (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_platform_connectors_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PlatformConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_platform_connectors_with_http_info( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PlatformConnectorListResponse]: + """List platform connectors + + Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. + + :param page: Page number + :type page: int + :param per_page: Number of records per page (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_platform_connectors_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PlatformConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_platform_connectors_without_preload_content( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List platform connectors + + Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. + + :param page: Page number + :type page: int + :param per_page: Number of records per page (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_platform_connectors_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PlatformConnectorListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_platform_connectors_serialize( + self, + page, + per_page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/integrations/all', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/data_tables_api.py b/src/workato_platform/client/workato_api/api/data_tables_api.py new file mode 100644 index 0000000..c47e59f --- /dev/null +++ b/src/workato_platform/client/workato_api/api/data_tables_api.py @@ -0,0 +1,604 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt +from typing import Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class DataTablesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_data_table( + self, + data_table_create_request: DataTableCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DataTableCreateResponse: + """Create data table + + Creates a data table in a folder you specify + + :param data_table_create_request: (required) + :type data_table_create_request: DataTableCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_data_table_serialize( + data_table_create_request=data_table_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableCreateResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_data_table_with_http_info( + self, + data_table_create_request: DataTableCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DataTableCreateResponse]: + """Create data table + + Creates a data table in a folder you specify + + :param data_table_create_request: (required) + :type data_table_create_request: DataTableCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_data_table_serialize( + data_table_create_request=data_table_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableCreateResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_data_table_without_preload_content( + self, + data_table_create_request: DataTableCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create data table + + Creates a data table in a folder you specify + + :param data_table_create_request: (required) + :type data_table_create_request: DataTableCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_data_table_serialize( + data_table_create_request=data_table_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableCreateResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_data_table_serialize( + self, + data_table_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if data_table_create_request is not None: + _body_params = data_table_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/data_tables', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_data_tables( + self, + page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DataTableListResponse: + """List data tables + + Returns a list of all data tables in your workspace + + :param page: Page number of the data tables to fetch + :type page: int + :param per_page: Page size (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_data_tables_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_data_tables_with_http_info( + self, + page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DataTableListResponse]: + """List data tables + + Returns a list of all data tables in your workspace + + :param page: Page number of the data tables to fetch + :type page: int + :param per_page: Page size (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_data_tables_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_data_tables_without_preload_content( + self, + page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List data tables + + Returns a list of all data tables in your workspace + + :param page: Page number of the data tables to fetch + :type page: int + :param per_page: Page size (max 100) + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_data_tables_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataTableListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_data_tables_serialize( + self, + page, + per_page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/data_tables', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/export_api.py b/src/workato_platform/client/workato_api/api/export_api.py new file mode 100644 index 0000000..60fb7fd --- /dev/null +++ b/src/workato_platform/client/workato_api/api/export_api.py @@ -0,0 +1,621 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt +from typing import Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class ExportApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_export_manifest( + self, + create_export_manifest_request: CreateExportManifestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExportManifestResponse: + """Create an export manifest + + Create an export manifest for exporting assets + + :param create_export_manifest_request: (required) + :type create_export_manifest_request: CreateExportManifestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_manifest_serialize( + create_export_manifest_request=create_export_manifest_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExportManifestResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_export_manifest_with_http_info( + self, + create_export_manifest_request: CreateExportManifestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExportManifestResponse]: + """Create an export manifest + + Create an export manifest for exporting assets + + :param create_export_manifest_request: (required) + :type create_export_manifest_request: CreateExportManifestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_manifest_serialize( + create_export_manifest_request=create_export_manifest_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExportManifestResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_export_manifest_without_preload_content( + self, + create_export_manifest_request: CreateExportManifestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an export manifest + + Create an export manifest for exporting assets + + :param create_export_manifest_request: (required) + :type create_export_manifest_request: CreateExportManifestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_manifest_serialize( + create_export_manifest_request=create_export_manifest_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExportManifestResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_export_manifest_serialize( + self, + create_export_manifest_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_export_manifest_request is not None: + _body_params = create_export_manifest_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/export_manifests', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_assets_in_folder( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, + include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, + include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderAssetsResponse: + """View assets in a folder + + View assets in a folder. Useful for creating or updating export manifests. + + :param folder_id: The ID of the folder containing the assets + :type folder_id: int + :param include_test_cases: Include test cases (currently not supported) + :type include_test_cases: bool + :param include_data: Include data from the list of assets + :type include_data: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assets_in_folder_serialize( + folder_id=folder_id, + include_test_cases=include_test_cases, + include_data=include_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderAssetsResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_assets_in_folder_with_http_info( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, + include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, + include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderAssetsResponse]: + """View assets in a folder + + View assets in a folder. Useful for creating or updating export manifests. + + :param folder_id: The ID of the folder containing the assets + :type folder_id: int + :param include_test_cases: Include test cases (currently not supported) + :type include_test_cases: bool + :param include_data: Include data from the list of assets + :type include_data: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assets_in_folder_serialize( + folder_id=folder_id, + include_test_cases=include_test_cases, + include_data=include_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderAssetsResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_assets_in_folder_without_preload_content( + self, + folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, + include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, + include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """View assets in a folder + + View assets in a folder. Useful for creating or updating export manifests. + + :param folder_id: The ID of the folder containing the assets + :type folder_id: int + :param include_test_cases: Include test cases (currently not supported) + :type include_test_cases: bool + :param include_data: Include data from the list of assets + :type include_data: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assets_in_folder_serialize( + folder_id=folder_id, + include_test_cases=include_test_cases, + include_data=include_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderAssetsResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_assets_in_folder_serialize( + self, + folder_id, + include_test_cases, + include_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if folder_id is not None: + + _query_params.append(('folder_id', folder_id)) + + if include_test_cases is not None: + + _query_params.append(('include_test_cases', include_test_cases)) + + if include_data is not None: + + _query_params.append(('include_data', include_data)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/export_manifests/folder_assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/folders_api.py b/src/workato_platform/client/workato_api/api/folders_api.py new file mode 100644 index 0000000..b1cc3b5 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/folders_api.py @@ -0,0 +1,621 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt +from typing import List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform.client.workato_api.models.folder import Folder +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class FoldersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_folder( + self, + create_folder_request: CreateFolderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderCreationResponse: + """Create a folder + + Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. + + :param create_folder_request: (required) + :type create_folder_request: CreateFolderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_folder_serialize( + create_folder_request=create_folder_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCreationResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_folder_with_http_info( + self, + create_folder_request: CreateFolderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderCreationResponse]: + """Create a folder + + Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. + + :param create_folder_request: (required) + :type create_folder_request: CreateFolderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_folder_serialize( + create_folder_request=create_folder_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCreationResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_folder_without_preload_content( + self, + create_folder_request: CreateFolderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a folder + + Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. + + :param create_folder_request: (required) + :type create_folder_request: CreateFolderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_folder_serialize( + create_folder_request=create_folder_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCreationResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_folder_serialize( + self, + create_folder_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_folder_request is not None: + _body_params = create_folder_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_folders( + self, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Folder]: + """List folders + + Lists all folders. + + :param parent_id: Parent folder ID. Defaults to Home folder. + :type parent_id: int + :param page: Page number. Defaults to 1. + :type page: int + :param per_page: Page size. Defaults to 100 (maximum is 100). + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_folders_serialize( + parent_id=parent_id, + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Folder]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_folders_with_http_info( + self, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Folder]]: + """List folders + + Lists all folders. + + :param parent_id: Parent folder ID. Defaults to Home folder. + :type parent_id: int + :param page: Page number. Defaults to 1. + :type page: int + :param per_page: Page size. Defaults to 100 (maximum is 100). + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_folders_serialize( + parent_id=parent_id, + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Folder]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_folders_without_preload_content( + self, + parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List folders + + Lists all folders. + + :param parent_id: Parent folder ID. Defaults to Home folder. + :type parent_id: int + :param page: Page number. Defaults to 1. + :type page: int + :param per_page: Page size. Defaults to 100 (maximum is 100). + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_folders_serialize( + parent_id=parent_id, + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Folder]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_folders_serialize( + self, + parent_id, + page, + per_page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/packages_api.py b/src/workato_platform/client/workato_api/api/packages_api.py new file mode 100644 index 0000000..def7dab --- /dev/null +++ b/src/workato_platform/client/workato_api/api/packages_api.py @@ -0,0 +1,1197 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr +from typing import Optional, Tuple, Union +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform.client.workato_api.models.package_response import PackageResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class PackagesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def download_package( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download package + + Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '302': None, + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def download_package_with_http_info( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download package + + Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '302': None, + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def download_package_without_preload_content( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download package + + Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '302': None, + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _download_package_serialize( + self, + package_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if package_id is not None: + _path_params['package_id'] = package_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zip', + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/packages/{package_id}/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def export_package( + self, + id: Annotated[StrictStr, Field(description="Export manifest ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PackageResponse: + """Export a package based on a manifest + + Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. + + :param id: Export manifest ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_package_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def export_package_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Export manifest ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PackageResponse]: + """Export a package based on a manifest + + Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. + + :param id: Export manifest ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_package_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def export_package_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Export manifest ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Export a package based on a manifest + + Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. + + :param id: Export manifest ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_package_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_package_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/packages/export/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_package( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PackageDetailsResponse: + """Get package details + + Get details of an imported or exported package including status + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageDetailsResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_package_with_http_info( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PackageDetailsResponse]: + """Get package details + + Get details of an imported or exported package including status + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageDetailsResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_package_without_preload_content( + self, + package_id: Annotated[StrictInt, Field(description="Package ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get package details + + Get details of an imported or exported package including status + + :param package_id: Package ID (required) + :type package_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_package_serialize( + package_id=package_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageDetailsResponse", + '401': "Error", + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_package_serialize( + self, + package_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if package_id is not None: + _path_params['package_id'] = package_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/packages/{package_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def import_package( + self, + id: Annotated[StrictInt, Field(description="Folder ID")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, + include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, + folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PackageResponse: + """Import a package into a folder + + Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. + + :param id: Folder ID (required) + :type id: int + :param body: (required) + :type body: bytearray + :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. + :type restart_recipes: bool + :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. + :type include_tags: bool + :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. + :type folder_id_for_home_assets: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_package_serialize( + id=id, + body=body, + restart_recipes=restart_recipes, + include_tags=include_tags, + folder_id_for_home_assets=folder_id_for_home_assets, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def import_package_with_http_info( + self, + id: Annotated[StrictInt, Field(description="Folder ID")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, + include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, + folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PackageResponse]: + """Import a package into a folder + + Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. + + :param id: Folder ID (required) + :type id: int + :param body: (required) + :type body: bytearray + :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. + :type restart_recipes: bool + :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. + :type include_tags: bool + :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. + :type folder_id_for_home_assets: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_package_serialize( + id=id, + body=body, + restart_recipes=restart_recipes, + include_tags=include_tags, + folder_id_for_home_assets=folder_id_for_home_assets, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def import_package_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="Folder ID")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, + include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, + folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import a package into a folder + + Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. + + :param id: Folder ID (required) + :type id: int + :param body: (required) + :type body: bytearray + :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. + :type restart_recipes: bool + :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. + :type include_tags: bool + :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. + :type folder_id_for_home_assets: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_package_serialize( + id=id, + body=body, + restart_recipes=restart_recipes, + include_tags=include_tags, + folder_id_for_home_assets=folder_id_for_home_assets, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PackageResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _import_package_serialize( + self, + id, + body, + restart_recipes, + include_tags, + folder_id_for_home_assets, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if restart_recipes is not None: + + _query_params.append(('restart_recipes', restart_recipes)) + + if include_tags is not None: + + _query_params.append(('include_tags', include_tags)) + + if folder_id_for_home_assets is not None: + + _query_params.append(('folder_id_for_home_assets', folder_id_for_home_assets)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/packages/import/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/projects_api.py b/src/workato_platform/client/workato_api/api/projects_api.py new file mode 100644 index 0000000..b9770ec --- /dev/null +++ b/src/workato_platform/client/workato_api/api/projects_api.py @@ -0,0 +1,590 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt +from typing import List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.project import Project +from workato_platform.client.workato_api.models.success_response import SuccessResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class ProjectsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def delete_project( + self, + project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Delete a project + + Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. + + :param project_id: The ID of the project to delete (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + '403': "DeleteProject403Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_project_with_http_info( + self, + project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Delete a project + + Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. + + :param project_id: The ID of the project to delete (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + '403': "DeleteProject403Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_project_without_preload_content( + self, + project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a project + + Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. + + :param project_id: The ID of the project to delete (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '401': "Error", + '403': "DeleteProject403Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_project_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['project_id'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/projects/{project_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_projects( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Project]: + """List projects + + Returns a list of projects belonging to the authenticated user with pagination support + + :param page: Page number + :type page: int + :param per_page: Number of projects per page + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_projects_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Project]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_projects_with_http_info( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Project]]: + """List projects + + Returns a list of projects belonging to the authenticated user with pagination support + + :param page: Page number + :type page: int + :param per_page: Number of projects per page + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_projects_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Project]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_projects_without_preload_content( + self, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List projects + + Returns a list of projects belonging to the authenticated user with pagination support + + :param page: Page number + :type page: int + :param per_page: Number of projects per page + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_projects_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Project]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_projects_serialize( + self, + page, + per_page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/projects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/properties_api.py b/src/workato_platform/client/workato_api/api/properties_api.py new file mode 100644 index 0000000..2f35eb0 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/properties_api.py @@ -0,0 +1,620 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Dict +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class PropertiesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def list_project_properties( + self, + prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], + project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, str]: + """List project properties + + Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. + + :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) + :type prefix: str + :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_project_properties_serialize( + prefix=prefix, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, str]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_project_properties_with_http_info( + self, + prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], + project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, str]]: + """List project properties + + Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. + + :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) + :type prefix: str + :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_project_properties_serialize( + prefix=prefix, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, str]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_project_properties_without_preload_content( + self, + prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], + project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List project properties + + Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. + + :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) + :type prefix: str + :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) + :type project_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_project_properties_serialize( + prefix=prefix, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, str]", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_project_properties_serialize( + self, + prefix, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if prefix is not None: + + _query_params.append(('prefix', prefix)) + + if project_id is not None: + + _query_params.append(('project_id', project_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/properties', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def upsert_project_properties( + self, + project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], + upsert_project_properties_request: UpsertProjectPropertiesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Upsert project properties + + Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters + + :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) + :type project_id: int + :param upsert_project_properties_request: (required) + :type upsert_project_properties_request: UpsertProjectPropertiesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upsert_project_properties_serialize( + project_id=project_id, + upsert_project_properties_request=upsert_project_properties_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def upsert_project_properties_with_http_info( + self, + project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], + upsert_project_properties_request: UpsertProjectPropertiesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Upsert project properties + + Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters + + :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) + :type project_id: int + :param upsert_project_properties_request: (required) + :type upsert_project_properties_request: UpsertProjectPropertiesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upsert_project_properties_serialize( + project_id=project_id, + upsert_project_properties_request=upsert_project_properties_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def upsert_project_properties_without_preload_content( + self, + project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], + upsert_project_properties_request: UpsertProjectPropertiesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upsert project properties + + Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters + + :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) + :type project_id: int + :param upsert_project_properties_request: (required) + :type upsert_project_properties_request: UpsertProjectPropertiesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upsert_project_properties_serialize( + project_id=project_id, + upsert_project_properties_request=upsert_project_properties_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "ValidationError", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upsert_project_properties_serialize( + self, + project_id, + upsert_project_properties_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('project_id', project_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + if upsert_project_properties_request is not None: + _body_params = upsert_project_properties_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/properties', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/recipes_api.py b/src/workato_platform/client/workato_api/api/recipes_api.py new file mode 100644 index 0000000..d2ff2b6 --- /dev/null +++ b/src/workato_platform/client/workato_api/api/recipes_api.py @@ -0,0 +1,1379 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform.client.workato_api.models.success_response import SuccessResponse + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class RecipesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def list_recipes( + self, + adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, + adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, + folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, + order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, + running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, + since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, + stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, + stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, + updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecipeListResponse: + """List recipes + + Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. + + :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) + :type adapter_names_all: str + :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) + :type adapter_names_any: str + :param folder_id: Return recipes in specified folder + :type folder_id: int + :param order: Set ordering method + :type order: str + :param page: Page number + :type page: int + :param per_page: Number of recipes per page + :type per_page: int + :param running: If true, returns only running recipes + :type running: bool + :param since_id: Return recipes with IDs lower than this value + :type since_id: int + :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) + :type stopped_after: datetime + :param stop_cause: Filter by stop reason + :type stop_cause: str + :param updated_after: Include recipes updated after this date (ISO 8601 format) + :type updated_after: datetime + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param exclude_code: Exclude recipe code from response for better performance + :type exclude_code: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_recipes_serialize( + adapter_names_all=adapter_names_all, + adapter_names_any=adapter_names_any, + folder_id=folder_id, + order=order, + page=page, + per_page=per_page, + running=running, + since_id=since_id, + stopped_after=stopped_after, + stop_cause=stop_cause, + updated_after=updated_after, + includes=includes, + exclude_code=exclude_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_recipes_with_http_info( + self, + adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, + adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, + folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, + order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, + running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, + since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, + stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, + stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, + updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecipeListResponse]: + """List recipes + + Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. + + :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) + :type adapter_names_all: str + :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) + :type adapter_names_any: str + :param folder_id: Return recipes in specified folder + :type folder_id: int + :param order: Set ordering method + :type order: str + :param page: Page number + :type page: int + :param per_page: Number of recipes per page + :type per_page: int + :param running: If true, returns only running recipes + :type running: bool + :param since_id: Return recipes with IDs lower than this value + :type since_id: int + :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) + :type stopped_after: datetime + :param stop_cause: Filter by stop reason + :type stop_cause: str + :param updated_after: Include recipes updated after this date (ISO 8601 format) + :type updated_after: datetime + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param exclude_code: Exclude recipe code from response for better performance + :type exclude_code: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_recipes_serialize( + adapter_names_all=adapter_names_all, + adapter_names_any=adapter_names_any, + folder_id=folder_id, + order=order, + page=page, + per_page=per_page, + running=running, + since_id=since_id, + stopped_after=stopped_after, + stop_cause=stop_cause, + updated_after=updated_after, + includes=includes, + exclude_code=exclude_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_recipes_without_preload_content( + self, + adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, + adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, + folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, + order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, + per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, + running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, + since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, + stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, + stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, + updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, + includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, + exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List recipes + + Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. + + :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) + :type adapter_names_all: str + :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) + :type adapter_names_any: str + :param folder_id: Return recipes in specified folder + :type folder_id: int + :param order: Set ordering method + :type order: str + :param page: Page number + :type page: int + :param per_page: Number of recipes per page + :type per_page: int + :param running: If true, returns only running recipes + :type running: bool + :param since_id: Return recipes with IDs lower than this value + :type since_id: int + :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) + :type stopped_after: datetime + :param stop_cause: Filter by stop reason + :type stop_cause: str + :param updated_after: Include recipes updated after this date (ISO 8601 format) + :type updated_after: datetime + :param includes: Additional fields to include (e.g., tags) + :type includes: List[str] + :param exclude_code: Exclude recipe code from response for better performance + :type exclude_code: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_recipes_serialize( + adapter_names_all=adapter_names_all, + adapter_names_any=adapter_names_any, + folder_id=folder_id, + order=order, + page=page, + per_page=per_page, + running=running, + since_id=since_id, + stopped_after=stopped_after, + stop_cause=stop_cause, + updated_after=updated_after, + includes=includes, + exclude_code=exclude_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeListResponse", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_recipes_serialize( + self, + adapter_names_all, + adapter_names_any, + folder_id, + order, + page, + per_page, + running, + since_id, + stopped_after, + stop_cause, + updated_after, + includes, + exclude_code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'includes[]': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if adapter_names_all is not None: + + _query_params.append(('adapter_names_all', adapter_names_all)) + + if adapter_names_any is not None: + + _query_params.append(('adapter_names_any', adapter_names_any)) + + if folder_id is not None: + + _query_params.append(('folder_id', folder_id)) + + if order is not None: + + _query_params.append(('order', order)) + + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + if running is not None: + + _query_params.append(('running', running)) + + if since_id is not None: + + _query_params.append(('since_id', since_id)) + + if stopped_after is not None: + if isinstance(stopped_after, datetime): + _query_params.append( + ( + 'stopped_after', + stopped_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('stopped_after', stopped_after)) + + if stop_cause is not None: + + _query_params.append(('stop_cause', stop_cause)) + + if updated_after is not None: + if isinstance(updated_after, datetime): + _query_params.append( + ( + 'updated_after', + updated_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_after', updated_after)) + + if includes is not None: + + _query_params.append(('includes[]', includes)) + + if exclude_code is not None: + + _query_params.append(('exclude_code', exclude_code)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/recipes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def start_recipe( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecipeStartResponse: + """Start a recipe + + Starts a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeStartResponse", + '400': "Error", + '401': "Error", + '422': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def start_recipe_with_http_info( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecipeStartResponse]: + """Start a recipe + + Starts a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeStartResponse", + '400': "Error", + '401': "Error", + '422': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def start_recipe_without_preload_content( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start a recipe + + Starts a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecipeStartResponse", + '400': "Error", + '401': "Error", + '422': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_recipe_serialize( + self, + recipe_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if recipe_id is not None: + _path_params['recipe_id'] = recipe_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/recipes/{recipe_id}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def stop_recipe( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Stop a recipe + + Stops a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def stop_recipe_with_http_info( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Stop a recipe + + Stops a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def stop_recipe_without_preload_content( + self, + recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop a recipe + + Stops a recipe specified by recipe ID + + :param recipe_id: Recipe ID (required) + :type recipe_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_recipe_serialize( + recipe_id=recipe_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _stop_recipe_serialize( + self, + recipe_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if recipe_id is not None: + _path_params['recipe_id'] = recipe_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/recipes/{recipe_id}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_recipe_connection( + self, + recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], + recipe_connection_update_request: RecipeConnectionUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SuccessResponse: + """Update a connection for a recipe + + Updates the chosen connection for a specific connector in a stopped recipe. + + :param recipe_id: ID of the recipe (required) + :type recipe_id: int + :param recipe_connection_update_request: (required) + :type recipe_connection_update_request: RecipeConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_recipe_connection_serialize( + recipe_id=recipe_id, + recipe_connection_update_request=recipe_connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_recipe_connection_with_http_info( + self, + recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], + recipe_connection_update_request: RecipeConnectionUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SuccessResponse]: + """Update a connection for a recipe + + Updates the chosen connection for a specific connector in a stopped recipe. + + :param recipe_id: ID of the recipe (required) + :type recipe_id: int + :param recipe_connection_update_request: (required) + :type recipe_connection_update_request: RecipeConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_recipe_connection_serialize( + recipe_id=recipe_id, + recipe_connection_update_request=recipe_connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_recipe_connection_without_preload_content( + self, + recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], + recipe_connection_update_request: RecipeConnectionUpdateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a connection for a recipe + + Updates the chosen connection for a specific connector in a stopped recipe. + + :param recipe_id: ID of the recipe (required) + :type recipe_id: int + :param recipe_connection_update_request: (required) + :type recipe_connection_update_request: RecipeConnectionUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_recipe_connection_serialize( + recipe_id=recipe_id, + recipe_connection_update_request=recipe_connection_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SuccessResponse", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_recipe_connection_serialize( + self, + recipe_id, + recipe_connection_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if recipe_id is not None: + _path_params['recipe_id'] = recipe_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if recipe_connection_update_request is not None: + _body_params = recipe_connection_update_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/recipes/{recipe_id}/connect', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api/users_api.py b/src/workato_platform/client/workato_api/api/users_api.py new file mode 100644 index 0000000..c1933fc --- /dev/null +++ b/src/workato_platform/client/workato_api/api/users_api.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from workato_platform.client.workato_api.models.user import User + +from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform.client.workato_api.api_response import ApiResponse +from workato_platform.client.workato_api.rest import RESTResponseType + + +class UsersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def get_workspace_details( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """Get current user information + + Returns information about the authenticated user + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_workspace_details_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_workspace_details_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """Get current user information + + Returns information about the authenticated user + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_workspace_details_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_workspace_details_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get current user information + + Returns information about the authenticated user + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_workspace_details_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '401': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_workspace_details_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/users/me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/workato_platform/client/workato_api/api_client.py b/src/workato_platform/client/workato_api/api_client.py new file mode 100644 index 0000000..ea849af --- /dev/null +++ b/src/workato_platform/client/workato_api/api_client.py @@ -0,0 +1,807 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile +import uuid + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from workato_platform.client.workato_api.configuration import Configuration +from workato_platform.client.workato_api.api_response import ApiResponse, T as ApiResponseT +import workato_platform.client.workato_api.models +from workato_platform.client.workato_api import rest +from workato_platform.client.workato_api.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_value, traceback): + await self.close() + + async def close(self): + await self.rest_client.close() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + async def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = await self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, uuid.UUID): + return str(obj) + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(workato_platform.client.workato_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass is object: + return self.__deserialize_object(data) + elif klass is datetime.date: + return self.__deserialize_date(data) + elif klass is datetime.datetime: + return self.__deserialize_datetime(data) + elif klass is decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/src/workato_platform/client/workato_api/api_response.py b/src/workato_platform/client/workato_api/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/src/workato_platform/client/workato_api/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/src/workato_platform/client/workato_api/configuration.py b/src/workato_platform/client/workato_api/configuration.py new file mode 100644 index 0000000..7259fc9 --- /dev/null +++ b/src/workato_platform/client/workato_api/configuration.py @@ -0,0 +1,601 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "BearerAuth": BearerAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://www.workato.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("workato_platform.client.workato_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = 100 + """This value is passed to the aiohttp to limit simultaneous connections. + Default values is 100, None means no-limit. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://www.workato.com", + 'description': "US Data Center", + }, + { + 'url': "https://app.eu.workato.com", + 'description': "EU Data Center", + }, + { + 'url': "https://app.jp.workato.com", + 'description': "JP Data Center", + }, + { + 'url': "https://app.sg.workato.com", + 'description': "SG Data Center", + }, + { + 'url': "https://app.au.workato.com", + 'description': "AU Data Center", + }, + { + 'url': "https://app.il.workato.com", + 'description': "IL Data Center", + }, + { + 'url': "https://app.trial.workato.com", + 'description': "Developer Sandbox", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/src/workato_platform/client/workato_api/docs/APIPlatformApi.md b/src/workato_platform/client/workato_api/docs/APIPlatformApi.md new file mode 100644 index 0000000..2d15179 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/APIPlatformApi.md @@ -0,0 +1,844 @@ +# workato_platform.client.workato_api.APIPlatformApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_api_client**](APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) +[**create_api_collection**](APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection +[**create_api_key**](APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key +[**disable_api_endpoint**](APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint +[**enable_api_endpoint**](APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint +[**list_api_clients**](APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) +[**list_api_collections**](APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections +[**list_api_endpoints**](APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints +[**list_api_keys**](APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys +[**refresh_api_key_secret**](APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret + + +# **create_api_client** +> ApiClientResponse create_api_client(api_client_create_request) + +Create API client (v2) + +Create a new API client within a project with various authentication methods + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | + + try: + # Create API client (v2) + api_response = await api_instance.create_api_client(api_client_create_request) + print("The response of APIPlatformApi->create_api_client:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->create_api_client: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_client_create_request** | [**ApiClientCreateRequest**](ApiClientCreateRequest.md)| | + +### Return type + +[**ApiClientResponse**](ApiClientResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API client created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_api_collection** +> ApiCollection create_api_collection(api_collection_create_request) + +Create API collection + +Create a new API collection from an OpenAPI specification. +This generates both recipes and endpoints from the provided spec. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_collection_create_request = workato_platform.client.workato_api.ApiCollectionCreateRequest() # ApiCollectionCreateRequest | + + try: + # Create API collection + api_response = await api_instance.create_api_collection(api_collection_create_request) + print("The response of APIPlatformApi->create_api_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->create_api_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_collection_create_request** | [**ApiCollectionCreateRequest**](ApiCollectionCreateRequest.md)| | + +### Return type + +[**ApiCollection**](ApiCollection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API collection created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_api_key** +> ApiKeyResponse create_api_key(api_client_id, api_key_create_request) + +Create an API key + +Create a new API key for an API client + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_client_id = 56 # int | Specify the ID of the API client to create the API key for + api_key_create_request = workato_platform.client.workato_api.ApiKeyCreateRequest() # ApiKeyCreateRequest | + + try: + # Create an API key + api_response = await api_instance.create_api_key(api_client_id, api_key_create_request) + print("The response of APIPlatformApi->create_api_key:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->create_api_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_client_id** | **int**| Specify the ID of the API client to create the API key for | + **api_key_create_request** | [**ApiKeyCreateRequest**](ApiKeyCreateRequest.md)| | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API key created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **disable_api_endpoint** +> SuccessResponse disable_api_endpoint(api_endpoint_id) + +Disable an API endpoint + +Disables an active API endpoint. The endpoint can no longer be called by a client. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_endpoint_id = 56 # int | ID of the API endpoint + + try: + # Disable an API endpoint + api_response = await api_instance.disable_api_endpoint(api_endpoint_id) + print("The response of APIPlatformApi->disable_api_endpoint:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->disable_api_endpoint: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_endpoint_id** | **int**| ID of the API endpoint | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API endpoint disabled successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **enable_api_endpoint** +> SuccessResponse enable_api_endpoint(api_endpoint_id) + +Enable an API endpoint + +Enables an API endpoint. You must start the associated recipe to enable +the API endpoint successfully. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_endpoint_id = 56 # int | ID of the API endpoint + + try: + # Enable an API endpoint + api_response = await api_instance.enable_api_endpoint(api_endpoint_id) + print("The response of APIPlatformApi->enable_api_endpoint:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->enable_api_endpoint: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_endpoint_id** | **int**| ID of the API endpoint | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API endpoint enabled successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_api_clients** +> ApiClientListResponse list_api_clients(project_id=project_id, page=page, per_page=per_page, cert_bundle_ids=cert_bundle_ids) + +List API clients (v2) + +List all API clients. This endpoint includes the project_id of the API client +in the response. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + project_id = 56 # int | The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint (optional) + page = 1 # int | Page number (optional) (default to 1) + per_page = 100 # int | Page size. The maximum page size is 100 (optional) (default to 100) + cert_bundle_ids = [56] # List[int] | Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles (optional) + + try: + # List API clients (v2) + api_response = await api_instance.list_api_clients(project_id=project_id, page=page, per_page=per_page, cert_bundle_ids=cert_bundle_ids) + print("The response of APIPlatformApi->list_api_clients:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->list_api_clients: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **int**| The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **per_page** | **int**| Page size. The maximum page size is 100 | [optional] [default to 100] + **cert_bundle_ids** | [**List[int]**](int.md)| Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles | [optional] + +### Return type + +[**ApiClientListResponse**](ApiClientListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of API clients retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_api_collections** +> List[ApiCollection] list_api_collections(per_page=per_page, page=page) + +List API collections + +List all API collections. The endpoint returns the project_id of the project +to which the collections belong in the response. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + per_page = 100 # int | Number of API collections to return in a single page (optional) (default to 100) + page = 1 # int | Page number of the API collections to fetch (optional) (default to 1) + + try: + # List API collections + api_response = await api_instance.list_api_collections(per_page=per_page, page=page) + print("The response of APIPlatformApi->list_api_collections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->list_api_collections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **per_page** | **int**| Number of API collections to return in a single page | [optional] [default to 100] + **page** | **int**| Page number of the API collections to fetch | [optional] [default to 1] + +### Return type + +[**List[ApiCollection]**](ApiCollection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of API collections retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_api_endpoints** +> List[ApiEndpoint] list_api_endpoints(api_collection_id=api_collection_id, per_page=per_page, page=page) + +List API endpoints + +Lists all API endpoints. Specify the api_collection_id to obtain the list +of endpoints in a specific collection. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_collection_id = 56 # int | ID of the API collection. If not provided, all API endpoints are returned (optional) + per_page = 100 # int | Number of API endpoints to return in a single page (optional) (default to 100) + page = 1 # int | Page number of the API endpoints to fetch (optional) (default to 1) + + try: + # List API endpoints + api_response = await api_instance.list_api_endpoints(api_collection_id=api_collection_id, per_page=per_page, page=page) + print("The response of APIPlatformApi->list_api_endpoints:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->list_api_endpoints: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_collection_id** | **int**| ID of the API collection. If not provided, all API endpoints are returned | [optional] + **per_page** | **int**| Number of API endpoints to return in a single page | [optional] [default to 100] + **page** | **int**| Page number of the API endpoints to fetch | [optional] [default to 1] + +### Return type + +[**List[ApiEndpoint]**](ApiEndpoint.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of API endpoints retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_api_keys** +> ApiKeyListResponse list_api_keys(api_client_id) + +List API keys + +Retrieve all API keys for an API client. Provide the api_client_id parameter +to filter keys for a specific client. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_client_id = 56 # int | Filter API keys for a specific API client + + try: + # List API keys + api_response = await api_instance.list_api_keys(api_client_id) + print("The response of APIPlatformApi->list_api_keys:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->list_api_keys: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_client_id** | **int**| Filter API keys for a specific API client | + +### Return type + +[**ApiKeyListResponse**](ApiKeyListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of API keys retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **refresh_api_key_secret** +> ApiKeyResponse refresh_api_key_secret(api_client_id, api_key_id) + +Refresh API key secret + +Refresh the authentication token or OAuth 2.0 client secret for an API key. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_client_id = 56 # int | ID of the API client that owns the API key + api_key_id = 56 # int | ID of the API key to refresh + + try: + # Refresh API key secret + api_response = await api_instance.refresh_api_key_secret(api_client_id, api_key_id) + print("The response of APIPlatformApi->refresh_api_key_secret:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APIPlatformApi->refresh_api_key_secret: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_client_id** | **int**| ID of the API client that owns the API key | + **api_key_id** | **int**| ID of the API key to refresh | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API key secret refreshed successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/ApiClient.md b/src/workato_platform/client/workato_api/docs/ApiClient.md new file mode 100644 index 0000000..ede7345 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClient.md @@ -0,0 +1,46 @@ +# ApiClient + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**description** | **str** | | [optional] +**active_api_keys_count** | **int** | | [optional] +**total_api_keys_count** | **int** | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**logo** | **str** | URL to the client's logo image | +**logo_2x** | **str** | URL to the client's high-resolution logo image | +**is_legacy** | **bool** | | +**email** | **str** | | [optional] +**auth_type** | **str** | | +**api_token** | **str** | API token (only returned for token auth type) | [optional] +**mtls_enabled** | **bool** | | [optional] +**validation_formula** | **str** | | [optional] +**cert_bundle_ids** | **List[int]** | | [optional] +**api_policies** | [**List[ApiClientApiPoliciesInner]**](ApiClientApiPoliciesInner.md) | List of API policies associated with the client | +**api_collections** | [**List[ApiClientApiCollectionsInner]**](ApiClientApiCollectionsInner.md) | List of API collections associated with the client | + +## Example + +```python +from workato_platform.client.workato_api.models.api_client import ApiClient + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClient from a JSON string +api_client_instance = ApiClient.from_json(json) +# print the JSON string representation of the object +print(ApiClient.to_json()) + +# convert the object into a dict +api_client_dict = api_client_instance.to_dict() +# create an instance of ApiClient from a dict +api_client_from_dict = ApiClient.from_dict(api_client_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md b/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md new file mode 100644 index 0000000..c6117d1 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md @@ -0,0 +1,30 @@ +# ApiClientApiCollectionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClientApiCollectionsInner from a JSON string +api_client_api_collections_inner_instance = ApiClientApiCollectionsInner.from_json(json) +# print the JSON string representation of the object +print(ApiClientApiCollectionsInner.to_json()) + +# convert the object into a dict +api_client_api_collections_inner_dict = api_client_api_collections_inner_instance.to_dict() +# create an instance of ApiClientApiCollectionsInner from a dict +api_client_api_collections_inner_from_dict = ApiClientApiCollectionsInner.from_dict(api_client_api_collections_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md b/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md new file mode 100644 index 0000000..f40a500 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md @@ -0,0 +1,30 @@ +# ApiClientApiPoliciesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClientApiPoliciesInner from a JSON string +api_client_api_policies_inner_instance = ApiClientApiPoliciesInner.from_json(json) +# print the JSON string representation of the object +print(ApiClientApiPoliciesInner.to_json()) + +# convert the object into a dict +api_client_api_policies_inner_dict = api_client_api_policies_inner_instance.to_dict() +# create an instance of ApiClientApiPoliciesInner from a dict +api_client_api_policies_inner_from_dict = ApiClientApiPoliciesInner.from_dict(api_client_api_policies_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md new file mode 100644 index 0000000..b750791 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md @@ -0,0 +1,46 @@ +# ApiClientCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the client | +**description** | **str** | Description of the client | [optional] +**project_id** | **int** | ID of the project to create the client in | [optional] +**api_portal_id** | **int** | ID of the API portal to assign the client | [optional] +**email** | **str** | Email address for the client (required if api_portal_id provided) | [optional] +**api_collection_ids** | **List[int]** | IDs of API collections to assign to the client | +**api_policy_id** | **int** | ID of the API policy to apply | [optional] +**auth_type** | **str** | Authentication method | +**jwt_method** | **str** | JWT signing method (required when auth_type is jwt) | [optional] +**jwt_secret** | **str** | HMAC shared secret or RSA public key (required when auth_type is jwt) | [optional] +**oidc_issuer** | **str** | Discovery URL for OIDC identity provider | [optional] +**oidc_jwks_uri** | **str** | JWKS URL for OIDC identity provider | [optional] +**access_profile_claim** | **str** | JWT claim key for access profile identification | [optional] +**required_claims** | **List[str]** | List of claims to enforce | [optional] +**allowed_issuers** | **List[str]** | List of allowed issuers | [optional] +**mtls_enabled** | **bool** | Whether mutual TLS is enabled | [optional] +**validation_formula** | **str** | Formula to validate client certificates | [optional] +**cert_bundle_ids** | **List[int]** | Certificate bundle IDs for mTLS | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClientCreateRequest from a JSON string +api_client_create_request_instance = ApiClientCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ApiClientCreateRequest.to_json()) + +# convert the object into a dict +api_client_create_request_dict = api_client_create_request_instance.to_dict() +# create an instance of ApiClientCreateRequest from a dict +api_client_create_request_from_dict = ApiClientCreateRequest.from_dict(api_client_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md b/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md new file mode 100644 index 0000000..6d3346c --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md @@ -0,0 +1,32 @@ +# ApiClientListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ApiClient]**](ApiClient.md) | | +**count** | **int** | Total number of API clients | +**page** | **int** | Current page number | +**per_page** | **int** | Number of items per page | + +## Example + +```python +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClientListResponse from a JSON string +api_client_list_response_instance = ApiClientListResponse.from_json(json) +# print the JSON string representation of the object +print(ApiClientListResponse.to_json()) + +# convert the object into a dict +api_client_list_response_dict = api_client_list_response_instance.to_dict() +# create an instance of ApiClientListResponse from a dict +api_client_list_response_from_dict = ApiClientListResponse.from_dict(api_client_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiClientResponse.md b/src/workato_platform/client/workato_api/docs/ApiClientResponse.md new file mode 100644 index 0000000..c979f83 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiClientResponse.md @@ -0,0 +1,29 @@ +# ApiClientResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ApiClient**](ApiClient.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiClientResponse from a JSON string +api_client_response_instance = ApiClientResponse.from_json(json) +# print the JSON string representation of the object +print(ApiClientResponse.to_json()) + +# convert the object into a dict +api_client_response_dict = api_client_response_instance.to_dict() +# create an instance of ApiClientResponse from a dict +api_client_response_from_dict = ApiClientResponse.from_dict(api_client_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiCollection.md b/src/workato_platform/client/workato_api/docs/ApiCollection.md new file mode 100644 index 0000000..c656934 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiCollection.md @@ -0,0 +1,38 @@ +# ApiCollection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**project_id** | **str** | | +**url** | **str** | | +**api_spec_url** | **str** | | +**version** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**message** | **str** | Only present in creation/import responses | [optional] +**import_results** | [**ImportResults**](ImportResults.md) | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_collection import ApiCollection + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiCollection from a JSON string +api_collection_instance = ApiCollection.from_json(json) +# print the JSON string representation of the object +print(ApiCollection.to_json()) + +# convert the object into a dict +api_collection_dict = api_collection_instance.to_dict() +# create an instance of ApiCollection from a dict +api_collection_from_dict = ApiCollection.from_dict(api_collection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md new file mode 100644 index 0000000..94b268e --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md @@ -0,0 +1,32 @@ +# ApiCollectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the API collection | +**project_id** | **int** | ID of the project to associate the collection with | [optional] +**proxy_connection_id** | **int** | ID of a proxy connection for proxy mode | [optional] +**openapi_spec** | [**OpenApiSpec**](OpenApiSpec.md) | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiCollectionCreateRequest from a JSON string +api_collection_create_request_instance = ApiCollectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ApiCollectionCreateRequest.to_json()) + +# convert the object into a dict +api_collection_create_request_dict = api_collection_create_request_instance.to_dict() +# create an instance of ApiCollectionCreateRequest from a dict +api_collection_create_request_from_dict = ApiCollectionCreateRequest.from_dict(api_collection_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiEndpoint.md b/src/workato_platform/client/workato_api/docs/ApiEndpoint.md new file mode 100644 index 0000000..9dbdfff --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiEndpoint.md @@ -0,0 +1,41 @@ +# ApiEndpoint + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**api_collection_id** | **int** | | +**flow_id** | **int** | | +**name** | **str** | | +**method** | **str** | | +**url** | **str** | | +**legacy_url** | **str** | | [optional] +**base_path** | **str** | | +**path** | **str** | | +**active** | **bool** | | +**legacy** | **bool** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +## Example + +```python +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiEndpoint from a JSON string +api_endpoint_instance = ApiEndpoint.from_json(json) +# print the JSON string representation of the object +print(ApiEndpoint.to_json()) + +# convert the object into a dict +api_endpoint_dict = api_endpoint_instance.to_dict() +# create an instance of ApiEndpoint from a dict +api_endpoint_from_dict = ApiEndpoint.from_dict(api_endpoint_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiKey.md b/src/workato_platform/client/workato_api/docs/ApiKey.md new file mode 100644 index 0000000..7c746e5 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiKey.md @@ -0,0 +1,36 @@ +# ApiKey + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**auth_type** | **str** | | +**ip_allow_list** | **List[str]** | List of IP addresses in the allowlist | [optional] +**ip_deny_list** | **List[str]** | List of IP addresses to deny requests from | [optional] +**active** | **bool** | | +**active_since** | **datetime** | | +**auth_token** | **str** | The generated API token | + +## Example + +```python +from workato_platform.client.workato_api.models.api_key import ApiKey + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKey from a JSON string +api_key_instance = ApiKey.from_json(json) +# print the JSON string representation of the object +print(ApiKey.to_json()) + +# convert the object into a dict +api_key_dict = api_key_instance.to_dict() +# create an instance of ApiKey from a dict +api_key_from_dict = ApiKey.from_dict(api_key_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md new file mode 100644 index 0000000..be1c78f --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md @@ -0,0 +1,32 @@ +# ApiKeyCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the API key | +**active** | **bool** | Indicates whether the API key is enabled or disabled. Disabled keys cannot call any APIs | +**ip_allow_list** | **List[str]** | List of IP addresses to add to the allowlist | [optional] +**ip_deny_list** | **List[str]** | List of IP addresses to deny requests from | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeyCreateRequest from a JSON string +api_key_create_request_instance = ApiKeyCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ApiKeyCreateRequest.to_json()) + +# convert the object into a dict +api_key_create_request_dict = api_key_create_request_instance.to_dict() +# create an instance of ApiKeyCreateRequest from a dict +api_key_create_request_from_dict = ApiKeyCreateRequest.from_dict(api_key_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md b/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md new file mode 100644 index 0000000..e3d720a --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md @@ -0,0 +1,32 @@ +# ApiKeyListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ApiKey]**](ApiKey.md) | | +**count** | **int** | Total number of API keys | +**page** | **int** | Current page number | +**per_page** | **int** | Number of items per page | + +## Example + +```python +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeyListResponse from a JSON string +api_key_list_response_instance = ApiKeyListResponse.from_json(json) +# print the JSON string representation of the object +print(ApiKeyListResponse.to_json()) + +# convert the object into a dict +api_key_list_response_dict = api_key_list_response_instance.to_dict() +# create an instance of ApiKeyListResponse from a dict +api_key_list_response_from_dict = ApiKeyListResponse.from_dict(api_key_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md b/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md new file mode 100644 index 0000000..d2caff2 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md @@ -0,0 +1,29 @@ +# ApiKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ApiKey**](ApiKey.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeyResponse from a JSON string +api_key_response_instance = ApiKeyResponse.from_json(json) +# print the JSON string representation of the object +print(ApiKeyResponse.to_json()) + +# convert the object into a dict +api_key_response_dict = api_key_response_instance.to_dict() +# create an instance of ApiKeyResponse from a dict +api_key_response_from_dict = ApiKeyResponse.from_dict(api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/Asset.md b/src/workato_platform/client/workato_api/docs/Asset.md new file mode 100644 index 0000000..826d944 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Asset.md @@ -0,0 +1,39 @@ +# Asset + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**type** | **str** | | +**version** | **int** | | [optional] +**folder** | **str** | | [optional] +**absolute_path** | **str** | | [optional] +**root_folder** | **bool** | | +**unreachable** | **bool** | | [optional] +**zip_name** | **str** | | +**checked** | **bool** | | +**status** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.asset import Asset + +# TODO update the JSON string below +json = "{}" +# create an instance of Asset from a JSON string +asset_instance = Asset.from_json(json) +# print the JSON string representation of the object +print(Asset.to_json()) + +# convert the object into a dict +asset_dict = asset_instance.to_dict() +# create an instance of Asset from a dict +asset_from_dict = Asset.from_dict(asset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/AssetReference.md b/src/workato_platform/client/workato_api/docs/AssetReference.md new file mode 100644 index 0000000..fff1d09 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/AssetReference.md @@ -0,0 +1,37 @@ +# AssetReference + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the dependency | +**type** | **str** | Type of dependent asset | +**checked** | **bool** | Determines if the asset is included in the manifest | [optional] [default to True] +**version** | **int** | The version of the asset | [optional] +**folder** | **str** | The folder that contains the asset | [optional] [default to ''] +**absolute_path** | **str** | The absolute path of the asset | +**root_folder** | **bool** | Name root folder | [optional] [default to False] +**unreachable** | **bool** | Whether the asset is unreachable | [optional] [default to False] +**zip_name** | **str** | Name in the exported zip file | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.asset_reference import AssetReference + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetReference from a JSON string +asset_reference_instance = AssetReference.from_json(json) +# print the JSON string representation of the object +print(AssetReference.to_json()) + +# convert the object into a dict +asset_reference_dict = asset_reference_instance.to_dict() +# create an instance of AssetReference from a dict +asset_reference_from_dict = AssetReference.from_dict(asset_reference_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/Connection.md b/src/workato_platform/client/workato_api/docs/Connection.md new file mode 100644 index 0000000..7762ced --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Connection.md @@ -0,0 +1,44 @@ +# Connection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**application** | **str** | | +**name** | **str** | | +**description** | **str** | | +**authorized_at** | **datetime** | | +**authorization_status** | **str** | | +**authorization_error** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**external_id** | **str** | | +**folder_id** | **int** | | +**connection_lost_at** | **datetime** | | +**connection_lost_reason** | **str** | | +**parent_id** | **int** | | +**provider** | **str** | | [optional] +**tags** | **List[str]** | | + +## Example + +```python +from workato_platform.client.workato_api.models.connection import Connection + +# TODO update the JSON string below +json = "{}" +# create an instance of Connection from a JSON string +connection_instance = Connection.from_json(json) +# print the JSON string representation of the object +print(Connection.to_json()) + +# convert the object into a dict +connection_dict = connection_instance.to_dict() +# create an instance of Connection from a dict +connection_from_dict = Connection.from_dict(connection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md new file mode 100644 index 0000000..4b9fd14 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md @@ -0,0 +1,35 @@ +# ConnectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the connection | +**provider** | **str** | The application type of the connection | +**parent_id** | **int** | The ID of the parent connection (must be same provider type) | [optional] +**folder_id** | **int** | The ID of the project or folder containing the connection | [optional] +**external_id** | **str** | The external ID assigned to the connection | [optional] +**shell_connection** | **bool** | Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. | [optional] [default to False] +**input** | **Dict[str, object]** | Connection parameters (varies by provider) | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectionCreateRequest from a JSON string +connection_create_request_instance = ConnectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ConnectionCreateRequest.to_json()) + +# convert the object into a dict +connection_create_request_dict = connection_create_request_instance.to_dict() +# create an instance of ConnectionCreateRequest from a dict +connection_create_request_from_dict = ConnectionCreateRequest.from_dict(connection_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md b/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md new file mode 100644 index 0000000..2ae2444 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md @@ -0,0 +1,34 @@ +# ConnectionUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the connection | [optional] +**parent_id** | **int** | The ID of the parent connection (must be same provider type) | [optional] +**folder_id** | **int** | The ID of the project or folder containing the connection | [optional] +**external_id** | **str** | The external ID assigned to the connection | [optional] +**shell_connection** | **bool** | Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. | [optional] [default to False] +**input** | **Dict[str, object]** | Connection parameters (varies by provider) | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectionUpdateRequest from a JSON string +connection_update_request_instance = ConnectionUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(ConnectionUpdateRequest.to_json()) + +# convert the object into a dict +connection_update_request_dict = connection_update_request_instance.to_dict() +# create an instance of ConnectionUpdateRequest from a dict +connection_update_request_from_dict = ConnectionUpdateRequest.from_dict(connection_update_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ConnectionsApi.md b/src/workato_platform/client/workato_api/docs/ConnectionsApi.md new file mode 100644 index 0000000..2e111dd --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectionsApi.md @@ -0,0 +1,526 @@ +# workato_platform.client.workato_api.ConnectionsApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_connection**](ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection +[**create_runtime_user_connection**](ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection +[**get_connection_oauth_url**](ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection +[**get_connection_picklist**](ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values +[**list_connections**](ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections +[**update_connection**](ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection + + +# **create_connection** +> Connection create_connection(connection_create_request) + +Create a connection + +Create a new connection. Supports creating shell connections or +fully authenticated connections. Does not support OAuth connections +for authentication, but can create shell connections for OAuth providers. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.connection import Connection +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + connection_create_request = workato_platform.client.workato_api.ConnectionCreateRequest() # ConnectionCreateRequest | + + try: + # Create a connection + api_response = await api_instance.create_connection(connection_create_request) + print("The response of ConnectionsApi->create_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->create_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_create_request** | [**ConnectionCreateRequest**](ConnectionCreateRequest.md)| | + +### Return type + +[**Connection**](Connection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_runtime_user_connection** +> RuntimeUserConnectionResponse create_runtime_user_connection(runtime_user_connection_create_request) + +Create OAuth runtime user connection + +Creates an OAuth runtime user connection. The parent connection must be +an established OAuth connection. This initiates the OAuth flow and provides +a URL for end user authorization. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + runtime_user_connection_create_request = workato_platform.client.workato_api.RuntimeUserConnectionCreateRequest() # RuntimeUserConnectionCreateRequest | + + try: + # Create OAuth runtime user connection + api_response = await api_instance.create_runtime_user_connection(runtime_user_connection_create_request) + print("The response of ConnectionsApi->create_runtime_user_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->create_runtime_user_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **runtime_user_connection_create_request** | [**RuntimeUserConnectionCreateRequest**](RuntimeUserConnectionCreateRequest.md)| | + +### Return type + +[**RuntimeUserConnectionResponse**](RuntimeUserConnectionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Runtime user connection created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | +**404** | Parent connection not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_connection_oauth_url** +> OAuthUrlResponse get_connection_oauth_url(connection_id) + +Get OAuth URL for connection + +Get the OAuth URL for a runtime user connection. This endpoint is used +to retrieve the OAuth authorization URL for establishing or re-authorizing +a connection. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + connection_id = 56 # int | Connection ID + + try: + # Get OAuth URL for connection + api_response = await api_instance.get_connection_oauth_url(connection_id) + print("The response of ConnectionsApi->get_connection_oauth_url:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->get_connection_oauth_url: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **int**| Connection ID | + +### Return type + +[**OAuthUrlResponse**](OAuthUrlResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OAuth URL retrieved successfully | - | +**401** | Authentication required | - | +**404** | Connection not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_connection_picklist** +> PicklistResponse get_connection_picklist(connection_id, picklist_request) + +Get picklist values + +Obtains a list of picklist values for a specified connection in a workspace. +This endpoint allows you to retrieve dynamic lists of values that can be +used in forms or dropdowns for the connected application. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + connection_id = 56 # int | ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. + picklist_request = workato_platform.client.workato_api.PicklistRequest() # PicklistRequest | + + try: + # Get picklist values + api_response = await api_instance.get_connection_picklist(connection_id, picklist_request) + print("The response of ConnectionsApi->get_connection_picklist:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->get_connection_picklist: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **int**| ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. | + **picklist_request** | [**PicklistRequest**](PicklistRequest.md)| | + +### Return type + +[**PicklistResponse**](PicklistResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Picklist values retrieved successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | +**404** | Connection not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_connections** +> List[Connection] list_connections(folder_id=folder_id, parent_id=parent_id, external_id=external_id, include_runtime_connections=include_runtime_connections, includes=includes) + +List connections + +Returns all connections and associated data for the authenticated user + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.connection import Connection +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + folder_id = 56 # int | Folder ID of the connection (optional) + parent_id = 56 # int | Parent ID of the connection (must be same provider) (optional) + external_id = 'external_id_example' # str | External identifier for the connection (optional) + include_runtime_connections = True # bool | When \"true\", include all runtime user connections (optional) + includes = ['includes_example'] # List[str] | Additional fields to include (e.g., tags) (optional) + + try: + # List connections + api_response = await api_instance.list_connections(folder_id=folder_id, parent_id=parent_id, external_id=external_id, include_runtime_connections=include_runtime_connections, includes=includes) + print("The response of ConnectionsApi->list_connections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->list_connections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folder_id** | **int**| Folder ID of the connection | [optional] + **parent_id** | **int**| Parent ID of the connection (must be same provider) | [optional] + **external_id** | **str**| External identifier for the connection | [optional] + **include_runtime_connections** | **bool**| When \"true\", include all runtime user connections | [optional] + **includes** | [**List[str]**](str.md)| Additional fields to include (e.g., tags) | [optional] + +### Return type + +[**List[Connection]**](Connection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of connections retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_connection** +> Connection update_connection(connection_id, connection_update_request=connection_update_request) + +Update a connection + +Updates a connection in a non-embedded workspace. Allows updating connection +metadata and parameters without requiring full re-creation. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.connection import Connection +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + connection_id = 56 # int | The ID of the connection + connection_update_request = workato_platform.client.workato_api.ConnectionUpdateRequest() # ConnectionUpdateRequest | (optional) + + try: + # Update a connection + api_response = await api_instance.update_connection(connection_id, connection_update_request=connection_update_request) + print("The response of ConnectionsApi->update_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionsApi->update_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **int**| The ID of the connection | + **connection_update_request** | [**ConnectionUpdateRequest**](ConnectionUpdateRequest.md)| | [optional] + +### Return type + +[**Connection**](Connection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection updated successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | +**404** | Connection not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/ConnectorAction.md b/src/workato_platform/client/workato_api/docs/ConnectorAction.md new file mode 100644 index 0000000..dbc4713 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectorAction.md @@ -0,0 +1,33 @@ +# ConnectorAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**title** | **str** | | [optional] +**deprecated** | **bool** | | +**bulk** | **bool** | | +**batch** | **bool** | | + +## Example + +```python +from workato_platform.client.workato_api.models.connector_action import ConnectorAction + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectorAction from a JSON string +connector_action_instance = ConnectorAction.from_json(json) +# print the JSON string representation of the object +print(ConnectorAction.to_json()) + +# convert the object into a dict +connector_action_dict = connector_action_instance.to_dict() +# create an instance of ConnectorAction from a dict +connector_action_from_dict = ConnectorAction.from_dict(connector_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ConnectorVersion.md b/src/workato_platform/client/workato_api/docs/ConnectorVersion.md new file mode 100644 index 0000000..8a4b96a --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectorVersion.md @@ -0,0 +1,32 @@ +# ConnectorVersion + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **int** | | +**version_note** | **str** | | +**created_at** | **datetime** | | +**released_at** | **datetime** | | + +## Example + +```python +from workato_platform.client.workato_api.models.connector_version import ConnectorVersion + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectorVersion from a JSON string +connector_version_instance = ConnectorVersion.from_json(json) +# print the JSON string representation of the object +print(ConnectorVersion.to_json()) + +# convert the object into a dict +connector_version_dict = connector_version_instance.to_dict() +# create an instance of ConnectorVersion from a dict +connector_version_from_dict = ConnectorVersion.from_dict(connector_version_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ConnectorsApi.md b/src/workato_platform/client/workato_api/docs/ConnectorsApi.md new file mode 100644 index 0000000..4fc5804 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ConnectorsApi.md @@ -0,0 +1,249 @@ +# workato_platform.client.workato_api.ConnectorsApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_custom_connector_code**](ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code +[**list_custom_connectors**](ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors +[**list_platform_connectors**](ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors + + +# **get_custom_connector_code** +> CustomConnectorCodeResponse get_custom_connector_code(id) + +Get custom connector code + +Fetch the code for a specific custom connector + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + id = 56 # int | The ID of the custom connector + + try: + # Get custom connector code + api_response = await api_instance.get_custom_connector_code(id) + print("The response of ConnectorsApi->get_custom_connector_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectorsApi->get_custom_connector_code: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| The ID of the custom connector | + +### Return type + +[**CustomConnectorCodeResponse**](CustomConnectorCodeResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom connector code retrieved successfully | - | +**401** | Authentication required | - | +**404** | Custom connector not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_custom_connectors** +> CustomConnectorListResponse list_custom_connectors() + +List custom connectors + +Returns a list of all custom connectors + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + + try: + # List custom connectors + api_response = await api_instance.list_custom_connectors() + print("The response of ConnectorsApi->list_custom_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectorsApi->list_custom_connectors: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**CustomConnectorListResponse**](CustomConnectorListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Custom connectors retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_platform_connectors** +> PlatformConnectorListResponse list_platform_connectors(page=page, per_page=per_page) + +List platform connectors + +Returns a paginated list of all connectors and associated metadata including +triggers and actions. This includes both standard and platform connectors. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + page = 1 # int | Page number (optional) (default to 1) + per_page = 1 # int | Number of records per page (max 100) (optional) (default to 1) + + try: + # List platform connectors + api_response = await api_instance.list_platform_connectors(page=page, per_page=per_page) + print("The response of ConnectorsApi->list_platform_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectorsApi->list_platform_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **per_page** | **int**| Number of records per page (max 100) | [optional] [default to 1] + +### Return type + +[**PlatformConnectorListResponse**](PlatformConnectorListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Platform connectors retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md b/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md new file mode 100644 index 0000000..f50f7ba --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md @@ -0,0 +1,29 @@ +# CreateExportManifestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**export_manifest** | [**ExportManifestRequest**](ExportManifestRequest.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateExportManifestRequest from a JSON string +create_export_manifest_request_instance = CreateExportManifestRequest.from_json(json) +# print the JSON string representation of the object +print(CreateExportManifestRequest.to_json()) + +# convert the object into a dict +create_export_manifest_request_dict = create_export_manifest_request_instance.to_dict() +# create an instance of CreateExportManifestRequest from a dict +create_export_manifest_request_from_dict = CreateExportManifestRequest.from_dict(create_export_manifest_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md b/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md new file mode 100644 index 0000000..8442e86 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md @@ -0,0 +1,30 @@ +# CreateFolderRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the folder | +**parent_id** | **str** | Parent folder ID. Defaults to Home folder if not specified | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFolderRequest from a JSON string +create_folder_request_instance = CreateFolderRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFolderRequest.to_json()) + +# convert the object into a dict +create_folder_request_dict = create_folder_request_instance.to_dict() +# create an instance of CreateFolderRequest from a dict +create_folder_request_from_dict = CreateFolderRequest.from_dict(create_folder_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/CustomConnector.md b/src/workato_platform/client/workato_api/docs/CustomConnector.md new file mode 100644 index 0000000..15a1b48 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CustomConnector.md @@ -0,0 +1,35 @@ +# CustomConnector + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**title** | **str** | | +**latest_released_version** | **int** | | +**latest_released_version_note** | **str** | | +**released_versions** | [**List[ConnectorVersion]**](ConnectorVersion.md) | | +**static_webhook_url** | **str** | | + +## Example + +```python +from workato_platform.client.workato_api.models.custom_connector import CustomConnector + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomConnector from a JSON string +custom_connector_instance = CustomConnector.from_json(json) +# print the JSON string representation of the object +print(CustomConnector.to_json()) + +# convert the object into a dict +custom_connector_dict = custom_connector_instance.to_dict() +# create an instance of CustomConnector from a dict +custom_connector_from_dict = CustomConnector.from_dict(custom_connector_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md new file mode 100644 index 0000000..a8636b9 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md @@ -0,0 +1,29 @@ +# CustomConnectorCodeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CustomConnectorCodeResponseData**](CustomConnectorCodeResponseData.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomConnectorCodeResponse from a JSON string +custom_connector_code_response_instance = CustomConnectorCodeResponse.from_json(json) +# print the JSON string representation of the object +print(CustomConnectorCodeResponse.to_json()) + +# convert the object into a dict +custom_connector_code_response_dict = custom_connector_code_response_instance.to_dict() +# create an instance of CustomConnectorCodeResponse from a dict +custom_connector_code_response_from_dict = CustomConnectorCodeResponse.from_dict(custom_connector_code_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md new file mode 100644 index 0000000..3207395 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md @@ -0,0 +1,29 @@ +# CustomConnectorCodeResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | The connector code as a stringified value | + +## Example + +```python +from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomConnectorCodeResponseData from a JSON string +custom_connector_code_response_data_instance = CustomConnectorCodeResponseData.from_json(json) +# print the JSON string representation of the object +print(CustomConnectorCodeResponseData.to_json()) + +# convert the object into a dict +custom_connector_code_response_data_dict = custom_connector_code_response_data_instance.to_dict() +# create an instance of CustomConnectorCodeResponseData from a dict +custom_connector_code_response_data_from_dict = CustomConnectorCodeResponseData.from_dict(custom_connector_code_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md b/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md new file mode 100644 index 0000000..4263eea --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md @@ -0,0 +1,29 @@ +# CustomConnectorListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | [**List[CustomConnector]**](CustomConnector.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomConnectorListResponse from a JSON string +custom_connector_list_response_instance = CustomConnectorListResponse.from_json(json) +# print the JSON string representation of the object +print(CustomConnectorListResponse.to_json()) + +# convert the object into a dict +custom_connector_list_response_dict = custom_connector_list_response_instance.to_dict() +# create an instance of CustomConnectorListResponse from a dict +custom_connector_list_response_from_dict = CustomConnectorListResponse.from_dict(custom_connector_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTable.md b/src/workato_platform/client/workato_api/docs/DataTable.md new file mode 100644 index 0000000..ada0419 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTable.md @@ -0,0 +1,34 @@ +# DataTable + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**var_schema** | [**List[DataTableColumn]**](DataTableColumn.md) | | +**folder_id** | **int** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table import DataTable + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTable from a JSON string +data_table_instance = DataTable.from_json(json) +# print the JSON string representation of the object +print(DataTable.to_json()) + +# convert the object into a dict +data_table_dict = data_table_instance.to_dict() +# create an instance of DataTable from a dict +data_table_from_dict = DataTable.from_dict(data_table_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumn.md b/src/workato_platform/client/workato_api/docs/DataTableColumn.md new file mode 100644 index 0000000..2a03cf1 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableColumn.md @@ -0,0 +1,37 @@ +# DataTableColumn + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | +**optional** | **bool** | | +**field_id** | **str** | | +**hint** | **str** | | +**default_value** | **object** | Default value matching the column type | +**metadata** | **Dict[str, object]** | | +**multivalue** | **bool** | | +**relation** | [**DataTableRelation**](DataTableRelation.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_column import DataTableColumn + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableColumn from a JSON string +data_table_column_instance = DataTableColumn.from_json(json) +# print the JSON string representation of the object +print(DataTableColumn.to_json()) + +# convert the object into a dict +data_table_column_dict = data_table_column_instance.to_dict() +# create an instance of DataTableColumn from a dict +data_table_column_from_dict = DataTableColumn.from_dict(data_table_column_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md b/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md new file mode 100644 index 0000000..8725adb --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md @@ -0,0 +1,37 @@ +# DataTableColumnRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The data type of the column | +**name** | **str** | The name of the column | +**optional** | **bool** | Whether the column is optional | +**field_id** | **str** | Unique UUID of the column | [optional] +**hint** | **str** | Tooltip hint for users | [optional] +**default_value** | **object** | Default value matching the column type | [optional] +**metadata** | **Dict[str, object]** | Additional metadata | [optional] +**multivalue** | **bool** | Whether the column accepts multi-value input | [optional] +**relation** | [**DataTableRelation**](DataTableRelation.md) | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableColumnRequest from a JSON string +data_table_column_request_instance = DataTableColumnRequest.from_json(json) +# print the JSON string representation of the object +print(DataTableColumnRequest.to_json()) + +# convert the object into a dict +data_table_column_request_dict = data_table_column_request_instance.to_dict() +# create an instance of DataTableColumnRequest from a dict +data_table_column_request_from_dict = DataTableColumnRequest.from_dict(data_table_column_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md b/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md new file mode 100644 index 0000000..889bfc1 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md @@ -0,0 +1,31 @@ +# DataTableCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the data table to create | +**folder_id** | **int** | ID of the folder where to create the data table | +**var_schema** | [**List[DataTableColumnRequest]**](DataTableColumnRequest.md) | Array of column definitions | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableCreateRequest from a JSON string +data_table_create_request_instance = DataTableCreateRequest.from_json(json) +# print the JSON string representation of the object +print(DataTableCreateRequest.to_json()) + +# convert the object into a dict +data_table_create_request_dict = data_table_create_request_instance.to_dict() +# create an instance of DataTableCreateRequest from a dict +data_table_create_request_from_dict = DataTableCreateRequest.from_dict(data_table_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md b/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md new file mode 100644 index 0000000..b359033 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md @@ -0,0 +1,29 @@ +# DataTableCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**DataTable**](DataTable.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableCreateResponse from a JSON string +data_table_create_response_instance = DataTableCreateResponse.from_json(json) +# print the JSON string representation of the object +print(DataTableCreateResponse.to_json()) + +# convert the object into a dict +data_table_create_response_dict = data_table_create_response_instance.to_dict() +# create an instance of DataTableCreateResponse from a dict +data_table_create_response_from_dict = DataTableCreateResponse.from_dict(data_table_create_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableListResponse.md b/src/workato_platform/client/workato_api/docs/DataTableListResponse.md new file mode 100644 index 0000000..9c0cc37 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableListResponse.md @@ -0,0 +1,29 @@ +# DataTableListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DataTable]**](DataTable.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableListResponse from a JSON string +data_table_list_response_instance = DataTableListResponse.from_json(json) +# print the JSON string representation of the object +print(DataTableListResponse.to_json()) + +# convert the object into a dict +data_table_list_response_dict = data_table_list_response_instance.to_dict() +# create an instance of DataTableListResponse from a dict +data_table_list_response_from_dict = DataTableListResponse.from_dict(data_table_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTableRelation.md b/src/workato_platform/client/workato_api/docs/DataTableRelation.md new file mode 100644 index 0000000..71cf924 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTableRelation.md @@ -0,0 +1,30 @@ +# DataTableRelation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**table_id** | **str** | | +**field_id** | **str** | | + +## Example + +```python +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation + +# TODO update the JSON string below +json = "{}" +# create an instance of DataTableRelation from a JSON string +data_table_relation_instance = DataTableRelation.from_json(json) +# print the JSON string representation of the object +print(DataTableRelation.to_json()) + +# convert the object into a dict +data_table_relation_dict = data_table_relation_instance.to_dict() +# create an instance of DataTableRelation from a dict +data_table_relation_from_dict = DataTableRelation.from_dict(data_table_relation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/DataTablesApi.md b/src/workato_platform/client/workato_api/docs/DataTablesApi.md new file mode 100644 index 0000000..360e436 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DataTablesApi.md @@ -0,0 +1,172 @@ +# workato_platform.client.workato_api.DataTablesApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_data_table**](DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table +[**list_data_tables**](DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables + + +# **create_data_table** +> DataTableCreateResponse create_data_table(data_table_create_request) + +Create data table + +Creates a data table in a folder you specify + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) + data_table_create_request = workato_platform.client.workato_api.DataTableCreateRequest() # DataTableCreateRequest | + + try: + # Create data table + api_response = await api_instance.create_data_table(data_table_create_request) + print("The response of DataTablesApi->create_data_table:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DataTablesApi->create_data_table: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_table_create_request** | [**DataTableCreateRequest**](DataTableCreateRequest.md)| | + +### Return type + +[**DataTableCreateResponse**](DataTableCreateResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Data table created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_data_tables** +> DataTableListResponse list_data_tables(page=page, per_page=per_page) + +List data tables + +Returns a list of all data tables in your workspace + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) + page = 1 # int | Page number of the data tables to fetch (optional) (default to 1) + per_page = 100 # int | Page size (max 100) (optional) (default to 100) + + try: + # List data tables + api_response = await api_instance.list_data_tables(page=page, per_page=per_page) + print("The response of DataTablesApi->list_data_tables:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DataTablesApi->list_data_tables: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number of the data tables to fetch | [optional] [default to 1] + **per_page** | **int**| Page size (max 100) | [optional] [default to 100] + +### Return type + +[**DataTableListResponse**](DataTableListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Data tables retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md b/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md new file mode 100644 index 0000000..c86cf44 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md @@ -0,0 +1,29 @@ +# DeleteProject403Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteProject403Response from a JSON string +delete_project403_response_instance = DeleteProject403Response.from_json(json) +# print the JSON string representation of the object +print(DeleteProject403Response.to_json()) + +# convert the object into a dict +delete_project403_response_dict = delete_project403_response_instance.to_dict() +# create an instance of DeleteProject403Response from a dict +delete_project403_response_from_dict = DeleteProject403Response.from_dict(delete_project403_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/Error.md b/src/workato_platform/client/workato_api/docs/Error.md new file mode 100644 index 0000000..617e9e9 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | + +## Example + +```python +from workato_platform.client.workato_api.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ExportApi.md b/src/workato_platform/client/workato_api/docs/ExportApi.md new file mode 100644 index 0000000..e71277b --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ExportApi.md @@ -0,0 +1,175 @@ +# workato_platform.client.workato_api.ExportApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_export_manifest**](ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest +[**list_assets_in_folder**](ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder + + +# **create_export_manifest** +> ExportManifestResponse create_export_manifest(create_export_manifest_request) + +Create an export manifest + +Create an export manifest for exporting assets + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ExportApi(api_client) + create_export_manifest_request = workato_platform.client.workato_api.CreateExportManifestRequest() # CreateExportManifestRequest | + + try: + # Create an export manifest + api_response = await api_instance.create_export_manifest(create_export_manifest_request) + print("The response of ExportApi->create_export_manifest:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExportApi->create_export_manifest: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_export_manifest_request** | [**CreateExportManifestRequest**](CreateExportManifestRequest.md)| | + +### Return type + +[**ExportManifestResponse**](ExportManifestResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Export manifest created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_assets_in_folder** +> FolderAssetsResponse list_assets_in_folder(folder_id=folder_id, include_test_cases=include_test_cases, include_data=include_data) + +View assets in a folder + +View assets in a folder. Useful for creating or updating export manifests. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ExportApi(api_client) + folder_id = 56 # int | The ID of the folder containing the assets (optional) + include_test_cases = False # bool | Include test cases (currently not supported) (optional) (default to False) + include_data = False # bool | Include data from the list of assets (optional) (default to False) + + try: + # View assets in a folder + api_response = await api_instance.list_assets_in_folder(folder_id=folder_id, include_test_cases=include_test_cases, include_data=include_data) + print("The response of ExportApi->list_assets_in_folder:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExportApi->list_assets_in_folder: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folder_id** | **int**| The ID of the folder containing the assets | [optional] + **include_test_cases** | **bool**| Include test cases (currently not supported) | [optional] [default to False] + **include_data** | **bool**| Include data from the list of assets | [optional] [default to False] + +### Return type + +[**FolderAssetsResponse**](FolderAssetsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Folder assets retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md b/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md new file mode 100644 index 0000000..4d64ee0 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md @@ -0,0 +1,35 @@ +# ExportManifestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the new manifest | +**assets** | [**List[AssetReference]**](AssetReference.md) | Dependent assets to include in the manifest | [optional] +**folder_id** | **int** | The ID of the folder containing the assets | [optional] +**include_test_cases** | **bool** | Whether the manifest includes test cases | [optional] [default to False] +**auto_generate_assets** | **bool** | Auto-generates assets from a folder | [optional] [default to False] +**include_data** | **bool** | Include data from automatic asset generation | [optional] [default to False] +**include_tags** | **bool** | Include tags assigned to assets in the export manifest | [optional] [default to False] + +## Example + +```python +from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportManifestRequest from a JSON string +export_manifest_request_instance = ExportManifestRequest.from_json(json) +# print the JSON string representation of the object +print(ExportManifestRequest.to_json()) + +# convert the object into a dict +export_manifest_request_dict = export_manifest_request_instance.to_dict() +# create an instance of ExportManifestRequest from a dict +export_manifest_request_from_dict = ExportManifestRequest.from_dict(export_manifest_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md b/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md new file mode 100644 index 0000000..ed8e5b7 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md @@ -0,0 +1,29 @@ +# ExportManifestResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | [**ExportManifestResponseResult**](ExportManifestResponseResult.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportManifestResponse from a JSON string +export_manifest_response_instance = ExportManifestResponse.from_json(json) +# print the JSON string representation of the object +print(ExportManifestResponse.to_json()) + +# convert the object into a dict +export_manifest_response_dict = export_manifest_response_instance.to_dict() +# create an instance of ExportManifestResponse from a dict +export_manifest_response_from_dict = ExportManifestResponse.from_dict(export_manifest_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md b/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md new file mode 100644 index 0000000..4c5e8e3 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md @@ -0,0 +1,36 @@ +# ExportManifestResponseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**last_exported_at** | **datetime** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**deleted_at** | **datetime** | | +**project_path** | **str** | | +**status** | **str** | | + +## Example + +```python +from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportManifestResponseResult from a JSON string +export_manifest_response_result_instance = ExportManifestResponseResult.from_json(json) +# print the JSON string representation of the object +print(ExportManifestResponseResult.to_json()) + +# convert the object into a dict +export_manifest_response_result_dict = export_manifest_response_result_instance.to_dict() +# create an instance of ExportManifestResponseResult from a dict +export_manifest_response_result_from_dict = ExportManifestResponseResult.from_dict(export_manifest_response_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/Folder.md b/src/workato_platform/client/workato_api/docs/Folder.md new file mode 100644 index 0000000..28207b4 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Folder.md @@ -0,0 +1,35 @@ +# Folder + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**parent_id** | **int** | | +**is_project** | **bool** | | +**project_id** | **int** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +## Example + +```python +from workato_platform.client.workato_api.models.folder import Folder + +# TODO update the JSON string below +json = "{}" +# create an instance of Folder from a JSON string +folder_instance = Folder.from_json(json) +# print the JSON string representation of the object +print(Folder.to_json()) + +# convert the object into a dict +folder_dict = folder_instance.to_dict() +# create an instance of Folder from a dict +folder_from_dict = Folder.from_dict(folder_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md b/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md new file mode 100644 index 0000000..382a3f3 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md @@ -0,0 +1,29 @@ +# FolderAssetsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | [**FolderAssetsResponseResult**](FolderAssetsResponseResult.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FolderAssetsResponse from a JSON string +folder_assets_response_instance = FolderAssetsResponse.from_json(json) +# print the JSON string representation of the object +print(FolderAssetsResponse.to_json()) + +# convert the object into a dict +folder_assets_response_dict = folder_assets_response_instance.to_dict() +# create an instance of FolderAssetsResponse from a dict +folder_assets_response_from_dict = FolderAssetsResponse.from_dict(folder_assets_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md b/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md new file mode 100644 index 0000000..95a5929 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md @@ -0,0 +1,29 @@ +# FolderAssetsResponseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**List[Asset]**](Asset.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of FolderAssetsResponseResult from a JSON string +folder_assets_response_result_instance = FolderAssetsResponseResult.from_json(json) +# print the JSON string representation of the object +print(FolderAssetsResponseResult.to_json()) + +# convert the object into a dict +folder_assets_response_result_dict = folder_assets_response_result_instance.to_dict() +# create an instance of FolderAssetsResponseResult from a dict +folder_assets_response_result_from_dict = FolderAssetsResponseResult.from_dict(folder_assets_response_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md b/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md new file mode 100644 index 0000000..2617a2e --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md @@ -0,0 +1,35 @@ +# FolderCreationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**parent_id** | **int** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**project_id** | **int** | | +**is_project** | **bool** | | + +## Example + +```python +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FolderCreationResponse from a JSON string +folder_creation_response_instance = FolderCreationResponse.from_json(json) +# print the JSON string representation of the object +print(FolderCreationResponse.to_json()) + +# convert the object into a dict +folder_creation_response_dict = folder_creation_response_instance.to_dict() +# create an instance of FolderCreationResponse from a dict +folder_creation_response_from_dict = FolderCreationResponse.from_dict(folder_creation_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/FoldersApi.md b/src/workato_platform/client/workato_api/docs/FoldersApi.md new file mode 100644 index 0000000..f4d2aa5 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/FoldersApi.md @@ -0,0 +1,176 @@ +# workato_platform.client.workato_api.FoldersApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_folder**](FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder +[**list_folders**](FoldersApi.md#list_folders) | **GET** /api/folders | List folders + + +# **create_folder** +> FolderCreationResponse create_folder(create_folder_request) + +Create a folder + +Creates a new folder in the specified parent folder. If no parent folder ID +is specified, creates the folder as a top-level folder in the home folder. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.FoldersApi(api_client) + create_folder_request = workato_platform.client.workato_api.CreateFolderRequest() # CreateFolderRequest | + + try: + # Create a folder + api_response = await api_instance.create_folder(create_folder_request) + print("The response of FoldersApi->create_folder:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FoldersApi->create_folder: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_folder_request** | [**CreateFolderRequest**](CreateFolderRequest.md)| | + +### Return type + +[**FolderCreationResponse**](FolderCreationResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Folder created successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_folders** +> List[Folder] list_folders(parent_id=parent_id, page=page, per_page=per_page) + +List folders + +Lists all folders. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.folder import Folder +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.FoldersApi(api_client) + parent_id = 56 # int | Parent folder ID. Defaults to Home folder. (optional) + page = 1 # int | Page number. Defaults to 1. (optional) (default to 1) + per_page = 100 # int | Page size. Defaults to 100 (maximum is 100). (optional) (default to 100) + + try: + # List folders + api_response = await api_instance.list_folders(parent_id=parent_id, page=page, per_page=per_page) + print("The response of FoldersApi->list_folders:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FoldersApi->list_folders: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parent_id** | **int**| Parent folder ID. Defaults to Home folder. | [optional] + **page** | **int**| Page number. Defaults to 1. | [optional] [default to 1] + **per_page** | **int**| Page size. Defaults to 100 (maximum is 100). | [optional] [default to 100] + +### Return type + +[**List[Folder]**](Folder.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of folders retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/ImportResults.md b/src/workato_platform/client/workato_api/docs/ImportResults.md new file mode 100644 index 0000000..3b81dbf --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ImportResults.md @@ -0,0 +1,32 @@ +# ImportResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**total_endpoints** | **int** | | +**failed_endpoints** | **int** | | +**failed_actions** | **List[str]** | | + +## Example + +```python +from workato_platform.client.workato_api.models.import_results import ImportResults + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportResults from a JSON string +import_results_instance = ImportResults.from_json(json) +# print the JSON string representation of the object +print(ImportResults.to_json()) + +# convert the object into a dict +import_results_dict = import_results_instance.to_dict() +# create an instance of ImportResults from a dict +import_results_from_dict = ImportResults.from_dict(import_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md b/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md new file mode 100644 index 0000000..9bc51e4 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md @@ -0,0 +1,29 @@ +# OAuthUrlResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OAuthUrlResponseData**](OAuthUrlResponseData.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuthUrlResponse from a JSON string +o_auth_url_response_instance = OAuthUrlResponse.from_json(json) +# print the JSON string representation of the object +print(OAuthUrlResponse.to_json()) + +# convert the object into a dict +o_auth_url_response_dict = o_auth_url_response_instance.to_dict() +# create an instance of OAuthUrlResponse from a dict +o_auth_url_response_from_dict = OAuthUrlResponse.from_dict(o_auth_url_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md b/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md new file mode 100644 index 0000000..f7db6ae --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md @@ -0,0 +1,29 @@ +# OAuthUrlResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The OAuth authorization URL | + +## Example + +```python +from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuthUrlResponseData from a JSON string +o_auth_url_response_data_instance = OAuthUrlResponseData.from_json(json) +# print the JSON string representation of the object +print(OAuthUrlResponseData.to_json()) + +# convert the object into a dict +o_auth_url_response_data_dict = o_auth_url_response_data_instance.to_dict() +# create an instance of OAuthUrlResponseData from a dict +o_auth_url_response_data_from_dict = OAuthUrlResponseData.from_dict(o_auth_url_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/OpenApiSpec.md b/src/workato_platform/client/workato_api/docs/OpenApiSpec.md new file mode 100644 index 0000000..b923b62 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/OpenApiSpec.md @@ -0,0 +1,30 @@ +# OpenApiSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | The OpenAPI spec as a JSON or YAML string | +**format** | **str** | Format of the OpenAPI spec | + +## Example + +```python +from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenApiSpec from a JSON string +open_api_spec_instance = OpenApiSpec.from_json(json) +# print the JSON string representation of the object +print(OpenApiSpec.to_json()) + +# convert the object into a dict +open_api_spec_dict = open_api_spec_instance.to_dict() +# create an instance of OpenApiSpec from a dict +open_api_spec_from_dict = OpenApiSpec.from_dict(open_api_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md b/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md new file mode 100644 index 0000000..b653df2 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md @@ -0,0 +1,35 @@ +# PackageDetailsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**operation_type** | **str** | | +**status** | **str** | | +**export_manifest_id** | **int** | | [optional] +**download_url** | **str** | | [optional] +**error** | **str** | Error message when status is failed | [optional] +**recipe_status** | [**List[PackageDetailsResponseRecipeStatusInner]**](PackageDetailsResponseRecipeStatusInner.md) | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PackageDetailsResponse from a JSON string +package_details_response_instance = PackageDetailsResponse.from_json(json) +# print the JSON string representation of the object +print(PackageDetailsResponse.to_json()) + +# convert the object into a dict +package_details_response_dict = package_details_response_instance.to_dict() +# create an instance of PackageDetailsResponse from a dict +package_details_response_from_dict = PackageDetailsResponse.from_dict(package_details_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md b/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md new file mode 100644 index 0000000..489d79e --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md @@ -0,0 +1,30 @@ +# PackageDetailsResponseRecipeStatusInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**import_result** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PackageDetailsResponseRecipeStatusInner from a JSON string +package_details_response_recipe_status_inner_instance = PackageDetailsResponseRecipeStatusInner.from_json(json) +# print the JSON string representation of the object +print(PackageDetailsResponseRecipeStatusInner.to_json()) + +# convert the object into a dict +package_details_response_recipe_status_inner_dict = package_details_response_recipe_status_inner_instance.to_dict() +# create an instance of PackageDetailsResponseRecipeStatusInner from a dict +package_details_response_recipe_status_inner_from_dict = PackageDetailsResponseRecipeStatusInner.from_dict(package_details_response_recipe_status_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PackageResponse.md b/src/workato_platform/client/workato_api/docs/PackageResponse.md new file mode 100644 index 0000000..0af6f19 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PackageResponse.md @@ -0,0 +1,33 @@ +# PackageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**operation_type** | **str** | | +**status** | **str** | | +**export_manifest_id** | **int** | | [optional] +**download_url** | **str** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.package_response import PackageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PackageResponse from a JSON string +package_response_instance = PackageResponse.from_json(json) +# print the JSON string representation of the object +print(PackageResponse.to_json()) + +# convert the object into a dict +package_response_dict = package_response_instance.to_dict() +# create an instance of PackageResponse from a dict +package_response_from_dict = PackageResponse.from_dict(package_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PackagesApi.md b/src/workato_platform/client/workato_api/docs/PackagesApi.md new file mode 100644 index 0000000..43aaf2c --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PackagesApi.md @@ -0,0 +1,364 @@ +# workato_platform.client.workato_api.PackagesApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**download_package**](PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package +[**export_package**](PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest +[**get_package**](PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details +[**import_package**](PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder + + +# **download_package** +> bytearray download_package(package_id) + +Download package + +Downloads a package. Returns a redirect to the package content or the binary content directly. +Use the -L flag in cURL to follow redirects. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + package_id = 56 # int | Package ID + + try: + # Download package + api_response = await api_instance.download_package(package_id) + print("The response of PackagesApi->download_package:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PackagesApi->download_package: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **package_id** | **int**| Package ID | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zip, application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Package binary content | - | +**302** | Redirect to package download | * Location - URL to download the package content
| +**401** | Authentication required | - | +**404** | Package not found or doesn't have content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **export_package** +> PackageResponse export_package(id) + +Export a package based on a manifest + +Export a package based on a manifest. + +**ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** + +When you provide an API client with privileges to this endpoint, the API client +is also granted the ability to view other assets like recipes, lookup tables, +Event topics, and message templates by examining the resulting zip file. + +This is an asynchronous request. Use GET package by ID endpoint to get details +of the exported package. + +**INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** + +To include tags in the exported package, set the include_tags attribute to true +when calling the Create an export manifest endpoint. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + id = 'id_example' # str | Export manifest ID + + try: + # Export a package based on a manifest + api_response = await api_instance.export_package(id) + print("The response of PackagesApi->export_package:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PackagesApi->export_package: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Export manifest ID | + +### Return type + +[**PackageResponse**](PackageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export package creation triggered successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_package** +> PackageDetailsResponse get_package(package_id) + +Get package details + +Get details of an imported or exported package including status + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + package_id = 56 # int | Package ID + + try: + # Get package details + api_response = await api_instance.get_package(package_id) + print("The response of PackagesApi->get_package:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PackagesApi->get_package: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **package_id** | **int**| Package ID | + +### Return type + +[**PackageDetailsResponse**](PackageDetailsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Package details retrieved successfully | - | +**401** | Authentication required | - | +**404** | Package not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **import_package** +> PackageResponse import_package(id, body, restart_recipes=restart_recipes, include_tags=include_tags, folder_id_for_home_assets=folder_id_for_home_assets) + +Import a package into a folder + +Import a package in zip file format into a folder. This endpoint allows an API client +to create or update assets, such as recipes, lookup tables, event topics, and message +templates, through package imports. + +This is an asynchronous request. Use GET package by ID endpoint to get details of +the imported package. + +The input (zip file) is an application/octet-stream payload containing package content. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + id = 56 # int | Folder ID + body = None # bytearray | + restart_recipes = False # bool | Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. (optional) (default to False) + include_tags = False # bool | Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. (optional) (default to False) + folder_id_for_home_assets = 56 # int | The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. (optional) + + try: + # Import a package into a folder + api_response = await api_instance.import_package(id, body, restart_recipes=restart_recipes, include_tags=include_tags, folder_id_for_home_assets=folder_id_for_home_assets) + print("The response of PackagesApi->import_package:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PackagesApi->import_package: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Folder ID | + **body** | **bytearray**| | + **restart_recipes** | **bool**| Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. | [optional] [default to False] + **include_tags** | **bool**| Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. | [optional] [default to False] + **folder_id_for_home_assets** | **int**| The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. | [optional] + +### Return type + +[**PackageResponse**](PackageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Package import initiated successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/PicklistRequest.md b/src/workato_platform/client/workato_api/docs/PicklistRequest.md new file mode 100644 index 0000000..9b5ab09 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PicklistRequest.md @@ -0,0 +1,30 @@ +# PicklistRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pick_list_name** | **str** | Name of the pick list | +**pick_list_params** | **Dict[str, object]** | Picklist parameters, required in some picklists | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PicklistRequest from a JSON string +picklist_request_instance = PicklistRequest.from_json(json) +# print the JSON string representation of the object +print(PicklistRequest.to_json()) + +# convert the object into a dict +picklist_request_dict = picklist_request_instance.to_dict() +# create an instance of PicklistRequest from a dict +picklist_request_from_dict = PicklistRequest.from_dict(picklist_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PicklistResponse.md b/src/workato_platform/client/workato_api/docs/PicklistResponse.md new file mode 100644 index 0000000..c462628 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PicklistResponse.md @@ -0,0 +1,29 @@ +# PicklistResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **List[List[object]]** | Array of picklist value tuples [display_name, value, null, boolean] | + +## Example + +```python +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PicklistResponse from a JSON string +picklist_response_instance = PicklistResponse.from_json(json) +# print the JSON string representation of the object +print(PicklistResponse.to_json()) + +# convert the object into a dict +picklist_response_dict = picklist_response_instance.to_dict() +# create an instance of PicklistResponse from a dict +picklist_response_from_dict = PicklistResponse.from_dict(picklist_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnector.md b/src/workato_platform/client/workato_api/docs/PlatformConnector.md new file mode 100644 index 0000000..549a48e --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PlatformConnector.md @@ -0,0 +1,36 @@ +# PlatformConnector + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**title** | **str** | | +**categories** | **List[str]** | | +**oauth** | **bool** | | +**deprecated** | **bool** | | +**secondary** | **bool** | | +**triggers** | [**List[ConnectorAction]**](ConnectorAction.md) | | +**actions** | [**List[ConnectorAction]**](ConnectorAction.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.platform_connector import PlatformConnector + +# TODO update the JSON string below +json = "{}" +# create an instance of PlatformConnector from a JSON string +platform_connector_instance = PlatformConnector.from_json(json) +# print the JSON string representation of the object +print(PlatformConnector.to_json()) + +# convert the object into a dict +platform_connector_dict = platform_connector_instance.to_dict() +# create an instance of PlatformConnector from a dict +platform_connector_from_dict = PlatformConnector.from_dict(platform_connector_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md b/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md new file mode 100644 index 0000000..0bca4ce --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md @@ -0,0 +1,32 @@ +# PlatformConnectorListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[PlatformConnector]**](PlatformConnector.md) | | +**count** | **int** | | +**page** | **int** | | +**per_page** | **int** | | + +## Example + +```python +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PlatformConnectorListResponse from a JSON string +platform_connector_list_response_instance = PlatformConnectorListResponse.from_json(json) +# print the JSON string representation of the object +print(PlatformConnectorListResponse.to_json()) + +# convert the object into a dict +platform_connector_list_response_dict = platform_connector_list_response_instance.to_dict() +# create an instance of PlatformConnectorListResponse from a dict +platform_connector_list_response_from_dict = PlatformConnectorListResponse.from_dict(platform_connector_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/Project.md b/src/workato_platform/client/workato_api/docs/Project.md new file mode 100644 index 0000000..92a5b9b --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Project.md @@ -0,0 +1,32 @@ +# Project + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**description** | **str** | | [optional] +**folder_id** | **int** | | +**name** | **str** | | + +## Example + +```python +from workato_platform.client.workato_api.models.project import Project + +# TODO update the JSON string below +json = "{}" +# create an instance of Project from a JSON string +project_instance = Project.from_json(json) +# print the JSON string representation of the object +print(Project.to_json()) + +# convert the object into a dict +project_dict = project_instance.to_dict() +# create an instance of Project from a dict +project_from_dict = Project.from_dict(project_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ProjectsApi.md b/src/workato_platform/client/workato_api/docs/ProjectsApi.md new file mode 100644 index 0000000..279d8ca --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ProjectsApi.md @@ -0,0 +1,173 @@ +# workato_platform.client.workato_api.ProjectsApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_project**](ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project +[**list_projects**](ProjectsApi.md#list_projects) | **GET** /api/projects | List projects + + +# **delete_project** +> SuccessResponse delete_project(project_id) + +Delete a project + +Delete a project and all of its contents. This includes all child folders, +recipes, connections, and Workflow apps assets inside the project. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) + project_id = 56 # int | The ID of the project to delete + + try: + # Delete a project + api_response = await api_instance.delete_project(project_id) + print("The response of ProjectsApi->delete_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->delete_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **int**| The ID of the project to delete | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project deleted successfully | - | +**401** | Authentication required | - | +**403** | Permission denied | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_projects** +> List[Project] list_projects(page=page, per_page=per_page) + +List projects + +Returns a list of projects belonging to the authenticated user with pagination support + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.project import Project +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) + page = 1 # int | Page number (optional) (default to 1) + per_page = 100 # int | Number of projects per page (optional) (default to 100) + + try: + # List projects + api_response = await api_instance.list_projects(page=page, per_page=per_page) + print("The response of ProjectsApi->list_projects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->list_projects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **per_page** | **int**| Number of projects per page | [optional] [default to 100] + +### Return type + +[**List[Project]**](Project.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of projects retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/PropertiesApi.md b/src/workato_platform/client/workato_api/docs/PropertiesApi.md new file mode 100644 index 0000000..56b0eda --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/PropertiesApi.md @@ -0,0 +1,186 @@ +# workato_platform.client.workato_api.PropertiesApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_project_properties**](PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties +[**upsert_project_properties**](PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties + + +# **list_project_properties** +> Dict[str, str] list_project_properties(prefix, project_id) + +List project properties + +Returns a list of project-level properties belonging to a specific project in a +customer workspace that matches a project_id you specify. You must also include +a prefix. For example, if you provide the prefix salesforce_sync., any project +property with a name beginning with salesforce_sync., such as +salesforce_sync.admin_email, with the project_id you provided is returned. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) + prefix = 'salesforce_sync.' # str | Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. + project_id = 523144 # int | Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. + + try: + # List project properties + api_response = await api_instance.list_project_properties(prefix, project_id) + print("The response of PropertiesApi->list_project_properties:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PropertiesApi->list_project_properties: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **str**| Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. | + **project_id** | **int**| Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. | + +### Return type + +**Dict[str, str]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project properties retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **upsert_project_properties** +> SuccessResponse upsert_project_properties(project_id, upsert_project_properties_request) + +Upsert project properties + +Upserts project properties belonging to a specific project in a customer workspace +that matches a project_id you specify. This endpoint maps to properties based on +the names you provide in the request. + +## Property Limits +- Maximum number of project properties per project: 1,000 +- Maximum length of project property name: 100 characters +- Maximum length of project property value: 1,024 characters + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) + project_id = 523144 # int | Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. + upsert_project_properties_request = workato_platform.client.workato_api.UpsertProjectPropertiesRequest() # UpsertProjectPropertiesRequest | + + try: + # Upsert project properties + api_response = await api_instance.upsert_project_properties(project_id, upsert_project_properties_request) + print("The response of PropertiesApi->upsert_project_properties:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PropertiesApi->upsert_project_properties: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **int**| Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. | + **upsert_project_properties_request** | [**UpsertProjectPropertiesRequest**](UpsertProjectPropertiesRequest.md)| | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project properties upserted successfully | - | +**400** | Bad request | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/Recipe.md b/src/workato_platform/client/workato_api/docs/Recipe.md new file mode 100644 index 0000000..3a9490a --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/Recipe.md @@ -0,0 +1,58 @@ +# Recipe + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**user_id** | **int** | | +**name** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**copy_count** | **int** | | +**trigger_application** | **str** | | [optional] +**action_applications** | **List[str]** | | +**applications** | **List[str]** | | +**description** | **str** | | +**parameters_schema** | **List[object]** | | +**parameters** | **object** | | +**webhook_url** | **str** | | +**folder_id** | **int** | | +**running** | **bool** | | +**job_succeeded_count** | **int** | | +**job_failed_count** | **int** | | +**lifetime_task_count** | **int** | | +**last_run_at** | **datetime** | | [optional] +**stopped_at** | **datetime** | | [optional] +**version_no** | **int** | | +**stop_cause** | **str** | | +**config** | [**List[RecipeConfigInner]**](RecipeConfigInner.md) | | +**trigger_closure** | **object** | | +**code** | **str** | Recipe code (may be truncated if exclude_code is true) | +**author_name** | **str** | | +**version_author_name** | **str** | | +**version_author_email** | **str** | | +**version_comment** | **str** | | +**tags** | **List[str]** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.recipe import Recipe + +# TODO update the JSON string below +json = "{}" +# create an instance of Recipe from a JSON string +recipe_instance = Recipe.from_json(json) +# print the JSON string representation of the object +print(Recipe.to_json()) + +# convert the object into a dict +recipe_dict = recipe_instance.to_dict() +# create an instance of Recipe from a dict +recipe_from_dict = Recipe.from_dict(recipe_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md b/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md new file mode 100644 index 0000000..faf7290 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md @@ -0,0 +1,33 @@ +# RecipeConfigInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword** | **str** | | [optional] +**name** | **str** | | [optional] +**provider** | **str** | | [optional] +**skip_validation** | **bool** | | [optional] +**account_id** | **int** | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner + +# TODO update the JSON string below +json = "{}" +# create an instance of RecipeConfigInner from a JSON string +recipe_config_inner_instance = RecipeConfigInner.from_json(json) +# print the JSON string representation of the object +print(RecipeConfigInner.to_json()) + +# convert the object into a dict +recipe_config_inner_dict = recipe_config_inner_instance.to_dict() +# create an instance of RecipeConfigInner from a dict +recipe_config_inner_from_dict = RecipeConfigInner.from_dict(recipe_config_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md b/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md new file mode 100644 index 0000000..34a36e2 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md @@ -0,0 +1,30 @@ +# RecipeConnectionUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**adapter_name** | **str** | The internal name of the connector | +**connection_id** | **int** | The ID of the connection that replaces the existing one | + +## Example + +```python +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RecipeConnectionUpdateRequest from a JSON string +recipe_connection_update_request_instance = RecipeConnectionUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(RecipeConnectionUpdateRequest.to_json()) + +# convert the object into a dict +recipe_connection_update_request_dict = recipe_connection_update_request_instance.to_dict() +# create an instance of RecipeConnectionUpdateRequest from a dict +recipe_connection_update_request_from_dict = RecipeConnectionUpdateRequest.from_dict(recipe_connection_update_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RecipeListResponse.md b/src/workato_platform/client/workato_api/docs/RecipeListResponse.md new file mode 100644 index 0000000..c9e96c4 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RecipeListResponse.md @@ -0,0 +1,29 @@ +# RecipeListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[Recipe]**](Recipe.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RecipeListResponse from a JSON string +recipe_list_response_instance = RecipeListResponse.from_json(json) +# print the JSON string representation of the object +print(RecipeListResponse.to_json()) + +# convert the object into a dict +recipe_list_response_dict = recipe_list_response_instance.to_dict() +# create an instance of RecipeListResponse from a dict +recipe_list_response_from_dict = RecipeListResponse.from_dict(recipe_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md b/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md new file mode 100644 index 0000000..daeb5e4 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md @@ -0,0 +1,31 @@ +# RecipeStartResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Indicates whether the recipe started successfully | +**code_errors** | **List[List[object]]** | Code validation errors (only present on failure) | [optional] +**config_errors** | **List[List[object]]** | Configuration errors (only present on failure) | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RecipeStartResponse from a JSON string +recipe_start_response_instance = RecipeStartResponse.from_json(json) +# print the JSON string representation of the object +print(RecipeStartResponse.to_json()) + +# convert the object into a dict +recipe_start_response_dict = recipe_start_response_instance.to_dict() +# create an instance of RecipeStartResponse from a dict +recipe_start_response_from_dict = RecipeStartResponse.from_dict(recipe_start_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RecipesApi.md b/src/workato_platform/client/workato_api/docs/RecipesApi.md new file mode 100644 index 0000000..4e6a282 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RecipesApi.md @@ -0,0 +1,367 @@ +# workato_platform.client.workato_api.RecipesApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_recipes**](RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes +[**start_recipe**](RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe +[**stop_recipe**](RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe +[**update_recipe_connection**](RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe + + +# **list_recipes** +> RecipeListResponse list_recipes(adapter_names_all=adapter_names_all, adapter_names_any=adapter_names_any, folder_id=folder_id, order=order, page=page, per_page=per_page, running=running, since_id=since_id, stopped_after=stopped_after, stop_cause=stop_cause, updated_after=updated_after, includes=includes, exclude_code=exclude_code) + +List recipes + +Returns a list of recipes belonging to the authenticated user. +Recipes are returned in descending ID order. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + adapter_names_all = 'adapter_names_all_example' # str | Comma-separated adapter names (recipes must use ALL) (optional) + adapter_names_any = 'adapter_names_any_example' # str | Comma-separated adapter names (recipes must use ANY) (optional) + folder_id = 56 # int | Return recipes in specified folder (optional) + order = 'order_example' # str | Set ordering method (optional) + page = 1 # int | Page number (optional) (default to 1) + per_page = 100 # int | Number of recipes per page (optional) (default to 100) + running = True # bool | If true, returns only running recipes (optional) + since_id = 56 # int | Return recipes with IDs lower than this value (optional) + stopped_after = '2013-10-20T19:20:30+01:00' # datetime | Exclude recipes stopped after this date (ISO 8601 format) (optional) + stop_cause = 'stop_cause_example' # str | Filter by stop reason (optional) + updated_after = '2013-10-20T19:20:30+01:00' # datetime | Include recipes updated after this date (ISO 8601 format) (optional) + includes = ['includes_example'] # List[str] | Additional fields to include (e.g., tags) (optional) + exclude_code = True # bool | Exclude recipe code from response for better performance (optional) + + try: + # List recipes + api_response = await api_instance.list_recipes(adapter_names_all=adapter_names_all, adapter_names_any=adapter_names_any, folder_id=folder_id, order=order, page=page, per_page=per_page, running=running, since_id=since_id, stopped_after=stopped_after, stop_cause=stop_cause, updated_after=updated_after, includes=includes, exclude_code=exclude_code) + print("The response of RecipesApi->list_recipes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RecipesApi->list_recipes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **adapter_names_all** | **str**| Comma-separated adapter names (recipes must use ALL) | [optional] + **adapter_names_any** | **str**| Comma-separated adapter names (recipes must use ANY) | [optional] + **folder_id** | **int**| Return recipes in specified folder | [optional] + **order** | **str**| Set ordering method | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **per_page** | **int**| Number of recipes per page | [optional] [default to 100] + **running** | **bool**| If true, returns only running recipes | [optional] + **since_id** | **int**| Return recipes with IDs lower than this value | [optional] + **stopped_after** | **datetime**| Exclude recipes stopped after this date (ISO 8601 format) | [optional] + **stop_cause** | **str**| Filter by stop reason | [optional] + **updated_after** | **datetime**| Include recipes updated after this date (ISO 8601 format) | [optional] + **includes** | [**List[str]**](str.md)| Additional fields to include (e.g., tags) | [optional] + **exclude_code** | **bool**| Exclude recipe code from response for better performance | [optional] + +### Return type + +[**RecipeListResponse**](RecipeListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of recipes retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_recipe** +> RecipeStartResponse start_recipe(recipe_id) + +Start a recipe + +Starts a recipe specified by recipe ID + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + recipe_id = 56 # int | Recipe ID + + try: + # Start a recipe + api_response = await api_instance.start_recipe(recipe_id) + print("The response of RecipesApi->start_recipe:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RecipesApi->start_recipe: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recipe_id** | **int**| Recipe ID | + +### Return type + +[**RecipeStartResponse**](RecipeStartResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Recipe start response (success or validation failure) | - | +**400** | Bad request (OEM adapter usage limit or state transition error) | - | +**401** | Authentication required | - | +**422** | Unprocessable entity (webhook registration error) | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stop_recipe** +> SuccessResponse stop_recipe(recipe_id) + +Stop a recipe + +Stops a recipe specified by recipe ID + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + recipe_id = 56 # int | Recipe ID + + try: + # Stop a recipe + api_response = await api_instance.stop_recipe(recipe_id) + print("The response of RecipesApi->stop_recipe:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RecipesApi->stop_recipe: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recipe_id** | **int**| Recipe ID | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Recipe stopped successfully | - | +**400** | Bad request (state transition error or recipe cannot be stopped) | - | +**401** | Authentication required | - | +**404** | Recipe not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_recipe_connection** +> SuccessResponse update_recipe_connection(recipe_id, recipe_connection_update_request) + +Update a connection for a recipe + +Updates the chosen connection for a specific connector in a stopped recipe. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + recipe_id = 56 # int | ID of the recipe + recipe_connection_update_request = workato_platform.client.workato_api.RecipeConnectionUpdateRequest() # RecipeConnectionUpdateRequest | + + try: + # Update a connection for a recipe + api_response = await api_instance.update_recipe_connection(recipe_id, recipe_connection_update_request) + print("The response of RecipesApi->update_recipe_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RecipesApi->update_recipe_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recipe_id** | **int**| ID of the recipe | + **recipe_connection_update_request** | [**RecipeConnectionUpdateRequest**](RecipeConnectionUpdateRequest.md)| | + +### Return type + +[**SuccessResponse**](SuccessResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection updated successfully | - | +**400** | Bad request (recipe is running or invalid parameters) | - | +**401** | Authentication required | - | +**403** | Forbidden (no permission to update this recipe) | - | +**404** | Recipe not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md new file mode 100644 index 0000000..68a224d --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md @@ -0,0 +1,34 @@ +# RuntimeUserConnectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parent_id** | **int** | ID of parent OAuth connector (connection must be established) | +**name** | **str** | Optional name for the runtime user connection | [optional] +**folder_id** | **int** | Folder to put connection (uses current project if not specified) | +**external_id** | **str** | End user string ID for identifying the connection | +**callback_url** | **str** | Optional URL called back after successful token acquisition | [optional] +**redirect_url** | **str** | Optional URL where user is redirected after successful authorization | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RuntimeUserConnectionCreateRequest from a JSON string +runtime_user_connection_create_request_instance = RuntimeUserConnectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(RuntimeUserConnectionCreateRequest.to_json()) + +# convert the object into a dict +runtime_user_connection_create_request_dict = runtime_user_connection_create_request_instance.to_dict() +# create an instance of RuntimeUserConnectionCreateRequest from a dict +runtime_user_connection_create_request_from_dict = RuntimeUserConnectionCreateRequest.from_dict(runtime_user_connection_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md new file mode 100644 index 0000000..fc124cc --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md @@ -0,0 +1,29 @@ +# RuntimeUserConnectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**RuntimeUserConnectionResponseData**](RuntimeUserConnectionResponseData.md) | | + +## Example + +```python +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RuntimeUserConnectionResponse from a JSON string +runtime_user_connection_response_instance = RuntimeUserConnectionResponse.from_json(json) +# print the JSON string representation of the object +print(RuntimeUserConnectionResponse.to_json()) + +# convert the object into a dict +runtime_user_connection_response_dict = runtime_user_connection_response_instance.to_dict() +# create an instance of RuntimeUserConnectionResponse from a dict +runtime_user_connection_response_from_dict = RuntimeUserConnectionResponse.from_dict(runtime_user_connection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md new file mode 100644 index 0000000..0377d39 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md @@ -0,0 +1,30 @@ +# RuntimeUserConnectionResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the created runtime user connection | +**url** | **str** | OAuth URL for user authorization | + +## Example + +```python +from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of RuntimeUserConnectionResponseData from a JSON string +runtime_user_connection_response_data_instance = RuntimeUserConnectionResponseData.from_json(json) +# print the JSON string representation of the object +print(RuntimeUserConnectionResponseData.to_json()) + +# convert the object into a dict +runtime_user_connection_response_data_dict = runtime_user_connection_response_data_instance.to_dict() +# create an instance of RuntimeUserConnectionResponseData from a dict +runtime_user_connection_response_data_from_dict = RuntimeUserConnectionResponseData.from_dict(runtime_user_connection_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/SuccessResponse.md b/src/workato_platform/client/workato_api/docs/SuccessResponse.md new file mode 100644 index 0000000..eba19ad --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/SuccessResponse.md @@ -0,0 +1,29 @@ +# SuccessResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | + +## Example + +```python +from workato_platform.client.workato_api.models.success_response import SuccessResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SuccessResponse from a JSON string +success_response_instance = SuccessResponse.from_json(json) +# print the JSON string representation of the object +print(SuccessResponse.to_json()) + +# convert the object into a dict +success_response_dict = success_response_instance.to_dict() +# create an instance of SuccessResponse from a dict +success_response_from_dict = SuccessResponse.from_dict(success_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md b/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md new file mode 100644 index 0000000..372c05f --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md @@ -0,0 +1,29 @@ +# UpsertProjectPropertiesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**properties** | **Dict[str, str]** | Contains the names and values of the properties you plan to upsert. Property names are limited to 100 characters, values to 1,024 characters. | + +## Example + +```python +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpsertProjectPropertiesRequest from a JSON string +upsert_project_properties_request_instance = UpsertProjectPropertiesRequest.from_json(json) +# print the JSON string representation of the object +print(UpsertProjectPropertiesRequest.to_json()) + +# convert the object into a dict +upsert_project_properties_request_dict = upsert_project_properties_request_instance.to_dict() +# create an instance of UpsertProjectPropertiesRequest from a dict +upsert_project_properties_request_from_dict = UpsertProjectPropertiesRequest.from_dict(upsert_project_properties_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/User.md b/src/workato_platform/client/workato_api/docs/User.md new file mode 100644 index 0000000..5d2db1f --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/User.md @@ -0,0 +1,48 @@ +# User + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**created_at** | **datetime** | | +**plan_id** | **str** | | +**current_billing_period_start** | **datetime** | | +**current_billing_period_end** | **datetime** | | +**expert** | **bool** | | [optional] +**avatar_url** | **str** | | [optional] +**recipes_count** | **int** | | +**interested_applications** | **List[str]** | | [optional] +**company_name** | **str** | | +**location** | **str** | | +**last_seen** | **datetime** | | +**contact_phone** | **str** | | [optional] +**contact_email** | **str** | | [optional] +**about_me** | **str** | | [optional] +**email** | **str** | | +**phone** | **str** | | [optional] +**active_recipes_count** | **int** | | +**root_folder_id** | **int** | | + +## Example + +```python +from workato_platform.client.workato_api.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print(User.to_json()) + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_from_dict = User.from_dict(user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/UsersApi.md b/src/workato_platform/client/workato_api/docs/UsersApi.md new file mode 100644 index 0000000..abd1bdc --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/UsersApi.md @@ -0,0 +1,84 @@ +# workato_platform.client.workato_api.UsersApi + +All URIs are relative to *https://www.workato.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_workspace_details**](UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information + + +# **get_workspace_details** +> User get_workspace_details() + +Get current user information + +Returns information about the authenticated user + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import workato_platform.client.workato_api +from workato_platform.client.workato_api.models.user import User +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.UsersApi(api_client) + + try: + # Get current user information + api_response = await api_instance.get_workspace_details() + print("The response of UsersApi->get_workspace_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_workspace_details: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User information retrieved successfully | - | +**401** | Authentication required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/src/workato_platform/client/workato_api/docs/ValidationError.md b/src/workato_platform/client/workato_api/docs/ValidationError.md new file mode 100644 index 0000000..0cc7200 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ValidationError.md @@ -0,0 +1,30 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**errors** | [**Dict[str, ValidationErrorErrorsValue]**](ValidationErrorErrorsValue.md) | | [optional] + +## Example + +```python +from workato_platform.client.workato_api.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md b/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md new file mode 100644 index 0000000..6329125 --- /dev/null +++ b/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md @@ -0,0 +1,28 @@ +# ValidationErrorErrorsValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorErrorsValue from a JSON string +validation_error_errors_value_instance = ValidationErrorErrorsValue.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorErrorsValue.to_json()) + +# convert the object into a dict +validation_error_errors_value_dict = validation_error_errors_value_instance.to_dict() +# create an instance of ValidationErrorErrorsValue from a dict +validation_error_errors_value_from_dict = ValidationErrorErrorsValue.from_dict(validation_error_errors_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/workato_platform/client/workato_api/exceptions.py b/src/workato_platform/client/workato_api/exceptions.py new file mode 100644 index 0000000..2aded31 --- /dev/null +++ b/src/workato_platform/client/workato_api/exceptions.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/src/workato_platform/client/workato_api/models/__init__.py b/src/workato_platform/client/workato_api/models/__init__.py new file mode 100644 index 0000000..28c8fe0 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/__init__.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +# flake8: noqa +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +# import models into model package +from workato_platform.client.workato_api.models.api_client import ApiClient +from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform.client.workato_api.models.api_key import ApiKey +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform.client.workato_api.models.asset import Asset +from workato_platform.client.workato_api.models.asset_reference import AssetReference +from workato_platform.client.workato_api.models.connection import Connection +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform.client.workato_api.models.connector_action import ConnectorAction +from workato_platform.client.workato_api.models.connector_version import ConnectorVersion +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform.client.workato_api.models.custom_connector import CustomConnector +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform.client.workato_api.models.data_table import DataTable +from workato_platform.client.workato_api.models.data_table_column import DataTableColumn +from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response +from workato_platform.client.workato_api.models.error import Error +from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from workato_platform.client.workato_api.models.folder import Folder +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform.client.workato_api.models.import_results import ImportResults +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform.client.workato_api.models.platform_connector import PlatformConnector +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform.client.workato_api.models.project import Project +from workato_platform.client.workato_api.models.recipe import Recipe +from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform.client.workato_api.models.user import User +from workato_platform.client.workato_api.models.validation_error import ValidationError +from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue + diff --git a/src/workato_platform/client/workato_api/models/api_client.py b/src/workato_platform/client/workato_api/models/api_client.py new file mode 100644 index 0000000..1d3e84b --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiClient(BaseModel): + """ + ApiClient + """ # noqa: E501 + id: StrictInt + name: StrictStr + description: Optional[StrictStr] = None + active_api_keys_count: Optional[StrictInt] = None + total_api_keys_count: Optional[StrictInt] = None + created_at: datetime + updated_at: datetime + logo: Optional[StrictStr] = Field(description="URL to the client's logo image") + logo_2x: Optional[StrictStr] = Field(description="URL to the client's high-resolution logo image") + is_legacy: StrictBool + email: Optional[StrictStr] = None + auth_type: StrictStr + api_token: Optional[StrictStr] = Field(default=None, description="API token (only returned for token auth type)") + mtls_enabled: Optional[StrictBool] = None + validation_formula: Optional[StrictStr] = None + cert_bundle_ids: Optional[List[StrictInt]] = None + api_policies: List[ApiClientApiPoliciesInner] = Field(description="List of API policies associated with the client") + api_collections: List[ApiClientApiCollectionsInner] = Field(description="List of API collections associated with the client") + __properties: ClassVar[List[str]] = ["id", "name", "description", "active_api_keys_count", "total_api_keys_count", "created_at", "updated_at", "logo", "logo_2x", "is_legacy", "email", "auth_type", "api_token", "mtls_enabled", "validation_formula", "cert_bundle_ids", "api_policies", "api_collections"] + + @field_validator('auth_type') + def auth_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['token', 'jwt', 'oauth2', 'oidc']): + raise ValueError("must be one of enum values ('token', 'jwt', 'oauth2', 'oidc')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClient from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in api_policies (list) + _items = [] + if self.api_policies: + for _item_api_policies in self.api_policies: + if _item_api_policies: + _items.append(_item_api_policies.to_dict()) + _dict['api_policies'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in api_collections (list) + _items = [] + if self.api_collections: + for _item_api_collections in self.api_collections: + if _item_api_collections: + _items.append(_item_api_collections.to_dict()) + _dict['api_collections'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if logo (nullable) is None + # and model_fields_set contains the field + if self.logo is None and "logo" in self.model_fields_set: + _dict['logo'] = None + + # set to None if logo_2x (nullable) is None + # and model_fields_set contains the field + if self.logo_2x is None and "logo_2x" in self.model_fields_set: + _dict['logo_2x'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if api_token (nullable) is None + # and model_fields_set contains the field + if self.api_token is None and "api_token" in self.model_fields_set: + _dict['api_token'] = None + + # set to None if mtls_enabled (nullable) is None + # and model_fields_set contains the field + if self.mtls_enabled is None and "mtls_enabled" in self.model_fields_set: + _dict['mtls_enabled'] = None + + # set to None if validation_formula (nullable) is None + # and model_fields_set contains the field + if self.validation_formula is None and "validation_formula" in self.model_fields_set: + _dict['validation_formula'] = None + + # set to None if cert_bundle_ids (nullable) is None + # and model_fields_set contains the field + if self.cert_bundle_ids is None and "cert_bundle_ids" in self.model_fields_set: + _dict['cert_bundle_ids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClient from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "active_api_keys_count": obj.get("active_api_keys_count"), + "total_api_keys_count": obj.get("total_api_keys_count"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "logo": obj.get("logo"), + "logo_2x": obj.get("logo_2x"), + "is_legacy": obj.get("is_legacy"), + "email": obj.get("email"), + "auth_type": obj.get("auth_type"), + "api_token": obj.get("api_token"), + "mtls_enabled": obj.get("mtls_enabled"), + "validation_formula": obj.get("validation_formula"), + "cert_bundle_ids": obj.get("cert_bundle_ids"), + "api_policies": [ApiClientApiPoliciesInner.from_dict(_item) for _item in obj["api_policies"]] if obj.get("api_policies") is not None else None, + "api_collections": [ApiClientApiCollectionsInner.from_dict(_item) for _item in obj["api_collections"]] if obj.get("api_collections") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py b/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py new file mode 100644 index 0000000..ee214b3 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiClientApiCollectionsInner(BaseModel): + """ + ApiClientApiCollectionsInner + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClientApiCollectionsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClientApiCollectionsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py b/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py new file mode 100644 index 0000000..440be2a --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiClientApiPoliciesInner(BaseModel): + """ + ApiClientApiPoliciesInner + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClientApiPoliciesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClientApiPoliciesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_client_create_request.py b/src/workato_platform/client/workato_api/models/api_client_create_request.py new file mode 100644 index 0000000..24fe35a --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client_create_request.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiClientCreateRequest(BaseModel): + """ + ApiClientCreateRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the client") + description: Optional[StrictStr] = Field(default=None, description="Description of the client") + project_id: Optional[StrictInt] = Field(default=None, description="ID of the project to create the client in") + api_portal_id: Optional[StrictInt] = Field(default=None, description="ID of the API portal to assign the client") + email: Optional[StrictStr] = Field(default=None, description="Email address for the client (required if api_portal_id provided)") + api_collection_ids: List[StrictInt] = Field(description="IDs of API collections to assign to the client") + api_policy_id: Optional[StrictInt] = Field(default=None, description="ID of the API policy to apply") + auth_type: StrictStr = Field(description="Authentication method") + jwt_method: Optional[StrictStr] = Field(default=None, description="JWT signing method (required when auth_type is jwt)") + jwt_secret: Optional[StrictStr] = Field(default=None, description="HMAC shared secret or RSA public key (required when auth_type is jwt)") + oidc_issuer: Optional[StrictStr] = Field(default=None, description="Discovery URL for OIDC identity provider") + oidc_jwks_uri: Optional[StrictStr] = Field(default=None, description="JWKS URL for OIDC identity provider") + access_profile_claim: Optional[StrictStr] = Field(default=None, description="JWT claim key for access profile identification") + required_claims: Optional[List[StrictStr]] = Field(default=None, description="List of claims to enforce") + allowed_issuers: Optional[List[StrictStr]] = Field(default=None, description="List of allowed issuers") + mtls_enabled: Optional[StrictBool] = Field(default=None, description="Whether mutual TLS is enabled") + validation_formula: Optional[StrictStr] = Field(default=None, description="Formula to validate client certificates") + cert_bundle_ids: Optional[List[StrictInt]] = Field(default=None, description="Certificate bundle IDs for mTLS") + __properties: ClassVar[List[str]] = ["name", "description", "project_id", "api_portal_id", "email", "api_collection_ids", "api_policy_id", "auth_type", "jwt_method", "jwt_secret", "oidc_issuer", "oidc_jwks_uri", "access_profile_claim", "required_claims", "allowed_issuers", "mtls_enabled", "validation_formula", "cert_bundle_ids"] + + @field_validator('auth_type') + def auth_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['token', 'jwt', 'oauth2', 'oidc']): + raise ValueError("must be one of enum values ('token', 'jwt', 'oauth2', 'oidc')") + return value + + @field_validator('jwt_method') + def jwt_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['hmac', 'rsa']): + raise ValueError("must be one of enum values ('hmac', 'rsa')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClientCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClientCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "project_id": obj.get("project_id"), + "api_portal_id": obj.get("api_portal_id"), + "email": obj.get("email"), + "api_collection_ids": obj.get("api_collection_ids"), + "api_policy_id": obj.get("api_policy_id"), + "auth_type": obj.get("auth_type"), + "jwt_method": obj.get("jwt_method"), + "jwt_secret": obj.get("jwt_secret"), + "oidc_issuer": obj.get("oidc_issuer"), + "oidc_jwks_uri": obj.get("oidc_jwks_uri"), + "access_profile_claim": obj.get("access_profile_claim"), + "required_claims": obj.get("required_claims"), + "allowed_issuers": obj.get("allowed_issuers"), + "mtls_enabled": obj.get("mtls_enabled"), + "validation_formula": obj.get("validation_formula"), + "cert_bundle_ids": obj.get("cert_bundle_ids") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_client_list_response.py b/src/workato_platform/client/workato_api/models/api_client_list_response.py new file mode 100644 index 0000000..ff4c94d --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client_list_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.api_client import ApiClient +from typing import Optional, Set +from typing_extensions import Self + +class ApiClientListResponse(BaseModel): + """ + ApiClientListResponse + """ # noqa: E501 + data: List[ApiClient] + count: StrictInt = Field(description="Total number of API clients") + page: StrictInt = Field(description="Current page number") + per_page: StrictInt = Field(description="Number of items per page") + __properties: ClassVar[List[str]] = ["data", "count", "page", "per_page"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClientListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClientListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ApiClient.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "count": obj.get("count"), + "page": obj.get("page"), + "per_page": obj.get("per_page") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_client_response.py b/src/workato_platform/client/workato_api/models/api_client_response.py new file mode 100644 index 0000000..a379b09 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_client_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.api_client import ApiClient +from typing import Optional, Set +from typing_extensions import Self + +class ApiClientResponse(BaseModel): + """ + ApiClientResponse + """ # noqa: E501 + data: ApiClient + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiClientResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiClientResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": ApiClient.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_collection.py b/src/workato_platform/client/workato_api/models/api_collection.py new file mode 100644 index 0000000..7fb1ceb --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_collection.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.import_results import ImportResults +from typing import Optional, Set +from typing_extensions import Self + +class ApiCollection(BaseModel): + """ + ApiCollection + """ # noqa: E501 + id: StrictInt + name: StrictStr + project_id: StrictStr + url: StrictStr + api_spec_url: StrictStr + version: StrictStr + created_at: datetime + updated_at: datetime + message: Optional[StrictStr] = Field(default=None, description="Only present in creation/import responses") + import_results: Optional[ImportResults] = None + __properties: ClassVar[List[str]] = ["id", "name", "project_id", "url", "api_spec_url", "version", "created_at", "updated_at", "message", "import_results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCollection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of import_results + if self.import_results: + _dict['import_results'] = self.import_results.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCollection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "project_id": obj.get("project_id"), + "url": obj.get("url"), + "api_spec_url": obj.get("api_spec_url"), + "version": obj.get("version"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "message": obj.get("message"), + "import_results": ImportResults.from_dict(obj["import_results"]) if obj.get("import_results") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_collection_create_request.py b/src/workato_platform/client/workato_api/models/api_collection_create_request.py new file mode 100644 index 0000000..973c52e --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_collection_create_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from typing import Optional, Set +from typing_extensions import Self + +class ApiCollectionCreateRequest(BaseModel): + """ + ApiCollectionCreateRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the API collection") + project_id: Optional[StrictInt] = Field(default=None, description="ID of the project to associate the collection with") + proxy_connection_id: Optional[StrictInt] = Field(default=None, description="ID of a proxy connection for proxy mode") + openapi_spec: Optional[OpenApiSpec] = None + __properties: ClassVar[List[str]] = ["name", "project_id", "proxy_connection_id", "openapi_spec"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCollectionCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of openapi_spec + if self.openapi_spec: + _dict['openapi_spec'] = self.openapi_spec.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCollectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "project_id": obj.get("project_id"), + "proxy_connection_id": obj.get("proxy_connection_id"), + "openapi_spec": OpenApiSpec.from_dict(obj["openapi_spec"]) if obj.get("openapi_spec") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_endpoint.py b/src/workato_platform/client/workato_api/models/api_endpoint.py new file mode 100644 index 0000000..8157095 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_endpoint.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiEndpoint(BaseModel): + """ + ApiEndpoint + """ # noqa: E501 + id: StrictInt + api_collection_id: StrictInt + flow_id: StrictInt + name: StrictStr + method: StrictStr + url: StrictStr + legacy_url: Optional[StrictStr] = None + base_path: StrictStr + path: StrictStr + active: StrictBool + legacy: StrictBool + created_at: datetime + updated_at: datetime + __properties: ClassVar[List[str]] = ["id", "api_collection_id", "flow_id", "name", "method", "url", "legacy_url", "base_path", "path", "active", "legacy", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiEndpoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if legacy_url (nullable) is None + # and model_fields_set contains the field + if self.legacy_url is None and "legacy_url" in self.model_fields_set: + _dict['legacy_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "api_collection_id": obj.get("api_collection_id"), + "flow_id": obj.get("flow_id"), + "name": obj.get("name"), + "method": obj.get("method"), + "url": obj.get("url"), + "legacy_url": obj.get("legacy_url"), + "base_path": obj.get("base_path"), + "path": obj.get("path"), + "active": obj.get("active"), + "legacy": obj.get("legacy"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_key.py b/src/workato_platform/client/workato_api/models/api_key.py new file mode 100644 index 0000000..d480730 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_key.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiKey(BaseModel): + """ + ApiKey + """ # noqa: E501 + id: StrictInt + name: StrictStr + auth_type: StrictStr + ip_allow_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses in the allowlist") + ip_deny_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to deny requests from") + active: StrictBool + active_since: datetime + auth_token: StrictStr = Field(description="The generated API token") + __properties: ClassVar[List[str]] = ["id", "name", "auth_type", "ip_allow_list", "ip_deny_list", "active", "active_since", "auth_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "auth_type": obj.get("auth_type"), + "ip_allow_list": obj.get("ip_allow_list"), + "ip_deny_list": obj.get("ip_deny_list"), + "active": obj.get("active"), + "active_since": obj.get("active_since"), + "auth_token": obj.get("auth_token") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_key_create_request.py b/src/workato_platform/client/workato_api/models/api_key_create_request.py new file mode 100644 index 0000000..5e6691e --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_key_create_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiKeyCreateRequest(BaseModel): + """ + ApiKeyCreateRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the API key") + active: StrictBool = Field(description="Indicates whether the API key is enabled or disabled. Disabled keys cannot call any APIs") + ip_allow_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to add to the allowlist") + ip_deny_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to deny requests from") + __properties: ClassVar[List[str]] = ["name", "active", "ip_allow_list", "ip_deny_list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiKeyCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiKeyCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "active": obj.get("active"), + "ip_allow_list": obj.get("ip_allow_list"), + "ip_deny_list": obj.get("ip_deny_list") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_key_list_response.py b/src/workato_platform/client/workato_api/models/api_key_list_response.py new file mode 100644 index 0000000..7d36419 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_key_list_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.api_key import ApiKey +from typing import Optional, Set +from typing_extensions import Self + +class ApiKeyListResponse(BaseModel): + """ + ApiKeyListResponse + """ # noqa: E501 + data: List[ApiKey] + count: StrictInt = Field(description="Total number of API keys") + page: StrictInt = Field(description="Current page number") + per_page: StrictInt = Field(description="Number of items per page") + __properties: ClassVar[List[str]] = ["data", "count", "page", "per_page"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiKeyListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiKeyListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ApiKey.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "count": obj.get("count"), + "page": obj.get("page"), + "per_page": obj.get("per_page") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/api_key_response.py b/src/workato_platform/client/workato_api/models/api_key_response.py new file mode 100644 index 0000000..045f239 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/api_key_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.api_key import ApiKey +from typing import Optional, Set +from typing_extensions import Self + +class ApiKeyResponse(BaseModel): + """ + ApiKeyResponse + """ # noqa: E501 + data: ApiKey + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": ApiKey.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/asset.py b/src/workato_platform/client/workato_api/models/asset.py new file mode 100644 index 0000000..55b6b34 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/asset.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Asset(BaseModel): + """ + Asset + """ # noqa: E501 + id: StrictInt + name: StrictStr + type: StrictStr + version: Optional[StrictInt] = None + folder: Optional[StrictStr] = None + absolute_path: Optional[StrictStr] = None + root_folder: StrictBool + unreachable: Optional[StrictBool] = None + zip_name: StrictStr + checked: StrictBool + status: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "version", "folder", "absolute_path", "root_folder", "unreachable", "zip_name", "checked", "status"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['added', 'updated', 'no change']): + raise ValueError("must be one of enum values ('added', 'updated', 'no change')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Asset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Asset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "version": obj.get("version"), + "folder": obj.get("folder"), + "absolute_path": obj.get("absolute_path"), + "root_folder": obj.get("root_folder"), + "unreachable": obj.get("unreachable"), + "zip_name": obj.get("zip_name"), + "checked": obj.get("checked"), + "status": obj.get("status") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/asset_reference.py b/src/workato_platform/client/workato_api/models/asset_reference.py new file mode 100644 index 0000000..e32f57f --- /dev/null +++ b/src/workato_platform/client/workato_api/models/asset_reference.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssetReference(BaseModel): + """ + AssetReference + """ # noqa: E501 + id: StrictInt = Field(description="ID of the dependency") + type: StrictStr = Field(description="Type of dependent asset") + checked: Optional[StrictBool] = Field(default=True, description="Determines if the asset is included in the manifest") + version: Optional[StrictInt] = Field(default=None, description="The version of the asset") + folder: Optional[StrictStr] = Field(default='', description="The folder that contains the asset") + absolute_path: StrictStr = Field(description="The absolute path of the asset") + root_folder: Optional[StrictBool] = Field(default=False, description="Name root folder") + unreachable: Optional[StrictBool] = Field(default=False, description="Whether the asset is unreachable") + zip_name: Optional[StrictStr] = Field(default=None, description="Name in the exported zip file") + __properties: ClassVar[List[str]] = ["id", "type", "checked", "version", "folder", "absolute_path", "root_folder", "unreachable", "zip_name"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetReference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetReference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "checked": obj.get("checked") if obj.get("checked") is not None else True, + "version": obj.get("version"), + "folder": obj.get("folder") if obj.get("folder") is not None else '', + "absolute_path": obj.get("absolute_path"), + "root_folder": obj.get("root_folder") if obj.get("root_folder") is not None else False, + "unreachable": obj.get("unreachable") if obj.get("unreachable") is not None else False, + "zip_name": obj.get("zip_name") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/connection.py b/src/workato_platform/client/workato_api/models/connection.py new file mode 100644 index 0000000..8048c68 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/connection.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Connection(BaseModel): + """ + Connection + """ # noqa: E501 + id: StrictInt + application: StrictStr + name: StrictStr + description: Optional[StrictStr] + authorized_at: Optional[datetime] + authorization_status: Optional[StrictStr] + authorization_error: Optional[StrictStr] + created_at: datetime + updated_at: datetime + external_id: Optional[StrictStr] + folder_id: StrictInt + connection_lost_at: Optional[datetime] + connection_lost_reason: Optional[StrictStr] + parent_id: Optional[StrictInt] + provider: Optional[StrictStr] = None + tags: Optional[List[StrictStr]] + __properties: ClassVar[List[str]] = ["id", "application", "name", "description", "authorized_at", "authorization_status", "authorization_error", "created_at", "updated_at", "external_id", "folder_id", "connection_lost_at", "connection_lost_reason", "parent_id", "provider", "tags"] + + @field_validator('authorization_status') + def authorization_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['success', 'failed', 'exception']): + raise ValueError("must be one of enum values ('success', 'failed', 'exception')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Connection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if authorized_at (nullable) is None + # and model_fields_set contains the field + if self.authorized_at is None and "authorized_at" in self.model_fields_set: + _dict['authorized_at'] = None + + # set to None if authorization_status (nullable) is None + # and model_fields_set contains the field + if self.authorization_status is None and "authorization_status" in self.model_fields_set: + _dict['authorization_status'] = None + + # set to None if authorization_error (nullable) is None + # and model_fields_set contains the field + if self.authorization_error is None and "authorization_error" in self.model_fields_set: + _dict['authorization_error'] = None + + # set to None if external_id (nullable) is None + # and model_fields_set contains the field + if self.external_id is None and "external_id" in self.model_fields_set: + _dict['external_id'] = None + + # set to None if connection_lost_at (nullable) is None + # and model_fields_set contains the field + if self.connection_lost_at is None and "connection_lost_at" in self.model_fields_set: + _dict['connection_lost_at'] = None + + # set to None if connection_lost_reason (nullable) is None + # and model_fields_set contains the field + if self.connection_lost_reason is None and "connection_lost_reason" in self.model_fields_set: + _dict['connection_lost_reason'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Connection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "application": obj.get("application"), + "name": obj.get("name"), + "description": obj.get("description"), + "authorized_at": obj.get("authorized_at"), + "authorization_status": obj.get("authorization_status"), + "authorization_error": obj.get("authorization_error"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "external_id": obj.get("external_id"), + "folder_id": obj.get("folder_id"), + "connection_lost_at": obj.get("connection_lost_at"), + "connection_lost_reason": obj.get("connection_lost_reason"), + "parent_id": obj.get("parent_id"), + "provider": obj.get("provider"), + "tags": obj.get("tags") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/connection_create_request.py b/src/workato_platform/client/workato_api/models/connection_create_request.py new file mode 100644 index 0000000..2fb97cc --- /dev/null +++ b/src/workato_platform/client/workato_api/models/connection_create_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConnectionCreateRequest(BaseModel): + """ + ConnectionCreateRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the connection") + provider: StrictStr = Field(description="The application type of the connection") + parent_id: Optional[StrictInt] = Field(default=None, description="The ID of the parent connection (must be same provider type)") + folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the project or folder containing the connection") + external_id: Optional[StrictStr] = Field(default=None, description="The external ID assigned to the connection") + shell_connection: Optional[StrictBool] = Field(default=False, description="Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. ") + input: Optional[Dict[str, Any]] = Field(default=None, description="Connection parameters (varies by provider)") + __properties: ClassVar[List[str]] = ["name", "provider", "parent_id", "folder_id", "external_id", "shell_connection", "input"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectionCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "parent_id": obj.get("parent_id"), + "folder_id": obj.get("folder_id"), + "external_id": obj.get("external_id"), + "shell_connection": obj.get("shell_connection") if obj.get("shell_connection") is not None else False, + "input": obj.get("input") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/connection_update_request.py b/src/workato_platform/client/workato_api/models/connection_update_request.py new file mode 100644 index 0000000..f2e111f --- /dev/null +++ b/src/workato_platform/client/workato_api/models/connection_update_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConnectionUpdateRequest(BaseModel): + """ + ConnectionUpdateRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the connection") + parent_id: Optional[StrictInt] = Field(default=None, description="The ID of the parent connection (must be same provider type)") + folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the project or folder containing the connection") + external_id: Optional[StrictStr] = Field(default=None, description="The external ID assigned to the connection") + shell_connection: Optional[StrictBool] = Field(default=False, description="Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. ") + input: Optional[Dict[str, Any]] = Field(default=None, description="Connection parameters (varies by provider)") + __properties: ClassVar[List[str]] = ["name", "parent_id", "folder_id", "external_id", "shell_connection", "input"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectionUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectionUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "folder_id": obj.get("folder_id"), + "external_id": obj.get("external_id"), + "shell_connection": obj.get("shell_connection") if obj.get("shell_connection") is not None else False, + "input": obj.get("input") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/connector_action.py b/src/workato_platform/client/workato_api/models/connector_action.py new file mode 100644 index 0000000..7fa08f3 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/connector_action.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConnectorAction(BaseModel): + """ + ConnectorAction + """ # noqa: E501 + name: StrictStr + title: Optional[StrictStr] = None + deprecated: StrictBool + bulk: StrictBool + batch: StrictBool + __properties: ClassVar[List[str]] = ["name", "title", "deprecated", "bulk", "batch"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectorAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectorAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "title": obj.get("title"), + "deprecated": obj.get("deprecated"), + "bulk": obj.get("bulk"), + "batch": obj.get("batch") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/connector_version.py b/src/workato_platform/client/workato_api/models/connector_version.py new file mode 100644 index 0000000..e7f2dc6 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/connector_version.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConnectorVersion(BaseModel): + """ + ConnectorVersion + """ # noqa: E501 + version: StrictInt + version_note: Optional[StrictStr] + created_at: datetime + released_at: datetime + __properties: ClassVar[List[str]] = ["version", "version_note", "created_at", "released_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectorVersion from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if version_note (nullable) is None + # and model_fields_set contains the field + if self.version_note is None and "version_note" in self.model_fields_set: + _dict['version_note'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectorVersion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "version_note": obj.get("version_note"), + "created_at": obj.get("created_at"), + "released_at": obj.get("released_at") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/create_export_manifest_request.py b/src/workato_platform/client/workato_api/models/create_export_manifest_request.py new file mode 100644 index 0000000..1fc4fdb --- /dev/null +++ b/src/workato_platform/client/workato_api/models/create_export_manifest_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateExportManifestRequest(BaseModel): + """ + CreateExportManifestRequest + """ # noqa: E501 + export_manifest: ExportManifestRequest + __properties: ClassVar[List[str]] = ["export_manifest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateExportManifestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of export_manifest + if self.export_manifest: + _dict['export_manifest'] = self.export_manifest.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateExportManifestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "export_manifest": ExportManifestRequest.from_dict(obj["export_manifest"]) if obj.get("export_manifest") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/create_folder_request.py b/src/workato_platform/client/workato_api/models/create_folder_request.py new file mode 100644 index 0000000..3f31ec3 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/create_folder_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFolderRequest(BaseModel): + """ + CreateFolderRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the folder") + parent_id: Optional[StrictStr] = Field(default=None, description="Parent folder ID. Defaults to Home folder if not specified") + __properties: ClassVar[List[str]] = ["name", "parent_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateFolderRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateFolderRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "parent_id": obj.get("parent_id") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/custom_connector.py b/src/workato_platform/client/workato_api/models/custom_connector.py new file mode 100644 index 0000000..c56b961 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/custom_connector.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.connector_version import ConnectorVersion +from typing import Optional, Set +from typing_extensions import Self + +class CustomConnector(BaseModel): + """ + CustomConnector + """ # noqa: E501 + id: StrictInt + name: StrictStr + title: StrictStr + latest_released_version: StrictInt + latest_released_version_note: Optional[StrictStr] + released_versions: List[ConnectorVersion] + static_webhook_url: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["id", "name", "title", "latest_released_version", "latest_released_version_note", "released_versions", "static_webhook_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomConnector from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in released_versions (list) + _items = [] + if self.released_versions: + for _item_released_versions in self.released_versions: + if _item_released_versions: + _items.append(_item_released_versions.to_dict()) + _dict['released_versions'] = _items + # set to None if latest_released_version_note (nullable) is None + # and model_fields_set contains the field + if self.latest_released_version_note is None and "latest_released_version_note" in self.model_fields_set: + _dict['latest_released_version_note'] = None + + # set to None if static_webhook_url (nullable) is None + # and model_fields_set contains the field + if self.static_webhook_url is None and "static_webhook_url" in self.model_fields_set: + _dict['static_webhook_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomConnector from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "title": obj.get("title"), + "latest_released_version": obj.get("latest_released_version"), + "latest_released_version_note": obj.get("latest_released_version_note"), + "released_versions": [ConnectorVersion.from_dict(_item) for _item in obj["released_versions"]] if obj.get("released_versions") is not None else None, + "static_webhook_url": obj.get("static_webhook_url") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response.py b/src/workato_platform/client/workato_api/models/custom_connector_code_response.py new file mode 100644 index 0000000..ee74d40 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/custom_connector_code_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from typing import Optional, Set +from typing_extensions import Self + +class CustomConnectorCodeResponse(BaseModel): + """ + CustomConnectorCodeResponse + """ # noqa: E501 + data: CustomConnectorCodeResponseData + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomConnectorCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomConnectorCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": CustomConnectorCodeResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py b/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py new file mode 100644 index 0000000..5cd5bdf --- /dev/null +++ b/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CustomConnectorCodeResponseData(BaseModel): + """ + CustomConnectorCodeResponseData + """ # noqa: E501 + code: StrictStr = Field(description="The connector code as a stringified value") + __properties: ClassVar[List[str]] = ["code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomConnectorCodeResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomConnectorCodeResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/custom_connector_list_response.py b/src/workato_platform/client/workato_api/models/custom_connector_list_response.py new file mode 100644 index 0000000..3977b62 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/custom_connector_list_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.custom_connector import CustomConnector +from typing import Optional, Set +from typing_extensions import Self + +class CustomConnectorListResponse(BaseModel): + """ + CustomConnectorListResponse + """ # noqa: E501 + result: List[CustomConnector] + __properties: ClassVar[List[str]] = ["result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomConnectorListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomConnectorListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "result": [CustomConnector.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table.py b/src/workato_platform/client/workato_api/models/data_table.py new file mode 100644 index 0000000..dd1048c --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from workato_platform.client.workato_api.models.data_table_column import DataTableColumn +from typing import Optional, Set +from typing_extensions import Self + +class DataTable(BaseModel): + """ + DataTable + """ # noqa: E501 + id: UUID + name: StrictStr + var_schema: List[DataTableColumn] = Field(alias="schema") + folder_id: StrictInt + created_at: datetime + updated_at: datetime + __properties: ClassVar[List[str]] = ["id", "name", "schema", "folder_id", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTable from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in var_schema (list) + _items = [] + if self.var_schema: + for _item_var_schema in self.var_schema: + if _item_var_schema: + _items.append(_item_var_schema.to_dict()) + _dict['schema'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "schema": [DataTableColumn.from_dict(_item) for _item in obj["schema"]] if obj.get("schema") is not None else None, + "folder_id": obj.get("folder_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_column.py b/src/workato_platform/client/workato_api/models/data_table_column.py new file mode 100644 index 0000000..3bb7b48 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_column.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from typing import Optional, Set +from typing_extensions import Self + +class DataTableColumn(BaseModel): + """ + DataTableColumn + """ # noqa: E501 + type: StrictStr + name: StrictStr + optional: StrictBool + field_id: UUID + hint: Optional[StrictStr] + default_value: Optional[Any] = Field(description="Default value matching the column type") + metadata: Dict[str, Any] + multivalue: StrictBool + relation: DataTableRelation + __properties: ClassVar[List[str]] = ["type", "name", "optional", "field_id", "hint", "default_value", "metadata", "multivalue", "relation"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation']): + raise ValueError("must be one of enum values ('boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableColumn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of relation + if self.relation: + _dict['relation'] = self.relation.to_dict() + # set to None if hint (nullable) is None + # and model_fields_set contains the field + if self.hint is None and "hint" in self.model_fields_set: + _dict['hint'] = None + + # set to None if default_value (nullable) is None + # and model_fields_set contains the field + if self.default_value is None and "default_value" in self.model_fields_set: + _dict['default_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableColumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "optional": obj.get("optional"), + "field_id": obj.get("field_id"), + "hint": obj.get("hint"), + "default_value": obj.get("default_value"), + "metadata": obj.get("metadata"), + "multivalue": obj.get("multivalue"), + "relation": DataTableRelation.from_dict(obj["relation"]) if obj.get("relation") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_column_request.py b/src/workato_platform/client/workato_api/models/data_table_column_request.py new file mode 100644 index 0000000..0f9ab45 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_column_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from typing import Optional, Set +from typing_extensions import Self + +class DataTableColumnRequest(BaseModel): + """ + DataTableColumnRequest + """ # noqa: E501 + type: StrictStr = Field(description="The data type of the column") + name: StrictStr = Field(description="The name of the column") + optional: StrictBool = Field(description="Whether the column is optional") + field_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Unique UUID of the column") + hint: Optional[StrictStr] = Field(default=None, description="Tooltip hint for users") + default_value: Optional[Any] = Field(default=None, description="Default value matching the column type") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Additional metadata") + multivalue: Optional[StrictBool] = Field(default=None, description="Whether the column accepts multi-value input") + relation: Optional[DataTableRelation] = None + __properties: ClassVar[List[str]] = ["type", "name", "optional", "field_id", "hint", "default_value", "metadata", "multivalue", "relation"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation']): + raise ValueError("must be one of enum values ('boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation')") + return value + + @field_validator('field_id') + def field_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError(r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableColumnRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of relation + if self.relation: + _dict['relation'] = self.relation.to_dict() + # set to None if default_value (nullable) is None + # and model_fields_set contains the field + if self.default_value is None and "default_value" in self.model_fields_set: + _dict['default_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableColumnRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "optional": obj.get("optional"), + "field_id": obj.get("field_id"), + "hint": obj.get("hint"), + "default_value": obj.get("default_value"), + "metadata": obj.get("metadata"), + "multivalue": obj.get("multivalue"), + "relation": DataTableRelation.from_dict(obj["relation"]) if obj.get("relation") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_create_request.py b/src/workato_platform/client/workato_api/models/data_table_create_request.py new file mode 100644 index 0000000..04d5ba2 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_create_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from typing import Optional, Set +from typing_extensions import Self + +class DataTableCreateRequest(BaseModel): + """ + DataTableCreateRequest + """ # noqa: E501 + name: StrictStr = Field(description="The name of the data table to create") + folder_id: StrictInt = Field(description="ID of the folder where to create the data table") + var_schema: List[DataTableColumnRequest] = Field(description="Array of column definitions", alias="schema") + __properties: ClassVar[List[str]] = ["name", "folder_id", "schema"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in var_schema (list) + _items = [] + if self.var_schema: + for _item_var_schema in self.var_schema: + if _item_var_schema: + _items.append(_item_var_schema.to_dict()) + _dict['schema'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "folder_id": obj.get("folder_id"), + "schema": [DataTableColumnRequest.from_dict(_item) for _item in obj["schema"]] if obj.get("schema") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_create_response.py b/src/workato_platform/client/workato_api/models/data_table_create_response.py new file mode 100644 index 0000000..e97badb --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_create_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.data_table import DataTable +from typing import Optional, Set +from typing_extensions import Self + +class DataTableCreateResponse(BaseModel): + """ + DataTableCreateResponse + """ # noqa: E501 + data: DataTable + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableCreateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": DataTable.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_list_response.py b/src/workato_platform/client/workato_api/models/data_table_list_response.py new file mode 100644 index 0000000..58c4b31 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_list_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.data_table import DataTable +from typing import Optional, Set +from typing_extensions import Self + +class DataTableListResponse(BaseModel): + """ + DataTableListResponse + """ # noqa: E501 + data: List[DataTable] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DataTable.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/data_table_relation.py b/src/workato_platform/client/workato_api/models/data_table_relation.py new file mode 100644 index 0000000..4e60838 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/data_table_relation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class DataTableRelation(BaseModel): + """ + DataTableRelation + """ # noqa: E501 + table_id: UUID + field_id: UUID + __properties: ClassVar[List[str]] = ["table_id", "field_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataTableRelation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataTableRelation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "table_id": obj.get("table_id"), + "field_id": obj.get("field_id") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/delete_project403_response.py b/src/workato_platform/client/workato_api/models/delete_project403_response.py new file mode 100644 index 0000000..584db9b --- /dev/null +++ b/src/workato_platform/client/workato_api/models/delete_project403_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeleteProject403Response(BaseModel): + """ + DeleteProject403Response + """ # noqa: E501 + message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteProject403Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteProject403Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/error.py b/src/workato_platform/client/workato_api/models/error.py new file mode 100644 index 0000000..504a792 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/error.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + message: StrictStr + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/export_manifest_request.py b/src/workato_platform/client/workato_api/models/export_manifest_request.py new file mode 100644 index 0000000..83d7b47 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/export_manifest_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.asset_reference import AssetReference +from typing import Optional, Set +from typing_extensions import Self + +class ExportManifestRequest(BaseModel): + """ + ExportManifestRequest + """ # noqa: E501 + name: StrictStr = Field(description="Name of the new manifest") + assets: Optional[List[AssetReference]] = Field(default=None, description="Dependent assets to include in the manifest") + folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the folder containing the assets") + include_test_cases: Optional[StrictBool] = Field(default=False, description="Whether the manifest includes test cases") + auto_generate_assets: Optional[StrictBool] = Field(default=False, description="Auto-generates assets from a folder") + include_data: Optional[StrictBool] = Field(default=False, description="Include data from automatic asset generation") + include_tags: Optional[StrictBool] = Field(default=False, description="Include tags assigned to assets in the export manifest") + __properties: ClassVar[List[str]] = ["name", "assets", "folder_id", "include_test_cases", "auto_generate_assets", "include_data", "include_tags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportManifestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item_assets in self.assets: + if _item_assets: + _items.append(_item_assets.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportManifestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "assets": [AssetReference.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "folder_id": obj.get("folder_id"), + "include_test_cases": obj.get("include_test_cases") if obj.get("include_test_cases") is not None else False, + "auto_generate_assets": obj.get("auto_generate_assets") if obj.get("auto_generate_assets") is not None else False, + "include_data": obj.get("include_data") if obj.get("include_data") is not None else False, + "include_tags": obj.get("include_tags") if obj.get("include_tags") is not None else False + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response.py b/src/workato_platform/client/workato_api/models/export_manifest_response.py new file mode 100644 index 0000000..f9cb5c6 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/export_manifest_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from typing import Optional, Set +from typing_extensions import Self + +class ExportManifestResponse(BaseModel): + """ + ExportManifestResponse + """ # noqa: E501 + result: ExportManifestResponseResult + __properties: ClassVar[List[str]] = ["result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportManifestResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportManifestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "result": ExportManifestResponseResult.from_dict(obj["result"]) if obj.get("result") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response_result.py b/src/workato_platform/client/workato_api/models/export_manifest_response_result.py new file mode 100644 index 0000000..492d071 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/export_manifest_response_result.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ExportManifestResponseResult(BaseModel): + """ + ExportManifestResponseResult + """ # noqa: E501 + id: StrictInt + name: StrictStr + last_exported_at: Optional[datetime] + created_at: datetime + updated_at: datetime + deleted_at: Optional[datetime] + project_path: StrictStr + status: StrictStr + __properties: ClassVar[List[str]] = ["id", "name", "last_exported_at", "created_at", "updated_at", "deleted_at", "project_path", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportManifestResponseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if last_exported_at (nullable) is None + # and model_fields_set contains the field + if self.last_exported_at is None and "last_exported_at" in self.model_fields_set: + _dict['last_exported_at'] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportManifestResponseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "last_exported_at": obj.get("last_exported_at"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "deleted_at": obj.get("deleted_at"), + "project_path": obj.get("project_path"), + "status": obj.get("status") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/folder.py b/src/workato_platform/client/workato_api/models/folder.py new file mode 100644 index 0000000..97fafed --- /dev/null +++ b/src/workato_platform/client/workato_api/models/folder.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Folder(BaseModel): + """ + Folder + """ # noqa: E501 + id: StrictInt + name: StrictStr + parent_id: Optional[StrictInt] + is_project: StrictBool + project_id: Optional[StrictInt] + created_at: datetime + updated_at: datetime + __properties: ClassVar[List[str]] = ["id", "name", "parent_id", "is_project", "project_id", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Folder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict['project_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Folder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "is_project": obj.get("is_project"), + "project_id": obj.get("project_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response.py b/src/workato_platform/client/workato_api/models/folder_assets_response.py new file mode 100644 index 0000000..874744c --- /dev/null +++ b/src/workato_platform/client/workato_api/models/folder_assets_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from typing import Optional, Set +from typing_extensions import Self + +class FolderAssetsResponse(BaseModel): + """ + FolderAssetsResponse + """ # noqa: E501 + result: FolderAssetsResponseResult + __properties: ClassVar[List[str]] = ["result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderAssetsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderAssetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "result": FolderAssetsResponseResult.from_dict(obj["result"]) if obj.get("result") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response_result.py b/src/workato_platform/client/workato_api/models/folder_assets_response_result.py new file mode 100644 index 0000000..af85754 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/folder_assets_response_result.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.asset import Asset +from typing import Optional, Set +from typing_extensions import Self + +class FolderAssetsResponseResult(BaseModel): + """ + FolderAssetsResponseResult + """ # noqa: E501 + assets: List[Asset] + __properties: ClassVar[List[str]] = ["assets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderAssetsResponseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item_assets in self.assets: + if _item_assets: + _items.append(_item_assets.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderAssetsResponseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assets": [Asset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/folder_creation_response.py b/src/workato_platform/client/workato_api/models/folder_creation_response.py new file mode 100644 index 0000000..6358b27 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/folder_creation_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FolderCreationResponse(BaseModel): + """ + FolderCreationResponse + """ # noqa: E501 + id: StrictInt + name: StrictStr + parent_id: Optional[StrictInt] + created_at: datetime + updated_at: datetime + project_id: Optional[StrictInt] + is_project: StrictBool + __properties: ClassVar[List[str]] = ["id", "name", "parent_id", "created_at", "updated_at", "project_id", "is_project"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCreationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict['project_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderCreationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "project_id": obj.get("project_id"), + "is_project": obj.get("is_project") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/import_results.py b/src/workato_platform/client/workato_api/models/import_results.py new file mode 100644 index 0000000..21c2eaa --- /dev/null +++ b/src/workato_platform/client/workato_api/models/import_results.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ImportResults(BaseModel): + """ + ImportResults + """ # noqa: E501 + success: StrictBool + total_endpoints: StrictInt + failed_endpoints: StrictInt + failed_actions: List[StrictStr] + __properties: ClassVar[List[str]] = ["success", "total_endpoints", "failed_endpoints", "failed_actions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImportResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImportResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "total_endpoints": obj.get("total_endpoints"), + "failed_endpoints": obj.get("failed_endpoints"), + "failed_actions": obj.get("failed_actions") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response.py b/src/workato_platform/client/workato_api/models/o_auth_url_response.py new file mode 100644 index 0000000..821ee05 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/o_auth_url_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from typing import Optional, Set +from typing_extensions import Self + +class OAuthUrlResponse(BaseModel): + """ + OAuthUrlResponse + """ # noqa: E501 + data: OAuthUrlResponseData + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthUrlResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthUrlResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": OAuthUrlResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py b/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py new file mode 100644 index 0000000..c4cf7a2 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OAuthUrlResponseData(BaseModel): + """ + OAuthUrlResponseData + """ # noqa: E501 + url: StrictStr = Field(description="The OAuth authorization URL") + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthUrlResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthUrlResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/open_api_spec.py b/src/workato_platform/client/workato_api/models/open_api_spec.py new file mode 100644 index 0000000..3df120a --- /dev/null +++ b/src/workato_platform/client/workato_api/models/open_api_spec.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OpenApiSpec(BaseModel): + """ + OpenApiSpec + """ # noqa: E501 + content: StrictStr = Field(description="The OpenAPI spec as a JSON or YAML string") + format: StrictStr = Field(description="Format of the OpenAPI spec") + __properties: ClassVar[List[str]] = ["content", "format"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['json', 'yaml']): + raise ValueError("must be one of enum values ('json', 'yaml')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenApiSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenApiSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "format": obj.get("format") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/package_details_response.py b/src/workato_platform/client/workato_api/models/package_details_response.py new file mode 100644 index 0000000..c2cdd02 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/package_details_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from typing import Optional, Set +from typing_extensions import Self + +class PackageDetailsResponse(BaseModel): + """ + PackageDetailsResponse + """ # noqa: E501 + id: StrictInt + operation_type: StrictStr + status: StrictStr + export_manifest_id: Optional[StrictInt] = None + download_url: Optional[StrictStr] = None + error: Optional[StrictStr] = Field(default=None, description="Error message when status is failed") + recipe_status: Optional[List[PackageDetailsResponseRecipeStatusInner]] = None + __properties: ClassVar[List[str]] = ["id", "operation_type", "status", "export_manifest_id", "download_url", "error", "recipe_status"] + + @field_validator('operation_type') + def operation_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['export', 'import']): + raise ValueError("must be one of enum values ('export', 'import')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['completed', 'failed', 'processing', 'in_progress']): + raise ValueError("must be one of enum values ('completed', 'failed', 'processing', 'in_progress')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PackageDetailsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in recipe_status (list) + _items = [] + if self.recipe_status: + for _item_recipe_status in self.recipe_status: + if _item_recipe_status: + _items.append(_item_recipe_status.to_dict()) + _dict['recipe_status'] = _items + # set to None if download_url (nullable) is None + # and model_fields_set contains the field + if self.download_url is None and "download_url" in self.model_fields_set: + _dict['download_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PackageDetailsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "operation_type": obj.get("operation_type"), + "status": obj.get("status"), + "export_manifest_id": obj.get("export_manifest_id"), + "download_url": obj.get("download_url"), + "error": obj.get("error"), + "recipe_status": [PackageDetailsResponseRecipeStatusInner.from_dict(_item) for _item in obj["recipe_status"]] if obj.get("recipe_status") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py b/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py new file mode 100644 index 0000000..fdfa5f2 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PackageDetailsResponseRecipeStatusInner(BaseModel): + """ + PackageDetailsResponseRecipeStatusInner + """ # noqa: E501 + id: Optional[StrictInt] = None + import_result: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "import_result"] + + @field_validator('import_result') + def import_result_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['no_update_or_updated_without_restart', 'restarted', 'stopped', 'restart_failed']): + raise ValueError("must be one of enum values ('no_update_or_updated_without_restart', 'restarted', 'stopped', 'restart_failed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PackageDetailsResponseRecipeStatusInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PackageDetailsResponseRecipeStatusInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "import_result": obj.get("import_result") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/package_response.py b/src/workato_platform/client/workato_api/models/package_response.py new file mode 100644 index 0000000..752cfab --- /dev/null +++ b/src/workato_platform/client/workato_api/models/package_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PackageResponse(BaseModel): + """ + PackageResponse + """ # noqa: E501 + id: StrictInt + operation_type: StrictStr + status: StrictStr + export_manifest_id: Optional[StrictInt] = None + download_url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "operation_type", "status", "export_manifest_id", "download_url"] + + @field_validator('operation_type') + def operation_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['export', 'import']): + raise ValueError("must be one of enum values ('export', 'import')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['completed', 'failed', 'processing', 'in_progress']): + raise ValueError("must be one of enum values ('completed', 'failed', 'processing', 'in_progress')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PackageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PackageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "operation_type": obj.get("operation_type"), + "status": obj.get("status"), + "export_manifest_id": obj.get("export_manifest_id"), + "download_url": obj.get("download_url") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/picklist_request.py b/src/workato_platform/client/workato_api/models/picklist_request.py new file mode 100644 index 0000000..4fcaeb4 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/picklist_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PicklistRequest(BaseModel): + """ + PicklistRequest + """ # noqa: E501 + pick_list_name: StrictStr = Field(description="Name of the pick list") + pick_list_params: Optional[Dict[str, Any]] = Field(default=None, description="Picklist parameters, required in some picklists") + __properties: ClassVar[List[str]] = ["pick_list_name", "pick_list_params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PicklistRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PicklistRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pick_list_name": obj.get("pick_list_name"), + "pick_list_params": obj.get("pick_list_params") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/picklist_response.py b/src/workato_platform/client/workato_api/models/picklist_response.py new file mode 100644 index 0000000..cebdc4a --- /dev/null +++ b/src/workato_platform/client/workato_api/models/picklist_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PicklistResponse(BaseModel): + """ + PicklistResponse + """ # noqa: E501 + data: List[Annotated[List[Any], Field(min_length=4, max_length=4)]] = Field(description="Array of picklist value tuples [display_name, value, null, boolean]") + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PicklistResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PicklistResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/platform_connector.py b/src/workato_platform/client/workato_api/models/platform_connector.py new file mode 100644 index 0000000..6959d6b --- /dev/null +++ b/src/workato_platform/client/workato_api/models/platform_connector.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.connector_action import ConnectorAction +from typing import Optional, Set +from typing_extensions import Self + +class PlatformConnector(BaseModel): + """ + PlatformConnector + """ # noqa: E501 + name: StrictStr + title: StrictStr + categories: List[StrictStr] + oauth: StrictBool + deprecated: StrictBool + secondary: StrictBool + triggers: List[ConnectorAction] + actions: List[ConnectorAction] + __properties: ClassVar[List[str]] = ["name", "title", "categories", "oauth", "deprecated", "secondary", "triggers", "actions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PlatformConnector from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in triggers (list) + _items = [] + if self.triggers: + for _item_triggers in self.triggers: + if _item_triggers: + _items.append(_item_triggers.to_dict()) + _dict['triggers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PlatformConnector from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "title": obj.get("title"), + "categories": obj.get("categories"), + "oauth": obj.get("oauth"), + "deprecated": obj.get("deprecated"), + "secondary": obj.get("secondary"), + "triggers": [ConnectorAction.from_dict(_item) for _item in obj["triggers"]] if obj.get("triggers") is not None else None, + "actions": [ConnectorAction.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/platform_connector_list_response.py b/src/workato_platform/client/workato_api/models/platform_connector_list_response.py new file mode 100644 index 0000000..2488bda --- /dev/null +++ b/src/workato_platform/client/workato_api/models/platform_connector_list_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.platform_connector import PlatformConnector +from typing import Optional, Set +from typing_extensions import Self + +class PlatformConnectorListResponse(BaseModel): + """ + PlatformConnectorListResponse + """ # noqa: E501 + items: List[PlatformConnector] + count: StrictInt + page: StrictInt + per_page: StrictInt + __properties: ClassVar[List[str]] = ["items", "count", "page", "per_page"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PlatformConnectorListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PlatformConnectorListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [PlatformConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "count": obj.get("count"), + "page": obj.get("page"), + "per_page": obj.get("per_page") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/project.py b/src/workato_platform/client/workato_api/models/project.py new file mode 100644 index 0000000..c84ca87 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/project.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Project(BaseModel): + """ + Project + """ # noqa: E501 + id: StrictInt + description: Optional[StrictStr] = None + folder_id: StrictInt + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "description", "folder_id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Project from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Project from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "folder_id": obj.get("folder_id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/recipe.py b/src/workato_platform/client/workato_api/models/recipe.py new file mode 100644 index 0000000..8688772 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/recipe.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from typing import Optional, Set +from typing_extensions import Self + +class Recipe(BaseModel): + """ + Recipe + """ # noqa: E501 + id: StrictInt + user_id: StrictInt + name: StrictStr + created_at: datetime + updated_at: datetime + copy_count: StrictInt + trigger_application: Optional[StrictStr] = None + action_applications: List[StrictStr] + applications: List[StrictStr] + description: StrictStr + parameters_schema: List[Any] + parameters: Dict[str, Any] + webhook_url: Optional[StrictStr] + folder_id: StrictInt + running: StrictBool + job_succeeded_count: StrictInt + job_failed_count: StrictInt + lifetime_task_count: StrictInt + last_run_at: Optional[datetime] = None + stopped_at: Optional[datetime] = None + version_no: StrictInt + stop_cause: Optional[StrictStr] + config: List[RecipeConfigInner] + trigger_closure: Optional[Any] + code: StrictStr = Field(description="Recipe code (may be truncated if exclude_code is true)") + author_name: StrictStr + version_author_name: StrictStr + version_author_email: StrictStr + version_comment: Optional[StrictStr] + tags: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "user_id", "name", "created_at", "updated_at", "copy_count", "trigger_application", "action_applications", "applications", "description", "parameters_schema", "parameters", "webhook_url", "folder_id", "running", "job_succeeded_count", "job_failed_count", "lifetime_task_count", "last_run_at", "stopped_at", "version_no", "stop_cause", "config", "trigger_closure", "code", "author_name", "version_author_name", "version_author_email", "version_comment", "tags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Recipe from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in config (list) + _items = [] + if self.config: + for _item_config in self.config: + if _item_config: + _items.append(_item_config.to_dict()) + _dict['config'] = _items + # set to None if webhook_url (nullable) is None + # and model_fields_set contains the field + if self.webhook_url is None and "webhook_url" in self.model_fields_set: + _dict['webhook_url'] = None + + # set to None if stop_cause (nullable) is None + # and model_fields_set contains the field + if self.stop_cause is None and "stop_cause" in self.model_fields_set: + _dict['stop_cause'] = None + + # set to None if trigger_closure (nullable) is None + # and model_fields_set contains the field + if self.trigger_closure is None and "trigger_closure" in self.model_fields_set: + _dict['trigger_closure'] = None + + # set to None if version_comment (nullable) is None + # and model_fields_set contains the field + if self.version_comment is None and "version_comment" in self.model_fields_set: + _dict['version_comment'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Recipe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "copy_count": obj.get("copy_count"), + "trigger_application": obj.get("trigger_application"), + "action_applications": obj.get("action_applications"), + "applications": obj.get("applications"), + "description": obj.get("description"), + "parameters_schema": obj.get("parameters_schema"), + "parameters": obj.get("parameters"), + "webhook_url": obj.get("webhook_url"), + "folder_id": obj.get("folder_id"), + "running": obj.get("running"), + "job_succeeded_count": obj.get("job_succeeded_count"), + "job_failed_count": obj.get("job_failed_count"), + "lifetime_task_count": obj.get("lifetime_task_count"), + "last_run_at": obj.get("last_run_at"), + "stopped_at": obj.get("stopped_at"), + "version_no": obj.get("version_no"), + "stop_cause": obj.get("stop_cause"), + "config": [RecipeConfigInner.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, + "trigger_closure": obj.get("trigger_closure"), + "code": obj.get("code"), + "author_name": obj.get("author_name"), + "version_author_name": obj.get("version_author_name"), + "version_author_email": obj.get("version_author_email"), + "version_comment": obj.get("version_comment"), + "tags": obj.get("tags") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/recipe_config_inner.py b/src/workato_platform/client/workato_api/models/recipe_config_inner.py new file mode 100644 index 0000000..5634e1b --- /dev/null +++ b/src/workato_platform/client/workato_api/models/recipe_config_inner.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RecipeConfigInner(BaseModel): + """ + RecipeConfigInner + """ # noqa: E501 + keyword: Optional[StrictStr] = None + name: Optional[StrictStr] = None + provider: Optional[StrictStr] = None + skip_validation: Optional[StrictBool] = None + account_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["keyword", "name", "provider", "skip_validation", "account_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecipeConfigInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict['account_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecipeConfigInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keyword": obj.get("keyword"), + "name": obj.get("name"), + "provider": obj.get("provider"), + "skip_validation": obj.get("skip_validation"), + "account_id": obj.get("account_id") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py b/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py new file mode 100644 index 0000000..514a5f4 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RecipeConnectionUpdateRequest(BaseModel): + """ + RecipeConnectionUpdateRequest + """ # noqa: E501 + adapter_name: StrictStr = Field(description="The internal name of the connector") + connection_id: StrictInt = Field(description="The ID of the connection that replaces the existing one") + __properties: ClassVar[List[str]] = ["adapter_name", "connection_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecipeConnectionUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecipeConnectionUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "adapter_name": obj.get("adapter_name"), + "connection_id": obj.get("connection_id") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/recipe_list_response.py b/src/workato_platform/client/workato_api/models/recipe_list_response.py new file mode 100644 index 0000000..504ece8 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/recipe_list_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.recipe import Recipe +from typing import Optional, Set +from typing_extensions import Self + +class RecipeListResponse(BaseModel): + """ + RecipeListResponse + """ # noqa: E501 + items: List[Recipe] + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecipeListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecipeListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [Recipe.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/recipe_start_response.py b/src/workato_platform/client/workato_api/models/recipe_start_response.py new file mode 100644 index 0000000..38fb7d5 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/recipe_start_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RecipeStartResponse(BaseModel): + """ + RecipeStartResponse + """ # noqa: E501 + success: StrictBool = Field(description="Indicates whether the recipe started successfully") + code_errors: Optional[List[List[Any]]] = Field(default=None, description="Code validation errors (only present on failure)") + config_errors: Optional[List[List[Any]]] = Field(default=None, description="Configuration errors (only present on failure)") + __properties: ClassVar[List[str]] = ["success", "code_errors", "config_errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecipeStartResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecipeStartResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "code_errors": obj.get("code_errors"), + "config_errors": obj.get("config_errors") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py new file mode 100644 index 0000000..2d72c01 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RuntimeUserConnectionCreateRequest(BaseModel): + """ + RuntimeUserConnectionCreateRequest + """ # noqa: E501 + parent_id: StrictInt = Field(description="ID of parent OAuth connector (connection must be established)") + name: Optional[StrictStr] = Field(default=None, description="Optional name for the runtime user connection") + folder_id: StrictInt = Field(description="Folder to put connection (uses current project if not specified)") + external_id: StrictStr = Field(description="End user string ID for identifying the connection") + callback_url: Optional[StrictStr] = Field(default=None, description="Optional URL called back after successful token acquisition") + redirect_url: Optional[StrictStr] = Field(default=None, description="Optional URL where user is redirected after successful authorization") + __properties: ClassVar[List[str]] = ["parent_id", "name", "folder_id", "external_id", "callback_url", "redirect_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "parent_id": obj.get("parent_id"), + "name": obj.get("name"), + "folder_id": obj.get("folder_id"), + "external_id": obj.get("external_id"), + "callback_url": obj.get("callback_url"), + "redirect_url": obj.get("redirect_url") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py new file mode 100644 index 0000000..468aabb --- /dev/null +++ b/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from typing import Optional, Set +from typing_extensions import Self + +class RuntimeUserConnectionResponse(BaseModel): + """ + RuntimeUserConnectionResponse + """ # noqa: E501 + data: RuntimeUserConnectionResponseData + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": RuntimeUserConnectionResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py new file mode 100644 index 0000000..66bc271 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RuntimeUserConnectionResponseData(BaseModel): + """ + RuntimeUserConnectionResponseData + """ # noqa: E501 + id: StrictInt = Field(description="The ID of the created runtime user connection") + url: StrictStr = Field(description="OAuth URL for user authorization") + __properties: ClassVar[List[str]] = ["id", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuntimeUserConnectionResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/success_response.py b/src/workato_platform/client/workato_api/models/success_response.py new file mode 100644 index 0000000..c1bd4cf --- /dev/null +++ b/src/workato_platform/client/workato_api/models/success_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SuccessResponse(BaseModel): + """ + SuccessResponse + """ # noqa: E501 + success: StrictBool + __properties: ClassVar[List[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SuccessResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SuccessResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py b/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py new file mode 100644 index 0000000..d6b0c50 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpsertProjectPropertiesRequest(BaseModel): + """ + UpsertProjectPropertiesRequest + """ # noqa: E501 + properties: Dict[str, Annotated[str, Field(strict=True, max_length=1024)]] = Field(description="Contains the names and values of the properties you plan to upsert. Property names are limited to 100 characters, values to 1,024 characters. ") + __properties: ClassVar[List[str]] = ["properties"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpsertProjectPropertiesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpsertProjectPropertiesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "properties": obj.get("properties") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/user.py b/src/workato_platform/client/workato_api/models/user.py new file mode 100644 index 0000000..6c05427 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/user.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class User(BaseModel): + """ + User + """ # noqa: E501 + id: StrictInt + name: StrictStr + created_at: datetime + plan_id: StrictStr + current_billing_period_start: datetime + current_billing_period_end: datetime + expert: Optional[StrictBool] = None + avatar_url: Optional[StrictStr] = None + recipes_count: StrictInt + interested_applications: Optional[List[StrictStr]] = None + company_name: Optional[StrictStr] + location: Optional[StrictStr] + last_seen: datetime + contact_phone: Optional[StrictStr] = None + contact_email: Optional[StrictStr] = None + about_me: Optional[StrictStr] = None + email: StrictStr + phone: Optional[StrictStr] = None + active_recipes_count: StrictInt + root_folder_id: StrictInt + __properties: ClassVar[List[str]] = ["id", "name", "created_at", "plan_id", "current_billing_period_start", "current_billing_period_end", "expert", "avatar_url", "recipes_count", "interested_applications", "company_name", "location", "last_seen", "contact_phone", "contact_email", "about_me", "email", "phone", "active_recipes_count", "root_folder_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if company_name (nullable) is None + # and model_fields_set contains the field + if self.company_name is None and "company_name" in self.model_fields_set: + _dict['company_name'] = None + + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict['location'] = None + + # set to None if contact_phone (nullable) is None + # and model_fields_set contains the field + if self.contact_phone is None and "contact_phone" in self.model_fields_set: + _dict['contact_phone'] = None + + # set to None if contact_email (nullable) is None + # and model_fields_set contains the field + if self.contact_email is None and "contact_email" in self.model_fields_set: + _dict['contact_email'] = None + + # set to None if about_me (nullable) is None + # and model_fields_set contains the field + if self.about_me is None and "about_me" in self.model_fields_set: + _dict['about_me'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "plan_id": obj.get("plan_id"), + "current_billing_period_start": obj.get("current_billing_period_start"), + "current_billing_period_end": obj.get("current_billing_period_end"), + "expert": obj.get("expert"), + "avatar_url": obj.get("avatar_url"), + "recipes_count": obj.get("recipes_count"), + "interested_applications": obj.get("interested_applications"), + "company_name": obj.get("company_name"), + "location": obj.get("location"), + "last_seen": obj.get("last_seen"), + "contact_phone": obj.get("contact_phone"), + "contact_email": obj.get("contact_email"), + "about_me": obj.get("about_me"), + "email": obj.get("email"), + "phone": obj.get("phone"), + "active_recipes_count": obj.get("active_recipes_count"), + "root_folder_id": obj.get("root_folder_id") + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/validation_error.py b/src/workato_platform/client/workato_api/models/validation_error.py new file mode 100644 index 0000000..a520c80 --- /dev/null +++ b/src/workato_platform/client/workato_api/models/validation_error.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + message: Optional[StrictStr] = None + errors: Optional[Dict[str, ValidationErrorErrorsValue]] = None + __properties: ClassVar[List[str]] = ["message", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in errors (dict) + _field_dict = {} + if self.errors: + for _key_errors in self.errors: + if self.errors[_key_errors]: + _field_dict[_key_errors] = self.errors[_key_errors].to_dict() + _dict['errors'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "errors": dict( + (_k, ValidationErrorErrorsValue.from_dict(_v)) + for _k, _v in obj["errors"].items() + ) + if obj.get("errors") is not None + else None + }) + return _obj + + diff --git a/src/workato_platform/client/workato_api/models/validation_error_errors_value.py b/src/workato_platform/client/workato_api/models/validation_error_errors_value.py new file mode 100644 index 0000000..5ea338f --- /dev/null +++ b/src/workato_platform/client/workato_api/models/validation_error_errors_value.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +VALIDATIONERRORERRORSVALUE_ONE_OF_SCHEMAS = ["List[str]", "str"] + +class ValidationErrorErrorsValue(BaseModel): + """ + ValidationErrorErrorsValue + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: List[str] + oneof_schema_2_validator: Optional[List[StrictStr]] = None + actual_instance: Optional[Union[List[str], str]] = None + one_of_schemas: Set[str] = { "List[str]", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ValidationErrorErrorsValue.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[str], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/workato_platform/client/workato_api/rest.py b/src/workato_platform/client/workato_api/rest.py new file mode 100644 index 0000000..bd1192e --- /dev/null +++ b/src/workato_platform/client/workato_api/rest.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl +from typing import Optional, Union + +import aiohttp +import aiohttp_retry + +from workato_platform.client.workato_api.exceptions import ApiException, ApiValueError + +RESTResponseType = aiohttp.ClientResponse + +ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'}) + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + async def read(self): + if self.data is None: + self.data = await self.response.read() + return self.data + + def getheaders(self): + """Returns a CIMultiDictProxy of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + + # maxsize is number of requests to host that are allowed in parallel + self.maxsize = configuration.connection_pool_maxsize + + self.ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert, + cadata=configuration.ca_cert_data, + ) + if configuration.cert_file: + self.ssl_context.load_cert_chain( + configuration.cert_file, keyfile=configuration.key_file + ) + + if not configuration.verify_ssl: + self.ssl_context.check_hostname = False + self.ssl_context.verify_mode = ssl.CERT_NONE + + self.proxy = configuration.proxy + self.proxy_headers = configuration.proxy_headers + + self.retries = configuration.retries + + self.pool_manager: Optional[aiohttp.ClientSession] = None + self.retry_client: Optional[aiohttp_retry.RetryClient] = None + + async def close(self) -> None: + if self.pool_manager: + await self.pool_manager.close() + if self.retry_client is not None: + await self.retry_client.close() + + async def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Execute request + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + timeout = _request_timeout or 5 * 60 + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } + + if self.proxy: + args["proxy"] = self.proxy + if self.proxy_headers: + args["proxy_headers"] = self.proxy_headers + + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): + if body is not None: + body = json.dumps(body) + args["data"] = body + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': + args["data"] = aiohttp.FormData(post_params) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by aiohttp + del headers['Content-Type'] + data = aiohttp.FormData() + for param in post_params: + k, v = param + if isinstance(v, tuple) and len(v) == 3: + data.add_field( + k, + value=v[1], + filename=v[0], + content_type=v[2] + ) + else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) + data.add_field(k, v) + args["data"] = data + + # Pass a `bytes` or `str` parameter directly in the body to support + # other content types than Json when `body` argument is provided + # in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + args["data"] = body + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + + pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] + + # https pool manager + if self.pool_manager is None: + self.pool_manager = aiohttp.ClientSession( + connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context), + trust_env=True, + ) + pool_manager = self.pool_manager + + if self.retries is not None and method in ALLOW_RETRY_METHODS: + if self.retry_client is None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=self.retries, + factor=2.0, + start_timeout=0.1, + max_timeout=120.0 + ) + ) + pool_manager = self.retry_client + + r = await pool_manager.request(**args) + + return RESTResponse(r) diff --git a/src/workato_platform/client/workato_api/test/__init__.py b/src/workato_platform/client/workato_api/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/workato_platform/client/workato_api/test/test_api_client.py b/src/workato_platform/client/workato_api/test/test_api_client.py new file mode 100644 index 0000000..59dcf4d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client import ApiClient + +class TestApiClient(unittest.TestCase): + """ApiClient unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClient: + """Test ApiClient + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClient` + """ + model = ApiClient() + if include_optional: + return ApiClient( + id = 1, + name = 'Test client', + description = '', + active_api_keys_count = 2, + total_api_keys_count = 2, + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + email = 'alex.das@workato.com', + auth_type = 'token', + api_token = '', + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3], + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ] + ) + else: + return ApiClient( + id = 1, + name = 'Test client', + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + auth_type = 'token', + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ], + ) + """ + + def testApiClient(self): + """Test ApiClient""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py b/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py new file mode 100644 index 0000000..35ce754 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner + +class TestApiClientApiCollectionsInner(unittest.TestCase): + """ApiClientApiCollectionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClientApiCollectionsInner: + """Test ApiClientApiCollectionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClientApiCollectionsInner` + """ + model = ApiClientApiCollectionsInner() + if include_optional: + return ApiClientApiCollectionsInner( + id = 1, + name = 'Echo collection' + ) + else: + return ApiClientApiCollectionsInner( + ) + """ + + def testApiClientApiCollectionsInner(self): + """Test ApiClientApiCollectionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py b/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py new file mode 100644 index 0000000..d9ed7d5 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner + +class TestApiClientApiPoliciesInner(unittest.TestCase): + """ApiClientApiPoliciesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClientApiPoliciesInner: + """Test ApiClientApiPoliciesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClientApiPoliciesInner` + """ + model = ApiClientApiPoliciesInner() + if include_optional: + return ApiClientApiPoliciesInner( + id = 2, + name = 'Internal – Admins' + ) + else: + return ApiClientApiPoliciesInner( + ) + """ + + def testApiClientApiPoliciesInner(self): + """Test ApiClientApiPoliciesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_create_request.py b/src/workato_platform/client/workato_api/test/test_api_client_create_request.py new file mode 100644 index 0000000..86dab25 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client_create_request.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest + +class TestApiClientCreateRequest(unittest.TestCase): + """ApiClientCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClientCreateRequest: + """Test ApiClientCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClientCreateRequest` + """ + model = ApiClientCreateRequest() + if include_optional: + return ApiClientCreateRequest( + name = 'Automation Inc.', + description = 'API client for Product Catalog', + project_id = 56, + api_portal_id = 56, + email = 'alex.das@workato.com', + api_collection_ids = [6883], + api_policy_id = 56, + auth_type = 'token', + jwt_method = 'hmac', + jwt_secret = '', + oidc_issuer = '', + oidc_jwks_uri = '', + access_profile_claim = '', + required_claims = [ + '' + ], + allowed_issuers = [ + '' + ], + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3] + ) + else: + return ApiClientCreateRequest( + name = 'Automation Inc.', + api_collection_ids = [6883], + auth_type = 'token', + ) + """ + + def testApiClientCreateRequest(self): + """Test ApiClientCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_list_response.py b/src/workato_platform/client/workato_api/test/test_api_client_list_response.py new file mode 100644 index 0000000..c35fafb --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client_list_response.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse + +class TestApiClientListResponse(unittest.TestCase): + """ApiClientListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClientListResponse: + """Test ApiClientListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClientListResponse` + """ + model = ApiClientListResponse() + if include_optional: + return ApiClientListResponse( + data = [ + workato_platform.client.workato_api.models.api_client.ApiClient( + id = 1, + name = 'Test client', + description = '', + active_api_keys_count = 2, + total_api_keys_count = 2, + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + email = 'alex.das@workato.com', + auth_type = 'token', + api_token = '', + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3], + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ], ) + ], + count = 1, + page = 1, + per_page = 100 + ) + else: + return ApiClientListResponse( + data = [ + workato_platform.client.workato_api.models.api_client.ApiClient( + id = 1, + name = 'Test client', + description = '', + active_api_keys_count = 2, + total_api_keys_count = 2, + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + email = 'alex.das@workato.com', + auth_type = 'token', + api_token = '', + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3], + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ], ) + ], + count = 1, + page = 1, + per_page = 100, + ) + """ + + def testApiClientListResponse(self): + """Test ApiClientListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_response.py b/src/workato_platform/client/workato_api/test/test_api_client_response.py new file mode 100644 index 0000000..90dc225 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_client_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse + +class TestApiClientResponse(unittest.TestCase): + """ApiClientResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiClientResponse: + """Test ApiClientResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiClientResponse` + """ + model = ApiClientResponse() + if include_optional: + return ApiClientResponse( + data = workato_platform.client.workato_api.models.api_client.ApiClient( + id = 1, + name = 'Test client', + description = '', + active_api_keys_count = 2, + total_api_keys_count = 2, + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + email = 'alex.das@workato.com', + auth_type = 'token', + api_token = '', + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3], + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ], ) + ) + else: + return ApiClientResponse( + data = workato_platform.client.workato_api.models.api_client.ApiClient( + id = 1, + name = 'Test client', + description = '', + active_api_keys_count = 2, + total_api_keys_count = 2, + created_at = '2023-05-25T08:08:21.413-07:00', + updated_at = '2024-10-25T03:52:07.122-07:00', + logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', + logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', + is_legacy = True, + email = 'alex.das@workato.com', + auth_type = 'token', + api_token = '', + mtls_enabled = True, + validation_formula = 'OU=Workato', + cert_bundle_ids = [3], + api_policies = [ + workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + id = 2, + name = 'Internal – Admins', ) + ], + api_collections = [ + workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + id = 1, + name = 'Echo collection', ) + ], ), + ) + """ + + def testApiClientResponse(self): + """Test ApiClientResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_collection.py b/src/workato_platform/client/workato_api/test/test_api_collection.py new file mode 100644 index 0000000..ed55188 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_collection import ApiCollection + +class TestApiCollection(unittest.TestCase): + """ApiCollection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCollection: + """Test ApiCollection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCollection` + """ + model = ApiCollection() + if include_optional: + return ApiCollection( + id = 1361, + name = 'Quote to cash', + project_id = '523144', + url = 'https://api.peatql.io/quote-to-cash-v1', + api_spec_url = 'https://www.workato.com/doc/service/quote-to-cash-v1/swagger?token={token}', + version = '1.0', + created_at = '2020-06-15T22:20:15.327-07:00', + updated_at = '2020-06-15T22:20:15.327-07:00', + message = 'Import completed successfully', + import_results = workato_platform.client.workato_api.models.import_results.ImportResults( + success = True, + total_endpoints = 1, + failed_endpoints = 0, + failed_actions = [], ) + ) + else: + return ApiCollection( + id = 1361, + name = 'Quote to cash', + project_id = '523144', + url = 'https://api.peatql.io/quote-to-cash-v1', + api_spec_url = 'https://www.workato.com/doc/service/quote-to-cash-v1/swagger?token={token}', + version = '1.0', + created_at = '2020-06-15T22:20:15.327-07:00', + updated_at = '2020-06-15T22:20:15.327-07:00', + ) + """ + + def testApiCollection(self): + """Test ApiCollection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py b/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py new file mode 100644 index 0000000..1649d90 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest + +class TestApiCollectionCreateRequest(unittest.TestCase): + """ApiCollectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCollectionCreateRequest: + """Test ApiCollectionCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCollectionCreateRequest` + """ + model = ApiCollectionCreateRequest() + if include_optional: + return ApiCollectionCreateRequest( + name = 'My API Collection', + project_id = 123, + proxy_connection_id = 456, + openapi_spec = workato_platform.client.workato_api.models.open_api_spec.OpenApiSpec( + content = '', + format = 'json', ) + ) + else: + return ApiCollectionCreateRequest( + name = 'My API Collection', + ) + """ + + def testApiCollectionCreateRequest(self): + """Test ApiCollectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_endpoint.py b/src/workato_platform/client/workato_api/test/test_api_endpoint.py new file mode 100644 index 0000000..a544055 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_endpoint.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint + +class TestApiEndpoint(unittest.TestCase): + """ApiEndpoint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiEndpoint: + """Test ApiEndpoint + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiEndpoint` + """ + model = ApiEndpoint() + if include_optional: + return ApiEndpoint( + id = 9903, + api_collection_id = 1391, + flow_id = 39999, + name = 'salesforce search', + method = 'GET', + url = 'https://api.na.workato.com/abstergoi/netsuite-customers-v1/salesforce/search', + legacy_url = '', + base_path = '/abstergoi/netsuite-customers-v1/salesforce/search', + path = 'salesforce/search', + active = False, + legacy = False, + created_at = '2020-08-05T05:59:55.991-07:00', + updated_at = '2020-08-05T05:59:55.991-07:00' + ) + else: + return ApiEndpoint( + id = 9903, + api_collection_id = 1391, + flow_id = 39999, + name = 'salesforce search', + method = 'GET', + url = 'https://api.na.workato.com/abstergoi/netsuite-customers-v1/salesforce/search', + base_path = '/abstergoi/netsuite-customers-v1/salesforce/search', + path = 'salesforce/search', + active = False, + legacy = False, + created_at = '2020-08-05T05:59:55.991-07:00', + updated_at = '2020-08-05T05:59:55.991-07:00', + ) + """ + + def testApiEndpoint(self): + """Test ApiEndpoint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key.py b/src/workato_platform/client/workato_api/test/test_api_key.py new file mode 100644 index 0000000..17ea816 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_key.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_key import ApiKey + +class TestApiKey(unittest.TestCase): + """ApiKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiKey: + """Test ApiKey + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiKey` + """ + model = ApiKey() + if include_optional: + return ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"], + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f' + ) + else: + return ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', + ) + """ + + def testApiKey(self): + """Test ApiKey""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_create_request.py b/src/workato_platform/client/workato_api/test/test_api_key_create_request.py new file mode 100644 index 0000000..99364d1 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_key_create_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest + +class TestApiKeyCreateRequest(unittest.TestCase): + """ApiKeyCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiKeyCreateRequest: + """Test ApiKeyCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiKeyCreateRequest` + """ + model = ApiKeyCreateRequest() + if include_optional: + return ApiKeyCreateRequest( + name = 'Automation Inc.', + active = True, + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"] + ) + else: + return ApiKeyCreateRequest( + name = 'Automation Inc.', + active = True, + ) + """ + + def testApiKeyCreateRequest(self): + """Test ApiKeyCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_list_response.py b/src/workato_platform/client/workato_api/test/test_api_key_list_response.py new file mode 100644 index 0000000..3c82d05 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_key_list_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse + +class TestApiKeyListResponse(unittest.TestCase): + """ApiKeyListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiKeyListResponse: + """Test ApiKeyListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiKeyListResponse` + """ + model = ApiKeyListResponse() + if include_optional: + return ApiKeyListResponse( + data = [ + workato_platform.client.workato_api.models.api_key.ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"], + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) + ], + count = 1, + page = 1, + per_page = 100 + ) + else: + return ApiKeyListResponse( + data = [ + workato_platform.client.workato_api.models.api_key.ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"], + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) + ], + count = 1, + page = 1, + per_page = 100, + ) + """ + + def testApiKeyListResponse(self): + """Test ApiKeyListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_response.py b/src/workato_platform/client/workato_api/test/test_api_key_response.py new file mode 100644 index 0000000..738a290 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_key_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse + +class TestApiKeyResponse(unittest.TestCase): + """ApiKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiKeyResponse: + """Test ApiKeyResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiKeyResponse` + """ + model = ApiKeyResponse() + if include_optional: + return ApiKeyResponse( + data = workato_platform.client.workato_api.models.api_key.ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"], + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) + ) + else: + return ApiKeyResponse( + data = workato_platform.client.workato_api.models.api_key.ApiKey( + id = 37326, + name = 'Automation Inc.', + auth_type = 'token', + ip_allow_list = ["8.8.8.8/24"], + ip_deny_list = ["192.168.0.0/16"], + active = True, + active_since = '2025-02-12T08:41:44+05:30', + auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ), + ) + """ + + def testApiKeyResponse(self): + """Test ApiKeyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_platform_api.py b/src/workato_platform/client/workato_api/test/test_api_platform_api.py new file mode 100644 index 0000000..99bd1d2 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_api_platform_api.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi + + +class TestAPIPlatformApi(unittest.IsolatedAsyncioTestCase): + """APIPlatformApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = APIPlatformApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_api_client(self) -> None: + """Test case for create_api_client + + Create API client (v2) + """ + pass + + async def test_create_api_collection(self) -> None: + """Test case for create_api_collection + + Create API collection + """ + pass + + async def test_create_api_key(self) -> None: + """Test case for create_api_key + + Create an API key + """ + pass + + async def test_disable_api_endpoint(self) -> None: + """Test case for disable_api_endpoint + + Disable an API endpoint + """ + pass + + async def test_enable_api_endpoint(self) -> None: + """Test case for enable_api_endpoint + + Enable an API endpoint + """ + pass + + async def test_list_api_clients(self) -> None: + """Test case for list_api_clients + + List API clients (v2) + """ + pass + + async def test_list_api_collections(self) -> None: + """Test case for list_api_collections + + List API collections + """ + pass + + async def test_list_api_endpoints(self) -> None: + """Test case for list_api_endpoints + + List API endpoints + """ + pass + + async def test_list_api_keys(self) -> None: + """Test case for list_api_keys + + List API keys + """ + pass + + async def test_refresh_api_key_secret(self) -> None: + """Test case for refresh_api_key_secret + + Refresh API key secret + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_asset.py b/src/workato_platform/client/workato_api/test/test_asset.py new file mode 100644 index 0000000..a8add17 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_asset.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.asset import Asset + +class TestAsset(unittest.TestCase): + """Asset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Asset: + """Test Asset + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Asset` + """ + model = Asset() + if include_optional: + return Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + version = 1, + folder = '', + absolute_path = 'All projects', + root_folder = False, + unreachable = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + status = 'added' + ) + else: + return Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + root_folder = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + ) + """ + + def testAsset(self): + """Test Asset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_asset_reference.py b/src/workato_platform/client/workato_api/test/test_asset_reference.py new file mode 100644 index 0000000..8c63114 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_asset_reference.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.asset_reference import AssetReference + +class TestAssetReference(unittest.TestCase): + """AssetReference unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetReference: + """Test AssetReference + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetReference` + """ + model = AssetReference() + if include_optional: + return AssetReference( + id = 56, + type = 'recipe', + checked = True, + version = 56, + folder = '', + absolute_path = '', + root_folder = True, + unreachable = True, + zip_name = '' + ) + else: + return AssetReference( + id = 56, + type = 'recipe', + absolute_path = '', + ) + """ + + def testAssetReference(self): + """Test AssetReference""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection.py b/src/workato_platform/client/workato_api/test/test_connection.py new file mode 100644 index 0000000..42fce8c --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connection.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.connection import Connection + +class TestConnection(unittest.TestCase): + """Connection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Connection: + """Test Connection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Connection` + """ + model = Connection() + if include_optional: + return Connection( + id = 36, + application = 'salesforce', + name = 'ACME Production Salesforce connection', + description = '', + authorized_at = '2015-05-26T22:53:52.528Z', + authorization_status = 'success', + authorization_error = '', + created_at = '2015-05-26T22:53:52.532Z', + updated_at = '2015-05-26T22:53:52.532Z', + external_id = '', + folder_id = 4515, + connection_lost_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + connection_lost_reason = '', + parent_id = 56, + provider = 'jira', + tags = ["tag-ANgeffPL-3gxQwA"] + ) + else: + return Connection( + id = 36, + application = 'salesforce', + name = 'ACME Production Salesforce connection', + description = '', + authorized_at = '2015-05-26T22:53:52.528Z', + authorization_status = 'success', + authorization_error = '', + created_at = '2015-05-26T22:53:52.532Z', + updated_at = '2015-05-26T22:53:52.532Z', + external_id = '', + folder_id = 4515, + connection_lost_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + connection_lost_reason = '', + parent_id = 56, + tags = ["tag-ANgeffPL-3gxQwA"], + ) + """ + + def testConnection(self): + """Test Connection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection_create_request.py b/src/workato_platform/client/workato_api/test/test_connection_create_request.py new file mode 100644 index 0000000..fe0b547 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connection_create_request.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest + +class TestConnectionCreateRequest(unittest.TestCase): + """ConnectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectionCreateRequest: + """Test ConnectionCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectionCreateRequest` + """ + model = ConnectionCreateRequest() + if include_optional: + return ConnectionCreateRequest( + name = 'Prod JIRA connection', + provider = 'jira', + parent_id = 56, + folder_id = 56, + external_id = '', + shell_connection = True, + input = {"host_name":"acme.atlassian.net","auth_type":"api_token","email":"smith@acme.com","apitoken":"XXXXXXXX"} + ) + else: + return ConnectionCreateRequest( + name = 'Prod JIRA connection', + provider = 'jira', + ) + """ + + def testConnectionCreateRequest(self): + """Test ConnectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection_update_request.py b/src/workato_platform/client/workato_api/test/test_connection_update_request.py new file mode 100644 index 0000000..16356d5 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connection_update_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest + +class TestConnectionUpdateRequest(unittest.TestCase): + """ConnectionUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectionUpdateRequest: + """Test ConnectionUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectionUpdateRequest` + """ + model = ConnectionUpdateRequest() + if include_optional: + return ConnectionUpdateRequest( + name = 'Updated Prod JIRA connection', + parent_id = 56, + folder_id = 56, + external_id = '', + shell_connection = True, + input = {"host_name":"updated.atlassian.net","auth_type":"api_token","email":"updated@acme.com","apitoken":"XXXXXXXX"} + ) + else: + return ConnectionUpdateRequest( + ) + """ + + def testConnectionUpdateRequest(self): + """Test ConnectionUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connections_api.py b/src/workato_platform/client/workato_api/test/test_connections_api.py new file mode 100644 index 0000000..552fdb1 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connections_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.connections_api import ConnectionsApi + + +class TestConnectionsApi(unittest.IsolatedAsyncioTestCase): + """ConnectionsApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = ConnectionsApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_connection(self) -> None: + """Test case for create_connection + + Create a connection + """ + pass + + async def test_create_runtime_user_connection(self) -> None: + """Test case for create_runtime_user_connection + + Create OAuth runtime user connection + """ + pass + + async def test_get_connection_oauth_url(self) -> None: + """Test case for get_connection_oauth_url + + Get OAuth URL for connection + """ + pass + + async def test_get_connection_picklist(self) -> None: + """Test case for get_connection_picklist + + Get picklist values + """ + pass + + async def test_list_connections(self) -> None: + """Test case for list_connections + + List connections + """ + pass + + async def test_update_connection(self) -> None: + """Test case for update_connection + + Update a connection + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connector_action.py b/src/workato_platform/client/workato_api/test/test_connector_action.py new file mode 100644 index 0000000..66d4f35 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connector_action.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.connector_action import ConnectorAction + +class TestConnectorAction(unittest.TestCase): + """ConnectorAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectorAction: + """Test ConnectorAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectorAction` + """ + model = ConnectorAction() + if include_optional: + return ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False + ) + else: + return ConnectorAction( + name = 'new_entry', + deprecated = False, + bulk = False, + batch = False, + ) + """ + + def testConnectorAction(self): + """Test ConnectorAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connector_version.py b/src/workato_platform/client/workato_api/test/test_connector_version.py new file mode 100644 index 0000000..664618f --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connector_version.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.connector_version import ConnectorVersion + +class TestConnectorVersion(unittest.TestCase): + """ConnectorVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectorVersion: + """Test ConnectorVersion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectorVersion` + """ + model = ConnectorVersion() + if include_optional: + return ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00' + ) + else: + return ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00', + ) + """ + + def testConnectorVersion(self): + """Test ConnectorVersion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connectors_api.py b/src/workato_platform/client/workato_api/test/test_connectors_api.py new file mode 100644 index 0000000..accf9f7 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_connectors_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi + + +class TestConnectorsApi(unittest.IsolatedAsyncioTestCase): + """ConnectorsApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = ConnectorsApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_get_custom_connector_code(self) -> None: + """Test case for get_custom_connector_code + + Get custom connector code + """ + pass + + async def test_list_custom_connectors(self) -> None: + """Test case for list_custom_connectors + + List custom connectors + """ + pass + + async def test_list_platform_connectors(self) -> None: + """Test case for list_platform_connectors + + List platform connectors + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py b/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py new file mode 100644 index 0000000..b864d9d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest + +class TestCreateExportManifestRequest(unittest.TestCase): + """CreateExportManifestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateExportManifestRequest: + """Test CreateExportManifestRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateExportManifestRequest` + """ + model = CreateExportManifestRequest() + if include_optional: + return CreateExportManifestRequest( + export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( + name = 'Test Manifest', + assets = [ + workato_platform.client.workato_api.models.asset_reference.AssetReference( + id = 56, + type = 'recipe', + checked = True, + version = 56, + folder = '', + absolute_path = '', + root_folder = True, + unreachable = True, + zip_name = '', ) + ], + folder_id = 56, + include_test_cases = True, + auto_generate_assets = True, + include_data = True, + include_tags = True, ) + ) + else: + return CreateExportManifestRequest( + export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( + name = 'Test Manifest', + assets = [ + workato_platform.client.workato_api.models.asset_reference.AssetReference( + id = 56, + type = 'recipe', + checked = True, + version = 56, + folder = '', + absolute_path = '', + root_folder = True, + unreachable = True, + zip_name = '', ) + ], + folder_id = 56, + include_test_cases = True, + auto_generate_assets = True, + include_data = True, + include_tags = True, ), + ) + """ + + def testCreateExportManifestRequest(self): + """Test CreateExportManifestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_create_folder_request.py b/src/workato_platform/client/workato_api/test/test_create_folder_request.py new file mode 100644 index 0000000..f22442f --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_create_folder_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest + +class TestCreateFolderRequest(unittest.TestCase): + """CreateFolderRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFolderRequest: + """Test CreateFolderRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateFolderRequest` + """ + model = CreateFolderRequest() + if include_optional: + return CreateFolderRequest( + name = 'Salesforce folder', + parent_id = '' + ) + else: + return CreateFolderRequest( + name = 'Salesforce folder', + ) + """ + + def testCreateFolderRequest(self): + """Test CreateFolderRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector.py b/src/workato_platform/client/workato_api/test/test_custom_connector.py new file mode 100644 index 0000000..77b11a1 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_custom_connector.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.custom_connector import CustomConnector + +class TestCustomConnector(unittest.TestCase): + """CustomConnector unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomConnector: + """Test CustomConnector + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomConnector` + """ + model = CustomConnector() + if include_optional: + return CustomConnector( + id = 562523, + name = 'apps_by_workato_connector_804586_1719241698', + title = 'Apps by Workato', + latest_released_version = 2, + latest_released_version_note = 'Connector Version', + released_versions = [ + workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00', ) + ], + static_webhook_url = '' + ) + else: + return CustomConnector( + id = 562523, + name = 'apps_by_workato_connector_804586_1719241698', + title = 'Apps by Workato', + latest_released_version = 2, + latest_released_version_note = 'Connector Version', + released_versions = [ + workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00', ) + ], + static_webhook_url = '', + ) + """ + + def testCustomConnector(self): + """Test CustomConnector""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py new file mode 100644 index 0000000..24e53df --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse + +class TestCustomConnectorCodeResponse(unittest.TestCase): + """CustomConnectorCodeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomConnectorCodeResponse: + """Test CustomConnectorCodeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomConnectorCodeResponse` + """ + model = CustomConnectorCodeResponse() + if include_optional: + return CustomConnectorCodeResponse( + data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( + code = '', ) + ) + else: + return CustomConnectorCodeResponse( + data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( + code = '', ), + ) + """ + + def testCustomConnectorCodeResponse(self): + """Test CustomConnectorCodeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py new file mode 100644 index 0000000..63b884c --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData + +class TestCustomConnectorCodeResponseData(unittest.TestCase): + """CustomConnectorCodeResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomConnectorCodeResponseData: + """Test CustomConnectorCodeResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomConnectorCodeResponseData` + """ + model = CustomConnectorCodeResponseData() + if include_optional: + return CustomConnectorCodeResponseData( + code = '' + ) + else: + return CustomConnectorCodeResponseData( + code = '', + ) + """ + + def testCustomConnectorCodeResponseData(self): + """Test CustomConnectorCodeResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py b/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py new file mode 100644 index 0000000..b166701 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse + +class TestCustomConnectorListResponse(unittest.TestCase): + """CustomConnectorListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomConnectorListResponse: + """Test CustomConnectorListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomConnectorListResponse` + """ + model = CustomConnectorListResponse() + if include_optional: + return CustomConnectorListResponse( + result = [ + workato_platform.client.workato_api.models.custom_connector.CustomConnector( + id = 562523, + name = 'apps_by_workato_connector_804586_1719241698', + title = 'Apps by Workato', + latest_released_version = 2, + latest_released_version_note = 'Connector Version', + released_versions = [ + workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00', ) + ], + static_webhook_url = '', ) + ] + ) + else: + return CustomConnectorListResponse( + result = [ + workato_platform.client.workato_api.models.custom_connector.CustomConnector( + id = 562523, + name = 'apps_by_workato_connector_804586_1719241698', + title = 'Apps by Workato', + latest_released_version = 2, + latest_released_version_note = 'Connector Version', + released_versions = [ + workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + version = 2, + version_note = '', + created_at = '2024-06-24T11:17:52.516-04:00', + released_at = '2024-06-24T11:17:53.999-04:00', ) + ], + static_webhook_url = '', ) + ], + ) + """ + + def testCustomConnectorListResponse(self): + """Test CustomConnectorListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table.py b/src/workato_platform/client/workato_api/test/test_data_table.py new file mode 100644 index 0000000..6182ee7 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table import DataTable + +class TestDataTable(unittest.TestCase): + """DataTable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTable: + """Test DataTable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTable` + """ + model = DataTable() + if include_optional: + return DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + var_schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00' + ) + else: + return DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + var_schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00', + ) + """ + + def testDataTable(self): + """Test DataTable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column.py b/src/workato_platform/client/workato_api/test/test_data_table_column.py new file mode 100644 index 0000000..27b5cbe --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_column.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_column import DataTableColumn + +class TestDataTableColumn(unittest.TestCase): + """DataTableColumn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableColumn: + """Test DataTableColumn + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableColumn` + """ + model = DataTableColumn() + if include_optional: + return DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = None, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) + ) + else: + return DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = None, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), + ) + """ + + def testDataTableColumn(self): + """Test DataTableColumn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column_request.py b/src/workato_platform/client/workato_api/test/test_data_table_column_request.py new file mode 100644 index 0000000..701a4ef --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_column_request.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest + +class TestDataTableColumnRequest(unittest.TestCase): + """DataTableColumnRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableColumnRequest: + """Test DataTableColumnRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableColumnRequest` + """ + model = DataTableColumnRequest() + if include_optional: + return DataTableColumnRequest( + type = 'boolean', + name = '', + optional = True, + field_id = 'bf325375-e030-fccb-a009-17317c574773', + hint = '', + default_value = None, + metadata = { }, + multivalue = True, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) + ) + else: + return DataTableColumnRequest( + type = 'boolean', + name = '', + optional = True, + ) + """ + + def testDataTableColumnRequest(self): + """Test DataTableColumnRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_request.py b/src/workato_platform/client/workato_api/test/test_data_table_create_request.py new file mode 100644 index 0000000..52bbf2a --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_create_request.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest + +class TestDataTableCreateRequest(unittest.TestCase): + """DataTableCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableCreateRequest: + """Test DataTableCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableCreateRequest` + """ + model = DataTableCreateRequest() + if include_optional: + return DataTableCreateRequest( + name = 'Expense reports 4', + folder_id = 75509, + var_schema = [ + workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( + type = 'boolean', + name = '', + optional = True, + field_id = 'bf325375-e030-fccb-a009-17317c574773', + hint = '', + default_value = null, + metadata = { }, + multivalue = True, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ] + ) + else: + return DataTableCreateRequest( + name = 'Expense reports 4', + folder_id = 75509, + var_schema = [ + workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( + type = 'boolean', + name = '', + optional = True, + field_id = 'bf325375-e030-fccb-a009-17317c574773', + hint = '', + default_value = null, + metadata = { }, + multivalue = True, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + ) + """ + + def testDataTableCreateRequest(self): + """Test DataTableCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_response.py b/src/workato_platform/client/workato_api/test/test_data_table_create_response.py new file mode 100644 index 0000000..28537c8 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_create_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse + +class TestDataTableCreateResponse(unittest.TestCase): + """DataTableCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableCreateResponse: + """Test DataTableCreateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableCreateResponse` + """ + model = DataTableCreateResponse() + if include_optional: + return DataTableCreateResponse( + data = workato_platform.client.workato_api.models.data_table.DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00', ) + ) + else: + return DataTableCreateResponse( + data = workato_platform.client.workato_api.models.data_table.DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00', ), + ) + """ + + def testDataTableCreateResponse(self): + """Test DataTableCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_list_response.py b/src/workato_platform/client/workato_api/test/test_data_table_list_response.py new file mode 100644 index 0000000..988e146 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_list_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse + +class TestDataTableListResponse(unittest.TestCase): + """DataTableListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableListResponse: + """Test DataTableListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableListResponse` + """ + model = DataTableListResponse() + if include_optional: + return DataTableListResponse( + data = [ + workato_platform.client.workato_api.models.data_table.DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00', ) + ] + ) + else: + return DataTableListResponse( + data = [ + workato_platform.client.workato_api.models.data_table.DataTable( + id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', + name = 'Resume screening', + schema = [ + workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + type = 'string', + name = 'application_id', + optional = True, + field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', + hint = 'Greenhouse application ID', + default_value = null, + metadata = { }, + multivalue = False, + relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) + ], + folder_id = 24468824, + created_at = '2025-04-04T11:35:04.544-07:00', + updated_at = '2025-04-04T11:55:50.473-07:00', ) + ], + ) + """ + + def testDataTableListResponse(self): + """Test DataTableListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_relation.py b/src/workato_platform/client/workato_api/test/test_data_table_relation.py new file mode 100644 index 0000000..ec79fa0 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_table_relation.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation + +class TestDataTableRelation(unittest.TestCase): + """DataTableRelation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataTableRelation: + """Test DataTableRelation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataTableRelation` + """ + model = DataTableRelation() + if include_optional: + return DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2' + ) + else: + return DataTableRelation( + table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', + field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', + ) + """ + + def testDataTableRelation(self): + """Test DataTableRelation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_tables_api.py b/src/workato_platform/client/workato_api/test/test_data_tables_api.py new file mode 100644 index 0000000..831ef85 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_data_tables_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi + + +class TestDataTablesApi(unittest.IsolatedAsyncioTestCase): + """DataTablesApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = DataTablesApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_data_table(self) -> None: + """Test case for create_data_table + + Create data table + """ + pass + + async def test_list_data_tables(self) -> None: + """Test case for list_data_tables + + List data tables + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_delete_project403_response.py b/src/workato_platform/client/workato_api/test/test_delete_project403_response.py new file mode 100644 index 0000000..5991160 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_delete_project403_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response + +class TestDeleteProject403Response(unittest.TestCase): + """DeleteProject403Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteProject403Response: + """Test DeleteProject403Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteProject403Response` + """ + model = DeleteProject403Response() + if include_optional: + return DeleteProject403Response( + message = 'Cannot destroy folder' + ) + else: + return DeleteProject403Response( + ) + """ + + def testDeleteProject403Response(self): + """Test DeleteProject403Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_error.py b/src/workato_platform/client/workato_api/test/test_error.py new file mode 100644 index 0000000..e25a187 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + message = 'Authentication failed' + ) + else: + return Error( + message = 'Authentication failed', + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_api.py b/src/workato_platform/client/workato_api/test/test_export_api.py new file mode 100644 index 0000000..6211cad --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_export_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.export_api import ExportApi + + +class TestExportApi(unittest.IsolatedAsyncioTestCase): + """ExportApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = ExportApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_export_manifest(self) -> None: + """Test case for create_export_manifest + + Create an export manifest + """ + pass + + async def test_list_assets_in_folder(self) -> None: + """Test case for list_assets_in_folder + + View assets in a folder + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_request.py b/src/workato_platform/client/workato_api/test/test_export_manifest_request.py new file mode 100644 index 0000000..ee4681d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_export_manifest_request.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest + +class TestExportManifestRequest(unittest.TestCase): + """ExportManifestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportManifestRequest: + """Test ExportManifestRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportManifestRequest` + """ + model = ExportManifestRequest() + if include_optional: + return ExportManifestRequest( + name = 'Test Manifest', + assets = [ + workato_platform.client.workato_api.models.asset_reference.AssetReference( + id = 56, + type = 'recipe', + checked = True, + version = 56, + folder = '', + absolute_path = '', + root_folder = True, + unreachable = True, + zip_name = '', ) + ], + folder_id = 56, + include_test_cases = True, + auto_generate_assets = True, + include_data = True, + include_tags = True + ) + else: + return ExportManifestRequest( + name = 'Test Manifest', + ) + """ + + def testExportManifestRequest(self): + """Test ExportManifestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response.py b/src/workato_platform/client/workato_api/test/test_export_manifest_response.py new file mode 100644 index 0000000..8009581 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_export_manifest_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse + +class TestExportManifestResponse(unittest.TestCase): + """ExportManifestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportManifestResponse: + """Test ExportManifestResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportManifestResponse` + """ + model = ExportManifestResponse() + if include_optional: + return ExportManifestResponse( + result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( + id = 12, + name = 'Test Manifest', + last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = '2023-02-27T02:44:59.447-08:00', + updated_at = '2023-02-27T02:44:59.447-08:00', + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + project_path = 'Folder 1', + status = 'working', ) + ) + else: + return ExportManifestResponse( + result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( + id = 12, + name = 'Test Manifest', + last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = '2023-02-27T02:44:59.447-08:00', + updated_at = '2023-02-27T02:44:59.447-08:00', + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + project_path = 'Folder 1', + status = 'working', ), + ) + """ + + def testExportManifestResponse(self): + """Test ExportManifestResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py b/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py new file mode 100644 index 0000000..1f99297 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult + +class TestExportManifestResponseResult(unittest.TestCase): + """ExportManifestResponseResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportManifestResponseResult: + """Test ExportManifestResponseResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportManifestResponseResult` + """ + model = ExportManifestResponseResult() + if include_optional: + return ExportManifestResponseResult( + id = 12, + name = 'Test Manifest', + last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = '2023-02-27T02:44:59.447-08:00', + updated_at = '2023-02-27T02:44:59.447-08:00', + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + project_path = 'Folder 1', + status = 'working' + ) + else: + return ExportManifestResponseResult( + id = 12, + name = 'Test Manifest', + last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = '2023-02-27T02:44:59.447-08:00', + updated_at = '2023-02-27T02:44:59.447-08:00', + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + project_path = 'Folder 1', + status = 'working', + ) + """ + + def testExportManifestResponseResult(self): + """Test ExportManifestResponseResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder.py b/src/workato_platform/client/workato_api/test/test_folder.py new file mode 100644 index 0000000..3ccc6d2 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_folder.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.folder import Folder + +class TestFolder(unittest.TestCase): + """Folder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Folder: + """Test Folder + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Folder` + """ + model = Folder() + if include_optional: + return Folder( + id = 7498, + name = 'Netsuite production', + parent_id = 3319, + is_project = False, + project_id = 4567, + created_at = '2020-07-31T03:08:29.486-07:00', + updated_at = '2020-07-31T03:08:29.493-07:00' + ) + else: + return Folder( + id = 7498, + name = 'Netsuite production', + parent_id = 3319, + is_project = False, + project_id = 4567, + created_at = '2020-07-31T03:08:29.486-07:00', + updated_at = '2020-07-31T03:08:29.493-07:00', + ) + """ + + def testFolder(self): + """Test Folder""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response.py b/src/workato_platform/client/workato_api/test/test_folder_assets_response.py new file mode 100644 index 0000000..3c594fa --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_folder_assets_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse + +class TestFolderAssetsResponse(unittest.TestCase): + """FolderAssetsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FolderAssetsResponse: + """Test FolderAssetsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FolderAssetsResponse` + """ + model = FolderAssetsResponse() + if include_optional: + return FolderAssetsResponse( + result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( + assets = [ + workato_platform.client.workato_api.models.asset.Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + version = 1, + folder = '', + absolute_path = 'All projects', + root_folder = False, + unreachable = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + status = 'added', ) + ], ) + ) + else: + return FolderAssetsResponse( + result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( + assets = [ + workato_platform.client.workato_api.models.asset.Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + version = 1, + folder = '', + absolute_path = 'All projects', + root_folder = False, + unreachable = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + status = 'added', ) + ], ), + ) + """ + + def testFolderAssetsResponse(self): + """Test FolderAssetsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py b/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py new file mode 100644 index 0000000..eb6fbdd --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult + +class TestFolderAssetsResponseResult(unittest.TestCase): + """FolderAssetsResponseResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FolderAssetsResponseResult: + """Test FolderAssetsResponseResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FolderAssetsResponseResult` + """ + model = FolderAssetsResponseResult() + if include_optional: + return FolderAssetsResponseResult( + assets = [ + workato_platform.client.workato_api.models.asset.Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + version = 1, + folder = '', + absolute_path = 'All projects', + root_folder = False, + unreachable = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + status = 'added', ) + ] + ) + else: + return FolderAssetsResponseResult( + assets = [ + workato_platform.client.workato_api.models.asset.Asset( + id = 12, + name = 'Copy of Recipeops', + type = 'recipe', + version = 1, + folder = '', + absolute_path = 'All projects', + root_folder = False, + unreachable = False, + zip_name = 'copy_of_recipeops.recipe.json', + checked = True, + status = 'added', ) + ], + ) + """ + + def testFolderAssetsResponseResult(self): + """Test FolderAssetsResponseResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_creation_response.py b/src/workato_platform/client/workato_api/test/test_folder_creation_response.py new file mode 100644 index 0000000..c993e9f --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_folder_creation_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse + +class TestFolderCreationResponse(unittest.TestCase): + """FolderCreationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FolderCreationResponse: + """Test FolderCreationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FolderCreationResponse` + """ + model = FolderCreationResponse() + if include_optional: + return FolderCreationResponse( + id = 80, + name = 'My Project', + parent_id = 1, + created_at = '2025-09-04T06:25:36.102-07:00', + updated_at = '2025-09-04T06:25:36.102-07:00', + project_id = 58, + is_project = True + ) + else: + return FolderCreationResponse( + id = 80, + name = 'My Project', + parent_id = 1, + created_at = '2025-09-04T06:25:36.102-07:00', + updated_at = '2025-09-04T06:25:36.102-07:00', + project_id = 58, + is_project = True, + ) + """ + + def testFolderCreationResponse(self): + """Test FolderCreationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folders_api.py b/src/workato_platform/client/workato_api/test/test_folders_api.py new file mode 100644 index 0000000..fec0291 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_folders_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.folders_api import FoldersApi + + +class TestFoldersApi(unittest.IsolatedAsyncioTestCase): + """FoldersApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = FoldersApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_folder(self) -> None: + """Test case for create_folder + + Create a folder + """ + pass + + async def test_list_folders(self) -> None: + """Test case for list_folders + + List folders + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_import_results.py b/src/workato_platform/client/workato_api/test/test_import_results.py new file mode 100644 index 0000000..69d82a8 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_import_results.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.import_results import ImportResults + +class TestImportResults(unittest.TestCase): + """ImportResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImportResults: + """Test ImportResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImportResults` + """ + model = ImportResults() + if include_optional: + return ImportResults( + success = True, + total_endpoints = 1, + failed_endpoints = 0, + failed_actions = [] + ) + else: + return ImportResults( + success = True, + total_endpoints = 1, + failed_endpoints = 0, + failed_actions = [], + ) + """ + + def testImportResults(self): + """Test ImportResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py b/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py new file mode 100644 index 0000000..6e3a0f2 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse + +class TestOAuthUrlResponse(unittest.TestCase): + """OAuthUrlResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuthUrlResponse: + """Test OAuthUrlResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuthUrlResponse` + """ + model = OAuthUrlResponse() + if include_optional: + return OAuthUrlResponse( + data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( + url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ) + ) + else: + return OAuthUrlResponse( + data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( + url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ), + ) + """ + + def testOAuthUrlResponse(self): + """Test OAuthUrlResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py b/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py new file mode 100644 index 0000000..a0cfeaa --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData + +class TestOAuthUrlResponseData(unittest.TestCase): + """OAuthUrlResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuthUrlResponseData: + """Test OAuthUrlResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuthUrlResponseData` + """ + model = OAuthUrlResponseData() + if include_optional: + return OAuthUrlResponseData( + url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...' + ) + else: + return OAuthUrlResponseData( + url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', + ) + """ + + def testOAuthUrlResponseData(self): + """Test OAuthUrlResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_open_api_spec.py b/src/workato_platform/client/workato_api/test/test_open_api_spec.py new file mode 100644 index 0000000..65d5651 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_open_api_spec.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec + +class TestOpenApiSpec(unittest.TestCase): + """OpenApiSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenApiSpec: + """Test OpenApiSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenApiSpec` + """ + model = OpenApiSpec() + if include_optional: + return OpenApiSpec( + content = '', + format = 'json' + ) + else: + return OpenApiSpec( + content = '', + format = 'json', + ) + """ + + def testOpenApiSpec(self): + """Test OpenApiSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response.py b/src/workato_platform/client/workato_api/test/test_package_details_response.py new file mode 100644 index 0000000..d7ef45c --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_package_details_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse + +class TestPackageDetailsResponse(unittest.TestCase): + """PackageDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PackageDetailsResponse: + """Test PackageDetailsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PackageDetailsResponse` + """ + model = PackageDetailsResponse() + if include_optional: + return PackageDetailsResponse( + id = 242, + operation_type = 'export', + status = 'completed', + export_manifest_id = 3, + download_url = 'https://www.workato-staging-assets.com/packages/zip_files/000/000/242/original/exportdemo.zip', + error = 'error_message', + recipe_status = [ + workato_platform.client.workato_api.models.package_details_response_recipe_status_inner.PackageDetailsResponse_recipe_status_inner( + id = 12345, + import_result = 'no_update_or_updated_without_restart', ) + ] + ) + else: + return PackageDetailsResponse( + id = 242, + operation_type = 'export', + status = 'completed', + ) + """ + + def testPackageDetailsResponse(self): + """Test PackageDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py b/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py new file mode 100644 index 0000000..703ab7d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner + +class TestPackageDetailsResponseRecipeStatusInner(unittest.TestCase): + """PackageDetailsResponseRecipeStatusInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PackageDetailsResponseRecipeStatusInner: + """Test PackageDetailsResponseRecipeStatusInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PackageDetailsResponseRecipeStatusInner` + """ + model = PackageDetailsResponseRecipeStatusInner() + if include_optional: + return PackageDetailsResponseRecipeStatusInner( + id = 12345, + import_result = 'no_update_or_updated_without_restart' + ) + else: + return PackageDetailsResponseRecipeStatusInner( + ) + """ + + def testPackageDetailsResponseRecipeStatusInner(self): + """Test PackageDetailsResponseRecipeStatusInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_response.py b/src/workato_platform/client/workato_api/test/test_package_response.py new file mode 100644 index 0000000..123f28e --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_package_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.package_response import PackageResponse + +class TestPackageResponse(unittest.TestCase): + """PackageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PackageResponse: + """Test PackageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PackageResponse` + """ + model = PackageResponse() + if include_optional: + return PackageResponse( + id = 242, + operation_type = 'export', + status = 'completed', + export_manifest_id = 3, + download_url = 'https://www.workato-staging-assets.com/packages/zip_files/000/000/242/original/exportdemo.zip' + ) + else: + return PackageResponse( + id = 242, + operation_type = 'export', + status = 'completed', + ) + """ + + def testPackageResponse(self): + """Test PackageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_packages_api.py b/src/workato_platform/client/workato_api/test/test_packages_api.py new file mode 100644 index 0000000..f3eeb1e --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_packages_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.packages_api import PackagesApi + + +class TestPackagesApi(unittest.IsolatedAsyncioTestCase): + """PackagesApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = PackagesApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_download_package(self) -> None: + """Test case for download_package + + Download package + """ + pass + + async def test_export_package(self) -> None: + """Test case for export_package + + Export a package based on a manifest + """ + pass + + async def test_get_package(self) -> None: + """Test case for get_package + + Get package details + """ + pass + + async def test_import_package(self) -> None: + """Test case for import_package + + Import a package into a folder + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_picklist_request.py b/src/workato_platform/client/workato_api/test/test_picklist_request.py new file mode 100644 index 0000000..893bce2 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_picklist_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.picklist_request import PicklistRequest + +class TestPicklistRequest(unittest.TestCase): + """PicklistRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PicklistRequest: + """Test PicklistRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PicklistRequest` + """ + model = PicklistRequest() + if include_optional: + return PicklistRequest( + pick_list_name = 'sobject_fields', + pick_list_params = {"sobject_name":"Invoice__c"} + ) + else: + return PicklistRequest( + pick_list_name = 'sobject_fields', + ) + """ + + def testPicklistRequest(self): + """Test PicklistRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_picklist_response.py b/src/workato_platform/client/workato_api/test/test_picklist_response.py new file mode 100644 index 0000000..81b1079 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_picklist_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.picklist_response import PicklistResponse + +class TestPicklistResponse(unittest.TestCase): + """PicklistResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PicklistResponse: + """Test PicklistResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PicklistResponse` + """ + model = PicklistResponse() + if include_optional: + return PicklistResponse( + data = [["Record ID","Id"],["Owner ID","OwnerId"],["Invoice Name","Name"],["Created Date","CreatedDate"],["Status","Status__c"]] + ) + else: + return PicklistResponse( + data = [["Record ID","Id"],["Owner ID","OwnerId"],["Invoice Name","Name"],["Created Date","CreatedDate"],["Status","Status__c"]], + ) + """ + + def testPicklistResponse(self): + """Test PicklistResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector.py b/src/workato_platform/client/workato_api/test/test_platform_connector.py new file mode 100644 index 0000000..45deae8 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_platform_connector.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.platform_connector import PlatformConnector + +class TestPlatformConnector(unittest.TestCase): + """PlatformConnector unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PlatformConnector: + """Test PlatformConnector + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PlatformConnector` + """ + model = PlatformConnector() + if include_optional: + return PlatformConnector( + name = 'active_directory', + title = 'Active Directory', + categories = ["Directory Services","Marketing"], + oauth = False, + deprecated = False, + secondary = False, + triggers = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], + actions = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ] + ) + else: + return PlatformConnector( + name = 'active_directory', + title = 'Active Directory', + categories = ["Directory Services","Marketing"], + oauth = False, + deprecated = False, + secondary = False, + triggers = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], + actions = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], + ) + """ + + def testPlatformConnector(self): + """Test PlatformConnector""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py b/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py new file mode 100644 index 0000000..d6baa85 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse + +class TestPlatformConnectorListResponse(unittest.TestCase): + """PlatformConnectorListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PlatformConnectorListResponse: + """Test PlatformConnectorListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PlatformConnectorListResponse` + """ + model = PlatformConnectorListResponse() + if include_optional: + return PlatformConnectorListResponse( + items = [ + workato_platform.client.workato_api.models.platform_connector.PlatformConnector( + name = 'active_directory', + title = 'Active Directory', + categories = ["Directory Services","Marketing"], + oauth = False, + deprecated = False, + secondary = False, + triggers = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], + actions = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], ) + ], + count = 304, + page = 1, + per_page = 100 + ) + else: + return PlatformConnectorListResponse( + items = [ + workato_platform.client.workato_api.models.platform_connector.PlatformConnector( + name = 'active_directory', + title = 'Active Directory', + categories = ["Directory Services","Marketing"], + oauth = False, + deprecated = False, + secondary = False, + triggers = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], + actions = [ + workato_platform.client.workato_api.models.connector_action.ConnectorAction( + name = 'new_entry', + title = 'New entry', + deprecated = False, + bulk = False, + batch = False, ) + ], ) + ], + count = 304, + page = 1, + per_page = 100, + ) + """ + + def testPlatformConnectorListResponse(self): + """Test PlatformConnectorListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_project.py b/src/workato_platform/client/workato_api/test/test_project.py new file mode 100644 index 0000000..fdcbb82 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_project.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.project import Project + +class TestProject(unittest.TestCase): + """Project unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Project: + """Test Project + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Project` + """ + model = Project() + if include_optional: + return Project( + id = 649122, + description = 'Coupa to Netsuite automations', + folder_id = 1563029, + name = 'Procure to Pay' + ) + else: + return Project( + id = 649122, + folder_id = 1563029, + name = 'Procure to Pay', + ) + """ + + def testProject(self): + """Test Project""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_projects_api.py b/src/workato_platform/client/workato_api/test/test_projects_api.py new file mode 100644 index 0000000..3a8e251 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_projects_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.projects_api import ProjectsApi + + +class TestProjectsApi(unittest.IsolatedAsyncioTestCase): + """ProjectsApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = ProjectsApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_delete_project(self) -> None: + """Test case for delete_project + + Delete a project + """ + pass + + async def test_list_projects(self) -> None: + """Test case for list_projects + + List projects + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_properties_api.py b/src/workato_platform/client/workato_api/test/test_properties_api.py new file mode 100644 index 0000000..7816a0e --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_properties_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.properties_api import PropertiesApi + + +class TestPropertiesApi(unittest.IsolatedAsyncioTestCase): + """PropertiesApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = PropertiesApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_list_project_properties(self) -> None: + """Test case for list_project_properties + + List project properties + """ + pass + + async def test_upsert_project_properties(self) -> None: + """Test case for upsert_project_properties + + Upsert project properties + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe.py b/src/workato_platform/client/workato_api/test/test_recipe.py new file mode 100644 index 0000000..ce794f0 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipe.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.recipe import Recipe + +class TestRecipe(unittest.TestCase): + """Recipe unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Recipe: + """Test Recipe + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Recipe` + """ + model = Recipe() + if include_optional: + return Recipe( + id = 1913515, + user_id = 4848, + name = 'Callable service: JIRA ticket sync', + created_at = '2021-11-25T07:07:38.568-08:00', + updated_at = '2021-11-25T07:14:40.822-08:00', + copy_count = 1, + trigger_application = 'workato_service', + action_applications = ["jira"], + applications = ["workato_service","jira"], + description = 'When there is a new call for callable recipe, do action', + parameters_schema = [ + null + ], + parameters = None, + webhook_url = '', + folder_id = 241557, + running = False, + job_succeeded_count = 1, + job_failed_count = 0, + lifetime_task_count = 1, + last_run_at = '2021-11-25T07:10:27.424-08:00', + stopped_at = '2021-11-25T07:11:06.346-08:00', + version_no = 3, + stop_cause = '', + config = [ + workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + keyword = 'application', + name = 'workato_service', + provider = 'workato_service', + skip_validation = False, + account_id = 56, ) + ], + trigger_closure = None, + code = '', + author_name = 'Alex Fisher', + version_author_name = 'Alex Fisher', + version_author_email = 'alex.fisher@example.com', + version_comment = '', + tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"] + ) + else: + return Recipe( + id = 1913515, + user_id = 4848, + name = 'Callable service: JIRA ticket sync', + created_at = '2021-11-25T07:07:38.568-08:00', + updated_at = '2021-11-25T07:14:40.822-08:00', + copy_count = 1, + action_applications = ["jira"], + applications = ["workato_service","jira"], + description = 'When there is a new call for callable recipe, do action', + parameters_schema = [ + null + ], + parameters = None, + webhook_url = '', + folder_id = 241557, + running = False, + job_succeeded_count = 1, + job_failed_count = 0, + lifetime_task_count = 1, + version_no = 3, + stop_cause = '', + config = [ + workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + keyword = 'application', + name = 'workato_service', + provider = 'workato_service', + skip_validation = False, + account_id = 56, ) + ], + trigger_closure = None, + code = '', + author_name = 'Alex Fisher', + version_author_name = 'Alex Fisher', + version_author_email = 'alex.fisher@example.com', + version_comment = '', + ) + """ + + def testRecipe(self): + """Test Recipe""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py b/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py new file mode 100644 index 0000000..49c768d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner + +class TestRecipeConfigInner(unittest.TestCase): + """RecipeConfigInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecipeConfigInner: + """Test RecipeConfigInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecipeConfigInner` + """ + model = RecipeConfigInner() + if include_optional: + return RecipeConfigInner( + keyword = 'application', + name = 'workato_service', + provider = 'workato_service', + skip_validation = False, + account_id = 56 + ) + else: + return RecipeConfigInner( + ) + """ + + def testRecipeConfigInner(self): + """Test RecipeConfigInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py b/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py new file mode 100644 index 0000000..8253213 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest + +class TestRecipeConnectionUpdateRequest(unittest.TestCase): + """RecipeConnectionUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecipeConnectionUpdateRequest: + """Test RecipeConnectionUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecipeConnectionUpdateRequest` + """ + model = RecipeConnectionUpdateRequest() + if include_optional: + return RecipeConnectionUpdateRequest( + adapter_name = 'salesforce', + connection_id = 772461 + ) + else: + return RecipeConnectionUpdateRequest( + adapter_name = 'salesforce', + connection_id = 772461, + ) + """ + + def testRecipeConnectionUpdateRequest(self): + """Test RecipeConnectionUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_list_response.py b/src/workato_platform/client/workato_api/test/test_recipe_list_response.py new file mode 100644 index 0000000..632dcf3 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipe_list_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse + +class TestRecipeListResponse(unittest.TestCase): + """RecipeListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecipeListResponse: + """Test RecipeListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecipeListResponse` + """ + model = RecipeListResponse() + if include_optional: + return RecipeListResponse( + items = [ + workato_platform.client.workato_api.models.recipe.Recipe( + id = 1913515, + user_id = 4848, + name = 'Callable service: JIRA ticket sync', + created_at = '2021-11-25T07:07:38.568-08:00', + updated_at = '2021-11-25T07:14:40.822-08:00', + copy_count = 1, + trigger_application = 'workato_service', + action_applications = ["jira"], + applications = ["workato_service","jira"], + description = 'When there is a new call for callable recipe, do action', + parameters_schema = [ + null + ], + parameters = workato_platform.client.workato_api.models.parameters.parameters(), + webhook_url = '', + folder_id = 241557, + running = False, + job_succeeded_count = 1, + job_failed_count = 0, + lifetime_task_count = 1, + last_run_at = '2021-11-25T07:10:27.424-08:00', + stopped_at = '2021-11-25T07:11:06.346-08:00', + version_no = 3, + stop_cause = '', + config = [ + workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + keyword = 'application', + name = 'workato_service', + provider = 'workato_service', + skip_validation = False, + account_id = 56, ) + ], + trigger_closure = null, + code = '', + author_name = 'Alex Fisher', + version_author_name = 'Alex Fisher', + version_author_email = 'alex.fisher@example.com', + version_comment = '', + tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"], ) + ] + ) + else: + return RecipeListResponse( + items = [ + workato_platform.client.workato_api.models.recipe.Recipe( + id = 1913515, + user_id = 4848, + name = 'Callable service: JIRA ticket sync', + created_at = '2021-11-25T07:07:38.568-08:00', + updated_at = '2021-11-25T07:14:40.822-08:00', + copy_count = 1, + trigger_application = 'workato_service', + action_applications = ["jira"], + applications = ["workato_service","jira"], + description = 'When there is a new call for callable recipe, do action', + parameters_schema = [ + null + ], + parameters = workato_platform.client.workato_api.models.parameters.parameters(), + webhook_url = '', + folder_id = 241557, + running = False, + job_succeeded_count = 1, + job_failed_count = 0, + lifetime_task_count = 1, + last_run_at = '2021-11-25T07:10:27.424-08:00', + stopped_at = '2021-11-25T07:11:06.346-08:00', + version_no = 3, + stop_cause = '', + config = [ + workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + keyword = 'application', + name = 'workato_service', + provider = 'workato_service', + skip_validation = False, + account_id = 56, ) + ], + trigger_closure = null, + code = '', + author_name = 'Alex Fisher', + version_author_name = 'Alex Fisher', + version_author_email = 'alex.fisher@example.com', + version_comment = '', + tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"], ) + ], + ) + """ + + def testRecipeListResponse(self): + """Test RecipeListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_start_response.py b/src/workato_platform/client/workato_api/test/test_recipe_start_response.py new file mode 100644 index 0000000..0d5de5f --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipe_start_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse + +class TestRecipeStartResponse(unittest.TestCase): + """RecipeStartResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecipeStartResponse: + """Test RecipeStartResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecipeStartResponse` + """ + model = RecipeStartResponse() + if include_optional: + return RecipeStartResponse( + success = True, + code_errors = [], + config_errors = [] + ) + else: + return RecipeStartResponse( + success = True, + ) + """ + + def testRecipeStartResponse(self): + """Test RecipeStartResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipes_api.py b/src/workato_platform/client/workato_api/test/test_recipes_api.py new file mode 100644 index 0000000..eba2888 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_recipes_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.recipes_api import RecipesApi + + +class TestRecipesApi(unittest.IsolatedAsyncioTestCase): + """RecipesApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = RecipesApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_list_recipes(self) -> None: + """Test case for list_recipes + + List recipes + """ + pass + + async def test_start_recipe(self) -> None: + """Test case for start_recipe + + Start a recipe + """ + pass + + async def test_stop_recipe(self) -> None: + """Test case for stop_recipe + + Stop a recipe + """ + pass + + async def test_update_recipe_connection(self) -> None: + """Test case for update_recipe_connection + + Update a connection for a recipe + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py new file mode 100644 index 0000000..1ba43af --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest + +class TestRuntimeUserConnectionCreateRequest(unittest.TestCase): + """RuntimeUserConnectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuntimeUserConnectionCreateRequest: + """Test RuntimeUserConnectionCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuntimeUserConnectionCreateRequest` + """ + model = RuntimeUserConnectionCreateRequest() + if include_optional: + return RuntimeUserConnectionCreateRequest( + parent_id = 12345, + name = 'John's Google Drive', + folder_id = 26204321, + external_id = 'user@example.com', + callback_url = 'https://myapp.com/oauth/callback', + redirect_url = 'https://myapp.com/success' + ) + else: + return RuntimeUserConnectionCreateRequest( + parent_id = 12345, + folder_id = 26204321, + external_id = 'user@example.com', + ) + """ + + def testRuntimeUserConnectionCreateRequest(self): + """Test RuntimeUserConnectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py new file mode 100644 index 0000000..411a49a --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse + +class TestRuntimeUserConnectionResponse(unittest.TestCase): + """RuntimeUserConnectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuntimeUserConnectionResponse: + """Test RuntimeUserConnectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuntimeUserConnectionResponse` + """ + model = RuntimeUserConnectionResponse() + if include_optional: + return RuntimeUserConnectionResponse( + data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( + id = 18009027, + url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ) + ) + else: + return RuntimeUserConnectionResponse( + data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( + id = 18009027, + url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ), + ) + """ + + def testRuntimeUserConnectionResponse(self): + """Test RuntimeUserConnectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py new file mode 100644 index 0000000..0aebbd6 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData + +class TestRuntimeUserConnectionResponseData(unittest.TestCase): + """RuntimeUserConnectionResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuntimeUserConnectionResponseData: + """Test RuntimeUserConnectionResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuntimeUserConnectionResponseData` + """ + model = RuntimeUserConnectionResponseData() + if include_optional: + return RuntimeUserConnectionResponseData( + id = 18009027, + url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027' + ) + else: + return RuntimeUserConnectionResponseData( + id = 18009027, + url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', + ) + """ + + def testRuntimeUserConnectionResponseData(self): + """Test RuntimeUserConnectionResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_success_response.py b/src/workato_platform/client/workato_api/test/test_success_response.py new file mode 100644 index 0000000..f9eb301 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_success_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.success_response import SuccessResponse + +class TestSuccessResponse(unittest.TestCase): + """SuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SuccessResponse: + """Test SuccessResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SuccessResponse` + """ + model = SuccessResponse() + if include_optional: + return SuccessResponse( + success = True + ) + else: + return SuccessResponse( + success = True, + ) + """ + + def testSuccessResponse(self): + """Test SuccessResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py b/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py new file mode 100644 index 0000000..f304058 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest + +class TestUpsertProjectPropertiesRequest(unittest.TestCase): + """UpsertProjectPropertiesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpsertProjectPropertiesRequest: + """Test UpsertProjectPropertiesRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpsertProjectPropertiesRequest` + """ + model = UpsertProjectPropertiesRequest() + if include_optional: + return UpsertProjectPropertiesRequest( + properties = {"admin_email":"lucy.carrigan@example.com","public_url":"https://www.example.com"} + ) + else: + return UpsertProjectPropertiesRequest( + properties = {"admin_email":"lucy.carrigan@example.com","public_url":"https://www.example.com"}, + ) + """ + + def testUpsertProjectPropertiesRequest(self): + """Test UpsertProjectPropertiesRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_user.py b/src/workato_platform/client/workato_api/test/test_user.py new file mode 100644 index 0000000..430d9b2 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_user.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.user import User + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> User: + """Test User + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `User` + """ + model = User() + if include_optional: + return User( + id = 17293, + name = 'ACME-API', + created_at = '2019-06-19T19:53:16.886-07:00', + plan_id = 'oem_plan', + current_billing_period_start = '2020-09-22T19:15:11.372-07:00', + current_billing_period_end = '2020-10-22T19:15:11.372-07:00', + expert = False, + avatar_url = 'https://workato-assets.s3.amazonaws.com/profiles/avatars/000/089/005/large/logo.png?1562399288', + recipes_count = 49, + interested_applications = [ + '' + ], + company_name = '', + location = '', + last_seen = '2020-08-23T23:22:24.329-07:00', + contact_phone = '', + contact_email = '', + about_me = '', + email = 'api-1@workato.com', + phone = 'xxxxxxxxxx', + active_recipes_count = 1, + root_folder_id = 10294 + ) + else: + return User( + id = 17293, + name = 'ACME-API', + created_at = '2019-06-19T19:53:16.886-07:00', + plan_id = 'oem_plan', + current_billing_period_start = '2020-09-22T19:15:11.372-07:00', + current_billing_period_end = '2020-10-22T19:15:11.372-07:00', + recipes_count = 49, + company_name = '', + location = '', + last_seen = '2020-08-23T23:22:24.329-07:00', + email = 'api-1@workato.com', + active_recipes_count = 1, + root_folder_id = 10294, + ) + """ + + def testUser(self): + """Test User""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_users_api.py b/src/workato_platform/client/workato_api/test/test_users_api.py new file mode 100644 index 0000000..a107387 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_users_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.api.users_api import UsersApi + + +class TestUsersApi(unittest.IsolatedAsyncioTestCase): + """UsersApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = UsersApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_get_workspace_details(self) -> None: + """Test case for get_workspace_details + + Get current user information + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_validation_error.py b/src/workato_platform/client/workato_api/test/test_validation_error.py new file mode 100644 index 0000000..547730d --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_validation_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + message = 'Validation failed', + errors = {"name":["can't be blank"],"provider":["is not included in the list"]} + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py b/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py new file mode 100644 index 0000000..151f1e7 --- /dev/null +++ b/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Workato Platform API + + Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue + +class TestValidationErrorErrorsValue(unittest.TestCase): + """ValidationErrorErrorsValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorErrorsValue: + """Test ValidationErrorErrorsValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorErrorsValue` + """ + model = ValidationErrorErrorsValue() + if include_optional: + return ValidationErrorErrorsValue( + ) + else: + return ValidationErrorErrorsValue( + ) + """ + + def testValidationErrorErrorsValue(self): + """Test ValidationErrorErrorsValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/workato_platform/client/workato_api_README.md b/src/workato_platform/client/workato_api_README.md new file mode 100644 index 0000000..da7d2f2 --- /dev/null +++ b/src/workato_platform/client/workato_api_README.md @@ -0,0 +1,205 @@ +# workato-platform-cli +Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` + +The `workato_platform.client.workato_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Generator version: 7.16.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://docs.workato.com](https://docs.workato.com) + +## Requirements. + +Python 3.9+ + +## Installation & Usage + +This python library package is generated without supporting files like setup.py or requirements files + +To be able to use it, you will need these dependencies in your own package that uses this library: + +* urllib3 >= 2.1.0, < 3.0.0 +* python-dateutil >= 2.8.2 +* aiohttp >= 3.8.4 +* aiohttp-retry >= 2.8.3 +* pydantic >= 2 +* typing-extensions >= 4.7.1 + +## Getting Started + +In your own code, to use this library to connect and interact with workato-platform-cli, +you can run the following: + +```python + +import workato_platform.client.workato_api +from workato_platform.client.workato_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.workato.com +# See configuration.py for a list of all supported configuration parameters. +configuration = workato_platform.client.workato_api.Configuration( + host = "https://www.workato.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = workato_platform.client.workato_api.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | + + try: + # Create API client (v2) + api_response = await api_instance.create_api_client(api_client_create_request) + print("The response of APIPlatformApi->create_api_client:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling APIPlatformApi->create_api_client: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://www.workato.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*APIPlatformApi* | [**create_api_client**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) +*APIPlatformApi* | [**create_api_collection**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection +*APIPlatformApi* | [**create_api_key**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key +*APIPlatformApi* | [**disable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint +*APIPlatformApi* | [**enable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint +*APIPlatformApi* | [**list_api_clients**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) +*APIPlatformApi* | [**list_api_collections**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections +*APIPlatformApi* | [**list_api_endpoints**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints +*APIPlatformApi* | [**list_api_keys**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys +*APIPlatformApi* | [**refresh_api_key_secret**](workato_platform/client/workato_api/docs/APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret +*ConnectionsApi* | [**create_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection +*ConnectionsApi* | [**create_runtime_user_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection +*ConnectionsApi* | [**get_connection_oauth_url**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection +*ConnectionsApi* | [**get_connection_picklist**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values +*ConnectionsApi* | [**list_connections**](workato_platform/client/workato_api/docs/ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections +*ConnectionsApi* | [**update_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection +*ConnectorsApi* | [**get_custom_connector_code**](workato_platform/client/workato_api/docs/ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code +*ConnectorsApi* | [**list_custom_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors +*ConnectorsApi* | [**list_platform_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors +*DataTablesApi* | [**create_data_table**](workato_platform/client/workato_api/docs/DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table +*DataTablesApi* | [**list_data_tables**](workato_platform/client/workato_api/docs/DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables +*ExportApi* | [**create_export_manifest**](workato_platform/client/workato_api/docs/ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest +*ExportApi* | [**list_assets_in_folder**](workato_platform/client/workato_api/docs/ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder +*FoldersApi* | [**create_folder**](workato_platform/client/workato_api/docs/FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder +*FoldersApi* | [**list_folders**](workato_platform/client/workato_api/docs/FoldersApi.md#list_folders) | **GET** /api/folders | List folders +*PackagesApi* | [**download_package**](workato_platform/client/workato_api/docs/PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package +*PackagesApi* | [**export_package**](workato_platform/client/workato_api/docs/PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest +*PackagesApi* | [**get_package**](workato_platform/client/workato_api/docs/PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details +*PackagesApi* | [**import_package**](workato_platform/client/workato_api/docs/PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder +*ProjectsApi* | [**delete_project**](workato_platform/client/workato_api/docs/ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project +*ProjectsApi* | [**list_projects**](workato_platform/client/workato_api/docs/ProjectsApi.md#list_projects) | **GET** /api/projects | List projects +*PropertiesApi* | [**list_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties +*PropertiesApi* | [**upsert_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties +*RecipesApi* | [**list_recipes**](workato_platform/client/workato_api/docs/RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes +*RecipesApi* | [**start_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe +*RecipesApi* | [**stop_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe +*RecipesApi* | [**update_recipe_connection**](workato_platform/client/workato_api/docs/RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe +*UsersApi* | [**get_workspace_details**](workato_platform/client/workato_api/docs/UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information + + +## Documentation For Models + + - [ApiClient](workato_platform/client/workato_api/docs/ApiClient.md) + - [ApiClientApiCollectionsInner](workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md) + - [ApiClientApiPoliciesInner](workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md) + - [ApiClientCreateRequest](workato_platform/client/workato_api/docs/ApiClientCreateRequest.md) + - [ApiClientListResponse](workato_platform/client/workato_api/docs/ApiClientListResponse.md) + - [ApiClientResponse](workato_platform/client/workato_api/docs/ApiClientResponse.md) + - [ApiCollection](workato_platform/client/workato_api/docs/ApiCollection.md) + - [ApiCollectionCreateRequest](workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md) + - [ApiEndpoint](workato_platform/client/workato_api/docs/ApiEndpoint.md) + - [ApiKey](workato_platform/client/workato_api/docs/ApiKey.md) + - [ApiKeyCreateRequest](workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md) + - [ApiKeyListResponse](workato_platform/client/workato_api/docs/ApiKeyListResponse.md) + - [ApiKeyResponse](workato_platform/client/workato_api/docs/ApiKeyResponse.md) + - [Asset](workato_platform/client/workato_api/docs/Asset.md) + - [AssetReference](workato_platform/client/workato_api/docs/AssetReference.md) + - [Connection](workato_platform/client/workato_api/docs/Connection.md) + - [ConnectionCreateRequest](workato_platform/client/workato_api/docs/ConnectionCreateRequest.md) + - [ConnectionUpdateRequest](workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md) + - [ConnectorAction](workato_platform/client/workato_api/docs/ConnectorAction.md) + - [ConnectorVersion](workato_platform/client/workato_api/docs/ConnectorVersion.md) + - [CreateExportManifestRequest](workato_platform/client/workato_api/docs/CreateExportManifestRequest.md) + - [CreateFolderRequest](workato_platform/client/workato_api/docs/CreateFolderRequest.md) + - [CustomConnector](workato_platform/client/workato_api/docs/CustomConnector.md) + - [CustomConnectorCodeResponse](workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md) + - [CustomConnectorCodeResponseData](workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md) + - [CustomConnectorListResponse](workato_platform/client/workato_api/docs/CustomConnectorListResponse.md) + - [DataTable](workato_platform/client/workato_api/docs/DataTable.md) + - [DataTableColumn](workato_platform/client/workato_api/docs/DataTableColumn.md) + - [DataTableColumnRequest](workato_platform/client/workato_api/docs/DataTableColumnRequest.md) + - [DataTableCreateRequest](workato_platform/client/workato_api/docs/DataTableCreateRequest.md) + - [DataTableCreateResponse](workato_platform/client/workato_api/docs/DataTableCreateResponse.md) + - [DataTableListResponse](workato_platform/client/workato_api/docs/DataTableListResponse.md) + - [DataTableRelation](workato_platform/client/workato_api/docs/DataTableRelation.md) + - [DeleteProject403Response](workato_platform/client/workato_api/docs/DeleteProject403Response.md) + - [Error](workato_platform/client/workato_api/docs/Error.md) + - [ExportManifestRequest](workato_platform/client/workato_api/docs/ExportManifestRequest.md) + - [ExportManifestResponse](workato_platform/client/workato_api/docs/ExportManifestResponse.md) + - [ExportManifestResponseResult](workato_platform/client/workato_api/docs/ExportManifestResponseResult.md) + - [Folder](workato_platform/client/workato_api/docs/Folder.md) + - [FolderAssetsResponse](workato_platform/client/workato_api/docs/FolderAssetsResponse.md) + - [FolderAssetsResponseResult](workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md) + - [FolderCreationResponse](workato_platform/client/workato_api/docs/FolderCreationResponse.md) + - [ImportResults](workato_platform/client/workato_api/docs/ImportResults.md) + - [OAuthUrlResponse](workato_platform/client/workato_api/docs/OAuthUrlResponse.md) + - [OAuthUrlResponseData](workato_platform/client/workato_api/docs/OAuthUrlResponseData.md) + - [OpenApiSpec](workato_platform/client/workato_api/docs/OpenApiSpec.md) + - [PackageDetailsResponse](workato_platform/client/workato_api/docs/PackageDetailsResponse.md) + - [PackageDetailsResponseRecipeStatusInner](workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md) + - [PackageResponse](workato_platform/client/workato_api/docs/PackageResponse.md) + - [PicklistRequest](workato_platform/client/workato_api/docs/PicklistRequest.md) + - [PicklistResponse](workato_platform/client/workato_api/docs/PicklistResponse.md) + - [PlatformConnector](workato_platform/client/workato_api/docs/PlatformConnector.md) + - [PlatformConnectorListResponse](workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md) + - [Project](workato_platform/client/workato_api/docs/Project.md) + - [Recipe](workato_platform/client/workato_api/docs/Recipe.md) + - [RecipeConfigInner](workato_platform/client/workato_api/docs/RecipeConfigInner.md) + - [RecipeConnectionUpdateRequest](workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md) + - [RecipeListResponse](workato_platform/client/workato_api/docs/RecipeListResponse.md) + - [RecipeStartResponse](workato_platform/client/workato_api/docs/RecipeStartResponse.md) + - [RuntimeUserConnectionCreateRequest](workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md) + - [RuntimeUserConnectionResponse](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md) + - [RuntimeUserConnectionResponseData](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md) + - [SuccessResponse](workato_platform/client/workato_api/docs/SuccessResponse.md) + - [UpsertProjectPropertiesRequest](workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md) + - [User](workato_platform/client/workato_api/docs/User.md) + - [ValidationError](workato_platform/client/workato_api/docs/ValidationError.md) + - [ValidationErrorErrorsValue](workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + From b6b059b31fc8ef65f6c1c78393b1f1e2d789ad06 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 16:58:41 -0700 Subject: [PATCH 10/13] Remove incorrectly generated API client files and fix cache config --- src/workato_platform/client/__init__.py | 0 .../client/workato_api/__init__.py | 202 -- .../client/workato_api/api/__init__.py | 15 - .../workato_api/api/api_platform_api.py | 2875 ----------------- .../client/workato_api/api/connections_api.py | 1807 ----------- .../client/workato_api/api/connectors_api.py | 840 ----- .../client/workato_api/api/data_tables_api.py | 604 ---- .../client/workato_api/api/export_api.py | 621 ---- .../client/workato_api/api/folders_api.py | 621 ---- .../client/workato_api/api/packages_api.py | 1197 ------- .../client/workato_api/api/projects_api.py | 590 ---- .../client/workato_api/api/properties_api.py | 620 ---- .../client/workato_api/api/recipes_api.py | 1379 -------- .../client/workato_api/api/users_api.py | 285 -- .../client/workato_api/api_client.py | 807 ----- .../client/workato_api/api_response.py | 21 - .../client/workato_api/configuration.py | 601 ---- .../client/workato_api/docs/APIPlatformApi.md | 844 ----- .../client/workato_api/docs/ApiClient.md | 46 - .../docs/ApiClientApiCollectionsInner.md | 30 - .../docs/ApiClientApiPoliciesInner.md | 30 - .../docs/ApiClientCreateRequest.md | 46 - .../workato_api/docs/ApiClientListResponse.md | 32 - .../workato_api/docs/ApiClientResponse.md | 29 - .../client/workato_api/docs/ApiCollection.md | 38 - .../docs/ApiCollectionCreateRequest.md | 32 - .../client/workato_api/docs/ApiEndpoint.md | 41 - .../client/workato_api/docs/ApiKey.md | 36 - .../workato_api/docs/ApiKeyCreateRequest.md | 32 - .../workato_api/docs/ApiKeyListResponse.md | 32 - .../client/workato_api/docs/ApiKeyResponse.md | 29 - .../client/workato_api/docs/Asset.md | 39 - .../client/workato_api/docs/AssetReference.md | 37 - .../client/workato_api/docs/Connection.md | 44 - .../docs/ConnectionCreateRequest.md | 35 - .../docs/ConnectionUpdateRequest.md | 34 - .../client/workato_api/docs/ConnectionsApi.md | 526 --- .../workato_api/docs/ConnectorAction.md | 33 - .../workato_api/docs/ConnectorVersion.md | 32 - .../client/workato_api/docs/ConnectorsApi.md | 249 -- .../docs/CreateExportManifestRequest.md | 29 - .../workato_api/docs/CreateFolderRequest.md | 30 - .../workato_api/docs/CustomConnector.md | 35 - .../docs/CustomConnectorCodeResponse.md | 29 - .../docs/CustomConnectorCodeResponseData.md | 29 - .../docs/CustomConnectorListResponse.md | 29 - .../client/workato_api/docs/DataTable.md | 34 - .../workato_api/docs/DataTableColumn.md | 37 - .../docs/DataTableColumnRequest.md | 37 - .../docs/DataTableCreateRequest.md | 31 - .../docs/DataTableCreateResponse.md | 29 - .../workato_api/docs/DataTableListResponse.md | 29 - .../workato_api/docs/DataTableRelation.md | 30 - .../client/workato_api/docs/DataTablesApi.md | 172 - .../docs/DeleteProject403Response.md | 29 - .../client/workato_api/docs/Error.md | 29 - .../client/workato_api/docs/ExportApi.md | 175 - .../workato_api/docs/ExportManifestRequest.md | 35 - .../docs/ExportManifestResponse.md | 29 - .../docs/ExportManifestResponseResult.md | 36 - .../client/workato_api/docs/Folder.md | 35 - .../workato_api/docs/FolderAssetsResponse.md | 29 - .../docs/FolderAssetsResponseResult.md | 29 - .../docs/FolderCreationResponse.md | 35 - .../client/workato_api/docs/FoldersApi.md | 176 - .../client/workato_api/docs/ImportResults.md | 32 - .../workato_api/docs/OAuthUrlResponse.md | 29 - .../workato_api/docs/OAuthUrlResponseData.md | 29 - .../client/workato_api/docs/OpenApiSpec.md | 30 - .../docs/PackageDetailsResponse.md | 35 - ...PackageDetailsResponseRecipeStatusInner.md | 30 - .../workato_api/docs/PackageResponse.md | 33 - .../client/workato_api/docs/PackagesApi.md | 364 --- .../workato_api/docs/PicklistRequest.md | 30 - .../workato_api/docs/PicklistResponse.md | 29 - .../workato_api/docs/PlatformConnector.md | 36 - .../docs/PlatformConnectorListResponse.md | 32 - .../client/workato_api/docs/Project.md | 32 - .../client/workato_api/docs/ProjectsApi.md | 173 - .../client/workato_api/docs/PropertiesApi.md | 186 -- .../client/workato_api/docs/Recipe.md | 58 - .../workato_api/docs/RecipeConfigInner.md | 33 - .../docs/RecipeConnectionUpdateRequest.md | 30 - .../workato_api/docs/RecipeListResponse.md | 29 - .../workato_api/docs/RecipeStartResponse.md | 31 - .../client/workato_api/docs/RecipesApi.md | 367 --- .../RuntimeUserConnectionCreateRequest.md | 34 - .../docs/RuntimeUserConnectionResponse.md | 29 - .../docs/RuntimeUserConnectionResponseData.md | 30 - .../workato_api/docs/SuccessResponse.md | 29 - .../docs/UpsertProjectPropertiesRequest.md | 29 - .../client/workato_api/docs/User.md | 48 - .../client/workato_api/docs/UsersApi.md | 84 - .../workato_api/docs/ValidationError.md | 30 - .../docs/ValidationErrorErrorsValue.md | 28 - .../client/workato_api/exceptions.py | 216 -- .../client/workato_api/models/__init__.py | 83 - .../client/workato_api/models/api_client.py | 185 -- .../api_client_api_collections_inner.py | 89 - .../models/api_client_api_policies_inner.py | 89 - .../models/api_client_create_request.py | 138 - .../models/api_client_list_response.py | 101 - .../workato_api/models/api_client_response.py | 91 - .../workato_api/models/api_collection.py | 110 - .../models/api_collection_create_request.py | 97 - .../client/workato_api/models/api_endpoint.py | 117 - .../client/workato_api/models/api_key.py | 102 - .../models/api_key_create_request.py | 93 - .../models/api_key_list_response.py | 101 - .../workato_api/models/api_key_response.py | 91 - .../client/workato_api/models/asset.py | 124 - .../workato_api/models/asset_reference.py | 110 - .../client/workato_api/models/connection.py | 173 - .../models/connection_create_request.py | 99 - .../models/connection_update_request.py | 97 - .../workato_api/models/connector_action.py | 100 - .../workato_api/models/connector_version.py | 99 - .../models/create_export_manifest_request.py | 91 - .../models/create_folder_request.py | 89 - .../workato_api/models/custom_connector.py | 117 - .../models/custom_connector_code_response.py | 91 - .../custom_connector_code_response_data.py | 87 - .../models/custom_connector_list_response.py | 95 - .../client/workato_api/models/data_table.py | 107 - .../workato_api/models/data_table_column.py | 125 - .../models/data_table_column_request.py | 130 - .../models/data_table_create_request.py | 99 - .../models/data_table_create_response.py | 91 - .../models/data_table_list_response.py | 95 - .../workato_api/models/data_table_relation.py | 90 - .../models/delete_project403_response.py | 87 - .../client/workato_api/models/error.py | 87 - .../models/export_manifest_request.py | 107 - .../models/export_manifest_response.py | 91 - .../models/export_manifest_response_result.py | 112 - .../client/workato_api/models/folder.py | 110 - .../models/folder_assets_response.py | 91 - .../models/folder_assets_response_result.py | 95 - .../models/folder_creation_response.py | 110 - .../workato_api/models/import_results.py | 93 - .../workato_api/models/o_auth_url_response.py | 91 - .../models/o_auth_url_response_data.py | 87 - .../workato_api/models/open_api_spec.py | 96 - .../models/package_details_response.py | 126 - ...ge_details_response_recipe_status_inner.py | 99 - .../workato_api/models/package_response.py | 109 - .../workato_api/models/picklist_request.py | 89 - .../workato_api/models/picklist_response.py | 88 - .../workato_api/models/platform_connector.py | 116 - .../platform_connector_list_response.py | 101 - .../client/workato_api/models/project.py | 93 - .../client/workato_api/models/recipe.py | 174 - .../workato_api/models/recipe_config_inner.py | 100 - .../recipe_connection_update_request.py | 89 - .../models/recipe_list_response.py | 95 - .../models/recipe_start_response.py | 91 - .../runtime_user_connection_create_request.py | 97 - .../runtime_user_connection_response.py | 91 - .../runtime_user_connection_response_data.py | 89 - .../workato_api/models/success_response.py | 87 - .../upsert_project_properties_request.py | 88 - .../client/workato_api/models/user.py | 151 - .../workato_api/models/validation_error.py | 102 - .../models/validation_error_errors_value.py | 143 - .../client/workato_api/rest.py | 213 -- .../client/workato_api/test/__init__.py | 0 .../workato_api/test/test_api_client.py | 94 - .../test_api_client_api_collections_inner.py | 52 - .../test_api_client_api_policies_inner.py | 52 - .../test/test_api_client_create_request.py | 75 - .../test/test_api_client_list_response.py | 114 - .../test/test_api_client_response.py | 104 - .../workato_api/test/test_api_collection.py | 72 - .../test_api_collection_create_request.py | 57 - .../workato_api/test/test_api_endpoint.py | 75 - .../client/workato_api/test/test_api_key.py | 64 - .../test/test_api_key_create_request.py | 56 - .../test/test_api_key_list_response.py | 78 - .../workato_api/test/test_api_key_response.py | 68 - .../workato_api/test/test_api_platform_api.py | 101 - .../client/workato_api/test/test_asset.py | 67 - .../workato_api/test/test_asset_reference.py | 62 - .../workato_api/test/test_connection.py | 81 - .../test/test_connection_create_request.py | 59 - .../test/test_connection_update_request.py | 56 - .../workato_api/test/test_connections_api.py | 73 - .../workato_api/test/test_connector_action.py | 59 - .../test/test_connector_version.py | 58 - .../workato_api/test/test_connectors_api.py | 52 - .../test_create_export_manifest_request.py | 88 - .../test/test_create_folder_request.py | 53 - .../workato_api/test/test_custom_connector.py | 76 - .../test_custom_connector_code_response.py | 54 - ...est_custom_connector_code_response_data.py | 52 - .../test_custom_connector_list_response.py | 82 - .../workato_api/test/test_data_table.py | 88 - .../test/test_data_table_column.py | 72 - .../test/test_data_table_column_request.py | 64 - .../test/test_data_table_create_request.py | 82 - .../test/test_data_table_create_response.py | 90 - .../test/test_data_table_list_response.py | 94 - .../test/test_data_table_relation.py | 54 - .../workato_api/test/test_data_tables_api.py | 45 - .../test/test_delete_project403_response.py | 51 - .../client/workato_api/test/test_error.py | 52 - .../workato_api/test/test_export_api.py | 45 - .../test/test_export_manifest_request.py | 69 - .../test/test_export_manifest_response.py | 68 - .../test_export_manifest_response_result.py | 66 - .../client/workato_api/test/test_folder.py | 64 - .../test/test_folder_assets_response.py | 80 - .../test_folder_assets_response_result.py | 78 - .../test/test_folder_creation_response.py | 64 - .../workato_api/test/test_folders_api.py | 45 - .../workato_api/test/test_import_results.py | 58 - .../test/test_o_auth_url_response.py | 54 - .../test/test_o_auth_url_response_data.py | 52 - .../workato_api/test/test_open_api_spec.py | 54 - .../test/test_package_details_response.py | 64 - ...ge_details_response_recipe_status_inner.py | 52 - .../workato_api/test/test_package_response.py | 58 - .../workato_api/test/test_packages_api.py | 59 - .../workato_api/test/test_picklist_request.py | 53 - .../test/test_picklist_response.py | 52 - .../test/test_platform_connector.py | 94 - .../test_platform_connector_list_response.py | 106 - .../client/workato_api/test/test_project.py | 57 - .../workato_api/test/test_projects_api.py | 45 - .../workato_api/test/test_properties_api.py | 45 - .../client/workato_api/test/test_recipe.py | 124 - .../test/test_recipe_config_inner.py | 55 - .../test_recipe_connection_update_request.py | 54 - .../test/test_recipe_list_response.py | 134 - .../test/test_recipe_start_response.py | 54 - .../workato_api/test/test_recipes_api.py | 59 - ..._runtime_user_connection_create_request.py | 59 - .../test_runtime_user_connection_response.py | 56 - ...t_runtime_user_connection_response_data.py | 54 - .../workato_api/test/test_success_response.py | 52 - .../test_upsert_project_properties_request.py | 52 - .../client/workato_api/test/test_user.py | 85 - .../client/workato_api/test/test_users_api.py | 38 - .../workato_api/test/test_validation_error.py | 52 - .../test_validation_error_errors_value.py | 50 - .../client/workato_api_README.md | 205 -- 245 files changed, 31508 deletions(-) delete mode 100644 src/workato_platform/client/__init__.py delete mode 100644 src/workato_platform/client/workato_api/__init__.py delete mode 100644 src/workato_platform/client/workato_api/api/__init__.py delete mode 100644 src/workato_platform/client/workato_api/api/api_platform_api.py delete mode 100644 src/workato_platform/client/workato_api/api/connections_api.py delete mode 100644 src/workato_platform/client/workato_api/api/connectors_api.py delete mode 100644 src/workato_platform/client/workato_api/api/data_tables_api.py delete mode 100644 src/workato_platform/client/workato_api/api/export_api.py delete mode 100644 src/workato_platform/client/workato_api/api/folders_api.py delete mode 100644 src/workato_platform/client/workato_api/api/packages_api.py delete mode 100644 src/workato_platform/client/workato_api/api/projects_api.py delete mode 100644 src/workato_platform/client/workato_api/api/properties_api.py delete mode 100644 src/workato_platform/client/workato_api/api/recipes_api.py delete mode 100644 src/workato_platform/client/workato_api/api/users_api.py delete mode 100644 src/workato_platform/client/workato_api/api_client.py delete mode 100644 src/workato_platform/client/workato_api/api_response.py delete mode 100644 src/workato_platform/client/workato_api/configuration.py delete mode 100644 src/workato_platform/client/workato_api/docs/APIPlatformApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClient.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClientListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiClientResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiCollection.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiEndpoint.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiKey.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/ApiKeyResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/Asset.md delete mode 100644 src/workato_platform/client/workato_api/docs/AssetReference.md delete mode 100644 src/workato_platform/client/workato_api/docs/Connection.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectionsApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectorAction.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectorVersion.md delete mode 100644 src/workato_platform/client/workato_api/docs/ConnectorsApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/CreateFolderRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/CustomConnector.md delete mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md delete mode 100644 src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTable.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableColumn.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTableRelation.md delete mode 100644 src/workato_platform/client/workato_api/docs/DataTablesApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/DeleteProject403Response.md delete mode 100644 src/workato_platform/client/workato_api/docs/Error.md delete mode 100644 src/workato_platform/client/workato_api/docs/ExportApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md delete mode 100644 src/workato_platform/client/workato_api/docs/Folder.md delete mode 100644 src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md delete mode 100644 src/workato_platform/client/workato_api/docs/FolderCreationResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/FoldersApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/ImportResults.md delete mode 100644 src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md delete mode 100644 src/workato_platform/client/workato_api/docs/OpenApiSpec.md delete mode 100644 src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md delete mode 100644 src/workato_platform/client/workato_api/docs/PackageResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/PackagesApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/PicklistRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/PicklistResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/PlatformConnector.md delete mode 100644 src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/Project.md delete mode 100644 src/workato_platform/client/workato_api/docs/ProjectsApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/PropertiesApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/Recipe.md delete mode 100644 src/workato_platform/client/workato_api/docs/RecipeConfigInner.md delete mode 100644 src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/RecipeListResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/RecipeStartResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/RecipesApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md delete mode 100644 src/workato_platform/client/workato_api/docs/SuccessResponse.md delete mode 100644 src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md delete mode 100644 src/workato_platform/client/workato_api/docs/User.md delete mode 100644 src/workato_platform/client/workato_api/docs/UsersApi.md delete mode 100644 src/workato_platform/client/workato_api/docs/ValidationError.md delete mode 100644 src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md delete mode 100644 src/workato_platform/client/workato_api/exceptions.py delete mode 100644 src/workato_platform/client/workato_api/models/__init__.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/api_client_response.py delete mode 100644 src/workato_platform/client/workato_api/models/api_collection.py delete mode 100644 src/workato_platform/client/workato_api/models/api_collection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/api_endpoint.py delete mode 100644 src/workato_platform/client/workato_api/models/api_key.py delete mode 100644 src/workato_platform/client/workato_api/models/api_key_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/api_key_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/api_key_response.py delete mode 100644 src/workato_platform/client/workato_api/models/asset.py delete mode 100644 src/workato_platform/client/workato_api/models/asset_reference.py delete mode 100644 src/workato_platform/client/workato_api/models/connection.py delete mode 100644 src/workato_platform/client/workato_api/models/connection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/connection_update_request.py delete mode 100644 src/workato_platform/client/workato_api/models/connector_action.py delete mode 100644 src/workato_platform/client/workato_api/models/connector_version.py delete mode 100644 src/workato_platform/client/workato_api/models/create_export_manifest_request.py delete mode 100644 src/workato_platform/client/workato_api/models/create_folder_request.py delete mode 100644 src/workato_platform/client/workato_api/models/custom_connector.py delete mode 100644 src/workato_platform/client/workato_api/models/custom_connector_code_response.py delete mode 100644 src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py delete mode 100644 src/workato_platform/client/workato_api/models/custom_connector_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_column.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_column_request.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_create_response.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/data_table_relation.py delete mode 100644 src/workato_platform/client/workato_api/models/delete_project403_response.py delete mode 100644 src/workato_platform/client/workato_api/models/error.py delete mode 100644 src/workato_platform/client/workato_api/models/export_manifest_request.py delete mode 100644 src/workato_platform/client/workato_api/models/export_manifest_response.py delete mode 100644 src/workato_platform/client/workato_api/models/export_manifest_response_result.py delete mode 100644 src/workato_platform/client/workato_api/models/folder.py delete mode 100644 src/workato_platform/client/workato_api/models/folder_assets_response.py delete mode 100644 src/workato_platform/client/workato_api/models/folder_assets_response_result.py delete mode 100644 src/workato_platform/client/workato_api/models/folder_creation_response.py delete mode 100644 src/workato_platform/client/workato_api/models/import_results.py delete mode 100644 src/workato_platform/client/workato_api/models/o_auth_url_response.py delete mode 100644 src/workato_platform/client/workato_api/models/o_auth_url_response_data.py delete mode 100644 src/workato_platform/client/workato_api/models/open_api_spec.py delete mode 100644 src/workato_platform/client/workato_api/models/package_details_response.py delete mode 100644 src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py delete mode 100644 src/workato_platform/client/workato_api/models/package_response.py delete mode 100644 src/workato_platform/client/workato_api/models/picklist_request.py delete mode 100644 src/workato_platform/client/workato_api/models/picklist_response.py delete mode 100644 src/workato_platform/client/workato_api/models/platform_connector.py delete mode 100644 src/workato_platform/client/workato_api/models/platform_connector_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/project.py delete mode 100644 src/workato_platform/client/workato_api/models/recipe.py delete mode 100644 src/workato_platform/client/workato_api/models/recipe_config_inner.py delete mode 100644 src/workato_platform/client/workato_api/models/recipe_connection_update_request.py delete mode 100644 src/workato_platform/client/workato_api/models/recipe_list_response.py delete mode 100644 src/workato_platform/client/workato_api/models/recipe_start_response.py delete mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_response.py delete mode 100644 src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py delete mode 100644 src/workato_platform/client/workato_api/models/success_response.py delete mode 100644 src/workato_platform/client/workato_api/models/upsert_project_properties_request.py delete mode 100644 src/workato_platform/client/workato_api/models/user.py delete mode 100644 src/workato_platform/client/workato_api/models/validation_error.py delete mode 100644 src/workato_platform/client/workato_api/models/validation_error_errors_value.py delete mode 100644 src/workato_platform/client/workato_api/rest.py delete mode 100644 src/workato_platform/client/workato_api/test/__init__.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_client_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_collection.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_collection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_endpoint.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_key.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_key_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_key_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_key_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_api_platform_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_asset.py delete mode 100644 src/workato_platform/client/workato_api/test/test_asset_reference.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connection.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connection_update_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connections_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connector_action.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connector_version.py delete mode 100644 src/workato_platform/client/workato_api/test/test_connectors_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_create_folder_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector.py delete mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py delete mode 100644 src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_column.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_column_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_create_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_table_relation.py delete mode 100644 src/workato_platform/client/workato_api/test/test_data_tables_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_delete_project403_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_error.py delete mode 100644 src/workato_platform/client/workato_api/test/test_export_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py delete mode 100644 src/workato_platform/client/workato_api/test/test_folder.py delete mode 100644 src/workato_platform/client/workato_api/test/test_folder_assets_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py delete mode 100644 src/workato_platform/client/workato_api/test/test_folder_creation_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_folders_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_import_results.py delete mode 100644 src/workato_platform/client/workato_api/test/test_o_auth_url_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py delete mode 100644 src/workato_platform/client/workato_api/test/test_open_api_spec.py delete mode 100644 src/workato_platform/client/workato_api/test/test_package_details_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py delete mode 100644 src/workato_platform/client/workato_api/test/test_package_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_packages_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_picklist_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_picklist_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_platform_connector.py delete mode 100644 src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_project.py delete mode 100644 src/workato_platform/client/workato_api/test/test_projects_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_properties_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipe.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipe_config_inner.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipe_list_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipe_start_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_recipes_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py delete mode 100644 src/workato_platform/client/workato_api/test/test_success_response.py delete mode 100644 src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py delete mode 100644 src/workato_platform/client/workato_api/test/test_user.py delete mode 100644 src/workato_platform/client/workato_api/test/test_users_api.py delete mode 100644 src/workato_platform/client/workato_api/test/test_validation_error.py delete mode 100644 src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py delete mode 100644 src/workato_platform/client/workato_api_README.md diff --git a/src/workato_platform/client/__init__.py b/src/workato_platform/client/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/workato_platform/client/workato_api/__init__.py b/src/workato_platform/client/workato_api/__init__.py deleted file mode 100644 index 279a191..0000000 --- a/src/workato_platform/client/workato_api/__init__.py +++ /dev/null @@ -1,202 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# Define package exports -__all__ = [ - "APIPlatformApi", - "ConnectionsApi", - "ConnectorsApi", - "DataTablesApi", - "ExportApi", - "FoldersApi", - "PackagesApi", - "ProjectsApi", - "PropertiesApi", - "RecipesApi", - "UsersApi", - "ApiResponse", - "ApiClient", - "Configuration", - "OpenApiException", - "ApiTypeError", - "ApiValueError", - "ApiKeyError", - "ApiAttributeError", - "ApiException", - "ApiClient", - "ApiClientApiCollectionsInner", - "ApiClientApiPoliciesInner", - "ApiClientCreateRequest", - "ApiClientListResponse", - "ApiClientResponse", - "ApiCollection", - "ApiCollectionCreateRequest", - "ApiEndpoint", - "ApiKey", - "ApiKeyCreateRequest", - "ApiKeyListResponse", - "ApiKeyResponse", - "Asset", - "AssetReference", - "Connection", - "ConnectionCreateRequest", - "ConnectionUpdateRequest", - "ConnectorAction", - "ConnectorVersion", - "CreateExportManifestRequest", - "CreateFolderRequest", - "CustomConnector", - "CustomConnectorCodeResponse", - "CustomConnectorCodeResponseData", - "CustomConnectorListResponse", - "DataTable", - "DataTableColumn", - "DataTableColumnRequest", - "DataTableCreateRequest", - "DataTableCreateResponse", - "DataTableListResponse", - "DataTableRelation", - "DeleteProject403Response", - "Error", - "ExportManifestRequest", - "ExportManifestResponse", - "ExportManifestResponseResult", - "Folder", - "FolderAssetsResponse", - "FolderAssetsResponseResult", - "FolderCreationResponse", - "ImportResults", - "OAuthUrlResponse", - "OAuthUrlResponseData", - "OpenApiSpec", - "PackageDetailsResponse", - "PackageDetailsResponseRecipeStatusInner", - "PackageResponse", - "PicklistRequest", - "PicklistResponse", - "PlatformConnector", - "PlatformConnectorListResponse", - "Project", - "Recipe", - "RecipeConfigInner", - "RecipeConnectionUpdateRequest", - "RecipeListResponse", - "RecipeStartResponse", - "RuntimeUserConnectionCreateRequest", - "RuntimeUserConnectionResponse", - "RuntimeUserConnectionResponseData", - "SuccessResponse", - "UpsertProjectPropertiesRequest", - "User", - "ValidationError", - "ValidationErrorErrorsValue", -] - -# import apis into sdk package -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi as APIPlatformApi -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi as ConnectionsApi -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi as ConnectorsApi -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi as DataTablesApi -from workato_platform.client.workato_api.api.export_api import ExportApi as ExportApi -from workato_platform.client.workato_api.api.folders_api import FoldersApi as FoldersApi -from workato_platform.client.workato_api.api.packages_api import PackagesApi as PackagesApi -from workato_platform.client.workato_api.api.projects_api import ProjectsApi as ProjectsApi -from workato_platform.client.workato_api.api.properties_api import PropertiesApi as PropertiesApi -from workato_platform.client.workato_api.api.recipes_api import RecipesApi as RecipesApi -from workato_platform.client.workato_api.api.users_api import UsersApi as UsersApi - -# import ApiClient -from workato_platform.client.workato_api.api_response import ApiResponse as ApiResponse -from workato_platform.client.workato_api.api_client import ApiClient as ApiClient -from workato_platform.client.workato_api.configuration import Configuration as Configuration -from workato_platform.client.workato_api.exceptions import OpenApiException as OpenApiException -from workato_platform.client.workato_api.exceptions import ApiTypeError as ApiTypeError -from workato_platform.client.workato_api.exceptions import ApiValueError as ApiValueError -from workato_platform.client.workato_api.exceptions import ApiKeyError as ApiKeyError -from workato_platform.client.workato_api.exceptions import ApiAttributeError as ApiAttributeError -from workato_platform.client.workato_api.exceptions import ApiException as ApiException - -# import models into sdk package -from workato_platform.client.workato_api.models.api_client import ApiClient as ApiClient -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner as ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner as ApiClientApiPoliciesInner -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest as ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse as ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse as ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection as ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest as ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint as ApiEndpoint -from workato_platform.client.workato_api.models.api_key import ApiKey as ApiKey -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest as ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse as ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse as ApiKeyResponse -from workato_platform.client.workato_api.models.asset import Asset as Asset -from workato_platform.client.workato_api.models.asset_reference import AssetReference as AssetReference -from workato_platform.client.workato_api.models.connection import Connection as Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest as ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest as ConnectionUpdateRequest -from workato_platform.client.workato_api.models.connector_action import ConnectorAction as ConnectorAction -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion as ConnectorVersion -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest as CreateExportManifestRequest -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest as CreateFolderRequest -from workato_platform.client.workato_api.models.custom_connector import CustomConnector as CustomConnector -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse as CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData as CustomConnectorCodeResponseData -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse as CustomConnectorListResponse -from workato_platform.client.workato_api.models.data_table import DataTable as DataTable -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn as DataTableColumn -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest as DataTableColumnRequest -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest as DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse as DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse as DataTableListResponse -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation as DataTableRelation -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response as DeleteProject403Response -from workato_platform.client.workato_api.models.error import Error as Error -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest as ExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse as ExportManifestResponse -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult as ExportManifestResponseResult -from workato_platform.client.workato_api.models.folder import Folder as Folder -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse as FolderAssetsResponse -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult as FolderAssetsResponseResult -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse as FolderCreationResponse -from workato_platform.client.workato_api.models.import_results import ImportResults as ImportResults -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse as OAuthUrlResponse -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData as OAuthUrlResponseData -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec as OpenApiSpec -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse as PackageDetailsResponse -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner as PackageDetailsResponseRecipeStatusInner -from workato_platform.client.workato_api.models.package_response import PackageResponse as PackageResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest as PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse as PicklistResponse -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector as PlatformConnector -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse as PlatformConnectorListResponse -from workato_platform.client.workato_api.models.project import Project as Project -from workato_platform.client.workato_api.models.recipe import Recipe as Recipe -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner as RecipeConfigInner -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest as RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse as RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse as RecipeStartResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest as RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse as RuntimeUserConnectionResponse -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData as RuntimeUserConnectionResponseData -from workato_platform.client.workato_api.models.success_response import SuccessResponse as SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest as UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.models.user import User as User -from workato_platform.client.workato_api.models.validation_error import ValidationError as ValidationError -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue as ValidationErrorErrorsValue - diff --git a/src/workato_platform/client/workato_api/api/__init__.py b/src/workato_platform/client/workato_api/api/__init__.py deleted file mode 100644 index a0e5380..0000000 --- a/src/workato_platform/client/workato_api/api/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# flake8: noqa - -# import apis into api package -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi -from workato_platform.client.workato_api.api.export_api import ExportApi -from workato_platform.client.workato_api.api.folders_api import FoldersApi -from workato_platform.client.workato_api.api.packages_api import PackagesApi -from workato_platform.client.workato_api.api.projects_api import ProjectsApi -from workato_platform.client.workato_api.api.properties_api import PropertiesApi -from workato_platform.client.workato_api.api.recipes_api import RecipesApi -from workato_platform.client.workato_api.api.users_api import UsersApi - diff --git a/src/workato_platform/client/workato_api/api/api_platform_api.py b/src/workato_platform/client/workato_api/api/api_platform_api.py deleted file mode 100644 index 8103398..0000000 --- a/src/workato_platform/client/workato_api/api/api_platform_api.py +++ /dev/null @@ -1,2875 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing import List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class APIPlatformApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def create_api_client( - self, - api_client_create_request: ApiClientCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiClientResponse: - """Create API client (v2) - - Create a new API client within a project with various authentication methods - - :param api_client_create_request: (required) - :type api_client_create_request: ApiClientCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_client_serialize( - api_client_create_request=api_client_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_api_client_with_http_info( - self, - api_client_create_request: ApiClientCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiClientResponse]: - """Create API client (v2) - - Create a new API client within a project with various authentication methods - - :param api_client_create_request: (required) - :type api_client_create_request: ApiClientCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_client_serialize( - api_client_create_request=api_client_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_api_client_without_preload_content( - self, - api_client_create_request: ApiClientCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create API client (v2) - - Create a new API client within a project with various authentication methods - - :param api_client_create_request: (required) - :type api_client_create_request: ApiClientCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_client_serialize( - api_client_create_request=api_client_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_api_client_serialize( - self, - api_client_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if api_client_create_request is not None: - _body_params = api_client_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/v2/api_clients', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def create_api_collection( - self, - api_collection_create_request: ApiCollectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiCollection: - """Create API collection - - Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. - - :param api_collection_create_request: (required) - :type api_collection_create_request: ApiCollectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_collection_serialize( - api_collection_create_request=api_collection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiCollection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_api_collection_with_http_info( - self, - api_collection_create_request: ApiCollectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiCollection]: - """Create API collection - - Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. - - :param api_collection_create_request: (required) - :type api_collection_create_request: ApiCollectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_collection_serialize( - api_collection_create_request=api_collection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiCollection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_api_collection_without_preload_content( - self, - api_collection_create_request: ApiCollectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create API collection - - Create a new API collection from an OpenAPI specification. This generates both recipes and endpoints from the provided spec. - - :param api_collection_create_request: (required) - :type api_collection_create_request: ApiCollectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_collection_serialize( - api_collection_create_request=api_collection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiCollection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_api_collection_serialize( - self, - api_collection_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if api_collection_create_request is not None: - _body_params = api_collection_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/api_collections', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def create_api_key( - self, - api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], - api_key_create_request: ApiKeyCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiKeyResponse: - """Create an API key - - Create a new API key for an API client - - :param api_client_id: Specify the ID of the API client to create the API key for (required) - :type api_client_id: int - :param api_key_create_request: (required) - :type api_key_create_request: ApiKeyCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_key_serialize( - api_client_id=api_client_id, - api_key_create_request=api_key_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_api_key_with_http_info( - self, - api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], - api_key_create_request: ApiKeyCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiKeyResponse]: - """Create an API key - - Create a new API key for an API client - - :param api_client_id: Specify the ID of the API client to create the API key for (required) - :type api_client_id: int - :param api_key_create_request: (required) - :type api_key_create_request: ApiKeyCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_key_serialize( - api_client_id=api_client_id, - api_key_create_request=api_key_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_api_key_without_preload_content( - self, - api_client_id: Annotated[StrictInt, Field(description="Specify the ID of the API client to create the API key for")], - api_key_create_request: ApiKeyCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create an API key - - Create a new API key for an API client - - :param api_client_id: Specify the ID of the API client to create the API key for (required) - :type api_client_id: int - :param api_key_create_request: (required) - :type api_key_create_request: ApiKeyCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_api_key_serialize( - api_client_id=api_client_id, - api_key_create_request=api_key_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_api_key_serialize( - self, - api_client_id, - api_key_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if api_client_id is not None: - _path_params['api_client_id'] = api_client_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if api_key_create_request is not None: - _body_params = api_key_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/v2/api_clients/{api_client_id}/api_keys', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def disable_api_endpoint( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Disable an API endpoint - - Disables an active API endpoint. The endpoint can no longer be called by a client. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._disable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def disable_api_endpoint_with_http_info( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Disable an API endpoint - - Disables an active API endpoint. The endpoint can no longer be called by a client. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._disable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def disable_api_endpoint_without_preload_content( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Disable an API endpoint - - Disables an active API endpoint. The endpoint can no longer be called by a client. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._disable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _disable_api_endpoint_serialize( - self, - api_endpoint_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if api_endpoint_id is not None: - _path_params['api_endpoint_id'] = api_endpoint_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/api_endpoints/{api_endpoint_id}/disable', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def enable_api_endpoint( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Enable an API endpoint - - Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def enable_api_endpoint_with_http_info( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Enable an API endpoint - - Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def enable_api_endpoint_without_preload_content( - self, - api_endpoint_id: Annotated[StrictInt, Field(description="ID of the API endpoint")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Enable an API endpoint - - Enables an API endpoint. You must start the associated recipe to enable the API endpoint successfully. - - :param api_endpoint_id: ID of the API endpoint (required) - :type api_endpoint_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enable_api_endpoint_serialize( - api_endpoint_id=api_endpoint_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _enable_api_endpoint_serialize( - self, - api_endpoint_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if api_endpoint_id is not None: - _path_params['api_endpoint_id'] = api_endpoint_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/api_endpoints/{api_endpoint_id}/enable', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_api_clients( - self, - project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, - cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiClientListResponse: - """List API clients (v2) - - List all API clients. This endpoint includes the project_id of the API client in the response. - - :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint - :type project_id: int - :param page: Page number - :type page: int - :param per_page: Page size. The maximum page size is 100 - :type per_page: int - :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles - :type cert_bundle_ids: List[int] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_clients_serialize( - project_id=project_id, - page=page, - per_page=per_page, - cert_bundle_ids=cert_bundle_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_api_clients_with_http_info( - self, - project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, - cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiClientListResponse]: - """List API clients (v2) - - List all API clients. This endpoint includes the project_id of the API client in the response. - - :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint - :type project_id: int - :param page: Page number - :type page: int - :param per_page: Page size. The maximum page size is 100 - :type per_page: int - :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles - :type cert_bundle_ids: List[int] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_clients_serialize( - project_id=project_id, - page=page, - per_page=per_page, - cert_bundle_ids=cert_bundle_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_api_clients_without_preload_content( - self, - project_id: Annotated[Optional[StrictInt], Field(description="The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. The maximum page size is 100")] = None, - cert_bundle_ids: Annotated[Optional[List[StrictInt]], Field(description="Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List API clients (v2) - - List all API clients. This endpoint includes the project_id of the API client in the response. - - :param project_id: The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint - :type project_id: int - :param page: Page number - :type page: int - :param per_page: Page size. The maximum page size is 100 - :type per_page: int - :param cert_bundle_ids: Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles - :type cert_bundle_ids: List[int] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_clients_serialize( - project_id=project_id, - page=page, - per_page=per_page, - cert_bundle_ids=cert_bundle_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiClientListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_api_clients_serialize( - self, - project_id, - page, - per_page, - cert_bundle_ids, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'cert_bundle_ids': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if project_id is not None: - - _query_params.append(('project_id', project_id)) - - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - if cert_bundle_ids is not None: - - _query_params.append(('cert_bundle_ids', cert_bundle_ids)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/v2/api_clients', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_api_collections( - self, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ApiCollection]: - """List API collections - - List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. - - :param per_page: Number of API collections to return in a single page - :type per_page: int - :param page: Page number of the API collections to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_collections_serialize( - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiCollection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_api_collections_with_http_info( - self, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ApiCollection]]: - """List API collections - - List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. - - :param per_page: Number of API collections to return in a single page - :type per_page: int - :param page: Page number of the API collections to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_collections_serialize( - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiCollection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_api_collections_without_preload_content( - self, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API collections to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API collections to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List API collections - - List all API collections. The endpoint returns the project_id of the project to which the collections belong in the response. - - :param per_page: Number of API collections to return in a single page - :type per_page: int - :param page: Page number of the API collections to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_collections_serialize( - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiCollection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_api_collections_serialize( - self, - per_page, - page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - if page is not None: - - _query_params.append(('page', page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/api_collections', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_api_endpoints( - self, - api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ApiEndpoint]: - """List API endpoints - - Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. - - :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned - :type api_collection_id: int - :param per_page: Number of API endpoints to return in a single page - :type per_page: int - :param page: Page number of the API endpoints to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_endpoints_serialize( - api_collection_id=api_collection_id, - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiEndpoint]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_api_endpoints_with_http_info( - self, - api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ApiEndpoint]]: - """List API endpoints - - Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. - - :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned - :type api_collection_id: int - :param per_page: Number of API endpoints to return in a single page - :type per_page: int - :param page: Page number of the API endpoints to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_endpoints_serialize( - api_collection_id=api_collection_id, - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiEndpoint]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_api_endpoints_without_preload_content( - self, - api_collection_id: Annotated[Optional[StrictInt], Field(description="ID of the API collection. If not provided, all API endpoints are returned")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Number of API endpoints to return in a single page")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number of the API endpoints to fetch")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List API endpoints - - Lists all API endpoints. Specify the api_collection_id to obtain the list of endpoints in a specific collection. - - :param api_collection_id: ID of the API collection. If not provided, all API endpoints are returned - :type api_collection_id: int - :param per_page: Number of API endpoints to return in a single page - :type per_page: int - :param page: Page number of the API endpoints to fetch - :type page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_endpoints_serialize( - api_collection_id=api_collection_id, - per_page=per_page, - page=page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiEndpoint]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_api_endpoints_serialize( - self, - api_collection_id, - per_page, - page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if api_collection_id is not None: - - _query_params.append(('api_collection_id', api_collection_id)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - if page is not None: - - _query_params.append(('page', page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/api_endpoints', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_api_keys( - self, - api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiKeyListResponse: - """List API keys - - Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. - - :param api_client_id: Filter API keys for a specific API client (required) - :type api_client_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_keys_serialize( - api_client_id=api_client_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_api_keys_with_http_info( - self, - api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiKeyListResponse]: - """List API keys - - Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. - - :param api_client_id: Filter API keys for a specific API client (required) - :type api_client_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_keys_serialize( - api_client_id=api_client_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_api_keys_without_preload_content( - self, - api_client_id: Annotated[StrictInt, Field(description="Filter API keys for a specific API client")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List API keys - - Retrieve all API keys for an API client. Provide the api_client_id parameter to filter keys for a specific client. - - :param api_client_id: Filter API keys for a specific API client (required) - :type api_client_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_api_keys_serialize( - api_client_id=api_client_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_api_keys_serialize( - self, - api_client_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if api_client_id is not None: - _path_params['api_client_id'] = api_client_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/v2/api_clients/{api_client_id}/api_keys', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def refresh_api_key_secret( - self, - api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], - api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiKeyResponse: - """Refresh API key secret - - Refresh the authentication token or OAuth 2.0 client secret for an API key. - - :param api_client_id: ID of the API client that owns the API key (required) - :type api_client_id: int - :param api_key_id: ID of the API key to refresh (required) - :type api_key_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_api_key_secret_serialize( - api_client_id=api_client_id, - api_key_id=api_key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def refresh_api_key_secret_with_http_info( - self, - api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], - api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiKeyResponse]: - """Refresh API key secret - - Refresh the authentication token or OAuth 2.0 client secret for an API key. - - :param api_client_id: ID of the API client that owns the API key (required) - :type api_client_id: int - :param api_key_id: ID of the API key to refresh (required) - :type api_key_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_api_key_secret_serialize( - api_client_id=api_client_id, - api_key_id=api_key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def refresh_api_key_secret_without_preload_content( - self, - api_client_id: Annotated[StrictInt, Field(description="ID of the API client that owns the API key")], - api_key_id: Annotated[StrictInt, Field(description="ID of the API key to refresh")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Refresh API key secret - - Refresh the authentication token or OAuth 2.0 client secret for an API key. - - :param api_client_id: ID of the API client that owns the API key (required) - :type api_client_id: int - :param api_key_id: ID of the API key to refresh (required) - :type api_key_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_api_key_secret_serialize( - api_client_id=api_client_id, - api_key_id=api_key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiKeyResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _refresh_api_key_secret_serialize( - self, - api_client_id, - api_key_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if api_client_id is not None: - _path_params['api_client_id'] = api_client_id - if api_key_id is not None: - _path_params['api_key_id'] = api_key_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/connections_api.py b/src/workato_platform/client/workato_api/api/connections_api.py deleted file mode 100644 index 467e9a4..0000000 --- a/src/workato_platform/client/workato_api/api/connections_api.py +++ /dev/null @@ -1,1807 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class ConnectionsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def create_connection( - self, - connection_create_request: ConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Connection: - """Create a connection - - Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. - - :param connection_create_request: (required) - :type connection_create_request: ConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_connection_serialize( - connection_create_request=connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_connection_with_http_info( - self, - connection_create_request: ConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Connection]: - """Create a connection - - Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. - - :param connection_create_request: (required) - :type connection_create_request: ConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_connection_serialize( - connection_create_request=connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_connection_without_preload_content( - self, - connection_create_request: ConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a connection - - Create a new connection. Supports creating shell connections or fully authenticated connections. Does not support OAuth connections for authentication, but can create shell connections for OAuth providers. - - :param connection_create_request: (required) - :type connection_create_request: ConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_connection_serialize( - connection_create_request=connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_connection_serialize( - self, - connection_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if connection_create_request is not None: - _body_params = connection_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/connections', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def create_runtime_user_connection( - self, - runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RuntimeUserConnectionResponse: - """Create OAuth runtime user connection - - Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. - - :param runtime_user_connection_create_request: (required) - :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_runtime_user_connection_serialize( - runtime_user_connection_create_request=runtime_user_connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RuntimeUserConnectionResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_runtime_user_connection_with_http_info( - self, - runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RuntimeUserConnectionResponse]: - """Create OAuth runtime user connection - - Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. - - :param runtime_user_connection_create_request: (required) - :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_runtime_user_connection_serialize( - runtime_user_connection_create_request=runtime_user_connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RuntimeUserConnectionResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_runtime_user_connection_without_preload_content( - self, - runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create OAuth runtime user connection - - Creates an OAuth runtime user connection. The parent connection must be an established OAuth connection. This initiates the OAuth flow and provides a URL for end user authorization. - - :param runtime_user_connection_create_request: (required) - :type runtime_user_connection_create_request: RuntimeUserConnectionCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_runtime_user_connection_serialize( - runtime_user_connection_create_request=runtime_user_connection_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RuntimeUserConnectionResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_runtime_user_connection_serialize( - self, - runtime_user_connection_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if runtime_user_connection_create_request is not None: - _body_params = runtime_user_connection_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/connections/runtime_user_connections', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def get_connection_oauth_url( - self, - connection_id: Annotated[StrictInt, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OAuthUrlResponse: - """Get OAuth URL for connection - - Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. - - :param connection_id: Connection ID (required) - :type connection_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_oauth_url_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthUrlResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def get_connection_oauth_url_with_http_info( - self, - connection_id: Annotated[StrictInt, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OAuthUrlResponse]: - """Get OAuth URL for connection - - Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. - - :param connection_id: Connection ID (required) - :type connection_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_oauth_url_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthUrlResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def get_connection_oauth_url_without_preload_content( - self, - connection_id: Annotated[StrictInt, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get OAuth URL for connection - - Get the OAuth URL for a runtime user connection. This endpoint is used to retrieve the OAuth authorization URL for establishing or re-authorizing a connection. - - :param connection_id: Connection ID (required) - :type connection_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_oauth_url_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthUrlResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_connection_oauth_url_serialize( - self, - connection_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if connection_id is not None: - _path_params['connection_id'] = connection_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/connections/runtime_user_connections/{connection_id}/get_oauth_url', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def get_connection_picklist( - self, - connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], - picklist_request: PicklistRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PicklistResponse: - """Get picklist values - - Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. - - :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) - :type connection_id: int - :param picklist_request: (required) - :type picklist_request: PicklistRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_picklist_serialize( - connection_id=connection_id, - picklist_request=picklist_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PicklistResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def get_connection_picklist_with_http_info( - self, - connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], - picklist_request: PicklistRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PicklistResponse]: - """Get picklist values - - Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. - - :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) - :type connection_id: int - :param picklist_request: (required) - :type picklist_request: PicklistRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_picklist_serialize( - connection_id=connection_id, - picklist_request=picklist_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PicklistResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def get_connection_picklist_without_preload_content( - self, - connection_id: Annotated[StrictInt, Field(description="ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. ")], - picklist_request: PicklistRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get picklist values - - Obtains a list of picklist values for a specified connection in a workspace. This endpoint allows you to retrieve dynamic lists of values that can be used in forms or dropdowns for the connected application. - - :param connection_id: ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. (required) - :type connection_id: int - :param picklist_request: (required) - :type picklist_request: PicklistRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_picklist_serialize( - connection_id=connection_id, - picklist_request=picklist_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PicklistResponse", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_connection_picklist_serialize( - self, - connection_id, - picklist_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if connection_id is not None: - _path_params['connection_id'] = connection_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if picklist_request is not None: - _body_params = picklist_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/connections/{connection_id}/pick_list', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_connections( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, - external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, - include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Connection]: - """List connections - - Returns all connections and associated data for the authenticated user - - :param folder_id: Folder ID of the connection - :type folder_id: int - :param parent_id: Parent ID of the connection (must be same provider) - :type parent_id: int - :param external_id: External identifier for the connection - :type external_id: str - :param include_runtime_connections: When \"true\", include all runtime user connections - :type include_runtime_connections: bool - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connections_serialize( - folder_id=folder_id, - parent_id=parent_id, - external_id=external_id, - include_runtime_connections=include_runtime_connections, - includes=includes, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Connection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_connections_with_http_info( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, - external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, - include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[Connection]]: - """List connections - - Returns all connections and associated data for the authenticated user - - :param folder_id: Folder ID of the connection - :type folder_id: int - :param parent_id: Parent ID of the connection (must be same provider) - :type parent_id: int - :param external_id: External identifier for the connection - :type external_id: str - :param include_runtime_connections: When \"true\", include all runtime user connections - :type include_runtime_connections: bool - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connections_serialize( - folder_id=folder_id, - parent_id=parent_id, - external_id=external_id, - include_runtime_connections=include_runtime_connections, - includes=includes, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Connection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_connections_without_preload_content( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="Folder ID of the connection")] = None, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent ID of the connection (must be same provider)")] = None, - external_id: Annotated[Optional[StrictStr], Field(description="External identifier for the connection")] = None, - include_runtime_connections: Annotated[Optional[StrictBool], Field(description="When \"true\", include all runtime user connections")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List connections - - Returns all connections and associated data for the authenticated user - - :param folder_id: Folder ID of the connection - :type folder_id: int - :param parent_id: Parent ID of the connection (must be same provider) - :type parent_id: int - :param external_id: External identifier for the connection - :type external_id: str - :param include_runtime_connections: When \"true\", include all runtime user connections - :type include_runtime_connections: bool - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connections_serialize( - folder_id=folder_id, - parent_id=parent_id, - external_id=external_id, - include_runtime_connections=include_runtime_connections, - includes=includes, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Connection]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_connections_serialize( - self, - folder_id, - parent_id, - external_id, - include_runtime_connections, - includes, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'includes[]': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if folder_id is not None: - - _query_params.append(('folder_id', folder_id)) - - if parent_id is not None: - - _query_params.append(('parent_id', parent_id)) - - if external_id is not None: - - _query_params.append(('external_id', external_id)) - - if include_runtime_connections is not None: - - _query_params.append(('include_runtime_connections', include_runtime_connections)) - - if includes is not None: - - _query_params.append(('includes[]', includes)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/connections', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def update_connection( - self, - connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], - connection_update_request: Optional[ConnectionUpdateRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Connection: - """Update a connection - - Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. - - :param connection_id: The ID of the connection (required) - :type connection_id: int - :param connection_update_request: - :type connection_update_request: ConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_connection_serialize( - connection_id=connection_id, - connection_update_request=connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def update_connection_with_http_info( - self, - connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], - connection_update_request: Optional[ConnectionUpdateRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Connection]: - """Update a connection - - Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. - - :param connection_id: The ID of the connection (required) - :type connection_id: int - :param connection_update_request: - :type connection_update_request: ConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_connection_serialize( - connection_id=connection_id, - connection_update_request=connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def update_connection_without_preload_content( - self, - connection_id: Annotated[StrictInt, Field(description="The ID of the connection")], - connection_update_request: Optional[ConnectionUpdateRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update a connection - - Updates a connection in a non-embedded workspace. Allows updating connection metadata and parameters without requiring full re-creation. - - :param connection_id: The ID of the connection (required) - :type connection_id: int - :param connection_update_request: - :type connection_update_request: ConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_connection_serialize( - connection_id=connection_id, - connection_update_request=connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Connection", - '400': "ValidationError", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_connection_serialize( - self, - connection_id, - connection_update_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if connection_id is not None: - _path_params['connection_id'] = connection_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if connection_update_request is not None: - _body_params = connection_update_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/connections/{connection_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/connectors_api.py b/src/workato_platform/client/workato_api/api/connectors_api.py deleted file mode 100644 index e51fcb8..0000000 --- a/src/workato_platform/client/workato_api/api/connectors_api.py +++ /dev/null @@ -1,840 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing import Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class ConnectorsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def get_custom_connector_code( - self, - id: Annotated[StrictInt, Field(description="The ID of the custom connector")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CustomConnectorCodeResponse: - """Get custom connector code - - Fetch the code for a specific custom connector - - :param id: The ID of the custom connector (required) - :type id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_custom_connector_code_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorCodeResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def get_custom_connector_code_with_http_info( - self, - id: Annotated[StrictInt, Field(description="The ID of the custom connector")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CustomConnectorCodeResponse]: - """Get custom connector code - - Fetch the code for a specific custom connector - - :param id: The ID of the custom connector (required) - :type id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_custom_connector_code_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorCodeResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def get_custom_connector_code_without_preload_content( - self, - id: Annotated[StrictInt, Field(description="The ID of the custom connector")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get custom connector code - - Fetch the code for a specific custom connector - - :param id: The ID of the custom connector (required) - :type id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_custom_connector_code_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorCodeResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_custom_connector_code_serialize( - self, - id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/custom_connectors/{id}/code', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_custom_connectors( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CustomConnectorListResponse: - """List custom connectors - - Returns a list of all custom connectors - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_custom_connectors_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_custom_connectors_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CustomConnectorListResponse]: - """List custom connectors - - Returns a list of all custom connectors - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_custom_connectors_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_custom_connectors_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List custom connectors - - Returns a list of all custom connectors - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_custom_connectors_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CustomConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_custom_connectors_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/custom_connectors', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_platform_connectors( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PlatformConnectorListResponse: - """List platform connectors - - Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. - - :param page: Page number - :type page: int - :param per_page: Number of records per page (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_platform_connectors_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PlatformConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_platform_connectors_with_http_info( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PlatformConnectorListResponse]: - """List platform connectors - - Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. - - :param page: Page number - :type page: int - :param per_page: Number of records per page (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_platform_connectors_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PlatformConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_platform_connectors_without_preload_content( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of records per page (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List platform connectors - - Returns a paginated list of all connectors and associated metadata including triggers and actions. This includes both standard and platform connectors. - - :param page: Page number - :type page: int - :param per_page: Number of records per page (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_platform_connectors_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PlatformConnectorListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_platform_connectors_serialize( - self, - page, - per_page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/integrations/all', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/data_tables_api.py b/src/workato_platform/client/workato_api/api/data_tables_api.py deleted file mode 100644 index c47e59f..0000000 --- a/src/workato_platform/client/workato_api/api/data_tables_api.py +++ /dev/null @@ -1,604 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing import Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class DataTablesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def create_data_table( - self, - data_table_create_request: DataTableCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataTableCreateResponse: - """Create data table - - Creates a data table in a folder you specify - - :param data_table_create_request: (required) - :type data_table_create_request: DataTableCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_data_table_serialize( - data_table_create_request=data_table_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableCreateResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_data_table_with_http_info( - self, - data_table_create_request: DataTableCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataTableCreateResponse]: - """Create data table - - Creates a data table in a folder you specify - - :param data_table_create_request: (required) - :type data_table_create_request: DataTableCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_data_table_serialize( - data_table_create_request=data_table_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableCreateResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_data_table_without_preload_content( - self, - data_table_create_request: DataTableCreateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create data table - - Creates a data table in a folder you specify - - :param data_table_create_request: (required) - :type data_table_create_request: DataTableCreateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_data_table_serialize( - data_table_create_request=data_table_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableCreateResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_data_table_serialize( - self, - data_table_create_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if data_table_create_request is not None: - _body_params = data_table_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/data_tables', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_data_tables( - self, - page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataTableListResponse: - """List data tables - - Returns a list of all data tables in your workspace - - :param page: Page number of the data tables to fetch - :type page: int - :param per_page: Page size (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_data_tables_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_data_tables_with_http_info( - self, - page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataTableListResponse]: - """List data tables - - Returns a list of all data tables in your workspace - - :param page: Page number of the data tables to fetch - :type page: int - :param per_page: Page size (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_data_tables_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_data_tables_without_preload_content( - self, - page: Annotated[Optional[StrictInt], Field(description="Page number of the data tables to fetch")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size (max 100)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List data tables - - Returns a list of all data tables in your workspace - - :param page: Page number of the data tables to fetch - :type page: int - :param per_page: Page size (max 100) - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_data_tables_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DataTableListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_data_tables_serialize( - self, - page, - per_page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/data_tables', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/export_api.py b/src/workato_platform/client/workato_api/api/export_api.py deleted file mode 100644 index 60fb7fd..0000000 --- a/src/workato_platform/client/workato_api/api/export_api.py +++ /dev/null @@ -1,621 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictInt -from typing import Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class ExportApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def create_export_manifest( - self, - create_export_manifest_request: CreateExportManifestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ExportManifestResponse: - """Create an export manifest - - Create an export manifest for exporting assets - - :param create_export_manifest_request: (required) - :type create_export_manifest_request: CreateExportManifestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_export_manifest_serialize( - create_export_manifest_request=create_export_manifest_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ExportManifestResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_export_manifest_with_http_info( - self, - create_export_manifest_request: CreateExportManifestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ExportManifestResponse]: - """Create an export manifest - - Create an export manifest for exporting assets - - :param create_export_manifest_request: (required) - :type create_export_manifest_request: CreateExportManifestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_export_manifest_serialize( - create_export_manifest_request=create_export_manifest_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ExportManifestResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_export_manifest_without_preload_content( - self, - create_export_manifest_request: CreateExportManifestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create an export manifest - - Create an export manifest for exporting assets - - :param create_export_manifest_request: (required) - :type create_export_manifest_request: CreateExportManifestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_export_manifest_serialize( - create_export_manifest_request=create_export_manifest_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ExportManifestResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_export_manifest_serialize( - self, - create_export_manifest_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_export_manifest_request is not None: - _body_params = create_export_manifest_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/export_manifests', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_assets_in_folder( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, - include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, - include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderAssetsResponse: - """View assets in a folder - - View assets in a folder. Useful for creating or updating export manifests. - - :param folder_id: The ID of the folder containing the assets - :type folder_id: int - :param include_test_cases: Include test cases (currently not supported) - :type include_test_cases: bool - :param include_data: Include data from the list of assets - :type include_data: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_assets_in_folder_serialize( - folder_id=folder_id, - include_test_cases=include_test_cases, - include_data=include_data, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderAssetsResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_assets_in_folder_with_http_info( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, - include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, - include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderAssetsResponse]: - """View assets in a folder - - View assets in a folder. Useful for creating or updating export manifests. - - :param folder_id: The ID of the folder containing the assets - :type folder_id: int - :param include_test_cases: Include test cases (currently not supported) - :type include_test_cases: bool - :param include_data: Include data from the list of assets - :type include_data: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_assets_in_folder_serialize( - folder_id=folder_id, - include_test_cases=include_test_cases, - include_data=include_data, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderAssetsResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_assets_in_folder_without_preload_content( - self, - folder_id: Annotated[Optional[StrictInt], Field(description="The ID of the folder containing the assets")] = None, - include_test_cases: Annotated[Optional[StrictBool], Field(description="Include test cases (currently not supported)")] = None, - include_data: Annotated[Optional[StrictBool], Field(description="Include data from the list of assets")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View assets in a folder - - View assets in a folder. Useful for creating or updating export manifests. - - :param folder_id: The ID of the folder containing the assets - :type folder_id: int - :param include_test_cases: Include test cases (currently not supported) - :type include_test_cases: bool - :param include_data: Include data from the list of assets - :type include_data: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_assets_in_folder_serialize( - folder_id=folder_id, - include_test_cases=include_test_cases, - include_data=include_data, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderAssetsResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_assets_in_folder_serialize( - self, - folder_id, - include_test_cases, - include_data, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if folder_id is not None: - - _query_params.append(('folder_id', folder_id)) - - if include_test_cases is not None: - - _query_params.append(('include_test_cases', include_test_cases)) - - if include_data is not None: - - _query_params.append(('include_data', include_data)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/export_manifests/folder_assets', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/folders_api.py b/src/workato_platform/client/workato_api/api/folders_api.py deleted file mode 100644 index b1cc3b5..0000000 --- a/src/workato_platform/client/workato_api/api/folders_api.py +++ /dev/null @@ -1,621 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing import List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class FoldersApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def create_folder( - self, - create_folder_request: CreateFolderRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderCreationResponse: - """Create a folder - - Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. - - :param create_folder_request: (required) - :type create_folder_request: CreateFolderRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_serialize( - create_folder_request=create_folder_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderCreationResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def create_folder_with_http_info( - self, - create_folder_request: CreateFolderRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderCreationResponse]: - """Create a folder - - Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. - - :param create_folder_request: (required) - :type create_folder_request: CreateFolderRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_serialize( - create_folder_request=create_folder_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderCreationResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def create_folder_without_preload_content( - self, - create_folder_request: CreateFolderRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a folder - - Creates a new folder in the specified parent folder. If no parent folder ID is specified, creates the folder as a top-level folder in the home folder. - - :param create_folder_request: (required) - :type create_folder_request: CreateFolderRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_serialize( - create_folder_request=create_folder_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderCreationResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_folder_serialize( - self, - create_folder_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_folder_request is not None: - _body_params = create_folder_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/folders', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_folders( - self, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Folder]: - """List folders - - Lists all folders. - - :param parent_id: Parent folder ID. Defaults to Home folder. - :type parent_id: int - :param page: Page number. Defaults to 1. - :type page: int - :param per_page: Page size. Defaults to 100 (maximum is 100). - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_folders_serialize( - parent_id=parent_id, - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Folder]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_folders_with_http_info( - self, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[Folder]]: - """List folders - - Lists all folders. - - :param parent_id: Parent folder ID. Defaults to Home folder. - :type parent_id: int - :param page: Page number. Defaults to 1. - :type page: int - :param per_page: Page size. Defaults to 100 (maximum is 100). - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_folders_serialize( - parent_id=parent_id, - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Folder]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_folders_without_preload_content( - self, - parent_id: Annotated[Optional[StrictInt], Field(description="Parent folder ID. Defaults to Home folder.")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number. Defaults to 1.")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True)]], Field(description="Page size. Defaults to 100 (maximum is 100).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List folders - - Lists all folders. - - :param parent_id: Parent folder ID. Defaults to Home folder. - :type parent_id: int - :param page: Page number. Defaults to 1. - :type page: int - :param per_page: Page size. Defaults to 100 (maximum is 100). - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_folders_serialize( - parent_id=parent_id, - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Folder]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_folders_serialize( - self, - parent_id, - page, - per_page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if parent_id is not None: - - _query_params.append(('parent_id', parent_id)) - - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/folders', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/packages_api.py b/src/workato_platform/client/workato_api/api/packages_api.py deleted file mode 100644 index def7dab..0000000 --- a/src/workato_platform/client/workato_api/api/packages_api.py +++ /dev/null @@ -1,1197 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr -from typing import Optional, Tuple, Union -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.models.package_response import PackageResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class PackagesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def download_package( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Download package - - Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '302': None, - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def download_package_with_http_info( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Download package - - Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '302': None, - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def download_package_without_preload_content( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Download package - - Downloads a package. Returns a redirect to the package content or the binary content directly. Use the -L flag in cURL to follow redirects. - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '302': None, - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_package_serialize( - self, - package_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if package_id is not None: - _path_params['package_id'] = package_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zip', - 'application/octet-stream', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/packages/{package_id}/download', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def export_package( - self, - id: Annotated[StrictStr, Field(description="Export manifest ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PackageResponse: - """Export a package based on a manifest - - Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. - - :param id: Export manifest ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._export_package_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def export_package_with_http_info( - self, - id: Annotated[StrictStr, Field(description="Export manifest ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PackageResponse]: - """Export a package based on a manifest - - Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. - - :param id: Export manifest ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._export_package_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def export_package_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="Export manifest ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Export a package based on a manifest - - Export a package based on a manifest. **ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** When you provide an API client with privileges to this endpoint, the API client is also granted the ability to view other assets like recipes, lookup tables, Event topics, and message templates by examining the resulting zip file. This is an asynchronous request. Use GET package by ID endpoint to get details of the exported package. **INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** To include tags in the exported package, set the include_tags attribute to true when calling the Create an export manifest endpoint. - - :param id: Export manifest ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._export_package_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _export_package_serialize( - self, - id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/packages/export/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def get_package( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PackageDetailsResponse: - """Get package details - - Get details of an imported or exported package including status - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageDetailsResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def get_package_with_http_info( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PackageDetailsResponse]: - """Get package details - - Get details of an imported or exported package including status - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageDetailsResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def get_package_without_preload_content( - self, - package_id: Annotated[StrictInt, Field(description="Package ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get package details - - Get details of an imported or exported package including status - - :param package_id: Package ID (required) - :type package_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_package_serialize( - package_id=package_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageDetailsResponse", - '401': "Error", - '404': None, - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_package_serialize( - self, - package_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if package_id is not None: - _path_params['package_id'] = package_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/packages/{package_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def import_package( - self, - id: Annotated[StrictInt, Field(description="Folder ID")], - body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, - include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, - folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PackageResponse: - """Import a package into a folder - - Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. - - :param id: Folder ID (required) - :type id: int - :param body: (required) - :type body: bytearray - :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. - :type restart_recipes: bool - :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. - :type include_tags: bool - :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. - :type folder_id_for_home_assets: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_package_serialize( - id=id, - body=body, - restart_recipes=restart_recipes, - include_tags=include_tags, - folder_id_for_home_assets=folder_id_for_home_assets, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def import_package_with_http_info( - self, - id: Annotated[StrictInt, Field(description="Folder ID")], - body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, - include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, - folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PackageResponse]: - """Import a package into a folder - - Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. - - :param id: Folder ID (required) - :type id: int - :param body: (required) - :type body: bytearray - :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. - :type restart_recipes: bool - :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. - :type include_tags: bool - :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. - :type folder_id_for_home_assets: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_package_serialize( - id=id, - body=body, - restart_recipes=restart_recipes, - include_tags=include_tags, - folder_id_for_home_assets=folder_id_for_home_assets, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def import_package_without_preload_content( - self, - id: Annotated[StrictInt, Field(description="Folder ID")], - body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - restart_recipes: Annotated[Optional[StrictBool], Field(description="Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. ")] = None, - include_tags: Annotated[Optional[StrictBool], Field(description="Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. ")] = None, - folder_id_for_home_assets: Annotated[Optional[StrictInt], Field(description="The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Import a package into a folder - - Import a package in zip file format into a folder. This endpoint allows an API client to create or update assets, such as recipes, lookup tables, event topics, and message templates, through package imports. This is an asynchronous request. Use GET package by ID endpoint to get details of the imported package. The input (zip file) is an application/octet-stream payload containing package content. - - :param id: Folder ID (required) - :type id: int - :param body: (required) - :type body: bytearray - :param restart_recipes: Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. - :type restart_recipes: bool - :param include_tags: Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. - :type include_tags: bool - :param folder_id_for_home_assets: The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. - :type folder_id_for_home_assets: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_package_serialize( - id=id, - body=body, - restart_recipes=restart_recipes, - include_tags=include_tags, - folder_id_for_home_assets=folder_id_for_home_assets, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PackageResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _import_package_serialize( - self, - id, - body, - restart_recipes, - include_tags, - folder_id_for_home_assets, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - if restart_recipes is not None: - - _query_params.append(('restart_recipes', restart_recipes)) - - if include_tags is not None: - - _query_params.append(('include_tags', include_tags)) - - if folder_id_for_home_assets is not None: - - _query_params.append(('folder_id_for_home_assets', folder_id_for_home_assets)) - - # process the header parameters - # process the form parameters - # process the body parameter - if body is not None: - # convert to byte array if the input is a file name (str) - if isinstance(body, str): - with open(body, "rb") as _fp: - _body_params = _fp.read() - elif isinstance(body, tuple): - # drop the filename from the tuple - _body_params = body[1] - else: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/octet-stream' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/packages/import/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/projects_api.py b/src/workato_platform/client/workato_api/api/projects_api.py deleted file mode 100644 index b9770ec..0000000 --- a/src/workato_platform/client/workato_api/api/projects_api.py +++ /dev/null @@ -1,590 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing import List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class ProjectsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def delete_project( - self, - project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Delete a project - - Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. - - :param project_id: The ID of the project to delete (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_project_serialize( - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - '403': "DeleteProject403Response", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def delete_project_with_http_info( - self, - project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Delete a project - - Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. - - :param project_id: The ID of the project to delete (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_project_serialize( - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - '403': "DeleteProject403Response", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def delete_project_without_preload_content( - self, - project_id: Annotated[StrictInt, Field(description="The ID of the project to delete")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete a project - - Delete a project and all of its contents. This includes all child folders, recipes, connections, and Workflow apps assets inside the project. - - :param project_id: The ID of the project to delete (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_project_serialize( - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '401': "Error", - '403': "DeleteProject403Response", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_project_serialize( - self, - project_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if project_id is not None: - _path_params['project_id'] = project_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/projects/{project_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def list_projects( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Project]: - """List projects - - Returns a list of projects belonging to the authenticated user with pagination support - - :param page: Page number - :type page: int - :param per_page: Number of projects per page - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_projects_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Project]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_projects_with_http_info( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[Project]]: - """List projects - - Returns a list of projects belonging to the authenticated user with pagination support - - :param page: Page number - :type page: int - :param per_page: Number of projects per page - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_projects_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Project]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_projects_without_preload_content( - self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of projects per page")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List projects - - Returns a list of projects belonging to the authenticated user with pagination support - - :param page: Page number - :type page: int - :param per_page: Number of projects per page - :type per_page: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_projects_serialize( - page=page, - per_page=per_page, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Project]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_projects_serialize( - self, - page, - per_page, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/projects', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/properties_api.py b/src/workato_platform/client/workato_api/api/properties_api.py deleted file mode 100644 index 2f35eb0..0000000 --- a/src/workato_platform/client/workato_api/api/properties_api.py +++ /dev/null @@ -1,620 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, StrictStr -from typing import Dict -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class PropertiesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def list_project_properties( - self, - prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], - project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, str]: - """List project properties - - Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. - - :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) - :type prefix: str - :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_properties_serialize( - prefix=prefix, - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, str]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_project_properties_with_http_info( - self, - prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], - project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, str]]: - """List project properties - - Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. - - :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) - :type prefix: str - :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_properties_serialize( - prefix=prefix, - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, str]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_project_properties_without_preload_content( - self, - prefix: Annotated[StrictStr, Field(description="Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. ")], - project_id: Annotated[StrictInt, Field(description="Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. ")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List project properties - - Returns a list of project-level properties belonging to a specific project in a customer workspace that matches a project_id you specify. You must also include a prefix. For example, if you provide the prefix salesforce_sync., any project property with a name beginning with salesforce_sync., such as salesforce_sync.admin_email, with the project_id you provided is returned. - - :param prefix: Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. (required) - :type prefix: str - :param project_id: Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. (required) - :type project_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_properties_serialize( - prefix=prefix, - project_id=project_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, str]", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_project_properties_serialize( - self, - prefix, - project_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if prefix is not None: - - _query_params.append(('prefix', prefix)) - - if project_id is not None: - - _query_params.append(('project_id', project_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/properties', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def upsert_project_properties( - self, - project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], - upsert_project_properties_request: UpsertProjectPropertiesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Upsert project properties - - Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters - - :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) - :type project_id: int - :param upsert_project_properties_request: (required) - :type upsert_project_properties_request: UpsertProjectPropertiesRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._upsert_project_properties_serialize( - project_id=project_id, - upsert_project_properties_request=upsert_project_properties_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def upsert_project_properties_with_http_info( - self, - project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], - upsert_project_properties_request: UpsertProjectPropertiesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Upsert project properties - - Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters - - :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) - :type project_id: int - :param upsert_project_properties_request: (required) - :type upsert_project_properties_request: UpsertProjectPropertiesRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._upsert_project_properties_serialize( - project_id=project_id, - upsert_project_properties_request=upsert_project_properties_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def upsert_project_properties_without_preload_content( - self, - project_id: Annotated[StrictInt, Field(description="Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. ")], - upsert_project_properties_request: UpsertProjectPropertiesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Upsert project properties - - Upserts project properties belonging to a specific project in a customer workspace that matches a project_id you specify. This endpoint maps to properties based on the names you provide in the request. ## Property Limits - Maximum number of project properties per project: 1,000 - Maximum length of project property name: 100 characters - Maximum length of project property value: 1,024 characters - - :param project_id: Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. (required) - :type project_id: int - :param upsert_project_properties_request: (required) - :type upsert_project_properties_request: UpsertProjectPropertiesRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._upsert_project_properties_serialize( - project_id=project_id, - upsert_project_properties_request=upsert_project_properties_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "ValidationError", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _upsert_project_properties_serialize( - self, - project_id, - upsert_project_properties_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if project_id is not None: - - _query_params.append(('project_id', project_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - if upsert_project_properties_request is not None: - _body_params = upsert_project_properties_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/properties', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/recipes_api.py b/src/workato_platform/client/workato_api/api/recipes_api.py deleted file mode 100644 index d2ff2b6..0000000 --- a/src/workato_platform/client/workato_api/api/recipes_api.py +++ /dev/null @@ -1,1379 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from datetime import datetime -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class RecipesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def list_recipes( - self, - adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, - adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, - folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, - order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, - running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, - since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, - stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, - stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, - updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RecipeListResponse: - """List recipes - - Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. - - :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) - :type adapter_names_all: str - :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) - :type adapter_names_any: str - :param folder_id: Return recipes in specified folder - :type folder_id: int - :param order: Set ordering method - :type order: str - :param page: Page number - :type page: int - :param per_page: Number of recipes per page - :type per_page: int - :param running: If true, returns only running recipes - :type running: bool - :param since_id: Return recipes with IDs lower than this value - :type since_id: int - :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) - :type stopped_after: datetime - :param stop_cause: Filter by stop reason - :type stop_cause: str - :param updated_after: Include recipes updated after this date (ISO 8601 format) - :type updated_after: datetime - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param exclude_code: Exclude recipe code from response for better performance - :type exclude_code: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_recipes_serialize( - adapter_names_all=adapter_names_all, - adapter_names_any=adapter_names_any, - folder_id=folder_id, - order=order, - page=page, - per_page=per_page, - running=running, - since_id=since_id, - stopped_after=stopped_after, - stop_cause=stop_cause, - updated_after=updated_after, - includes=includes, - exclude_code=exclude_code, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def list_recipes_with_http_info( - self, - adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, - adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, - folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, - order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, - running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, - since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, - stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, - stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, - updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RecipeListResponse]: - """List recipes - - Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. - - :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) - :type adapter_names_all: str - :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) - :type adapter_names_any: str - :param folder_id: Return recipes in specified folder - :type folder_id: int - :param order: Set ordering method - :type order: str - :param page: Page number - :type page: int - :param per_page: Number of recipes per page - :type per_page: int - :param running: If true, returns only running recipes - :type running: bool - :param since_id: Return recipes with IDs lower than this value - :type since_id: int - :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) - :type stopped_after: datetime - :param stop_cause: Filter by stop reason - :type stop_cause: str - :param updated_after: Include recipes updated after this date (ISO 8601 format) - :type updated_after: datetime - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param exclude_code: Exclude recipe code from response for better performance - :type exclude_code: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_recipes_serialize( - adapter_names_all=adapter_names_all, - adapter_names_any=adapter_names_any, - folder_id=folder_id, - order=order, - page=page, - per_page=per_page, - running=running, - since_id=since_id, - stopped_after=stopped_after, - stop_cause=stop_cause, - updated_after=updated_after, - includes=includes, - exclude_code=exclude_code, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def list_recipes_without_preload_content( - self, - adapter_names_all: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ALL)")] = None, - adapter_names_any: Annotated[Optional[StrictStr], Field(description="Comma-separated adapter names (recipes must use ANY)")] = None, - folder_id: Annotated[Optional[StrictInt], Field(description="Return recipes in specified folder")] = None, - order: Annotated[Optional[StrictStr], Field(description="Set ordering method")] = None, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None, - per_page: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of recipes per page")] = None, - running: Annotated[Optional[StrictBool], Field(description="If true, returns only running recipes")] = None, - since_id: Annotated[Optional[StrictInt], Field(description="Return recipes with IDs lower than this value")] = None, - stopped_after: Annotated[Optional[datetime], Field(description="Exclude recipes stopped after this date (ISO 8601 format)")] = None, - stop_cause: Annotated[Optional[StrictStr], Field(description="Filter by stop reason")] = None, - updated_after: Annotated[Optional[datetime], Field(description="Include recipes updated after this date (ISO 8601 format)")] = None, - includes: Annotated[Optional[List[StrictStr]], Field(description="Additional fields to include (e.g., tags)")] = None, - exclude_code: Annotated[Optional[StrictBool], Field(description="Exclude recipe code from response for better performance")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List recipes - - Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. - - :param adapter_names_all: Comma-separated adapter names (recipes must use ALL) - :type adapter_names_all: str - :param adapter_names_any: Comma-separated adapter names (recipes must use ANY) - :type adapter_names_any: str - :param folder_id: Return recipes in specified folder - :type folder_id: int - :param order: Set ordering method - :type order: str - :param page: Page number - :type page: int - :param per_page: Number of recipes per page - :type per_page: int - :param running: If true, returns only running recipes - :type running: bool - :param since_id: Return recipes with IDs lower than this value - :type since_id: int - :param stopped_after: Exclude recipes stopped after this date (ISO 8601 format) - :type stopped_after: datetime - :param stop_cause: Filter by stop reason - :type stop_cause: str - :param updated_after: Include recipes updated after this date (ISO 8601 format) - :type updated_after: datetime - :param includes: Additional fields to include (e.g., tags) - :type includes: List[str] - :param exclude_code: Exclude recipe code from response for better performance - :type exclude_code: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_recipes_serialize( - adapter_names_all=adapter_names_all, - adapter_names_any=adapter_names_any, - folder_id=folder_id, - order=order, - page=page, - per_page=per_page, - running=running, - since_id=since_id, - stopped_after=stopped_after, - stop_cause=stop_cause, - updated_after=updated_after, - includes=includes, - exclude_code=exclude_code, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeListResponse", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_recipes_serialize( - self, - adapter_names_all, - adapter_names_any, - folder_id, - order, - page, - per_page, - running, - since_id, - stopped_after, - stop_cause, - updated_after, - includes, - exclude_code, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'includes[]': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if adapter_names_all is not None: - - _query_params.append(('adapter_names_all', adapter_names_all)) - - if adapter_names_any is not None: - - _query_params.append(('adapter_names_any', adapter_names_any)) - - if folder_id is not None: - - _query_params.append(('folder_id', folder_id)) - - if order is not None: - - _query_params.append(('order', order)) - - if page is not None: - - _query_params.append(('page', page)) - - if per_page is not None: - - _query_params.append(('per_page', per_page)) - - if running is not None: - - _query_params.append(('running', running)) - - if since_id is not None: - - _query_params.append(('since_id', since_id)) - - if stopped_after is not None: - if isinstance(stopped_after, datetime): - _query_params.append( - ( - 'stopped_after', - stopped_after.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('stopped_after', stopped_after)) - - if stop_cause is not None: - - _query_params.append(('stop_cause', stop_cause)) - - if updated_after is not None: - if isinstance(updated_after, datetime): - _query_params.append( - ( - 'updated_after', - updated_after.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('updated_after', updated_after)) - - if includes is not None: - - _query_params.append(('includes[]', includes)) - - if exclude_code is not None: - - _query_params.append(('exclude_code', exclude_code)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/recipes', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def start_recipe( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RecipeStartResponse: - """Start a recipe - - Starts a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeStartResponse", - '400': "Error", - '401': "Error", - '422': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def start_recipe_with_http_info( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RecipeStartResponse]: - """Start a recipe - - Starts a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeStartResponse", - '400': "Error", - '401': "Error", - '422': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def start_recipe_without_preload_content( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start a recipe - - Starts a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RecipeStartResponse", - '400': "Error", - '401': "Error", - '422': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _start_recipe_serialize( - self, - recipe_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if recipe_id is not None: - _path_params['recipe_id'] = recipe_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/recipes/{recipe_id}/start', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def stop_recipe( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Stop a recipe - - Stops a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._stop_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '404': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def stop_recipe_with_http_info( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Stop a recipe - - Stops a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._stop_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '404': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def stop_recipe_without_preload_content( - self, - recipe_id: Annotated[StrictInt, Field(description="Recipe ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Stop a recipe - - Stops a recipe specified by recipe ID - - :param recipe_id: Recipe ID (required) - :type recipe_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._stop_recipe_serialize( - recipe_id=recipe_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '404': "Error", - '500': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _stop_recipe_serialize( - self, - recipe_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if recipe_id is not None: - _path_params['recipe_id'] = recipe_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/recipes/{recipe_id}/stop', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - async def update_recipe_connection( - self, - recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], - recipe_connection_update_request: RecipeConnectionUpdateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SuccessResponse: - """Update a connection for a recipe - - Updates the chosen connection for a specific connector in a stopped recipe. - - :param recipe_id: ID of the recipe (required) - :type recipe_id: int - :param recipe_connection_update_request: (required) - :type recipe_connection_update_request: RecipeConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_recipe_connection_serialize( - recipe_id=recipe_id, - recipe_connection_update_request=recipe_connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '403': "Error", - '404': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def update_recipe_connection_with_http_info( - self, - recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], - recipe_connection_update_request: RecipeConnectionUpdateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SuccessResponse]: - """Update a connection for a recipe - - Updates the chosen connection for a specific connector in a stopped recipe. - - :param recipe_id: ID of the recipe (required) - :type recipe_id: int - :param recipe_connection_update_request: (required) - :type recipe_connection_update_request: RecipeConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_recipe_connection_serialize( - recipe_id=recipe_id, - recipe_connection_update_request=recipe_connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '403': "Error", - '404': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def update_recipe_connection_without_preload_content( - self, - recipe_id: Annotated[StrictInt, Field(description="ID of the recipe")], - recipe_connection_update_request: RecipeConnectionUpdateRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update a connection for a recipe - - Updates the chosen connection for a specific connector in a stopped recipe. - - :param recipe_id: ID of the recipe (required) - :type recipe_id: int - :param recipe_connection_update_request: (required) - :type recipe_connection_update_request: RecipeConnectionUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_recipe_connection_serialize( - recipe_id=recipe_id, - recipe_connection_update_request=recipe_connection_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SuccessResponse", - '400': "Error", - '401': "Error", - '403': "Error", - '404': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_recipe_connection_serialize( - self, - recipe_id, - recipe_connection_update_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if recipe_id is not None: - _path_params['recipe_id'] = recipe_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if recipe_connection_update_request is not None: - _body_params = recipe_connection_update_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/api/recipes/{recipe_id}/connect', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api/users_api.py b/src/workato_platform/client/workato_api/api/users_api.py deleted file mode 100644 index c1933fc..0000000 --- a/src/workato_platform/client/workato_api/api/users_api.py +++ /dev/null @@ -1,285 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from workato_platform.client.workato_api.models.user import User - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType - - -class UsersApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - async def get_workspace_details( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> User: - """Get current user information - - Returns information about the authenticated user - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_workspace_details_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "User", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - async def get_workspace_details_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[User]: - """Get current user information - - Returns information about the authenticated user - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_workspace_details_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "User", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - await response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - async def get_workspace_details_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get current user information - - Returns information about the authenticated user - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_workspace_details_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "User", - '401': "Error", - } - response_data = await self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_workspace_details_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/users/me', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/workato_platform/client/workato_api/api_client.py b/src/workato_platform/client/workato_api/api_client.py deleted file mode 100644 index ea849af..0000000 --- a/src/workato_platform/client/workato_api/api_client.py +++ /dev/null @@ -1,807 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile -import uuid - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from workato_platform.client.workato_api.configuration import Configuration -from workato_platform.client.workato_api.api_response import ApiResponse, T as ApiResponseT -import workato_platform.client.workato_api.models -from workato_platform.client.workato_api import rest -from workato_platform.client.workato_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - async def __aenter__(self): - return self - - async def __aexit__(self, exc_type, exc_value, traceback): - await self.close() - - async def close(self): - await self.rest_client.close() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - async def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = await self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, uuid.UUID): - return str(obj) - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - if isinstance(obj_dict, list): - # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() - return self.sanitize_for_serialization(obj_dict) - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(workato_platform.client.workato_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass is object: - return self.__deserialize_object(data) - elif klass is datetime.date: - return self.__deserialize_date(data) - elif klass is datetime.datetime: - return self.__deserialize_datetime(data) - elif klass is decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/src/workato_platform/client/workato_api/api_response.py b/src/workato_platform/client/workato_api/api_response.py deleted file mode 100644 index 9bc7c11..0000000 --- a/src/workato_platform/client/workato_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/src/workato_platform/client/workato_api/configuration.py b/src/workato_platform/client/workato_api/configuration.py deleted file mode 100644 index 7259fc9..0000000 --- a/src/workato_platform/client/workato_api/configuration.py +++ /dev/null @@ -1,601 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "BearerAuth": BearerAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "https://www.workato.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("workato_platform.client.workato_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = 100 - """This value is passed to the aiohttp to limit simultaneous connections. - Default values is 100, None means no-limit. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://www.workato.com", - 'description': "US Data Center", - }, - { - 'url': "https://app.eu.workato.com", - 'description': "EU Data Center", - }, - { - 'url': "https://app.jp.workato.com", - 'description': "JP Data Center", - }, - { - 'url': "https://app.sg.workato.com", - 'description': "SG Data Center", - }, - { - 'url': "https://app.au.workato.com", - 'description': "AU Data Center", - }, - { - 'url': "https://app.il.workato.com", - 'description': "IL Data Center", - }, - { - 'url': "https://app.trial.workato.com", - 'description': "Developer Sandbox", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/src/workato_platform/client/workato_api/docs/APIPlatformApi.md b/src/workato_platform/client/workato_api/docs/APIPlatformApi.md deleted file mode 100644 index 2d15179..0000000 --- a/src/workato_platform/client/workato_api/docs/APIPlatformApi.md +++ /dev/null @@ -1,844 +0,0 @@ -# workato_platform.client.workato_api.APIPlatformApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_api_client**](APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) -[**create_api_collection**](APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection -[**create_api_key**](APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key -[**disable_api_endpoint**](APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint -[**enable_api_endpoint**](APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint -[**list_api_clients**](APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) -[**list_api_collections**](APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections -[**list_api_endpoints**](APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints -[**list_api_keys**](APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys -[**refresh_api_key_secret**](APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret - - -# **create_api_client** -> ApiClientResponse create_api_client(api_client_create_request) - -Create API client (v2) - -Create a new API client within a project with various authentication methods - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | - - try: - # Create API client (v2) - api_response = await api_instance.create_api_client(api_client_create_request) - print("The response of APIPlatformApi->create_api_client:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->create_api_client: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_client_create_request** | [**ApiClientCreateRequest**](ApiClientCreateRequest.md)| | - -### Return type - -[**ApiClientResponse**](ApiClientResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API client created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_api_collection** -> ApiCollection create_api_collection(api_collection_create_request) - -Create API collection - -Create a new API collection from an OpenAPI specification. -This generates both recipes and endpoints from the provided spec. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_collection_create_request = workato_platform.client.workato_api.ApiCollectionCreateRequest() # ApiCollectionCreateRequest | - - try: - # Create API collection - api_response = await api_instance.create_api_collection(api_collection_create_request) - print("The response of APIPlatformApi->create_api_collection:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->create_api_collection: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_collection_create_request** | [**ApiCollectionCreateRequest**](ApiCollectionCreateRequest.md)| | - -### Return type - -[**ApiCollection**](ApiCollection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API collection created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_api_key** -> ApiKeyResponse create_api_key(api_client_id, api_key_create_request) - -Create an API key - -Create a new API key for an API client - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_id = 56 # int | Specify the ID of the API client to create the API key for - api_key_create_request = workato_platform.client.workato_api.ApiKeyCreateRequest() # ApiKeyCreateRequest | - - try: - # Create an API key - api_response = await api_instance.create_api_key(api_client_id, api_key_create_request) - print("The response of APIPlatformApi->create_api_key:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->create_api_key: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_client_id** | **int**| Specify the ID of the API client to create the API key for | - **api_key_create_request** | [**ApiKeyCreateRequest**](ApiKeyCreateRequest.md)| | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API key created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **disable_api_endpoint** -> SuccessResponse disable_api_endpoint(api_endpoint_id) - -Disable an API endpoint - -Disables an active API endpoint. The endpoint can no longer be called by a client. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_endpoint_id = 56 # int | ID of the API endpoint - - try: - # Disable an API endpoint - api_response = await api_instance.disable_api_endpoint(api_endpoint_id) - print("The response of APIPlatformApi->disable_api_endpoint:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->disable_api_endpoint: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_endpoint_id** | **int**| ID of the API endpoint | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API endpoint disabled successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enable_api_endpoint** -> SuccessResponse enable_api_endpoint(api_endpoint_id) - -Enable an API endpoint - -Enables an API endpoint. You must start the associated recipe to enable -the API endpoint successfully. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_endpoint_id = 56 # int | ID of the API endpoint - - try: - # Enable an API endpoint - api_response = await api_instance.enable_api_endpoint(api_endpoint_id) - print("The response of APIPlatformApi->enable_api_endpoint:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->enable_api_endpoint: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_endpoint_id** | **int**| ID of the API endpoint | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API endpoint enabled successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_api_clients** -> ApiClientListResponse list_api_clients(project_id=project_id, page=page, per_page=per_page, cert_bundle_ids=cert_bundle_ids) - -List API clients (v2) - -List all API clients. This endpoint includes the project_id of the API client -in the response. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - project_id = 56 # int | The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint (optional) - page = 1 # int | Page number (optional) (default to 1) - per_page = 100 # int | Page size. The maximum page size is 100 (optional) (default to 100) - cert_bundle_ids = [56] # List[int] | Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles (optional) - - try: - # List API clients (v2) - api_response = await api_instance.list_api_clients(project_id=project_id, page=page, per_page=per_page, cert_bundle_ids=cert_bundle_ids) - print("The response of APIPlatformApi->list_api_clients:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->list_api_clients: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **int**| The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **per_page** | **int**| Page size. The maximum page size is 100 | [optional] [default to 100] - **cert_bundle_ids** | [**List[int]**](int.md)| Filter clients by certificate bundle IDs. Returns only clients associated with the specified certificate bundles | [optional] - -### Return type - -[**ApiClientListResponse**](ApiClientListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of API clients retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_api_collections** -> List[ApiCollection] list_api_collections(per_page=per_page, page=page) - -List API collections - -List all API collections. The endpoint returns the project_id of the project -to which the collections belong in the response. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - per_page = 100 # int | Number of API collections to return in a single page (optional) (default to 100) - page = 1 # int | Page number of the API collections to fetch (optional) (default to 1) - - try: - # List API collections - api_response = await api_instance.list_api_collections(per_page=per_page, page=page) - print("The response of APIPlatformApi->list_api_collections:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->list_api_collections: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **per_page** | **int**| Number of API collections to return in a single page | [optional] [default to 100] - **page** | **int**| Page number of the API collections to fetch | [optional] [default to 1] - -### Return type - -[**List[ApiCollection]**](ApiCollection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of API collections retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_api_endpoints** -> List[ApiEndpoint] list_api_endpoints(api_collection_id=api_collection_id, per_page=per_page, page=page) - -List API endpoints - -Lists all API endpoints. Specify the api_collection_id to obtain the list -of endpoints in a specific collection. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_collection_id = 56 # int | ID of the API collection. If not provided, all API endpoints are returned (optional) - per_page = 100 # int | Number of API endpoints to return in a single page (optional) (default to 100) - page = 1 # int | Page number of the API endpoints to fetch (optional) (default to 1) - - try: - # List API endpoints - api_response = await api_instance.list_api_endpoints(api_collection_id=api_collection_id, per_page=per_page, page=page) - print("The response of APIPlatformApi->list_api_endpoints:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->list_api_endpoints: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_collection_id** | **int**| ID of the API collection. If not provided, all API endpoints are returned | [optional] - **per_page** | **int**| Number of API endpoints to return in a single page | [optional] [default to 100] - **page** | **int**| Page number of the API endpoints to fetch | [optional] [default to 1] - -### Return type - -[**List[ApiEndpoint]**](ApiEndpoint.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of API endpoints retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_api_keys** -> ApiKeyListResponse list_api_keys(api_client_id) - -List API keys - -Retrieve all API keys for an API client. Provide the api_client_id parameter -to filter keys for a specific client. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_id = 56 # int | Filter API keys for a specific API client - - try: - # List API keys - api_response = await api_instance.list_api_keys(api_client_id) - print("The response of APIPlatformApi->list_api_keys:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->list_api_keys: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_client_id** | **int**| Filter API keys for a specific API client | - -### Return type - -[**ApiKeyListResponse**](ApiKeyListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of API keys retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **refresh_api_key_secret** -> ApiKeyResponse refresh_api_key_secret(api_client_id, api_key_id) - -Refresh API key secret - -Refresh the authentication token or OAuth 2.0 client secret for an API key. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_id = 56 # int | ID of the API client that owns the API key - api_key_id = 56 # int | ID of the API key to refresh - - try: - # Refresh API key secret - api_response = await api_instance.refresh_api_key_secret(api_client_id, api_key_id) - print("The response of APIPlatformApi->refresh_api_key_secret:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APIPlatformApi->refresh_api_key_secret: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_client_id** | **int**| ID of the API client that owns the API key | - **api_key_id** | **int**| ID of the API key to refresh | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | API key secret refreshed successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/ApiClient.md b/src/workato_platform/client/workato_api/docs/ApiClient.md deleted file mode 100644 index ede7345..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClient.md +++ /dev/null @@ -1,46 +0,0 @@ -# ApiClient - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**description** | **str** | | [optional] -**active_api_keys_count** | **int** | | [optional] -**total_api_keys_count** | **int** | | [optional] -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**logo** | **str** | URL to the client's logo image | -**logo_2x** | **str** | URL to the client's high-resolution logo image | -**is_legacy** | **bool** | | -**email** | **str** | | [optional] -**auth_type** | **str** | | -**api_token** | **str** | API token (only returned for token auth type) | [optional] -**mtls_enabled** | **bool** | | [optional] -**validation_formula** | **str** | | [optional] -**cert_bundle_ids** | **List[int]** | | [optional] -**api_policies** | [**List[ApiClientApiPoliciesInner]**](ApiClientApiPoliciesInner.md) | List of API policies associated with the client | -**api_collections** | [**List[ApiClientApiCollectionsInner]**](ApiClientApiCollectionsInner.md) | List of API collections associated with the client | - -## Example - -```python -from workato_platform.client.workato_api.models.api_client import ApiClient - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClient from a JSON string -api_client_instance = ApiClient.from_json(json) -# print the JSON string representation of the object -print(ApiClient.to_json()) - -# convert the object into a dict -api_client_dict = api_client_instance.to_dict() -# create an instance of ApiClient from a dict -api_client_from_dict = ApiClient.from_dict(api_client_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md b/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md deleted file mode 100644 index c6117d1..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ApiClientApiCollectionsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClientApiCollectionsInner from a JSON string -api_client_api_collections_inner_instance = ApiClientApiCollectionsInner.from_json(json) -# print the JSON string representation of the object -print(ApiClientApiCollectionsInner.to_json()) - -# convert the object into a dict -api_client_api_collections_inner_dict = api_client_api_collections_inner_instance.to_dict() -# create an instance of ApiClientApiCollectionsInner from a dict -api_client_api_collections_inner_from_dict = ApiClientApiCollectionsInner.from_dict(api_client_api_collections_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md b/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md deleted file mode 100644 index f40a500..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ApiClientApiPoliciesInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClientApiPoliciesInner from a JSON string -api_client_api_policies_inner_instance = ApiClientApiPoliciesInner.from_json(json) -# print the JSON string representation of the object -print(ApiClientApiPoliciesInner.to_json()) - -# convert the object into a dict -api_client_api_policies_inner_dict = api_client_api_policies_inner_instance.to_dict() -# create an instance of ApiClientApiPoliciesInner from a dict -api_client_api_policies_inner_from_dict = ApiClientApiPoliciesInner.from_dict(api_client_api_policies_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md deleted file mode 100644 index b750791..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClientCreateRequest.md +++ /dev/null @@ -1,46 +0,0 @@ -# ApiClientCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the client | -**description** | **str** | Description of the client | [optional] -**project_id** | **int** | ID of the project to create the client in | [optional] -**api_portal_id** | **int** | ID of the API portal to assign the client | [optional] -**email** | **str** | Email address for the client (required if api_portal_id provided) | [optional] -**api_collection_ids** | **List[int]** | IDs of API collections to assign to the client | -**api_policy_id** | **int** | ID of the API policy to apply | [optional] -**auth_type** | **str** | Authentication method | -**jwt_method** | **str** | JWT signing method (required when auth_type is jwt) | [optional] -**jwt_secret** | **str** | HMAC shared secret or RSA public key (required when auth_type is jwt) | [optional] -**oidc_issuer** | **str** | Discovery URL for OIDC identity provider | [optional] -**oidc_jwks_uri** | **str** | JWKS URL for OIDC identity provider | [optional] -**access_profile_claim** | **str** | JWT claim key for access profile identification | [optional] -**required_claims** | **List[str]** | List of claims to enforce | [optional] -**allowed_issuers** | **List[str]** | List of allowed issuers | [optional] -**mtls_enabled** | **bool** | Whether mutual TLS is enabled | [optional] -**validation_formula** | **str** | Formula to validate client certificates | [optional] -**cert_bundle_ids** | **List[int]** | Certificate bundle IDs for mTLS | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClientCreateRequest from a JSON string -api_client_create_request_instance = ApiClientCreateRequest.from_json(json) -# print the JSON string representation of the object -print(ApiClientCreateRequest.to_json()) - -# convert the object into a dict -api_client_create_request_dict = api_client_create_request_instance.to_dict() -# create an instance of ApiClientCreateRequest from a dict -api_client_create_request_from_dict = ApiClientCreateRequest.from_dict(api_client_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md b/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md deleted file mode 100644 index 6d3346c..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClientListResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiClientListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ApiClient]**](ApiClient.md) | | -**count** | **int** | Total number of API clients | -**page** | **int** | Current page number | -**per_page** | **int** | Number of items per page | - -## Example - -```python -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClientListResponse from a JSON string -api_client_list_response_instance = ApiClientListResponse.from_json(json) -# print the JSON string representation of the object -print(ApiClientListResponse.to_json()) - -# convert the object into a dict -api_client_list_response_dict = api_client_list_response_instance.to_dict() -# create an instance of ApiClientListResponse from a dict -api_client_list_response_from_dict = ApiClientListResponse.from_dict(api_client_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiClientResponse.md b/src/workato_platform/client/workato_api/docs/ApiClientResponse.md deleted file mode 100644 index c979f83..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiClientResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiClientResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ApiClient**](ApiClient.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiClientResponse from a JSON string -api_client_response_instance = ApiClientResponse.from_json(json) -# print the JSON string representation of the object -print(ApiClientResponse.to_json()) - -# convert the object into a dict -api_client_response_dict = api_client_response_instance.to_dict() -# create an instance of ApiClientResponse from a dict -api_client_response_from_dict = ApiClientResponse.from_dict(api_client_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiCollection.md b/src/workato_platform/client/workato_api/docs/ApiCollection.md deleted file mode 100644 index c656934..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiCollection.md +++ /dev/null @@ -1,38 +0,0 @@ -# ApiCollection - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**project_id** | **str** | | -**url** | **str** | | -**api_spec_url** | **str** | | -**version** | **str** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**message** | **str** | Only present in creation/import responses | [optional] -**import_results** | [**ImportResults**](ImportResults.md) | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_collection import ApiCollection - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiCollection from a JSON string -api_collection_instance = ApiCollection.from_json(json) -# print the JSON string representation of the object -print(ApiCollection.to_json()) - -# convert the object into a dict -api_collection_dict = api_collection_instance.to_dict() -# create an instance of ApiCollection from a dict -api_collection_from_dict = ApiCollection.from_dict(api_collection_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md deleted file mode 100644 index 94b268e..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiCollectionCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the API collection | -**project_id** | **int** | ID of the project to associate the collection with | [optional] -**proxy_connection_id** | **int** | ID of a proxy connection for proxy mode | [optional] -**openapi_spec** | [**OpenApiSpec**](OpenApiSpec.md) | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiCollectionCreateRequest from a JSON string -api_collection_create_request_instance = ApiCollectionCreateRequest.from_json(json) -# print the JSON string representation of the object -print(ApiCollectionCreateRequest.to_json()) - -# convert the object into a dict -api_collection_create_request_dict = api_collection_create_request_instance.to_dict() -# create an instance of ApiCollectionCreateRequest from a dict -api_collection_create_request_from_dict = ApiCollectionCreateRequest.from_dict(api_collection_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiEndpoint.md b/src/workato_platform/client/workato_api/docs/ApiEndpoint.md deleted file mode 100644 index 9dbdfff..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiEndpoint.md +++ /dev/null @@ -1,41 +0,0 @@ -# ApiEndpoint - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**api_collection_id** | **int** | | -**flow_id** | **int** | | -**name** | **str** | | -**method** | **str** | | -**url** | **str** | | -**legacy_url** | **str** | | [optional] -**base_path** | **str** | | -**path** | **str** | | -**active** | **bool** | | -**legacy** | **bool** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | - -## Example - -```python -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiEndpoint from a JSON string -api_endpoint_instance = ApiEndpoint.from_json(json) -# print the JSON string representation of the object -print(ApiEndpoint.to_json()) - -# convert the object into a dict -api_endpoint_dict = api_endpoint_instance.to_dict() -# create an instance of ApiEndpoint from a dict -api_endpoint_from_dict = ApiEndpoint.from_dict(api_endpoint_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiKey.md b/src/workato_platform/client/workato_api/docs/ApiKey.md deleted file mode 100644 index 7c746e5..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiKey.md +++ /dev/null @@ -1,36 +0,0 @@ -# ApiKey - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**auth_type** | **str** | | -**ip_allow_list** | **List[str]** | List of IP addresses in the allowlist | [optional] -**ip_deny_list** | **List[str]** | List of IP addresses to deny requests from | [optional] -**active** | **bool** | | -**active_since** | **datetime** | | -**auth_token** | **str** | The generated API token | - -## Example - -```python -from workato_platform.client.workato_api.models.api_key import ApiKey - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKey from a JSON string -api_key_instance = ApiKey.from_json(json) -# print the JSON string representation of the object -print(ApiKey.to_json()) - -# convert the object into a dict -api_key_dict = api_key_instance.to_dict() -# create an instance of ApiKey from a dict -api_key_from_dict = ApiKey.from_dict(api_key_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md b/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md deleted file mode 100644 index be1c78f..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiKeyCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the API key | -**active** | **bool** | Indicates whether the API key is enabled or disabled. Disabled keys cannot call any APIs | -**ip_allow_list** | **List[str]** | List of IP addresses to add to the allowlist | [optional] -**ip_deny_list** | **List[str]** | List of IP addresses to deny requests from | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKeyCreateRequest from a JSON string -api_key_create_request_instance = ApiKeyCreateRequest.from_json(json) -# print the JSON string representation of the object -print(ApiKeyCreateRequest.to_json()) - -# convert the object into a dict -api_key_create_request_dict = api_key_create_request_instance.to_dict() -# create an instance of ApiKeyCreateRequest from a dict -api_key_create_request_from_dict = ApiKeyCreateRequest.from_dict(api_key_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md b/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md deleted file mode 100644 index e3d720a..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiKeyListResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiKeyListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ApiKey]**](ApiKey.md) | | -**count** | **int** | Total number of API keys | -**page** | **int** | Current page number | -**per_page** | **int** | Number of items per page | - -## Example - -```python -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKeyListResponse from a JSON string -api_key_list_response_instance = ApiKeyListResponse.from_json(json) -# print the JSON string representation of the object -print(ApiKeyListResponse.to_json()) - -# convert the object into a dict -api_key_list_response_dict = api_key_list_response_instance.to_dict() -# create an instance of ApiKeyListResponse from a dict -api_key_list_response_from_dict = ApiKeyListResponse.from_dict(api_key_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md b/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md deleted file mode 100644 index d2caff2..0000000 --- a/src/workato_platform/client/workato_api/docs/ApiKeyResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiKeyResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ApiKey**](ApiKey.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKeyResponse from a JSON string -api_key_response_instance = ApiKeyResponse.from_json(json) -# print the JSON string representation of the object -print(ApiKeyResponse.to_json()) - -# convert the object into a dict -api_key_response_dict = api_key_response_instance.to_dict() -# create an instance of ApiKeyResponse from a dict -api_key_response_from_dict = ApiKeyResponse.from_dict(api_key_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/Asset.md b/src/workato_platform/client/workato_api/docs/Asset.md deleted file mode 100644 index 826d944..0000000 --- a/src/workato_platform/client/workato_api/docs/Asset.md +++ /dev/null @@ -1,39 +0,0 @@ -# Asset - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**type** | **str** | | -**version** | **int** | | [optional] -**folder** | **str** | | [optional] -**absolute_path** | **str** | | [optional] -**root_folder** | **bool** | | -**unreachable** | **bool** | | [optional] -**zip_name** | **str** | | -**checked** | **bool** | | -**status** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.asset import Asset - -# TODO update the JSON string below -json = "{}" -# create an instance of Asset from a JSON string -asset_instance = Asset.from_json(json) -# print the JSON string representation of the object -print(Asset.to_json()) - -# convert the object into a dict -asset_dict = asset_instance.to_dict() -# create an instance of Asset from a dict -asset_from_dict = Asset.from_dict(asset_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/AssetReference.md b/src/workato_platform/client/workato_api/docs/AssetReference.md deleted file mode 100644 index fff1d09..0000000 --- a/src/workato_platform/client/workato_api/docs/AssetReference.md +++ /dev/null @@ -1,37 +0,0 @@ -# AssetReference - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | ID of the dependency | -**type** | **str** | Type of dependent asset | -**checked** | **bool** | Determines if the asset is included in the manifest | [optional] [default to True] -**version** | **int** | The version of the asset | [optional] -**folder** | **str** | The folder that contains the asset | [optional] [default to ''] -**absolute_path** | **str** | The absolute path of the asset | -**root_folder** | **bool** | Name root folder | [optional] [default to False] -**unreachable** | **bool** | Whether the asset is unreachable | [optional] [default to False] -**zip_name** | **str** | Name in the exported zip file | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.asset_reference import AssetReference - -# TODO update the JSON string below -json = "{}" -# create an instance of AssetReference from a JSON string -asset_reference_instance = AssetReference.from_json(json) -# print the JSON string representation of the object -print(AssetReference.to_json()) - -# convert the object into a dict -asset_reference_dict = asset_reference_instance.to_dict() -# create an instance of AssetReference from a dict -asset_reference_from_dict = AssetReference.from_dict(asset_reference_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/Connection.md b/src/workato_platform/client/workato_api/docs/Connection.md deleted file mode 100644 index 7762ced..0000000 --- a/src/workato_platform/client/workato_api/docs/Connection.md +++ /dev/null @@ -1,44 +0,0 @@ -# Connection - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**application** | **str** | | -**name** | **str** | | -**description** | **str** | | -**authorized_at** | **datetime** | | -**authorization_status** | **str** | | -**authorization_error** | **str** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**external_id** | **str** | | -**folder_id** | **int** | | -**connection_lost_at** | **datetime** | | -**connection_lost_reason** | **str** | | -**parent_id** | **int** | | -**provider** | **str** | | [optional] -**tags** | **List[str]** | | - -## Example - -```python -from workato_platform.client.workato_api.models.connection import Connection - -# TODO update the JSON string below -json = "{}" -# create an instance of Connection from a JSON string -connection_instance = Connection.from_json(json) -# print the JSON string representation of the object -print(Connection.to_json()) - -# convert the object into a dict -connection_dict = connection_instance.to_dict() -# create an instance of Connection from a dict -connection_from_dict = Connection.from_dict(connection_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md deleted file mode 100644 index 4b9fd14..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectionCreateRequest.md +++ /dev/null @@ -1,35 +0,0 @@ -# ConnectionCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the connection | -**provider** | **str** | The application type of the connection | -**parent_id** | **int** | The ID of the parent connection (must be same provider type) | [optional] -**folder_id** | **int** | The ID of the project or folder containing the connection | [optional] -**external_id** | **str** | The external ID assigned to the connection | [optional] -**shell_connection** | **bool** | Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. | [optional] [default to False] -**input** | **Dict[str, object]** | Connection parameters (varies by provider) | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionCreateRequest from a JSON string -connection_create_request_instance = ConnectionCreateRequest.from_json(json) -# print the JSON string representation of the object -print(ConnectionCreateRequest.to_json()) - -# convert the object into a dict -connection_create_request_dict = connection_create_request_instance.to_dict() -# create an instance of ConnectionCreateRequest from a dict -connection_create_request_from_dict = ConnectionCreateRequest.from_dict(connection_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md b/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md deleted file mode 100644 index 2ae2444..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# ConnectionUpdateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the connection | [optional] -**parent_id** | **int** | The ID of the parent connection (must be same provider type) | [optional] -**folder_id** | **int** | The ID of the project or folder containing the connection | [optional] -**external_id** | **str** | The external ID assigned to the connection | [optional] -**shell_connection** | **bool** | Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. | [optional] [default to False] -**input** | **Dict[str, object]** | Connection parameters (varies by provider) | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionUpdateRequest from a JSON string -connection_update_request_instance = ConnectionUpdateRequest.from_json(json) -# print the JSON string representation of the object -print(ConnectionUpdateRequest.to_json()) - -# convert the object into a dict -connection_update_request_dict = connection_update_request_instance.to_dict() -# create an instance of ConnectionUpdateRequest from a dict -connection_update_request_from_dict = ConnectionUpdateRequest.from_dict(connection_update_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ConnectionsApi.md b/src/workato_platform/client/workato_api/docs/ConnectionsApi.md deleted file mode 100644 index 2e111dd..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectionsApi.md +++ /dev/null @@ -1,526 +0,0 @@ -# workato_platform.client.workato_api.ConnectionsApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_connection**](ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection -[**create_runtime_user_connection**](ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection -[**get_connection_oauth_url**](ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection -[**get_connection_picklist**](ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values -[**list_connections**](ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections -[**update_connection**](ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection - - -# **create_connection** -> Connection create_connection(connection_create_request) - -Create a connection - -Create a new connection. Supports creating shell connections or -fully authenticated connections. Does not support OAuth connections -for authentication, but can create shell connections for OAuth providers. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - connection_create_request = workato_platform.client.workato_api.ConnectionCreateRequest() # ConnectionCreateRequest | - - try: - # Create a connection - api_response = await api_instance.create_connection(connection_create_request) - print("The response of ConnectionsApi->create_connection:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->create_connection: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **connection_create_request** | [**ConnectionCreateRequest**](ConnectionCreateRequest.md)| | - -### Return type - -[**Connection**](Connection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Connection created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_runtime_user_connection** -> RuntimeUserConnectionResponse create_runtime_user_connection(runtime_user_connection_create_request) - -Create OAuth runtime user connection - -Creates an OAuth runtime user connection. The parent connection must be -an established OAuth connection. This initiates the OAuth flow and provides -a URL for end user authorization. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - runtime_user_connection_create_request = workato_platform.client.workato_api.RuntimeUserConnectionCreateRequest() # RuntimeUserConnectionCreateRequest | - - try: - # Create OAuth runtime user connection - api_response = await api_instance.create_runtime_user_connection(runtime_user_connection_create_request) - print("The response of ConnectionsApi->create_runtime_user_connection:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->create_runtime_user_connection: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **runtime_user_connection_create_request** | [**RuntimeUserConnectionCreateRequest**](RuntimeUserConnectionCreateRequest.md)| | - -### Return type - -[**RuntimeUserConnectionResponse**](RuntimeUserConnectionResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Runtime user connection created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | -**404** | Parent connection not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_connection_oauth_url** -> OAuthUrlResponse get_connection_oauth_url(connection_id) - -Get OAuth URL for connection - -Get the OAuth URL for a runtime user connection. This endpoint is used -to retrieve the OAuth authorization URL for establishing or re-authorizing -a connection. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - connection_id = 56 # int | Connection ID - - try: - # Get OAuth URL for connection - api_response = await api_instance.get_connection_oauth_url(connection_id) - print("The response of ConnectionsApi->get_connection_oauth_url:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->get_connection_oauth_url: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **connection_id** | **int**| Connection ID | - -### Return type - -[**OAuthUrlResponse**](OAuthUrlResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OAuth URL retrieved successfully | - | -**401** | Authentication required | - | -**404** | Connection not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_connection_picklist** -> PicklistResponse get_connection_picklist(connection_id, picklist_request) - -Get picklist values - -Obtains a list of picklist values for a specified connection in a workspace. -This endpoint allows you to retrieve dynamic lists of values that can be -used in forms or dropdowns for the connected application. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - connection_id = 56 # int | ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. - picklist_request = workato_platform.client.workato_api.PicklistRequest() # PicklistRequest | - - try: - # Get picklist values - api_response = await api_instance.get_connection_picklist(connection_id, picklist_request) - print("The response of ConnectionsApi->get_connection_picklist:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->get_connection_picklist: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **connection_id** | **int**| ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. | - **picklist_request** | [**PicklistRequest**](PicklistRequest.md)| | - -### Return type - -[**PicklistResponse**](PicklistResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Picklist values retrieved successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | -**404** | Connection not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_connections** -> List[Connection] list_connections(folder_id=folder_id, parent_id=parent_id, external_id=external_id, include_runtime_connections=include_runtime_connections, includes=includes) - -List connections - -Returns all connections and associated data for the authenticated user - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - folder_id = 56 # int | Folder ID of the connection (optional) - parent_id = 56 # int | Parent ID of the connection (must be same provider) (optional) - external_id = 'external_id_example' # str | External identifier for the connection (optional) - include_runtime_connections = True # bool | When \"true\", include all runtime user connections (optional) - includes = ['includes_example'] # List[str] | Additional fields to include (e.g., tags) (optional) - - try: - # List connections - api_response = await api_instance.list_connections(folder_id=folder_id, parent_id=parent_id, external_id=external_id, include_runtime_connections=include_runtime_connections, includes=includes) - print("The response of ConnectionsApi->list_connections:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->list_connections: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **int**| Folder ID of the connection | [optional] - **parent_id** | **int**| Parent ID of the connection (must be same provider) | [optional] - **external_id** | **str**| External identifier for the connection | [optional] - **include_runtime_connections** | **bool**| When \"true\", include all runtime user connections | [optional] - **includes** | [**List[str]**](str.md)| Additional fields to include (e.g., tags) | [optional] - -### Return type - -[**List[Connection]**](Connection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of connections retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_connection** -> Connection update_connection(connection_id, connection_update_request=connection_update_request) - -Update a connection - -Updates a connection in a non-embedded workspace. Allows updating connection -metadata and parameters without requiring full re-creation. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - connection_id = 56 # int | The ID of the connection - connection_update_request = workato_platform.client.workato_api.ConnectionUpdateRequest() # ConnectionUpdateRequest | (optional) - - try: - # Update a connection - api_response = await api_instance.update_connection(connection_id, connection_update_request=connection_update_request) - print("The response of ConnectionsApi->update_connection:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->update_connection: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **connection_id** | **int**| The ID of the connection | - **connection_update_request** | [**ConnectionUpdateRequest**](ConnectionUpdateRequest.md)| | [optional] - -### Return type - -[**Connection**](Connection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Connection updated successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | -**404** | Connection not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/ConnectorAction.md b/src/workato_platform/client/workato_api/docs/ConnectorAction.md deleted file mode 100644 index dbc4713..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectorAction.md +++ /dev/null @@ -1,33 +0,0 @@ -# ConnectorAction - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**title** | **str** | | [optional] -**deprecated** | **bool** | | -**bulk** | **bool** | | -**batch** | **bool** | | - -## Example - -```python -from workato_platform.client.workato_api.models.connector_action import ConnectorAction - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectorAction from a JSON string -connector_action_instance = ConnectorAction.from_json(json) -# print the JSON string representation of the object -print(ConnectorAction.to_json()) - -# convert the object into a dict -connector_action_dict = connector_action_instance.to_dict() -# create an instance of ConnectorAction from a dict -connector_action_from_dict = ConnectorAction.from_dict(connector_action_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ConnectorVersion.md b/src/workato_platform/client/workato_api/docs/ConnectorVersion.md deleted file mode 100644 index 8a4b96a..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectorVersion.md +++ /dev/null @@ -1,32 +0,0 @@ -# ConnectorVersion - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **int** | | -**version_note** | **str** | | -**created_at** | **datetime** | | -**released_at** | **datetime** | | - -## Example - -```python -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectorVersion from a JSON string -connector_version_instance = ConnectorVersion.from_json(json) -# print the JSON string representation of the object -print(ConnectorVersion.to_json()) - -# convert the object into a dict -connector_version_dict = connector_version_instance.to_dict() -# create an instance of ConnectorVersion from a dict -connector_version_from_dict = ConnectorVersion.from_dict(connector_version_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ConnectorsApi.md b/src/workato_platform/client/workato_api/docs/ConnectorsApi.md deleted file mode 100644 index 4fc5804..0000000 --- a/src/workato_platform/client/workato_api/docs/ConnectorsApi.md +++ /dev/null @@ -1,249 +0,0 @@ -# workato_platform.client.workato_api.ConnectorsApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_custom_connector_code**](ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code -[**list_custom_connectors**](ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors -[**list_platform_connectors**](ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors - - -# **get_custom_connector_code** -> CustomConnectorCodeResponse get_custom_connector_code(id) - -Get custom connector code - -Fetch the code for a specific custom connector - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) - id = 56 # int | The ID of the custom connector - - try: - # Get custom connector code - api_response = await api_instance.get_custom_connector_code(id) - print("The response of ConnectorsApi->get_custom_connector_code:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectorsApi->get_custom_connector_code: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the custom connector | - -### Return type - -[**CustomConnectorCodeResponse**](CustomConnectorCodeResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Custom connector code retrieved successfully | - | -**401** | Authentication required | - | -**404** | Custom connector not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_custom_connectors** -> CustomConnectorListResponse list_custom_connectors() - -List custom connectors - -Returns a list of all custom connectors - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) - - try: - # List custom connectors - api_response = await api_instance.list_custom_connectors() - print("The response of ConnectorsApi->list_custom_connectors:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectorsApi->list_custom_connectors: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**CustomConnectorListResponse**](CustomConnectorListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Custom connectors retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_platform_connectors** -> PlatformConnectorListResponse list_platform_connectors(page=page, per_page=per_page) - -List platform connectors - -Returns a paginated list of all connectors and associated metadata including -triggers and actions. This includes both standard and platform connectors. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) - page = 1 # int | Page number (optional) (default to 1) - per_page = 1 # int | Number of records per page (max 100) (optional) (default to 1) - - try: - # List platform connectors - api_response = await api_instance.list_platform_connectors(page=page, per_page=per_page) - print("The response of ConnectorsApi->list_platform_connectors:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectorsApi->list_platform_connectors: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **per_page** | **int**| Number of records per page (max 100) | [optional] [default to 1] - -### Return type - -[**PlatformConnectorListResponse**](PlatformConnectorListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Platform connectors retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md b/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md deleted file mode 100644 index f50f7ba..0000000 --- a/src/workato_platform/client/workato_api/docs/CreateExportManifestRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateExportManifestRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**export_manifest** | [**ExportManifestRequest**](ExportManifestRequest.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateExportManifestRequest from a JSON string -create_export_manifest_request_instance = CreateExportManifestRequest.from_json(json) -# print the JSON string representation of the object -print(CreateExportManifestRequest.to_json()) - -# convert the object into a dict -create_export_manifest_request_dict = create_export_manifest_request_instance.to_dict() -# create an instance of CreateExportManifestRequest from a dict -create_export_manifest_request_from_dict = CreateExportManifestRequest.from_dict(create_export_manifest_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md b/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md deleted file mode 100644 index 8442e86..0000000 --- a/src/workato_platform/client/workato_api/docs/CreateFolderRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateFolderRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the folder | -**parent_id** | **str** | Parent folder ID. Defaults to Home folder if not specified | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFolderRequest from a JSON string -create_folder_request_instance = CreateFolderRequest.from_json(json) -# print the JSON string representation of the object -print(CreateFolderRequest.to_json()) - -# convert the object into a dict -create_folder_request_dict = create_folder_request_instance.to_dict() -# create an instance of CreateFolderRequest from a dict -create_folder_request_from_dict = CreateFolderRequest.from_dict(create_folder_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/CustomConnector.md b/src/workato_platform/client/workato_api/docs/CustomConnector.md deleted file mode 100644 index 15a1b48..0000000 --- a/src/workato_platform/client/workato_api/docs/CustomConnector.md +++ /dev/null @@ -1,35 +0,0 @@ -# CustomConnector - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**title** | **str** | | -**latest_released_version** | **int** | | -**latest_released_version_note** | **str** | | -**released_versions** | [**List[ConnectorVersion]**](ConnectorVersion.md) | | -**static_webhook_url** | **str** | | - -## Example - -```python -from workato_platform.client.workato_api.models.custom_connector import CustomConnector - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomConnector from a JSON string -custom_connector_instance = CustomConnector.from_json(json) -# print the JSON string representation of the object -print(CustomConnector.to_json()) - -# convert the object into a dict -custom_connector_dict = custom_connector_instance.to_dict() -# create an instance of CustomConnector from a dict -custom_connector_from_dict = CustomConnector.from_dict(custom_connector_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md deleted file mode 100644 index a8636b9..0000000 --- a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# CustomConnectorCodeResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**CustomConnectorCodeResponseData**](CustomConnectorCodeResponseData.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomConnectorCodeResponse from a JSON string -custom_connector_code_response_instance = CustomConnectorCodeResponse.from_json(json) -# print the JSON string representation of the object -print(CustomConnectorCodeResponse.to_json()) - -# convert the object into a dict -custom_connector_code_response_dict = custom_connector_code_response_instance.to_dict() -# create an instance of CustomConnectorCodeResponse from a dict -custom_connector_code_response_from_dict = CustomConnectorCodeResponse.from_dict(custom_connector_code_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md b/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md deleted file mode 100644 index 3207395..0000000 --- a/src/workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md +++ /dev/null @@ -1,29 +0,0 @@ -# CustomConnectorCodeResponseData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | The connector code as a stringified value | - -## Example - -```python -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomConnectorCodeResponseData from a JSON string -custom_connector_code_response_data_instance = CustomConnectorCodeResponseData.from_json(json) -# print the JSON string representation of the object -print(CustomConnectorCodeResponseData.to_json()) - -# convert the object into a dict -custom_connector_code_response_data_dict = custom_connector_code_response_data_instance.to_dict() -# create an instance of CustomConnectorCodeResponseData from a dict -custom_connector_code_response_data_from_dict = CustomConnectorCodeResponseData.from_dict(custom_connector_code_response_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md b/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md deleted file mode 100644 index 4263eea..0000000 --- a/src/workato_platform/client/workato_api/docs/CustomConnectorListResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# CustomConnectorListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | [**List[CustomConnector]**](CustomConnector.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomConnectorListResponse from a JSON string -custom_connector_list_response_instance = CustomConnectorListResponse.from_json(json) -# print the JSON string representation of the object -print(CustomConnectorListResponse.to_json()) - -# convert the object into a dict -custom_connector_list_response_dict = custom_connector_list_response_instance.to_dict() -# create an instance of CustomConnectorListResponse from a dict -custom_connector_list_response_from_dict = CustomConnectorListResponse.from_dict(custom_connector_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTable.md b/src/workato_platform/client/workato_api/docs/DataTable.md deleted file mode 100644 index ada0419..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTable.md +++ /dev/null @@ -1,34 +0,0 @@ -# DataTable - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**name** | **str** | | -**var_schema** | [**List[DataTableColumn]**](DataTableColumn.md) | | -**folder_id** | **int** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table import DataTable - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTable from a JSON string -data_table_instance = DataTable.from_json(json) -# print the JSON string representation of the object -print(DataTable.to_json()) - -# convert the object into a dict -data_table_dict = data_table_instance.to_dict() -# create an instance of DataTable from a dict -data_table_from_dict = DataTable.from_dict(data_table_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumn.md b/src/workato_platform/client/workato_api/docs/DataTableColumn.md deleted file mode 100644 index 2a03cf1..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableColumn.md +++ /dev/null @@ -1,37 +0,0 @@ -# DataTableColumn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | -**name** | **str** | | -**optional** | **bool** | | -**field_id** | **str** | | -**hint** | **str** | | -**default_value** | **object** | Default value matching the column type | -**metadata** | **Dict[str, object]** | | -**multivalue** | **bool** | | -**relation** | [**DataTableRelation**](DataTableRelation.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableColumn from a JSON string -data_table_column_instance = DataTableColumn.from_json(json) -# print the JSON string representation of the object -print(DataTableColumn.to_json()) - -# convert the object into a dict -data_table_column_dict = data_table_column_instance.to_dict() -# create an instance of DataTableColumn from a dict -data_table_column_from_dict = DataTableColumn.from_dict(data_table_column_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md b/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md deleted file mode 100644 index 8725adb..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableColumnRequest.md +++ /dev/null @@ -1,37 +0,0 @@ -# DataTableColumnRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | The data type of the column | -**name** | **str** | The name of the column | -**optional** | **bool** | Whether the column is optional | -**field_id** | **str** | Unique UUID of the column | [optional] -**hint** | **str** | Tooltip hint for users | [optional] -**default_value** | **object** | Default value matching the column type | [optional] -**metadata** | **Dict[str, object]** | Additional metadata | [optional] -**multivalue** | **bool** | Whether the column accepts multi-value input | [optional] -**relation** | [**DataTableRelation**](DataTableRelation.md) | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableColumnRequest from a JSON string -data_table_column_request_instance = DataTableColumnRequest.from_json(json) -# print the JSON string representation of the object -print(DataTableColumnRequest.to_json()) - -# convert the object into a dict -data_table_column_request_dict = data_table_column_request_instance.to_dict() -# create an instance of DataTableColumnRequest from a dict -data_table_column_request_from_dict = DataTableColumnRequest.from_dict(data_table_column_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md b/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md deleted file mode 100644 index 889bfc1..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableCreateRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# DataTableCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the data table to create | -**folder_id** | **int** | ID of the folder where to create the data table | -**var_schema** | [**List[DataTableColumnRequest]**](DataTableColumnRequest.md) | Array of column definitions | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableCreateRequest from a JSON string -data_table_create_request_instance = DataTableCreateRequest.from_json(json) -# print the JSON string representation of the object -print(DataTableCreateRequest.to_json()) - -# convert the object into a dict -data_table_create_request_dict = data_table_create_request_instance.to_dict() -# create an instance of DataTableCreateRequest from a dict -data_table_create_request_from_dict = DataTableCreateRequest.from_dict(data_table_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md b/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md deleted file mode 100644 index b359033..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableCreateResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# DataTableCreateResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**DataTable**](DataTable.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableCreateResponse from a JSON string -data_table_create_response_instance = DataTableCreateResponse.from_json(json) -# print the JSON string representation of the object -print(DataTableCreateResponse.to_json()) - -# convert the object into a dict -data_table_create_response_dict = data_table_create_response_instance.to_dict() -# create an instance of DataTableCreateResponse from a dict -data_table_create_response_from_dict = DataTableCreateResponse.from_dict(data_table_create_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableListResponse.md b/src/workato_platform/client/workato_api/docs/DataTableListResponse.md deleted file mode 100644 index 9c0cc37..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableListResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# DataTableListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[DataTable]**](DataTable.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableListResponse from a JSON string -data_table_list_response_instance = DataTableListResponse.from_json(json) -# print the JSON string representation of the object -print(DataTableListResponse.to_json()) - -# convert the object into a dict -data_table_list_response_dict = data_table_list_response_instance.to_dict() -# create an instance of DataTableListResponse from a dict -data_table_list_response_from_dict = DataTableListResponse.from_dict(data_table_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTableRelation.md b/src/workato_platform/client/workato_api/docs/DataTableRelation.md deleted file mode 100644 index 71cf924..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTableRelation.md +++ /dev/null @@ -1,30 +0,0 @@ -# DataTableRelation - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**table_id** | **str** | | -**field_id** | **str** | | - -## Example - -```python -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation - -# TODO update the JSON string below -json = "{}" -# create an instance of DataTableRelation from a JSON string -data_table_relation_instance = DataTableRelation.from_json(json) -# print the JSON string representation of the object -print(DataTableRelation.to_json()) - -# convert the object into a dict -data_table_relation_dict = data_table_relation_instance.to_dict() -# create an instance of DataTableRelation from a dict -data_table_relation_from_dict = DataTableRelation.from_dict(data_table_relation_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/DataTablesApi.md b/src/workato_platform/client/workato_api/docs/DataTablesApi.md deleted file mode 100644 index 360e436..0000000 --- a/src/workato_platform/client/workato_api/docs/DataTablesApi.md +++ /dev/null @@ -1,172 +0,0 @@ -# workato_platform.client.workato_api.DataTablesApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_data_table**](DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table -[**list_data_tables**](DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables - - -# **create_data_table** -> DataTableCreateResponse create_data_table(data_table_create_request) - -Create data table - -Creates a data table in a folder you specify - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) - data_table_create_request = workato_platform.client.workato_api.DataTableCreateRequest() # DataTableCreateRequest | - - try: - # Create data table - api_response = await api_instance.create_data_table(data_table_create_request) - print("The response of DataTablesApi->create_data_table:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DataTablesApi->create_data_table: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **data_table_create_request** | [**DataTableCreateRequest**](DataTableCreateRequest.md)| | - -### Return type - -[**DataTableCreateResponse**](DataTableCreateResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Data table created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_data_tables** -> DataTableListResponse list_data_tables(page=page, per_page=per_page) - -List data tables - -Returns a list of all data tables in your workspace - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) - page = 1 # int | Page number of the data tables to fetch (optional) (default to 1) - per_page = 100 # int | Page size (max 100) (optional) (default to 100) - - try: - # List data tables - api_response = await api_instance.list_data_tables(page=page, per_page=per_page) - print("The response of DataTablesApi->list_data_tables:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DataTablesApi->list_data_tables: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number of the data tables to fetch | [optional] [default to 1] - **per_page** | **int**| Page size (max 100) | [optional] [default to 100] - -### Return type - -[**DataTableListResponse**](DataTableListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Data tables retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md b/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md deleted file mode 100644 index c86cf44..0000000 --- a/src/workato_platform/client/workato_api/docs/DeleteProject403Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteProject403Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteProject403Response from a JSON string -delete_project403_response_instance = DeleteProject403Response.from_json(json) -# print the JSON string representation of the object -print(DeleteProject403Response.to_json()) - -# convert the object into a dict -delete_project403_response_dict = delete_project403_response_instance.to_dict() -# create an instance of DeleteProject403Response from a dict -delete_project403_response_from_dict = DeleteProject403Response.from_dict(delete_project403_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/Error.md b/src/workato_platform/client/workato_api/docs/Error.md deleted file mode 100644 index 617e9e9..0000000 --- a/src/workato_platform/client/workato_api/docs/Error.md +++ /dev/null @@ -1,29 +0,0 @@ -# Error - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | - -## Example - -```python -from workato_platform.client.workato_api.models.error import Error - -# TODO update the JSON string below -json = "{}" -# create an instance of Error from a JSON string -error_instance = Error.from_json(json) -# print the JSON string representation of the object -print(Error.to_json()) - -# convert the object into a dict -error_dict = error_instance.to_dict() -# create an instance of Error from a dict -error_from_dict = Error.from_dict(error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ExportApi.md b/src/workato_platform/client/workato_api/docs/ExportApi.md deleted file mode 100644 index e71277b..0000000 --- a/src/workato_platform/client/workato_api/docs/ExportApi.md +++ /dev/null @@ -1,175 +0,0 @@ -# workato_platform.client.workato_api.ExportApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_export_manifest**](ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest -[**list_assets_in_folder**](ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder - - -# **create_export_manifest** -> ExportManifestResponse create_export_manifest(create_export_manifest_request) - -Create an export manifest - -Create an export manifest for exporting assets - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ExportApi(api_client) - create_export_manifest_request = workato_platform.client.workato_api.CreateExportManifestRequest() # CreateExportManifestRequest | - - try: - # Create an export manifest - api_response = await api_instance.create_export_manifest(create_export_manifest_request) - print("The response of ExportApi->create_export_manifest:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ExportApi->create_export_manifest: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_export_manifest_request** | [**CreateExportManifestRequest**](CreateExportManifestRequest.md)| | - -### Return type - -[**ExportManifestResponse**](ExportManifestResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Export manifest created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_assets_in_folder** -> FolderAssetsResponse list_assets_in_folder(folder_id=folder_id, include_test_cases=include_test_cases, include_data=include_data) - -View assets in a folder - -View assets in a folder. Useful for creating or updating export manifests. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ExportApi(api_client) - folder_id = 56 # int | The ID of the folder containing the assets (optional) - include_test_cases = False # bool | Include test cases (currently not supported) (optional) (default to False) - include_data = False # bool | Include data from the list of assets (optional) (default to False) - - try: - # View assets in a folder - api_response = await api_instance.list_assets_in_folder(folder_id=folder_id, include_test_cases=include_test_cases, include_data=include_data) - print("The response of ExportApi->list_assets_in_folder:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ExportApi->list_assets_in_folder: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **folder_id** | **int**| The ID of the folder containing the assets | [optional] - **include_test_cases** | **bool**| Include test cases (currently not supported) | [optional] [default to False] - **include_data** | **bool**| Include data from the list of assets | [optional] [default to False] - -### Return type - -[**FolderAssetsResponse**](FolderAssetsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Folder assets retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md b/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md deleted file mode 100644 index 4d64ee0..0000000 --- a/src/workato_platform/client/workato_api/docs/ExportManifestRequest.md +++ /dev/null @@ -1,35 +0,0 @@ -# ExportManifestRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the new manifest | -**assets** | [**List[AssetReference]**](AssetReference.md) | Dependent assets to include in the manifest | [optional] -**folder_id** | **int** | The ID of the folder containing the assets | [optional] -**include_test_cases** | **bool** | Whether the manifest includes test cases | [optional] [default to False] -**auto_generate_assets** | **bool** | Auto-generates assets from a folder | [optional] [default to False] -**include_data** | **bool** | Include data from automatic asset generation | [optional] [default to False] -**include_tags** | **bool** | Include tags assigned to assets in the export manifest | [optional] [default to False] - -## Example - -```python -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ExportManifestRequest from a JSON string -export_manifest_request_instance = ExportManifestRequest.from_json(json) -# print the JSON string representation of the object -print(ExportManifestRequest.to_json()) - -# convert the object into a dict -export_manifest_request_dict = export_manifest_request_instance.to_dict() -# create an instance of ExportManifestRequest from a dict -export_manifest_request_from_dict = ExportManifestRequest.from_dict(export_manifest_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md b/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md deleted file mode 100644 index ed8e5b7..0000000 --- a/src/workato_platform/client/workato_api/docs/ExportManifestResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ExportManifestResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | [**ExportManifestResponseResult**](ExportManifestResponseResult.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ExportManifestResponse from a JSON string -export_manifest_response_instance = ExportManifestResponse.from_json(json) -# print the JSON string representation of the object -print(ExportManifestResponse.to_json()) - -# convert the object into a dict -export_manifest_response_dict = export_manifest_response_instance.to_dict() -# create an instance of ExportManifestResponse from a dict -export_manifest_response_from_dict = ExportManifestResponse.from_dict(export_manifest_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md b/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md deleted file mode 100644 index 4c5e8e3..0000000 --- a/src/workato_platform/client/workato_api/docs/ExportManifestResponseResult.md +++ /dev/null @@ -1,36 +0,0 @@ -# ExportManifestResponseResult - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**last_exported_at** | **datetime** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**deleted_at** | **datetime** | | -**project_path** | **str** | | -**status** | **str** | | - -## Example - -```python -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult - -# TODO update the JSON string below -json = "{}" -# create an instance of ExportManifestResponseResult from a JSON string -export_manifest_response_result_instance = ExportManifestResponseResult.from_json(json) -# print the JSON string representation of the object -print(ExportManifestResponseResult.to_json()) - -# convert the object into a dict -export_manifest_response_result_dict = export_manifest_response_result_instance.to_dict() -# create an instance of ExportManifestResponseResult from a dict -export_manifest_response_result_from_dict = ExportManifestResponseResult.from_dict(export_manifest_response_result_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/Folder.md b/src/workato_platform/client/workato_api/docs/Folder.md deleted file mode 100644 index 28207b4..0000000 --- a/src/workato_platform/client/workato_api/docs/Folder.md +++ /dev/null @@ -1,35 +0,0 @@ -# Folder - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**parent_id** | **int** | | -**is_project** | **bool** | | -**project_id** | **int** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | - -## Example - -```python -from workato_platform.client.workato_api.models.folder import Folder - -# TODO update the JSON string below -json = "{}" -# create an instance of Folder from a JSON string -folder_instance = Folder.from_json(json) -# print the JSON string representation of the object -print(Folder.to_json()) - -# convert the object into a dict -folder_dict = folder_instance.to_dict() -# create an instance of Folder from a dict -folder_from_dict = Folder.from_dict(folder_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md b/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md deleted file mode 100644 index 382a3f3..0000000 --- a/src/workato_platform/client/workato_api/docs/FolderAssetsResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# FolderAssetsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | [**FolderAssetsResponseResult**](FolderAssetsResponseResult.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderAssetsResponse from a JSON string -folder_assets_response_instance = FolderAssetsResponse.from_json(json) -# print the JSON string representation of the object -print(FolderAssetsResponse.to_json()) - -# convert the object into a dict -folder_assets_response_dict = folder_assets_response_instance.to_dict() -# create an instance of FolderAssetsResponse from a dict -folder_assets_response_from_dict = FolderAssetsResponse.from_dict(folder_assets_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md b/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md deleted file mode 100644 index 95a5929..0000000 --- a/src/workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md +++ /dev/null @@ -1,29 +0,0 @@ -# FolderAssetsResponseResult - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | [**List[Asset]**](Asset.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderAssetsResponseResult from a JSON string -folder_assets_response_result_instance = FolderAssetsResponseResult.from_json(json) -# print the JSON string representation of the object -print(FolderAssetsResponseResult.to_json()) - -# convert the object into a dict -folder_assets_response_result_dict = folder_assets_response_result_instance.to_dict() -# create an instance of FolderAssetsResponseResult from a dict -folder_assets_response_result_from_dict = FolderAssetsResponseResult.from_dict(folder_assets_response_result_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md b/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md deleted file mode 100644 index 2617a2e..0000000 --- a/src/workato_platform/client/workato_api/docs/FolderCreationResponse.md +++ /dev/null @@ -1,35 +0,0 @@ -# FolderCreationResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**parent_id** | **int** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**project_id** | **int** | | -**is_project** | **bool** | | - -## Example - -```python -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderCreationResponse from a JSON string -folder_creation_response_instance = FolderCreationResponse.from_json(json) -# print the JSON string representation of the object -print(FolderCreationResponse.to_json()) - -# convert the object into a dict -folder_creation_response_dict = folder_creation_response_instance.to_dict() -# create an instance of FolderCreationResponse from a dict -folder_creation_response_from_dict = FolderCreationResponse.from_dict(folder_creation_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/FoldersApi.md b/src/workato_platform/client/workato_api/docs/FoldersApi.md deleted file mode 100644 index f4d2aa5..0000000 --- a/src/workato_platform/client/workato_api/docs/FoldersApi.md +++ /dev/null @@ -1,176 +0,0 @@ -# workato_platform.client.workato_api.FoldersApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_folder**](FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder -[**list_folders**](FoldersApi.md#list_folders) | **GET** /api/folders | List folders - - -# **create_folder** -> FolderCreationResponse create_folder(create_folder_request) - -Create a folder - -Creates a new folder in the specified parent folder. If no parent folder ID -is specified, creates the folder as a top-level folder in the home folder. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.FoldersApi(api_client) - create_folder_request = workato_platform.client.workato_api.CreateFolderRequest() # CreateFolderRequest | - - try: - # Create a folder - api_response = await api_instance.create_folder(create_folder_request) - print("The response of FoldersApi->create_folder:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FoldersApi->create_folder: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_folder_request** | [**CreateFolderRequest**](CreateFolderRequest.md)| | - -### Return type - -[**FolderCreationResponse**](FolderCreationResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Folder created successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_folders** -> List[Folder] list_folders(parent_id=parent_id, page=page, per_page=per_page) - -List folders - -Lists all folders. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.FoldersApi(api_client) - parent_id = 56 # int | Parent folder ID. Defaults to Home folder. (optional) - page = 1 # int | Page number. Defaults to 1. (optional) (default to 1) - per_page = 100 # int | Page size. Defaults to 100 (maximum is 100). (optional) (default to 100) - - try: - # List folders - api_response = await api_instance.list_folders(parent_id=parent_id, page=page, per_page=per_page) - print("The response of FoldersApi->list_folders:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FoldersApi->list_folders: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **parent_id** | **int**| Parent folder ID. Defaults to Home folder. | [optional] - **page** | **int**| Page number. Defaults to 1. | [optional] [default to 1] - **per_page** | **int**| Page size. Defaults to 100 (maximum is 100). | [optional] [default to 100] - -### Return type - -[**List[Folder]**](Folder.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of folders retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/ImportResults.md b/src/workato_platform/client/workato_api/docs/ImportResults.md deleted file mode 100644 index 3b81dbf..0000000 --- a/src/workato_platform/client/workato_api/docs/ImportResults.md +++ /dev/null @@ -1,32 +0,0 @@ -# ImportResults - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | -**total_endpoints** | **int** | | -**failed_endpoints** | **int** | | -**failed_actions** | **List[str]** | | - -## Example - -```python -from workato_platform.client.workato_api.models.import_results import ImportResults - -# TODO update the JSON string below -json = "{}" -# create an instance of ImportResults from a JSON string -import_results_instance = ImportResults.from_json(json) -# print the JSON string representation of the object -print(ImportResults.to_json()) - -# convert the object into a dict -import_results_dict = import_results_instance.to_dict() -# create an instance of ImportResults from a dict -import_results_from_dict = ImportResults.from_dict(import_results_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md b/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md deleted file mode 100644 index 9bc51e4..0000000 --- a/src/workato_platform/client/workato_api/docs/OAuthUrlResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# OAuthUrlResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**OAuthUrlResponseData**](OAuthUrlResponseData.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of OAuthUrlResponse from a JSON string -o_auth_url_response_instance = OAuthUrlResponse.from_json(json) -# print the JSON string representation of the object -print(OAuthUrlResponse.to_json()) - -# convert the object into a dict -o_auth_url_response_dict = o_auth_url_response_instance.to_dict() -# create an instance of OAuthUrlResponse from a dict -o_auth_url_response_from_dict = OAuthUrlResponse.from_dict(o_auth_url_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md b/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md deleted file mode 100644 index f7db6ae..0000000 --- a/src/workato_platform/client/workato_api/docs/OAuthUrlResponseData.md +++ /dev/null @@ -1,29 +0,0 @@ -# OAuthUrlResponseData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **str** | The OAuth authorization URL | - -## Example - -```python -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData - -# TODO update the JSON string below -json = "{}" -# create an instance of OAuthUrlResponseData from a JSON string -o_auth_url_response_data_instance = OAuthUrlResponseData.from_json(json) -# print the JSON string representation of the object -print(OAuthUrlResponseData.to_json()) - -# convert the object into a dict -o_auth_url_response_data_dict = o_auth_url_response_data_instance.to_dict() -# create an instance of OAuthUrlResponseData from a dict -o_auth_url_response_data_from_dict = OAuthUrlResponseData.from_dict(o_auth_url_response_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/OpenApiSpec.md b/src/workato_platform/client/workato_api/docs/OpenApiSpec.md deleted file mode 100644 index b923b62..0000000 --- a/src/workato_platform/client/workato_api/docs/OpenApiSpec.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenApiSpec - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | **str** | The OpenAPI spec as a JSON or YAML string | -**format** | **str** | Format of the OpenAPI spec | - -## Example - -```python -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenApiSpec from a JSON string -open_api_spec_instance = OpenApiSpec.from_json(json) -# print the JSON string representation of the object -print(OpenApiSpec.to_json()) - -# convert the object into a dict -open_api_spec_dict = open_api_spec_instance.to_dict() -# create an instance of OpenApiSpec from a dict -open_api_spec_from_dict = OpenApiSpec.from_dict(open_api_spec_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md b/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md deleted file mode 100644 index b653df2..0000000 --- a/src/workato_platform/client/workato_api/docs/PackageDetailsResponse.md +++ /dev/null @@ -1,35 +0,0 @@ -# PackageDetailsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**operation_type** | **str** | | -**status** | **str** | | -**export_manifest_id** | **int** | | [optional] -**download_url** | **str** | | [optional] -**error** | **str** | Error message when status is failed | [optional] -**recipe_status** | [**List[PackageDetailsResponseRecipeStatusInner]**](PackageDetailsResponseRecipeStatusInner.md) | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PackageDetailsResponse from a JSON string -package_details_response_instance = PackageDetailsResponse.from_json(json) -# print the JSON string representation of the object -print(PackageDetailsResponse.to_json()) - -# convert the object into a dict -package_details_response_dict = package_details_response_instance.to_dict() -# create an instance of PackageDetailsResponse from a dict -package_details_response_from_dict = PackageDetailsResponse.from_dict(package_details_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md b/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md deleted file mode 100644 index 489d79e..0000000 --- a/src/workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PackageDetailsResponseRecipeStatusInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**import_result** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PackageDetailsResponseRecipeStatusInner from a JSON string -package_details_response_recipe_status_inner_instance = PackageDetailsResponseRecipeStatusInner.from_json(json) -# print the JSON string representation of the object -print(PackageDetailsResponseRecipeStatusInner.to_json()) - -# convert the object into a dict -package_details_response_recipe_status_inner_dict = package_details_response_recipe_status_inner_instance.to_dict() -# create an instance of PackageDetailsResponseRecipeStatusInner from a dict -package_details_response_recipe_status_inner_from_dict = PackageDetailsResponseRecipeStatusInner.from_dict(package_details_response_recipe_status_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PackageResponse.md b/src/workato_platform/client/workato_api/docs/PackageResponse.md deleted file mode 100644 index 0af6f19..0000000 --- a/src/workato_platform/client/workato_api/docs/PackageResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# PackageResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**operation_type** | **str** | | -**status** | **str** | | -**export_manifest_id** | **int** | | [optional] -**download_url** | **str** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.package_response import PackageResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PackageResponse from a JSON string -package_response_instance = PackageResponse.from_json(json) -# print the JSON string representation of the object -print(PackageResponse.to_json()) - -# convert the object into a dict -package_response_dict = package_response_instance.to_dict() -# create an instance of PackageResponse from a dict -package_response_from_dict = PackageResponse.from_dict(package_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PackagesApi.md b/src/workato_platform/client/workato_api/docs/PackagesApi.md deleted file mode 100644 index 43aaf2c..0000000 --- a/src/workato_platform/client/workato_api/docs/PackagesApi.md +++ /dev/null @@ -1,364 +0,0 @@ -# workato_platform.client.workato_api.PackagesApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**download_package**](PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package -[**export_package**](PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest -[**get_package**](PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details -[**import_package**](PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder - - -# **download_package** -> bytearray download_package(package_id) - -Download package - -Downloads a package. Returns a redirect to the package content or the binary content directly. -Use the -L flag in cURL to follow redirects. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) - package_id = 56 # int | Package ID - - try: - # Download package - api_response = await api_instance.download_package(package_id) - print("The response of PackagesApi->download_package:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PackagesApi->download_package: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **package_id** | **int**| Package ID | - -### Return type - -**bytearray** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zip, application/octet-stream, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Package binary content | - | -**302** | Redirect to package download | * Location - URL to download the package content
| -**401** | Authentication required | - | -**404** | Package not found or doesn't have content | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **export_package** -> PackageResponse export_package(id) - -Export a package based on a manifest - -Export a package based on a manifest. - -**ENDPOINT PRIVILEGES ALSO PROVIDE ACCESS TO ASSETS** - -When you provide an API client with privileges to this endpoint, the API client -is also granted the ability to view other assets like recipes, lookup tables, -Event topics, and message templates by examining the resulting zip file. - -This is an asynchronous request. Use GET package by ID endpoint to get details -of the exported package. - -**INCLUDE TAGS WHEN CREATING THE EXPORT MANIFEST** - -To include tags in the exported package, set the include_tags attribute to true -when calling the Create an export manifest endpoint. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) - id = 'id_example' # str | Export manifest ID - - try: - # Export a package based on a manifest - api_response = await api_instance.export_package(id) - print("The response of PackagesApi->export_package:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PackagesApi->export_package: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| Export manifest ID | - -### Return type - -[**PackageResponse**](PackageResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Export package creation triggered successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_package** -> PackageDetailsResponse get_package(package_id) - -Get package details - -Get details of an imported or exported package including status - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) - package_id = 56 # int | Package ID - - try: - # Get package details - api_response = await api_instance.get_package(package_id) - print("The response of PackagesApi->get_package:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PackagesApi->get_package: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **package_id** | **int**| Package ID | - -### Return type - -[**PackageDetailsResponse**](PackageDetailsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Package details retrieved successfully | - | -**401** | Authentication required | - | -**404** | Package not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **import_package** -> PackageResponse import_package(id, body, restart_recipes=restart_recipes, include_tags=include_tags, folder_id_for_home_assets=folder_id_for_home_assets) - -Import a package into a folder - -Import a package in zip file format into a folder. This endpoint allows an API client -to create or update assets, such as recipes, lookup tables, event topics, and message -templates, through package imports. - -This is an asynchronous request. Use GET package by ID endpoint to get details of -the imported package. - -The input (zip file) is an application/octet-stream payload containing package content. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) - id = 56 # int | Folder ID - body = None # bytearray | - restart_recipes = False # bool | Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. (optional) (default to False) - include_tags = False # bool | Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. (optional) (default to False) - folder_id_for_home_assets = 56 # int | The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. (optional) - - try: - # Import a package into a folder - api_response = await api_instance.import_package(id, body, restart_recipes=restart_recipes, include_tags=include_tags, folder_id_for_home_assets=folder_id_for_home_assets) - print("The response of PackagesApi->import_package:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PackagesApi->import_package: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| Folder ID | - **body** | **bytearray**| | - **restart_recipes** | **bool**| Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. | [optional] [default to False] - **include_tags** | **bool**| Specifies whether to preserve tags assigned to assets when the package is imported into the folder. Tags are excluded from the import when set to false. | [optional] [default to False] - **folder_id_for_home_assets** | **int**| The ID of a folder to store assets in instead of the root folder. The folder specified must be accessible to the API client and cannot be the root folder. This parameter is conditionally required if you are importing a package that contains root folder assets and your workspace Home assets folder has been converted to a Home assets project. | [optional] - -### Return type - -[**PackageResponse**](PackageResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Package import initiated successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/PicklistRequest.md b/src/workato_platform/client/workato_api/docs/PicklistRequest.md deleted file mode 100644 index 9b5ab09..0000000 --- a/src/workato_platform/client/workato_api/docs/PicklistRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# PicklistRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pick_list_name** | **str** | Name of the pick list | -**pick_list_params** | **Dict[str, object]** | Picklist parameters, required in some picklists | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PicklistRequest from a JSON string -picklist_request_instance = PicklistRequest.from_json(json) -# print the JSON string representation of the object -print(PicklistRequest.to_json()) - -# convert the object into a dict -picklist_request_dict = picklist_request_instance.to_dict() -# create an instance of PicklistRequest from a dict -picklist_request_from_dict = PicklistRequest.from_dict(picklist_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PicklistResponse.md b/src/workato_platform/client/workato_api/docs/PicklistResponse.md deleted file mode 100644 index c462628..0000000 --- a/src/workato_platform/client/workato_api/docs/PicklistResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# PicklistResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **List[List[object]]** | Array of picklist value tuples [display_name, value, null, boolean] | - -## Example - -```python -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PicklistResponse from a JSON string -picklist_response_instance = PicklistResponse.from_json(json) -# print the JSON string representation of the object -print(PicklistResponse.to_json()) - -# convert the object into a dict -picklist_response_dict = picklist_response_instance.to_dict() -# create an instance of PicklistResponse from a dict -picklist_response_from_dict = PicklistResponse.from_dict(picklist_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnector.md b/src/workato_platform/client/workato_api/docs/PlatformConnector.md deleted file mode 100644 index 549a48e..0000000 --- a/src/workato_platform/client/workato_api/docs/PlatformConnector.md +++ /dev/null @@ -1,36 +0,0 @@ -# PlatformConnector - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**title** | **str** | | -**categories** | **List[str]** | | -**oauth** | **bool** | | -**deprecated** | **bool** | | -**secondary** | **bool** | | -**triggers** | [**List[ConnectorAction]**](ConnectorAction.md) | | -**actions** | [**List[ConnectorAction]**](ConnectorAction.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector - -# TODO update the JSON string below -json = "{}" -# create an instance of PlatformConnector from a JSON string -platform_connector_instance = PlatformConnector.from_json(json) -# print the JSON string representation of the object -print(PlatformConnector.to_json()) - -# convert the object into a dict -platform_connector_dict = platform_connector_instance.to_dict() -# create an instance of PlatformConnector from a dict -platform_connector_from_dict = PlatformConnector.from_dict(platform_connector_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md b/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md deleted file mode 100644 index 0bca4ce..0000000 --- a/src/workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# PlatformConnectorListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[PlatformConnector]**](PlatformConnector.md) | | -**count** | **int** | | -**page** | **int** | | -**per_page** | **int** | | - -## Example - -```python -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PlatformConnectorListResponse from a JSON string -platform_connector_list_response_instance = PlatformConnectorListResponse.from_json(json) -# print the JSON string representation of the object -print(PlatformConnectorListResponse.to_json()) - -# convert the object into a dict -platform_connector_list_response_dict = platform_connector_list_response_instance.to_dict() -# create an instance of PlatformConnectorListResponse from a dict -platform_connector_list_response_from_dict = PlatformConnectorListResponse.from_dict(platform_connector_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/Project.md b/src/workato_platform/client/workato_api/docs/Project.md deleted file mode 100644 index 92a5b9b..0000000 --- a/src/workato_platform/client/workato_api/docs/Project.md +++ /dev/null @@ -1,32 +0,0 @@ -# Project - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**description** | **str** | | [optional] -**folder_id** | **int** | | -**name** | **str** | | - -## Example - -```python -from workato_platform.client.workato_api.models.project import Project - -# TODO update the JSON string below -json = "{}" -# create an instance of Project from a JSON string -project_instance = Project.from_json(json) -# print the JSON string representation of the object -print(Project.to_json()) - -# convert the object into a dict -project_dict = project_instance.to_dict() -# create an instance of Project from a dict -project_from_dict = Project.from_dict(project_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ProjectsApi.md b/src/workato_platform/client/workato_api/docs/ProjectsApi.md deleted file mode 100644 index 279d8ca..0000000 --- a/src/workato_platform/client/workato_api/docs/ProjectsApi.md +++ /dev/null @@ -1,173 +0,0 @@ -# workato_platform.client.workato_api.ProjectsApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**delete_project**](ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project -[**list_projects**](ProjectsApi.md#list_projects) | **GET** /api/projects | List projects - - -# **delete_project** -> SuccessResponse delete_project(project_id) - -Delete a project - -Delete a project and all of its contents. This includes all child folders, -recipes, connections, and Workflow apps assets inside the project. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) - project_id = 56 # int | The ID of the project to delete - - try: - # Delete a project - api_response = await api_instance.delete_project(project_id) - print("The response of ProjectsApi->delete_project:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProjectsApi->delete_project: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **int**| The ID of the project to delete | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Project deleted successfully | - | -**401** | Authentication required | - | -**403** | Permission denied | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_projects** -> List[Project] list_projects(page=page, per_page=per_page) - -List projects - -Returns a list of projects belonging to the authenticated user with pagination support - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) - page = 1 # int | Page number (optional) (default to 1) - per_page = 100 # int | Number of projects per page (optional) (default to 100) - - try: - # List projects - api_response = await api_instance.list_projects(page=page, per_page=per_page) - print("The response of ProjectsApi->list_projects:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProjectsApi->list_projects: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **per_page** | **int**| Number of projects per page | [optional] [default to 100] - -### Return type - -[**List[Project]**](Project.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of projects retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/PropertiesApi.md b/src/workato_platform/client/workato_api/docs/PropertiesApi.md deleted file mode 100644 index 56b0eda..0000000 --- a/src/workato_platform/client/workato_api/docs/PropertiesApi.md +++ /dev/null @@ -1,186 +0,0 @@ -# workato_platform.client.workato_api.PropertiesApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_project_properties**](PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties -[**upsert_project_properties**](PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties - - -# **list_project_properties** -> Dict[str, str] list_project_properties(prefix, project_id) - -List project properties - -Returns a list of project-level properties belonging to a specific project in a -customer workspace that matches a project_id you specify. You must also include -a prefix. For example, if you provide the prefix salesforce_sync., any project -property with a name beginning with salesforce_sync., such as -salesforce_sync.admin_email, with the project_id you provided is returned. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) - prefix = 'salesforce_sync.' # str | Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. - project_id = 523144 # int | Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. - - try: - # List project properties - api_response = await api_instance.list_project_properties(prefix, project_id) - print("The response of PropertiesApi->list_project_properties:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PropertiesApi->list_project_properties: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **prefix** | **str**| Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. | - **project_id** | **int**| Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. | - -### Return type - -**Dict[str, str]** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Project properties retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **upsert_project_properties** -> SuccessResponse upsert_project_properties(project_id, upsert_project_properties_request) - -Upsert project properties - -Upserts project properties belonging to a specific project in a customer workspace -that matches a project_id you specify. This endpoint maps to properties based on -the names you provide in the request. - -## Property Limits -- Maximum number of project properties per project: 1,000 -- Maximum length of project property name: 100 characters -- Maximum length of project property value: 1,024 characters - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) - project_id = 523144 # int | Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. - upsert_project_properties_request = workato_platform.client.workato_api.UpsertProjectPropertiesRequest() # UpsertProjectPropertiesRequest | - - try: - # Upsert project properties - api_response = await api_instance.upsert_project_properties(project_id, upsert_project_properties_request) - print("The response of PropertiesApi->upsert_project_properties:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PropertiesApi->upsert_project_properties: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **int**| Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. | - **upsert_project_properties_request** | [**UpsertProjectPropertiesRequest**](UpsertProjectPropertiesRequest.md)| | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Project properties upserted successfully | - | -**400** | Bad request | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/Recipe.md b/src/workato_platform/client/workato_api/docs/Recipe.md deleted file mode 100644 index 3a9490a..0000000 --- a/src/workato_platform/client/workato_api/docs/Recipe.md +++ /dev/null @@ -1,58 +0,0 @@ -# Recipe - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**user_id** | **int** | | -**name** | **str** | | -**created_at** | **datetime** | | -**updated_at** | **datetime** | | -**copy_count** | **int** | | -**trigger_application** | **str** | | [optional] -**action_applications** | **List[str]** | | -**applications** | **List[str]** | | -**description** | **str** | | -**parameters_schema** | **List[object]** | | -**parameters** | **object** | | -**webhook_url** | **str** | | -**folder_id** | **int** | | -**running** | **bool** | | -**job_succeeded_count** | **int** | | -**job_failed_count** | **int** | | -**lifetime_task_count** | **int** | | -**last_run_at** | **datetime** | | [optional] -**stopped_at** | **datetime** | | [optional] -**version_no** | **int** | | -**stop_cause** | **str** | | -**config** | [**List[RecipeConfigInner]**](RecipeConfigInner.md) | | -**trigger_closure** | **object** | | -**code** | **str** | Recipe code (may be truncated if exclude_code is true) | -**author_name** | **str** | | -**version_author_name** | **str** | | -**version_author_email** | **str** | | -**version_comment** | **str** | | -**tags** | **List[str]** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.recipe import Recipe - -# TODO update the JSON string below -json = "{}" -# create an instance of Recipe from a JSON string -recipe_instance = Recipe.from_json(json) -# print the JSON string representation of the object -print(Recipe.to_json()) - -# convert the object into a dict -recipe_dict = recipe_instance.to_dict() -# create an instance of Recipe from a dict -recipe_from_dict = Recipe.from_dict(recipe_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md b/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md deleted file mode 100644 index faf7290..0000000 --- a/src/workato_platform/client/workato_api/docs/RecipeConfigInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# RecipeConfigInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keyword** | **str** | | [optional] -**name** | **str** | | [optional] -**provider** | **str** | | [optional] -**skip_validation** | **bool** | | [optional] -**account_id** | **int** | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner - -# TODO update the JSON string below -json = "{}" -# create an instance of RecipeConfigInner from a JSON string -recipe_config_inner_instance = RecipeConfigInner.from_json(json) -# print the JSON string representation of the object -print(RecipeConfigInner.to_json()) - -# convert the object into a dict -recipe_config_inner_dict = recipe_config_inner_instance.to_dict() -# create an instance of RecipeConfigInner from a dict -recipe_config_inner_from_dict = RecipeConfigInner.from_dict(recipe_config_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md b/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md deleted file mode 100644 index 34a36e2..0000000 --- a/src/workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RecipeConnectionUpdateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**adapter_name** | **str** | The internal name of the connector | -**connection_id** | **int** | The ID of the connection that replaces the existing one | - -## Example - -```python -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RecipeConnectionUpdateRequest from a JSON string -recipe_connection_update_request_instance = RecipeConnectionUpdateRequest.from_json(json) -# print the JSON string representation of the object -print(RecipeConnectionUpdateRequest.to_json()) - -# convert the object into a dict -recipe_connection_update_request_dict = recipe_connection_update_request_instance.to_dict() -# create an instance of RecipeConnectionUpdateRequest from a dict -recipe_connection_update_request_from_dict = RecipeConnectionUpdateRequest.from_dict(recipe_connection_update_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RecipeListResponse.md b/src/workato_platform/client/workato_api/docs/RecipeListResponse.md deleted file mode 100644 index c9e96c4..0000000 --- a/src/workato_platform/client/workato_api/docs/RecipeListResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# RecipeListResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[Recipe]**](Recipe.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RecipeListResponse from a JSON string -recipe_list_response_instance = RecipeListResponse.from_json(json) -# print the JSON string representation of the object -print(RecipeListResponse.to_json()) - -# convert the object into a dict -recipe_list_response_dict = recipe_list_response_instance.to_dict() -# create an instance of RecipeListResponse from a dict -recipe_list_response_from_dict = RecipeListResponse.from_dict(recipe_list_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md b/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md deleted file mode 100644 index daeb5e4..0000000 --- a/src/workato_platform/client/workato_api/docs/RecipeStartResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# RecipeStartResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | Indicates whether the recipe started successfully | -**code_errors** | **List[List[object]]** | Code validation errors (only present on failure) | [optional] -**config_errors** | **List[List[object]]** | Configuration errors (only present on failure) | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RecipeStartResponse from a JSON string -recipe_start_response_instance = RecipeStartResponse.from_json(json) -# print the JSON string representation of the object -print(RecipeStartResponse.to_json()) - -# convert the object into a dict -recipe_start_response_dict = recipe_start_response_instance.to_dict() -# create an instance of RecipeStartResponse from a dict -recipe_start_response_from_dict = RecipeStartResponse.from_dict(recipe_start_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RecipesApi.md b/src/workato_platform/client/workato_api/docs/RecipesApi.md deleted file mode 100644 index 4e6a282..0000000 --- a/src/workato_platform/client/workato_api/docs/RecipesApi.md +++ /dev/null @@ -1,367 +0,0 @@ -# workato_platform.client.workato_api.RecipesApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_recipes**](RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes -[**start_recipe**](RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe -[**stop_recipe**](RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe -[**update_recipe_connection**](RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe - - -# **list_recipes** -> RecipeListResponse list_recipes(adapter_names_all=adapter_names_all, adapter_names_any=adapter_names_any, folder_id=folder_id, order=order, page=page, per_page=per_page, running=running, since_id=since_id, stopped_after=stopped_after, stop_cause=stop_cause, updated_after=updated_after, includes=includes, exclude_code=exclude_code) - -List recipes - -Returns a list of recipes belonging to the authenticated user. -Recipes are returned in descending ID order. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) - adapter_names_all = 'adapter_names_all_example' # str | Comma-separated adapter names (recipes must use ALL) (optional) - adapter_names_any = 'adapter_names_any_example' # str | Comma-separated adapter names (recipes must use ANY) (optional) - folder_id = 56 # int | Return recipes in specified folder (optional) - order = 'order_example' # str | Set ordering method (optional) - page = 1 # int | Page number (optional) (default to 1) - per_page = 100 # int | Number of recipes per page (optional) (default to 100) - running = True # bool | If true, returns only running recipes (optional) - since_id = 56 # int | Return recipes with IDs lower than this value (optional) - stopped_after = '2013-10-20T19:20:30+01:00' # datetime | Exclude recipes stopped after this date (ISO 8601 format) (optional) - stop_cause = 'stop_cause_example' # str | Filter by stop reason (optional) - updated_after = '2013-10-20T19:20:30+01:00' # datetime | Include recipes updated after this date (ISO 8601 format) (optional) - includes = ['includes_example'] # List[str] | Additional fields to include (e.g., tags) (optional) - exclude_code = True # bool | Exclude recipe code from response for better performance (optional) - - try: - # List recipes - api_response = await api_instance.list_recipes(adapter_names_all=adapter_names_all, adapter_names_any=adapter_names_any, folder_id=folder_id, order=order, page=page, per_page=per_page, running=running, since_id=since_id, stopped_after=stopped_after, stop_cause=stop_cause, updated_after=updated_after, includes=includes, exclude_code=exclude_code) - print("The response of RecipesApi->list_recipes:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RecipesApi->list_recipes: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **adapter_names_all** | **str**| Comma-separated adapter names (recipes must use ALL) | [optional] - **adapter_names_any** | **str**| Comma-separated adapter names (recipes must use ANY) | [optional] - **folder_id** | **int**| Return recipes in specified folder | [optional] - **order** | **str**| Set ordering method | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **per_page** | **int**| Number of recipes per page | [optional] [default to 100] - **running** | **bool**| If true, returns only running recipes | [optional] - **since_id** | **int**| Return recipes with IDs lower than this value | [optional] - **stopped_after** | **datetime**| Exclude recipes stopped after this date (ISO 8601 format) | [optional] - **stop_cause** | **str**| Filter by stop reason | [optional] - **updated_after** | **datetime**| Include recipes updated after this date (ISO 8601 format) | [optional] - **includes** | [**List[str]**](str.md)| Additional fields to include (e.g., tags) | [optional] - **exclude_code** | **bool**| Exclude recipe code from response for better performance | [optional] - -### Return type - -[**RecipeListResponse**](RecipeListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of recipes retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **start_recipe** -> RecipeStartResponse start_recipe(recipe_id) - -Start a recipe - -Starts a recipe specified by recipe ID - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) - recipe_id = 56 # int | Recipe ID - - try: - # Start a recipe - api_response = await api_instance.start_recipe(recipe_id) - print("The response of RecipesApi->start_recipe:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RecipesApi->start_recipe: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recipe_id** | **int**| Recipe ID | - -### Return type - -[**RecipeStartResponse**](RecipeStartResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Recipe start response (success or validation failure) | - | -**400** | Bad request (OEM adapter usage limit or state transition error) | - | -**401** | Authentication required | - | -**422** | Unprocessable entity (webhook registration error) | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stop_recipe** -> SuccessResponse stop_recipe(recipe_id) - -Stop a recipe - -Stops a recipe specified by recipe ID - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) - recipe_id = 56 # int | Recipe ID - - try: - # Stop a recipe - api_response = await api_instance.stop_recipe(recipe_id) - print("The response of RecipesApi->stop_recipe:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RecipesApi->stop_recipe: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recipe_id** | **int**| Recipe ID | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Recipe stopped successfully | - | -**400** | Bad request (state transition error or recipe cannot be stopped) | - | -**401** | Authentication required | - | -**404** | Recipe not found | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_recipe_connection** -> SuccessResponse update_recipe_connection(recipe_id, recipe_connection_update_request) - -Update a connection for a recipe - -Updates the chosen connection for a specific connector in a stopped recipe. - - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) - recipe_id = 56 # int | ID of the recipe - recipe_connection_update_request = workato_platform.client.workato_api.RecipeConnectionUpdateRequest() # RecipeConnectionUpdateRequest | - - try: - # Update a connection for a recipe - api_response = await api_instance.update_recipe_connection(recipe_id, recipe_connection_update_request) - print("The response of RecipesApi->update_recipe_connection:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RecipesApi->update_recipe_connection: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recipe_id** | **int**| ID of the recipe | - **recipe_connection_update_request** | [**RecipeConnectionUpdateRequest**](RecipeConnectionUpdateRequest.md)| | - -### Return type - -[**SuccessResponse**](SuccessResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Connection updated successfully | - | -**400** | Bad request (recipe is running or invalid parameters) | - | -**401** | Authentication required | - | -**403** | Forbidden (no permission to update this recipe) | - | -**404** | Recipe not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md deleted file mode 100644 index 68a224d..0000000 --- a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# RuntimeUserConnectionCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parent_id** | **int** | ID of parent OAuth connector (connection must be established) | -**name** | **str** | Optional name for the runtime user connection | [optional] -**folder_id** | **int** | Folder to put connection (uses current project if not specified) | -**external_id** | **str** | End user string ID for identifying the connection | -**callback_url** | **str** | Optional URL called back after successful token acquisition | [optional] -**redirect_url** | **str** | Optional URL where user is redirected after successful authorization | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RuntimeUserConnectionCreateRequest from a JSON string -runtime_user_connection_create_request_instance = RuntimeUserConnectionCreateRequest.from_json(json) -# print the JSON string representation of the object -print(RuntimeUserConnectionCreateRequest.to_json()) - -# convert the object into a dict -runtime_user_connection_create_request_dict = runtime_user_connection_create_request_instance.to_dict() -# create an instance of RuntimeUserConnectionCreateRequest from a dict -runtime_user_connection_create_request_from_dict = RuntimeUserConnectionCreateRequest.from_dict(runtime_user_connection_create_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md deleted file mode 100644 index fc124cc..0000000 --- a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# RuntimeUserConnectionResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**RuntimeUserConnectionResponseData**](RuntimeUserConnectionResponseData.md) | | - -## Example - -```python -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RuntimeUserConnectionResponse from a JSON string -runtime_user_connection_response_instance = RuntimeUserConnectionResponse.from_json(json) -# print the JSON string representation of the object -print(RuntimeUserConnectionResponse.to_json()) - -# convert the object into a dict -runtime_user_connection_response_dict = runtime_user_connection_response_instance.to_dict() -# create an instance of RuntimeUserConnectionResponse from a dict -runtime_user_connection_response_from_dict = RuntimeUserConnectionResponse.from_dict(runtime_user_connection_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md b/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md deleted file mode 100644 index 0377d39..0000000 --- a/src/workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md +++ /dev/null @@ -1,30 +0,0 @@ -# RuntimeUserConnectionResponseData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | The ID of the created runtime user connection | -**url** | **str** | OAuth URL for user authorization | - -## Example - -```python -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData - -# TODO update the JSON string below -json = "{}" -# create an instance of RuntimeUserConnectionResponseData from a JSON string -runtime_user_connection_response_data_instance = RuntimeUserConnectionResponseData.from_json(json) -# print the JSON string representation of the object -print(RuntimeUserConnectionResponseData.to_json()) - -# convert the object into a dict -runtime_user_connection_response_data_dict = runtime_user_connection_response_data_instance.to_dict() -# create an instance of RuntimeUserConnectionResponseData from a dict -runtime_user_connection_response_data_from_dict = RuntimeUserConnectionResponseData.from_dict(runtime_user_connection_response_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/SuccessResponse.md b/src/workato_platform/client/workato_api/docs/SuccessResponse.md deleted file mode 100644 index eba19ad..0000000 --- a/src/workato_platform/client/workato_api/docs/SuccessResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# SuccessResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | - -## Example - -```python -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of SuccessResponse from a JSON string -success_response_instance = SuccessResponse.from_json(json) -# print the JSON string representation of the object -print(SuccessResponse.to_json()) - -# convert the object into a dict -success_response_dict = success_response_instance.to_dict() -# create an instance of SuccessResponse from a dict -success_response_from_dict = SuccessResponse.from_dict(success_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md b/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md deleted file mode 100644 index 372c05f..0000000 --- a/src/workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# UpsertProjectPropertiesRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**properties** | **Dict[str, str]** | Contains the names and values of the properties you plan to upsert. Property names are limited to 100 characters, values to 1,024 characters. | - -## Example - -```python -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpsertProjectPropertiesRequest from a JSON string -upsert_project_properties_request_instance = UpsertProjectPropertiesRequest.from_json(json) -# print the JSON string representation of the object -print(UpsertProjectPropertiesRequest.to_json()) - -# convert the object into a dict -upsert_project_properties_request_dict = upsert_project_properties_request_instance.to_dict() -# create an instance of UpsertProjectPropertiesRequest from a dict -upsert_project_properties_request_from_dict = UpsertProjectPropertiesRequest.from_dict(upsert_project_properties_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/User.md b/src/workato_platform/client/workato_api/docs/User.md deleted file mode 100644 index 5d2db1f..0000000 --- a/src/workato_platform/client/workato_api/docs/User.md +++ /dev/null @@ -1,48 +0,0 @@ -# User - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**created_at** | **datetime** | | -**plan_id** | **str** | | -**current_billing_period_start** | **datetime** | | -**current_billing_period_end** | **datetime** | | -**expert** | **bool** | | [optional] -**avatar_url** | **str** | | [optional] -**recipes_count** | **int** | | -**interested_applications** | **List[str]** | | [optional] -**company_name** | **str** | | -**location** | **str** | | -**last_seen** | **datetime** | | -**contact_phone** | **str** | | [optional] -**contact_email** | **str** | | [optional] -**about_me** | **str** | | [optional] -**email** | **str** | | -**phone** | **str** | | [optional] -**active_recipes_count** | **int** | | -**root_folder_id** | **int** | | - -## Example - -```python -from workato_platform.client.workato_api.models.user import User - -# TODO update the JSON string below -json = "{}" -# create an instance of User from a JSON string -user_instance = User.from_json(json) -# print the JSON string representation of the object -print(User.to_json()) - -# convert the object into a dict -user_dict = user_instance.to_dict() -# create an instance of User from a dict -user_from_dict = User.from_dict(user_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/UsersApi.md b/src/workato_platform/client/workato_api/docs/UsersApi.md deleted file mode 100644 index abd1bdc..0000000 --- a/src/workato_platform/client/workato_api/docs/UsersApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# workato_platform.client.workato_api.UsersApi - -All URIs are relative to *https://www.workato.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_workspace_details**](UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information - - -# **get_workspace_details** -> User get_workspace_details() - -Get current user information - -Returns information about the authenticated user - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.user import User -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.UsersApi(api_client) - - try: - # Get current user information - api_response = await api_instance.get_workspace_details() - print("The response of UsersApi->get_workspace_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UsersApi->get_workspace_details: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**User**](User.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User information retrieved successfully | - | -**401** | Authentication required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/src/workato_platform/client/workato_api/docs/ValidationError.md b/src/workato_platform/client/workato_api/docs/ValidationError.md deleted file mode 100644 index 0cc7200..0000000 --- a/src/workato_platform/client/workato_api/docs/ValidationError.md +++ /dev/null @@ -1,30 +0,0 @@ -# ValidationError - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**errors** | [**Dict[str, ValidationErrorErrorsValue]**](ValidationErrorErrorsValue.md) | | [optional] - -## Example - -```python -from workato_platform.client.workato_api.models.validation_error import ValidationError - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationError from a JSON string -validation_error_instance = ValidationError.from_json(json) -# print the JSON string representation of the object -print(ValidationError.to_json()) - -# convert the object into a dict -validation_error_dict = validation_error_instance.to_dict() -# create an instance of ValidationError from a dict -validation_error_from_dict = ValidationError.from_dict(validation_error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md b/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md deleted file mode 100644 index 6329125..0000000 --- a/src/workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md +++ /dev/null @@ -1,28 +0,0 @@ -# ValidationErrorErrorsValue - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationErrorErrorsValue from a JSON string -validation_error_errors_value_instance = ValidationErrorErrorsValue.from_json(json) -# print the JSON string representation of the object -print(ValidationErrorErrorsValue.to_json()) - -# convert the object into a dict -validation_error_errors_value_dict = validation_error_errors_value_instance.to_dict() -# create an instance of ValidationErrorErrorsValue from a dict -validation_error_errors_value_from_dict = ValidationErrorErrorsValue.from_dict(validation_error_errors_value_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/src/workato_platform/client/workato_api/exceptions.py b/src/workato_platform/client/workato_api/exceptions.py deleted file mode 100644 index 2aded31..0000000 --- a/src/workato_platform/client/workato_api/exceptions.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/src/workato_platform/client/workato_api/models/__init__.py b/src/workato_platform/client/workato_api/models/__init__.py deleted file mode 100644 index 28c8fe0..0000000 --- a/src/workato_platform/client/workato_api/models/__init__.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -# import models into model package -from workato_platform.client.workato_api.models.api_client import ApiClient -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.api_key import ApiKey -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.models.asset import Asset -from workato_platform.client.workato_api.models.asset_reference import AssetReference -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.models.connector_action import ConnectorAction -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.custom_connector import CustomConnector -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.models.data_table import DataTable -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response -from workato_platform.client.workato_api.models.error import Error -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse -from workato_platform.client.workato_api.models.import_results import ImportResults -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.models.recipe import Recipe -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.models.user import User -from workato_platform.client.workato_api.models.validation_error import ValidationError -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue - diff --git a/src/workato_platform/client/workato_api/models/api_client.py b/src/workato_platform/client/workato_api/models/api_client.py deleted file mode 100644 index 1d3e84b..0000000 --- a/src/workato_platform/client/workato_api/models/api_client.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner -from typing import Optional, Set -from typing_extensions import Self - -class ApiClient(BaseModel): - """ - ApiClient - """ # noqa: E501 - id: StrictInt - name: StrictStr - description: Optional[StrictStr] = None - active_api_keys_count: Optional[StrictInt] = None - total_api_keys_count: Optional[StrictInt] = None - created_at: datetime - updated_at: datetime - logo: Optional[StrictStr] = Field(description="URL to the client's logo image") - logo_2x: Optional[StrictStr] = Field(description="URL to the client's high-resolution logo image") - is_legacy: StrictBool - email: Optional[StrictStr] = None - auth_type: StrictStr - api_token: Optional[StrictStr] = Field(default=None, description="API token (only returned for token auth type)") - mtls_enabled: Optional[StrictBool] = None - validation_formula: Optional[StrictStr] = None - cert_bundle_ids: Optional[List[StrictInt]] = None - api_policies: List[ApiClientApiPoliciesInner] = Field(description="List of API policies associated with the client") - api_collections: List[ApiClientApiCollectionsInner] = Field(description="List of API collections associated with the client") - __properties: ClassVar[List[str]] = ["id", "name", "description", "active_api_keys_count", "total_api_keys_count", "created_at", "updated_at", "logo", "logo_2x", "is_legacy", "email", "auth_type", "api_token", "mtls_enabled", "validation_formula", "cert_bundle_ids", "api_policies", "api_collections"] - - @field_validator('auth_type') - def auth_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['token', 'jwt', 'oauth2', 'oidc']): - raise ValueError("must be one of enum values ('token', 'jwt', 'oauth2', 'oidc')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClient from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in api_policies (list) - _items = [] - if self.api_policies: - for _item_api_policies in self.api_policies: - if _item_api_policies: - _items.append(_item_api_policies.to_dict()) - _dict['api_policies'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in api_collections (list) - _items = [] - if self.api_collections: - for _item_api_collections in self.api_collections: - if _item_api_collections: - _items.append(_item_api_collections.to_dict()) - _dict['api_collections'] = _items - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if logo (nullable) is None - # and model_fields_set contains the field - if self.logo is None and "logo" in self.model_fields_set: - _dict['logo'] = None - - # set to None if logo_2x (nullable) is None - # and model_fields_set contains the field - if self.logo_2x is None and "logo_2x" in self.model_fields_set: - _dict['logo_2x'] = None - - # set to None if email (nullable) is None - # and model_fields_set contains the field - if self.email is None and "email" in self.model_fields_set: - _dict['email'] = None - - # set to None if api_token (nullable) is None - # and model_fields_set contains the field - if self.api_token is None and "api_token" in self.model_fields_set: - _dict['api_token'] = None - - # set to None if mtls_enabled (nullable) is None - # and model_fields_set contains the field - if self.mtls_enabled is None and "mtls_enabled" in self.model_fields_set: - _dict['mtls_enabled'] = None - - # set to None if validation_formula (nullable) is None - # and model_fields_set contains the field - if self.validation_formula is None and "validation_formula" in self.model_fields_set: - _dict['validation_formula'] = None - - # set to None if cert_bundle_ids (nullable) is None - # and model_fields_set contains the field - if self.cert_bundle_ids is None and "cert_bundle_ids" in self.model_fields_set: - _dict['cert_bundle_ids'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClient from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "description": obj.get("description"), - "active_api_keys_count": obj.get("active_api_keys_count"), - "total_api_keys_count": obj.get("total_api_keys_count"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "logo": obj.get("logo"), - "logo_2x": obj.get("logo_2x"), - "is_legacy": obj.get("is_legacy"), - "email": obj.get("email"), - "auth_type": obj.get("auth_type"), - "api_token": obj.get("api_token"), - "mtls_enabled": obj.get("mtls_enabled"), - "validation_formula": obj.get("validation_formula"), - "cert_bundle_ids": obj.get("cert_bundle_ids"), - "api_policies": [ApiClientApiPoliciesInner.from_dict(_item) for _item in obj["api_policies"]] if obj.get("api_policies") is not None else None, - "api_collections": [ApiClientApiCollectionsInner.from_dict(_item) for _item in obj["api_collections"]] if obj.get("api_collections") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py b/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py deleted file mode 100644 index ee214b3..0000000 --- a/src/workato_platform/client/workato_api/models/api_client_api_collections_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiClientApiCollectionsInner(BaseModel): - """ - ApiClientApiCollectionsInner - """ # noqa: E501 - id: Optional[StrictInt] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClientApiCollectionsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClientApiCollectionsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py b/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py deleted file mode 100644 index 440be2a..0000000 --- a/src/workato_platform/client/workato_api/models/api_client_api_policies_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiClientApiPoliciesInner(BaseModel): - """ - ApiClientApiPoliciesInner - """ # noqa: E501 - id: Optional[StrictInt] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClientApiPoliciesInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClientApiPoliciesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_client_create_request.py b/src/workato_platform/client/workato_api/models/api_client_create_request.py deleted file mode 100644 index 24fe35a..0000000 --- a/src/workato_platform/client/workato_api/models/api_client_create_request.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiClientCreateRequest(BaseModel): - """ - ApiClientCreateRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the client") - description: Optional[StrictStr] = Field(default=None, description="Description of the client") - project_id: Optional[StrictInt] = Field(default=None, description="ID of the project to create the client in") - api_portal_id: Optional[StrictInt] = Field(default=None, description="ID of the API portal to assign the client") - email: Optional[StrictStr] = Field(default=None, description="Email address for the client (required if api_portal_id provided)") - api_collection_ids: List[StrictInt] = Field(description="IDs of API collections to assign to the client") - api_policy_id: Optional[StrictInt] = Field(default=None, description="ID of the API policy to apply") - auth_type: StrictStr = Field(description="Authentication method") - jwt_method: Optional[StrictStr] = Field(default=None, description="JWT signing method (required when auth_type is jwt)") - jwt_secret: Optional[StrictStr] = Field(default=None, description="HMAC shared secret or RSA public key (required when auth_type is jwt)") - oidc_issuer: Optional[StrictStr] = Field(default=None, description="Discovery URL for OIDC identity provider") - oidc_jwks_uri: Optional[StrictStr] = Field(default=None, description="JWKS URL for OIDC identity provider") - access_profile_claim: Optional[StrictStr] = Field(default=None, description="JWT claim key for access profile identification") - required_claims: Optional[List[StrictStr]] = Field(default=None, description="List of claims to enforce") - allowed_issuers: Optional[List[StrictStr]] = Field(default=None, description="List of allowed issuers") - mtls_enabled: Optional[StrictBool] = Field(default=None, description="Whether mutual TLS is enabled") - validation_formula: Optional[StrictStr] = Field(default=None, description="Formula to validate client certificates") - cert_bundle_ids: Optional[List[StrictInt]] = Field(default=None, description="Certificate bundle IDs for mTLS") - __properties: ClassVar[List[str]] = ["name", "description", "project_id", "api_portal_id", "email", "api_collection_ids", "api_policy_id", "auth_type", "jwt_method", "jwt_secret", "oidc_issuer", "oidc_jwks_uri", "access_profile_claim", "required_claims", "allowed_issuers", "mtls_enabled", "validation_formula", "cert_bundle_ids"] - - @field_validator('auth_type') - def auth_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['token', 'jwt', 'oauth2', 'oidc']): - raise ValueError("must be one of enum values ('token', 'jwt', 'oauth2', 'oidc')") - return value - - @field_validator('jwt_method') - def jwt_method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['hmac', 'rsa']): - raise ValueError("must be one of enum values ('hmac', 'rsa')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClientCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClientCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "description": obj.get("description"), - "project_id": obj.get("project_id"), - "api_portal_id": obj.get("api_portal_id"), - "email": obj.get("email"), - "api_collection_ids": obj.get("api_collection_ids"), - "api_policy_id": obj.get("api_policy_id"), - "auth_type": obj.get("auth_type"), - "jwt_method": obj.get("jwt_method"), - "jwt_secret": obj.get("jwt_secret"), - "oidc_issuer": obj.get("oidc_issuer"), - "oidc_jwks_uri": obj.get("oidc_jwks_uri"), - "access_profile_claim": obj.get("access_profile_claim"), - "required_claims": obj.get("required_claims"), - "allowed_issuers": obj.get("allowed_issuers"), - "mtls_enabled": obj.get("mtls_enabled"), - "validation_formula": obj.get("validation_formula"), - "cert_bundle_ids": obj.get("cert_bundle_ids") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_client_list_response.py b/src/workato_platform/client/workato_api/models/api_client_list_response.py deleted file mode 100644 index ff4c94d..0000000 --- a/src/workato_platform/client/workato_api/models/api_client_list_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_client import ApiClient -from typing import Optional, Set -from typing_extensions import Self - -class ApiClientListResponse(BaseModel): - """ - ApiClientListResponse - """ # noqa: E501 - data: List[ApiClient] - count: StrictInt = Field(description="Total number of API clients") - page: StrictInt = Field(description="Current page number") - per_page: StrictInt = Field(description="Number of items per page") - __properties: ClassVar[List[str]] = ["data", "count", "page", "per_page"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClientListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClientListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ApiClient.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "count": obj.get("count"), - "page": obj.get("page"), - "per_page": obj.get("per_page") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_client_response.py b/src/workato_platform/client/workato_api/models/api_client_response.py deleted file mode 100644 index a379b09..0000000 --- a/src/workato_platform/client/workato_api/models/api_client_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_client import ApiClient -from typing import Optional, Set -from typing_extensions import Self - -class ApiClientResponse(BaseModel): - """ - ApiClientResponse - """ # noqa: E501 - data: ApiClient - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiClientResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiClientResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": ApiClient.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_collection.py b/src/workato_platform/client/workato_api/models/api_collection.py deleted file mode 100644 index 7fb1ceb..0000000 --- a/src/workato_platform/client/workato_api/models/api_collection.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.import_results import ImportResults -from typing import Optional, Set -from typing_extensions import Self - -class ApiCollection(BaseModel): - """ - ApiCollection - """ # noqa: E501 - id: StrictInt - name: StrictStr - project_id: StrictStr - url: StrictStr - api_spec_url: StrictStr - version: StrictStr - created_at: datetime - updated_at: datetime - message: Optional[StrictStr] = Field(default=None, description="Only present in creation/import responses") - import_results: Optional[ImportResults] = None - __properties: ClassVar[List[str]] = ["id", "name", "project_id", "url", "api_spec_url", "version", "created_at", "updated_at", "message", "import_results"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiCollection from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of import_results - if self.import_results: - _dict['import_results'] = self.import_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiCollection from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "project_id": obj.get("project_id"), - "url": obj.get("url"), - "api_spec_url": obj.get("api_spec_url"), - "version": obj.get("version"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "message": obj.get("message"), - "import_results": ImportResults.from_dict(obj["import_results"]) if obj.get("import_results") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_collection_create_request.py b/src/workato_platform/client/workato_api/models/api_collection_create_request.py deleted file mode 100644 index 973c52e..0000000 --- a/src/workato_platform/client/workato_api/models/api_collection_create_request.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec -from typing import Optional, Set -from typing_extensions import Self - -class ApiCollectionCreateRequest(BaseModel): - """ - ApiCollectionCreateRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the API collection") - project_id: Optional[StrictInt] = Field(default=None, description="ID of the project to associate the collection with") - proxy_connection_id: Optional[StrictInt] = Field(default=None, description="ID of a proxy connection for proxy mode") - openapi_spec: Optional[OpenApiSpec] = None - __properties: ClassVar[List[str]] = ["name", "project_id", "proxy_connection_id", "openapi_spec"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiCollectionCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of openapi_spec - if self.openapi_spec: - _dict['openapi_spec'] = self.openapi_spec.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiCollectionCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "project_id": obj.get("project_id"), - "proxy_connection_id": obj.get("proxy_connection_id"), - "openapi_spec": OpenApiSpec.from_dict(obj["openapi_spec"]) if obj.get("openapi_spec") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_endpoint.py b/src/workato_platform/client/workato_api/models/api_endpoint.py deleted file mode 100644 index 8157095..0000000 --- a/src/workato_platform/client/workato_api/models/api_endpoint.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiEndpoint(BaseModel): - """ - ApiEndpoint - """ # noqa: E501 - id: StrictInt - api_collection_id: StrictInt - flow_id: StrictInt - name: StrictStr - method: StrictStr - url: StrictStr - legacy_url: Optional[StrictStr] = None - base_path: StrictStr - path: StrictStr - active: StrictBool - legacy: StrictBool - created_at: datetime - updated_at: datetime - __properties: ClassVar[List[str]] = ["id", "api_collection_id", "flow_id", "name", "method", "url", "legacy_url", "base_path", "path", "active", "legacy", "created_at", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiEndpoint from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if legacy_url (nullable) is None - # and model_fields_set contains the field - if self.legacy_url is None and "legacy_url" in self.model_fields_set: - _dict['legacy_url'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiEndpoint from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "api_collection_id": obj.get("api_collection_id"), - "flow_id": obj.get("flow_id"), - "name": obj.get("name"), - "method": obj.get("method"), - "url": obj.get("url"), - "legacy_url": obj.get("legacy_url"), - "base_path": obj.get("base_path"), - "path": obj.get("path"), - "active": obj.get("active"), - "legacy": obj.get("legacy"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_key.py b/src/workato_platform/client/workato_api/models/api_key.py deleted file mode 100644 index d480730..0000000 --- a/src/workato_platform/client/workato_api/models/api_key.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiKey(BaseModel): - """ - ApiKey - """ # noqa: E501 - id: StrictInt - name: StrictStr - auth_type: StrictStr - ip_allow_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses in the allowlist") - ip_deny_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to deny requests from") - active: StrictBool - active_since: datetime - auth_token: StrictStr = Field(description="The generated API token") - __properties: ClassVar[List[str]] = ["id", "name", "auth_type", "ip_allow_list", "ip_deny_list", "active", "active_since", "auth_token"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiKey from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiKey from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "auth_type": obj.get("auth_type"), - "ip_allow_list": obj.get("ip_allow_list"), - "ip_deny_list": obj.get("ip_deny_list"), - "active": obj.get("active"), - "active_since": obj.get("active_since"), - "auth_token": obj.get("auth_token") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_key_create_request.py b/src/workato_platform/client/workato_api/models/api_key_create_request.py deleted file mode 100644 index 5e6691e..0000000 --- a/src/workato_platform/client/workato_api/models/api_key_create_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApiKeyCreateRequest(BaseModel): - """ - ApiKeyCreateRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the API key") - active: StrictBool = Field(description="Indicates whether the API key is enabled or disabled. Disabled keys cannot call any APIs") - ip_allow_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to add to the allowlist") - ip_deny_list: Optional[List[StrictStr]] = Field(default=None, description="List of IP addresses to deny requests from") - __properties: ClassVar[List[str]] = ["name", "active", "ip_allow_list", "ip_deny_list"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiKeyCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiKeyCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "active": obj.get("active"), - "ip_allow_list": obj.get("ip_allow_list"), - "ip_deny_list": obj.get("ip_deny_list") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_key_list_response.py b/src/workato_platform/client/workato_api/models/api_key_list_response.py deleted file mode 100644 index 7d36419..0000000 --- a/src/workato_platform/client/workato_api/models/api_key_list_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_key import ApiKey -from typing import Optional, Set -from typing_extensions import Self - -class ApiKeyListResponse(BaseModel): - """ - ApiKeyListResponse - """ # noqa: E501 - data: List[ApiKey] - count: StrictInt = Field(description="Total number of API keys") - page: StrictInt = Field(description="Current page number") - per_page: StrictInt = Field(description="Number of items per page") - __properties: ClassVar[List[str]] = ["data", "count", "page", "per_page"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiKeyListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiKeyListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ApiKey.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "count": obj.get("count"), - "page": obj.get("page"), - "per_page": obj.get("per_page") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/api_key_response.py b/src/workato_platform/client/workato_api/models/api_key_response.py deleted file mode 100644 index 045f239..0000000 --- a/src/workato_platform/client/workato_api/models/api_key_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_key import ApiKey -from typing import Optional, Set -from typing_extensions import Self - -class ApiKeyResponse(BaseModel): - """ - ApiKeyResponse - """ # noqa: E501 - data: ApiKey - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiKeyResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiKeyResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": ApiKey.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/asset.py b/src/workato_platform/client/workato_api/models/asset.py deleted file mode 100644 index 55b6b34..0000000 --- a/src/workato_platform/client/workato_api/models/asset.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Asset(BaseModel): - """ - Asset - """ # noqa: E501 - id: StrictInt - name: StrictStr - type: StrictStr - version: Optional[StrictInt] = None - folder: Optional[StrictStr] = None - absolute_path: Optional[StrictStr] = None - root_folder: StrictBool - unreachable: Optional[StrictBool] = None - zip_name: StrictStr - checked: StrictBool - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name", "type", "version", "folder", "absolute_path", "root_folder", "unreachable", "zip_name", "checked", "status"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") - return value - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['added', 'updated', 'no change']): - raise ValueError("must be one of enum values ('added', 'updated', 'no change')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Asset from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Asset from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type"), - "version": obj.get("version"), - "folder": obj.get("folder"), - "absolute_path": obj.get("absolute_path"), - "root_folder": obj.get("root_folder"), - "unreachable": obj.get("unreachable"), - "zip_name": obj.get("zip_name"), - "checked": obj.get("checked"), - "status": obj.get("status") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/asset_reference.py b/src/workato_platform/client/workato_api/models/asset_reference.py deleted file mode 100644 index e32f57f..0000000 --- a/src/workato_platform/client/workato_api/models/asset_reference.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class AssetReference(BaseModel): - """ - AssetReference - """ # noqa: E501 - id: StrictInt = Field(description="ID of the dependency") - type: StrictStr = Field(description="Type of dependent asset") - checked: Optional[StrictBool] = Field(default=True, description="Determines if the asset is included in the manifest") - version: Optional[StrictInt] = Field(default=None, description="The version of the asset") - folder: Optional[StrictStr] = Field(default='', description="The folder that contains the asset") - absolute_path: StrictStr = Field(description="The absolute path of the asset") - root_folder: Optional[StrictBool] = Field(default=False, description="Name root folder") - unreachable: Optional[StrictBool] = Field(default=False, description="Whether the asset is unreachable") - zip_name: Optional[StrictStr] = Field(default=None, description="Name in the exported zip file") - __properties: ClassVar[List[str]] = ["id", "type", "checked", "version", "folder", "absolute_path", "root_folder", "unreachable", "zip_name"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssetReference from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssetReference from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "type": obj.get("type"), - "checked": obj.get("checked") if obj.get("checked") is not None else True, - "version": obj.get("version"), - "folder": obj.get("folder") if obj.get("folder") is not None else '', - "absolute_path": obj.get("absolute_path"), - "root_folder": obj.get("root_folder") if obj.get("root_folder") is not None else False, - "unreachable": obj.get("unreachable") if obj.get("unreachable") is not None else False, - "zip_name": obj.get("zip_name") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/connection.py b/src/workato_platform/client/workato_api/models/connection.py deleted file mode 100644 index 8048c68..0000000 --- a/src/workato_platform/client/workato_api/models/connection.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Connection(BaseModel): - """ - Connection - """ # noqa: E501 - id: StrictInt - application: StrictStr - name: StrictStr - description: Optional[StrictStr] - authorized_at: Optional[datetime] - authorization_status: Optional[StrictStr] - authorization_error: Optional[StrictStr] - created_at: datetime - updated_at: datetime - external_id: Optional[StrictStr] - folder_id: StrictInt - connection_lost_at: Optional[datetime] - connection_lost_reason: Optional[StrictStr] - parent_id: Optional[StrictInt] - provider: Optional[StrictStr] = None - tags: Optional[List[StrictStr]] - __properties: ClassVar[List[str]] = ["id", "application", "name", "description", "authorized_at", "authorization_status", "authorization_error", "created_at", "updated_at", "external_id", "folder_id", "connection_lost_at", "connection_lost_reason", "parent_id", "provider", "tags"] - - @field_validator('authorization_status') - def authorization_status_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['success', 'failed', 'exception']): - raise ValueError("must be one of enum values ('success', 'failed', 'exception')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Connection from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if authorized_at (nullable) is None - # and model_fields_set contains the field - if self.authorized_at is None and "authorized_at" in self.model_fields_set: - _dict['authorized_at'] = None - - # set to None if authorization_status (nullable) is None - # and model_fields_set contains the field - if self.authorization_status is None and "authorization_status" in self.model_fields_set: - _dict['authorization_status'] = None - - # set to None if authorization_error (nullable) is None - # and model_fields_set contains the field - if self.authorization_error is None and "authorization_error" in self.model_fields_set: - _dict['authorization_error'] = None - - # set to None if external_id (nullable) is None - # and model_fields_set contains the field - if self.external_id is None and "external_id" in self.model_fields_set: - _dict['external_id'] = None - - # set to None if connection_lost_at (nullable) is None - # and model_fields_set contains the field - if self.connection_lost_at is None and "connection_lost_at" in self.model_fields_set: - _dict['connection_lost_at'] = None - - # set to None if connection_lost_reason (nullable) is None - # and model_fields_set contains the field - if self.connection_lost_reason is None and "connection_lost_reason" in self.model_fields_set: - _dict['connection_lost_reason'] = None - - # set to None if parent_id (nullable) is None - # and model_fields_set contains the field - if self.parent_id is None and "parent_id" in self.model_fields_set: - _dict['parent_id'] = None - - # set to None if tags (nullable) is None - # and model_fields_set contains the field - if self.tags is None and "tags" in self.model_fields_set: - _dict['tags'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Connection from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "application": obj.get("application"), - "name": obj.get("name"), - "description": obj.get("description"), - "authorized_at": obj.get("authorized_at"), - "authorization_status": obj.get("authorization_status"), - "authorization_error": obj.get("authorization_error"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "external_id": obj.get("external_id"), - "folder_id": obj.get("folder_id"), - "connection_lost_at": obj.get("connection_lost_at"), - "connection_lost_reason": obj.get("connection_lost_reason"), - "parent_id": obj.get("parent_id"), - "provider": obj.get("provider"), - "tags": obj.get("tags") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/connection_create_request.py b/src/workato_platform/client/workato_api/models/connection_create_request.py deleted file mode 100644 index 2fb97cc..0000000 --- a/src/workato_platform/client/workato_api/models/connection_create_request.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionCreateRequest(BaseModel): - """ - ConnectionCreateRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the connection") - provider: StrictStr = Field(description="The application type of the connection") - parent_id: Optional[StrictInt] = Field(default=None, description="The ID of the parent connection (must be same provider type)") - folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the project or folder containing the connection") - external_id: Optional[StrictStr] = Field(default=None, description="The external ID assigned to the connection") - shell_connection: Optional[StrictBool] = Field(default=False, description="Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. ") - input: Optional[Dict[str, Any]] = Field(default=None, description="Connection parameters (varies by provider)") - __properties: ClassVar[List[str]] = ["name", "provider", "parent_id", "folder_id", "external_id", "shell_connection", "input"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "provider": obj.get("provider"), - "parent_id": obj.get("parent_id"), - "folder_id": obj.get("folder_id"), - "external_id": obj.get("external_id"), - "shell_connection": obj.get("shell_connection") if obj.get("shell_connection") is not None else False, - "input": obj.get("input") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/connection_update_request.py b/src/workato_platform/client/workato_api/models/connection_update_request.py deleted file mode 100644 index f2e111f..0000000 --- a/src/workato_platform/client/workato_api/models/connection_update_request.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionUpdateRequest(BaseModel): - """ - ConnectionUpdateRequest - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="Name of the connection") - parent_id: Optional[StrictInt] = Field(default=None, description="The ID of the parent connection (must be same provider type)") - folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the project or folder containing the connection") - external_id: Optional[StrictStr] = Field(default=None, description="The external ID assigned to the connection") - shell_connection: Optional[StrictBool] = Field(default=False, description="Specifies whether the connection is a shell connection or authenticated connection. If false, credentials are passed and connection is tested. If true, credentials are passed but connection isn't tested. ") - input: Optional[Dict[str, Any]] = Field(default=None, description="Connection parameters (varies by provider)") - __properties: ClassVar[List[str]] = ["name", "parent_id", "folder_id", "external_id", "shell_connection", "input"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionUpdateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionUpdateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "parent_id": obj.get("parent_id"), - "folder_id": obj.get("folder_id"), - "external_id": obj.get("external_id"), - "shell_connection": obj.get("shell_connection") if obj.get("shell_connection") is not None else False, - "input": obj.get("input") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/connector_action.py b/src/workato_platform/client/workato_api/models/connector_action.py deleted file mode 100644 index 7fa08f3..0000000 --- a/src/workato_platform/client/workato_api/models/connector_action.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConnectorAction(BaseModel): - """ - ConnectorAction - """ # noqa: E501 - name: StrictStr - title: Optional[StrictStr] = None - deprecated: StrictBool - bulk: StrictBool - batch: StrictBool - __properties: ClassVar[List[str]] = ["name", "title", "deprecated", "bulk", "batch"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectorAction from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if title (nullable) is None - # and model_fields_set contains the field - if self.title is None and "title" in self.model_fields_set: - _dict['title'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectorAction from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "title": obj.get("title"), - "deprecated": obj.get("deprecated"), - "bulk": obj.get("bulk"), - "batch": obj.get("batch") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/connector_version.py b/src/workato_platform/client/workato_api/models/connector_version.py deleted file mode 100644 index e7f2dc6..0000000 --- a/src/workato_platform/client/workato_api/models/connector_version.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConnectorVersion(BaseModel): - """ - ConnectorVersion - """ # noqa: E501 - version: StrictInt - version_note: Optional[StrictStr] - created_at: datetime - released_at: datetime - __properties: ClassVar[List[str]] = ["version", "version_note", "created_at", "released_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectorVersion from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if version_note (nullable) is None - # and model_fields_set contains the field - if self.version_note is None and "version_note" in self.model_fields_set: - _dict['version_note'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectorVersion from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "version": obj.get("version"), - "version_note": obj.get("version_note"), - "created_at": obj.get("created_at"), - "released_at": obj.get("released_at") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/create_export_manifest_request.py b/src/workato_platform/client/workato_api/models/create_export_manifest_request.py deleted file mode 100644 index 1fc4fdb..0000000 --- a/src/workato_platform/client/workato_api/models/create_export_manifest_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest -from typing import Optional, Set -from typing_extensions import Self - -class CreateExportManifestRequest(BaseModel): - """ - CreateExportManifestRequest - """ # noqa: E501 - export_manifest: ExportManifestRequest - __properties: ClassVar[List[str]] = ["export_manifest"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateExportManifestRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of export_manifest - if self.export_manifest: - _dict['export_manifest'] = self.export_manifest.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateExportManifestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "export_manifest": ExportManifestRequest.from_dict(obj["export_manifest"]) if obj.get("export_manifest") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/create_folder_request.py b/src/workato_platform/client/workato_api/models/create_folder_request.py deleted file mode 100644 index 3f31ec3..0000000 --- a/src/workato_platform/client/workato_api/models/create_folder_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFolderRequest(BaseModel): - """ - CreateFolderRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the folder") - parent_id: Optional[StrictStr] = Field(default=None, description="Parent folder ID. Defaults to Home folder if not specified") - __properties: ClassVar[List[str]] = ["name", "parent_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateFolderRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateFolderRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "parent_id": obj.get("parent_id") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/custom_connector.py b/src/workato_platform/client/workato_api/models/custom_connector.py deleted file mode 100644 index c56b961..0000000 --- a/src/workato_platform/client/workato_api/models/custom_connector.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion -from typing import Optional, Set -from typing_extensions import Self - -class CustomConnector(BaseModel): - """ - CustomConnector - """ # noqa: E501 - id: StrictInt - name: StrictStr - title: StrictStr - latest_released_version: StrictInt - latest_released_version_note: Optional[StrictStr] - released_versions: List[ConnectorVersion] - static_webhook_url: Optional[StrictStr] - __properties: ClassVar[List[str]] = ["id", "name", "title", "latest_released_version", "latest_released_version_note", "released_versions", "static_webhook_url"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CustomConnector from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in released_versions (list) - _items = [] - if self.released_versions: - for _item_released_versions in self.released_versions: - if _item_released_versions: - _items.append(_item_released_versions.to_dict()) - _dict['released_versions'] = _items - # set to None if latest_released_version_note (nullable) is None - # and model_fields_set contains the field - if self.latest_released_version_note is None and "latest_released_version_note" in self.model_fields_set: - _dict['latest_released_version_note'] = None - - # set to None if static_webhook_url (nullable) is None - # and model_fields_set contains the field - if self.static_webhook_url is None and "static_webhook_url" in self.model_fields_set: - _dict['static_webhook_url'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CustomConnector from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "title": obj.get("title"), - "latest_released_version": obj.get("latest_released_version"), - "latest_released_version_note": obj.get("latest_released_version_note"), - "released_versions": [ConnectorVersion.from_dict(_item) for _item in obj["released_versions"]] if obj.get("released_versions") is not None else None, - "static_webhook_url": obj.get("static_webhook_url") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response.py b/src/workato_platform/client/workato_api/models/custom_connector_code_response.py deleted file mode 100644 index ee74d40..0000000 --- a/src/workato_platform/client/workato_api/models/custom_connector_code_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData -from typing import Optional, Set -from typing_extensions import Self - -class CustomConnectorCodeResponse(BaseModel): - """ - CustomConnectorCodeResponse - """ # noqa: E501 - data: CustomConnectorCodeResponseData - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CustomConnectorCodeResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CustomConnectorCodeResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": CustomConnectorCodeResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py b/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py deleted file mode 100644 index 5cd5bdf..0000000 --- a/src/workato_platform/client/workato_api/models/custom_connector_code_response_data.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class CustomConnectorCodeResponseData(BaseModel): - """ - CustomConnectorCodeResponseData - """ # noqa: E501 - code: StrictStr = Field(description="The connector code as a stringified value") - __properties: ClassVar[List[str]] = ["code"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CustomConnectorCodeResponseData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CustomConnectorCodeResponseData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/custom_connector_list_response.py b/src/workato_platform/client/workato_api/models/custom_connector_list_response.py deleted file mode 100644 index 3977b62..0000000 --- a/src/workato_platform/client/workato_api/models/custom_connector_list_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.custom_connector import CustomConnector -from typing import Optional, Set -from typing_extensions import Self - -class CustomConnectorListResponse(BaseModel): - """ - CustomConnectorListResponse - """ # noqa: E501 - result: List[CustomConnector] - __properties: ClassVar[List[str]] = ["result"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CustomConnectorListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in result (list) - _items = [] - if self.result: - for _item_result in self.result: - if _item_result: - _items.append(_item_result.to_dict()) - _dict['result'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CustomConnectorListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "result": [CustomConnector.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table.py b/src/workato_platform/client/workato_api/models/data_table.py deleted file mode 100644 index dd1048c..0000000 --- a/src/workato_platform/client/workato_api/models/data_table.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from uuid import UUID -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn -from typing import Optional, Set -from typing_extensions import Self - -class DataTable(BaseModel): - """ - DataTable - """ # noqa: E501 - id: UUID - name: StrictStr - var_schema: List[DataTableColumn] = Field(alias="schema") - folder_id: StrictInt - created_at: datetime - updated_at: datetime - __properties: ClassVar[List[str]] = ["id", "name", "schema", "folder_id", "created_at", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTable from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in var_schema (list) - _items = [] - if self.var_schema: - for _item_var_schema in self.var_schema: - if _item_var_schema: - _items.append(_item_var_schema.to_dict()) - _dict['schema'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTable from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "schema": [DataTableColumn.from_dict(_item) for _item in obj["schema"]] if obj.get("schema") is not None else None, - "folder_id": obj.get("folder_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_column.py b/src/workato_platform/client/workato_api/models/data_table_column.py deleted file mode 100644 index 3bb7b48..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_column.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from uuid import UUID -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation -from typing import Optional, Set -from typing_extensions import Self - -class DataTableColumn(BaseModel): - """ - DataTableColumn - """ # noqa: E501 - type: StrictStr - name: StrictStr - optional: StrictBool - field_id: UUID - hint: Optional[StrictStr] - default_value: Optional[Any] = Field(description="Default value matching the column type") - metadata: Dict[str, Any] - multivalue: StrictBool - relation: DataTableRelation - __properties: ClassVar[List[str]] = ["type", "name", "optional", "field_id", "hint", "default_value", "metadata", "multivalue", "relation"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation']): - raise ValueError("must be one of enum values ('boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableColumn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of relation - if self.relation: - _dict['relation'] = self.relation.to_dict() - # set to None if hint (nullable) is None - # and model_fields_set contains the field - if self.hint is None and "hint" in self.model_fields_set: - _dict['hint'] = None - - # set to None if default_value (nullable) is None - # and model_fields_set contains the field - if self.default_value is None and "default_value" in self.model_fields_set: - _dict['default_value'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableColumn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "name": obj.get("name"), - "optional": obj.get("optional"), - "field_id": obj.get("field_id"), - "hint": obj.get("hint"), - "default_value": obj.get("default_value"), - "metadata": obj.get("metadata"), - "multivalue": obj.get("multivalue"), - "relation": DataTableRelation.from_dict(obj["relation"]) if obj.get("relation") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_column_request.py b/src/workato_platform/client/workato_api/models/data_table_column_request.py deleted file mode 100644 index 0f9ab45..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_column_request.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation -from typing import Optional, Set -from typing_extensions import Self - -class DataTableColumnRequest(BaseModel): - """ - DataTableColumnRequest - """ # noqa: E501 - type: StrictStr = Field(description="The data type of the column") - name: StrictStr = Field(description="The name of the column") - optional: StrictBool = Field(description="Whether the column is optional") - field_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Unique UUID of the column") - hint: Optional[StrictStr] = Field(default=None, description="Tooltip hint for users") - default_value: Optional[Any] = Field(default=None, description="Default value matching the column type") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Additional metadata") - multivalue: Optional[StrictBool] = Field(default=None, description="Whether the column accepts multi-value input") - relation: Optional[DataTableRelation] = None - __properties: ClassVar[List[str]] = ["type", "name", "optional", "field_id", "hint", "default_value", "metadata", "multivalue", "relation"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation']): - raise ValueError("must be one of enum values ('boolean', 'date', 'date_time', 'integer', 'number', 'string', 'file', 'relation')") - return value - - @field_validator('field_id') - def field_id_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): - raise ValueError(r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableColumnRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of relation - if self.relation: - _dict['relation'] = self.relation.to_dict() - # set to None if default_value (nullable) is None - # and model_fields_set contains the field - if self.default_value is None and "default_value" in self.model_fields_set: - _dict['default_value'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableColumnRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "name": obj.get("name"), - "optional": obj.get("optional"), - "field_id": obj.get("field_id"), - "hint": obj.get("hint"), - "default_value": obj.get("default_value"), - "metadata": obj.get("metadata"), - "multivalue": obj.get("multivalue"), - "relation": DataTableRelation.from_dict(obj["relation"]) if obj.get("relation") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_create_request.py b/src/workato_platform/client/workato_api/models/data_table_create_request.py deleted file mode 100644 index 04d5ba2..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_create_request.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest -from typing import Optional, Set -from typing_extensions import Self - -class DataTableCreateRequest(BaseModel): - """ - DataTableCreateRequest - """ # noqa: E501 - name: StrictStr = Field(description="The name of the data table to create") - folder_id: StrictInt = Field(description="ID of the folder where to create the data table") - var_schema: List[DataTableColumnRequest] = Field(description="Array of column definitions", alias="schema") - __properties: ClassVar[List[str]] = ["name", "folder_id", "schema"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in var_schema (list) - _items = [] - if self.var_schema: - for _item_var_schema in self.var_schema: - if _item_var_schema: - _items.append(_item_var_schema.to_dict()) - _dict['schema'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "folder_id": obj.get("folder_id"), - "schema": [DataTableColumnRequest.from_dict(_item) for _item in obj["schema"]] if obj.get("schema") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_create_response.py b/src/workato_platform/client/workato_api/models/data_table_create_response.py deleted file mode 100644 index e97badb..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_create_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table import DataTable -from typing import Optional, Set -from typing_extensions import Self - -class DataTableCreateResponse(BaseModel): - """ - DataTableCreateResponse - """ # noqa: E501 - data: DataTable - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableCreateResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableCreateResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": DataTable.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_list_response.py b/src/workato_platform/client/workato_api/models/data_table_list_response.py deleted file mode 100644 index 58c4b31..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_list_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table import DataTable -from typing import Optional, Set -from typing_extensions import Self - -class DataTableListResponse(BaseModel): - """ - DataTableListResponse - """ # noqa: E501 - data: List[DataTable] - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [DataTable.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/data_table_relation.py b/src/workato_platform/client/workato_api/models/data_table_relation.py deleted file mode 100644 index 4e60838..0000000 --- a/src/workato_platform/client/workato_api/models/data_table_relation.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from uuid import UUID -from typing import Optional, Set -from typing_extensions import Self - -class DataTableRelation(BaseModel): - """ - DataTableRelation - """ # noqa: E501 - table_id: UUID - field_id: UUID - __properties: ClassVar[List[str]] = ["table_id", "field_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataTableRelation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataTableRelation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "table_id": obj.get("table_id"), - "field_id": obj.get("field_id") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/delete_project403_response.py b/src/workato_platform/client/workato_api/models/delete_project403_response.py deleted file mode 100644 index 584db9b..0000000 --- a/src/workato_platform/client/workato_api/models/delete_project403_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class DeleteProject403Response(BaseModel): - """ - DeleteProject403Response - """ # noqa: E501 - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeleteProject403Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeleteProject403Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/error.py b/src/workato_platform/client/workato_api/models/error.py deleted file mode 100644 index 504a792..0000000 --- a/src/workato_platform/client/workato_api/models/error.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class Error(BaseModel): - """ - Error - """ # noqa: E501 - message: StrictStr - __properties: ClassVar[List[str]] = ["message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Error from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Error from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/export_manifest_request.py b/src/workato_platform/client/workato_api/models/export_manifest_request.py deleted file mode 100644 index 83d7b47..0000000 --- a/src/workato_platform/client/workato_api/models/export_manifest_request.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.asset_reference import AssetReference -from typing import Optional, Set -from typing_extensions import Self - -class ExportManifestRequest(BaseModel): - """ - ExportManifestRequest - """ # noqa: E501 - name: StrictStr = Field(description="Name of the new manifest") - assets: Optional[List[AssetReference]] = Field(default=None, description="Dependent assets to include in the manifest") - folder_id: Optional[StrictInt] = Field(default=None, description="The ID of the folder containing the assets") - include_test_cases: Optional[StrictBool] = Field(default=False, description="Whether the manifest includes test cases") - auto_generate_assets: Optional[StrictBool] = Field(default=False, description="Auto-generates assets from a folder") - include_data: Optional[StrictBool] = Field(default=False, description="Include data from automatic asset generation") - include_tags: Optional[StrictBool] = Field(default=False, description="Include tags assigned to assets in the export manifest") - __properties: ClassVar[List[str]] = ["name", "assets", "folder_id", "include_test_cases", "auto_generate_assets", "include_data", "include_tags"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExportManifestRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in assets (list) - _items = [] - if self.assets: - for _item_assets in self.assets: - if _item_assets: - _items.append(_item_assets.to_dict()) - _dict['assets'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExportManifestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "assets": [AssetReference.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, - "folder_id": obj.get("folder_id"), - "include_test_cases": obj.get("include_test_cases") if obj.get("include_test_cases") is not None else False, - "auto_generate_assets": obj.get("auto_generate_assets") if obj.get("auto_generate_assets") is not None else False, - "include_data": obj.get("include_data") if obj.get("include_data") is not None else False, - "include_tags": obj.get("include_tags") if obj.get("include_tags") is not None else False - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response.py b/src/workato_platform/client/workato_api/models/export_manifest_response.py deleted file mode 100644 index f9cb5c6..0000000 --- a/src/workato_platform/client/workato_api/models/export_manifest_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult -from typing import Optional, Set -from typing_extensions import Self - -class ExportManifestResponse(BaseModel): - """ - ExportManifestResponse - """ # noqa: E501 - result: ExportManifestResponseResult - __properties: ClassVar[List[str]] = ["result"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExportManifestResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of result - if self.result: - _dict['result'] = self.result.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExportManifestResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "result": ExportManifestResponseResult.from_dict(obj["result"]) if obj.get("result") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/export_manifest_response_result.py b/src/workato_platform/client/workato_api/models/export_manifest_response_result.py deleted file mode 100644 index 492d071..0000000 --- a/src/workato_platform/client/workato_api/models/export_manifest_response_result.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ExportManifestResponseResult(BaseModel): - """ - ExportManifestResponseResult - """ # noqa: E501 - id: StrictInt - name: StrictStr - last_exported_at: Optional[datetime] - created_at: datetime - updated_at: datetime - deleted_at: Optional[datetime] - project_path: StrictStr - status: StrictStr - __properties: ClassVar[List[str]] = ["id", "name", "last_exported_at", "created_at", "updated_at", "deleted_at", "project_path", "status"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExportManifestResponseResult from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if last_exported_at (nullable) is None - # and model_fields_set contains the field - if self.last_exported_at is None and "last_exported_at" in self.model_fields_set: - _dict['last_exported_at'] = None - - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExportManifestResponseResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "last_exported_at": obj.get("last_exported_at"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "deleted_at": obj.get("deleted_at"), - "project_path": obj.get("project_path"), - "status": obj.get("status") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/folder.py b/src/workato_platform/client/workato_api/models/folder.py deleted file mode 100644 index 97fafed..0000000 --- a/src/workato_platform/client/workato_api/models/folder.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Folder(BaseModel): - """ - Folder - """ # noqa: E501 - id: StrictInt - name: StrictStr - parent_id: Optional[StrictInt] - is_project: StrictBool - project_id: Optional[StrictInt] - created_at: datetime - updated_at: datetime - __properties: ClassVar[List[str]] = ["id", "name", "parent_id", "is_project", "project_id", "created_at", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Folder from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if parent_id (nullable) is None - # and model_fields_set contains the field - if self.parent_id is None and "parent_id" in self.model_fields_set: - _dict['parent_id'] = None - - # set to None if project_id (nullable) is None - # and model_fields_set contains the field - if self.project_id is None and "project_id" in self.model_fields_set: - _dict['project_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Folder from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "parent_id": obj.get("parent_id"), - "is_project": obj.get("is_project"), - "project_id": obj.get("project_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response.py b/src/workato_platform/client/workato_api/models/folder_assets_response.py deleted file mode 100644 index 874744c..0000000 --- a/src/workato_platform/client/workato_api/models/folder_assets_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult -from typing import Optional, Set -from typing_extensions import Self - -class FolderAssetsResponse(BaseModel): - """ - FolderAssetsResponse - """ # noqa: E501 - result: FolderAssetsResponseResult - __properties: ClassVar[List[str]] = ["result"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderAssetsResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of result - if self.result: - _dict['result'] = self.result.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderAssetsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "result": FolderAssetsResponseResult.from_dict(obj["result"]) if obj.get("result") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/folder_assets_response_result.py b/src/workato_platform/client/workato_api/models/folder_assets_response_result.py deleted file mode 100644 index af85754..0000000 --- a/src/workato_platform/client/workato_api/models/folder_assets_response_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.asset import Asset -from typing import Optional, Set -from typing_extensions import Self - -class FolderAssetsResponseResult(BaseModel): - """ - FolderAssetsResponseResult - """ # noqa: E501 - assets: List[Asset] - __properties: ClassVar[List[str]] = ["assets"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderAssetsResponseResult from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in assets (list) - _items = [] - if self.assets: - for _item_assets in self.assets: - if _item_assets: - _items.append(_item_assets.to_dict()) - _dict['assets'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderAssetsResponseResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "assets": [Asset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/folder_creation_response.py b/src/workato_platform/client/workato_api/models/folder_creation_response.py deleted file mode 100644 index 6358b27..0000000 --- a/src/workato_platform/client/workato_api/models/folder_creation_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class FolderCreationResponse(BaseModel): - """ - FolderCreationResponse - """ # noqa: E501 - id: StrictInt - name: StrictStr - parent_id: Optional[StrictInt] - created_at: datetime - updated_at: datetime - project_id: Optional[StrictInt] - is_project: StrictBool - __properties: ClassVar[List[str]] = ["id", "name", "parent_id", "created_at", "updated_at", "project_id", "is_project"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderCreationResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if parent_id (nullable) is None - # and model_fields_set contains the field - if self.parent_id is None and "parent_id" in self.model_fields_set: - _dict['parent_id'] = None - - # set to None if project_id (nullable) is None - # and model_fields_set contains the field - if self.project_id is None and "project_id" in self.model_fields_set: - _dict['project_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderCreationResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "parent_id": obj.get("parent_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "project_id": obj.get("project_id"), - "is_project": obj.get("is_project") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/import_results.py b/src/workato_platform/client/workato_api/models/import_results.py deleted file mode 100644 index 21c2eaa..0000000 --- a/src/workato_platform/client/workato_api/models/import_results.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class ImportResults(BaseModel): - """ - ImportResults - """ # noqa: E501 - success: StrictBool - total_endpoints: StrictInt - failed_endpoints: StrictInt - failed_actions: List[StrictStr] - __properties: ClassVar[List[str]] = ["success", "total_endpoints", "failed_endpoints", "failed_actions"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ImportResults from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ImportResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "success": obj.get("success"), - "total_endpoints": obj.get("total_endpoints"), - "failed_endpoints": obj.get("failed_endpoints"), - "failed_actions": obj.get("failed_actions") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response.py b/src/workato_platform/client/workato_api/models/o_auth_url_response.py deleted file mode 100644 index 821ee05..0000000 --- a/src/workato_platform/client/workato_api/models/o_auth_url_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData -from typing import Optional, Set -from typing_extensions import Self - -class OAuthUrlResponse(BaseModel): - """ - OAuthUrlResponse - """ # noqa: E501 - data: OAuthUrlResponseData - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OAuthUrlResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OAuthUrlResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": OAuthUrlResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py b/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py deleted file mode 100644 index c4cf7a2..0000000 --- a/src/workato_platform/client/workato_api/models/o_auth_url_response_data.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class OAuthUrlResponseData(BaseModel): - """ - OAuthUrlResponseData - """ # noqa: E501 - url: StrictStr = Field(description="The OAuth authorization URL") - __properties: ClassVar[List[str]] = ["url"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OAuthUrlResponseData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OAuthUrlResponseData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "url": obj.get("url") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/open_api_spec.py b/src/workato_platform/client/workato_api/models/open_api_spec.py deleted file mode 100644 index 3df120a..0000000 --- a/src/workato_platform/client/workato_api/models/open_api_spec.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class OpenApiSpec(BaseModel): - """ - OpenApiSpec - """ # noqa: E501 - content: StrictStr = Field(description="The OpenAPI spec as a JSON or YAML string") - format: StrictStr = Field(description="Format of the OpenAPI spec") - __properties: ClassVar[List[str]] = ["content", "format"] - - @field_validator('format') - def format_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['json', 'yaml']): - raise ValueError("must be one of enum values ('json', 'yaml')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenApiSpec from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenApiSpec from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "content": obj.get("content"), - "format": obj.get("format") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/package_details_response.py b/src/workato_platform/client/workato_api/models/package_details_response.py deleted file mode 100644 index c2cdd02..0000000 --- a/src/workato_platform/client/workato_api/models/package_details_response.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner -from typing import Optional, Set -from typing_extensions import Self - -class PackageDetailsResponse(BaseModel): - """ - PackageDetailsResponse - """ # noqa: E501 - id: StrictInt - operation_type: StrictStr - status: StrictStr - export_manifest_id: Optional[StrictInt] = None - download_url: Optional[StrictStr] = None - error: Optional[StrictStr] = Field(default=None, description="Error message when status is failed") - recipe_status: Optional[List[PackageDetailsResponseRecipeStatusInner]] = None - __properties: ClassVar[List[str]] = ["id", "operation_type", "status", "export_manifest_id", "download_url", "error", "recipe_status"] - - @field_validator('operation_type') - def operation_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['export', 'import']): - raise ValueError("must be one of enum values ('export', 'import')") - return value - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['completed', 'failed', 'processing', 'in_progress']): - raise ValueError("must be one of enum values ('completed', 'failed', 'processing', 'in_progress')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PackageDetailsResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in recipe_status (list) - _items = [] - if self.recipe_status: - for _item_recipe_status in self.recipe_status: - if _item_recipe_status: - _items.append(_item_recipe_status.to_dict()) - _dict['recipe_status'] = _items - # set to None if download_url (nullable) is None - # and model_fields_set contains the field - if self.download_url is None and "download_url" in self.model_fields_set: - _dict['download_url'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PackageDetailsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "operation_type": obj.get("operation_type"), - "status": obj.get("status"), - "export_manifest_id": obj.get("export_manifest_id"), - "download_url": obj.get("download_url"), - "error": obj.get("error"), - "recipe_status": [PackageDetailsResponseRecipeStatusInner.from_dict(_item) for _item in obj["recipe_status"]] if obj.get("recipe_status") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py b/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py deleted file mode 100644 index fdfa5f2..0000000 --- a/src/workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PackageDetailsResponseRecipeStatusInner(BaseModel): - """ - PackageDetailsResponseRecipeStatusInner - """ # noqa: E501 - id: Optional[StrictInt] = None - import_result: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "import_result"] - - @field_validator('import_result') - def import_result_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['no_update_or_updated_without_restart', 'restarted', 'stopped', 'restart_failed']): - raise ValueError("must be one of enum values ('no_update_or_updated_without_restart', 'restarted', 'stopped', 'restart_failed')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PackageDetailsResponseRecipeStatusInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PackageDetailsResponseRecipeStatusInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "import_result": obj.get("import_result") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/package_response.py b/src/workato_platform/client/workato_api/models/package_response.py deleted file mode 100644 index 752cfab..0000000 --- a/src/workato_platform/client/workato_api/models/package_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PackageResponse(BaseModel): - """ - PackageResponse - """ # noqa: E501 - id: StrictInt - operation_type: StrictStr - status: StrictStr - export_manifest_id: Optional[StrictInt] = None - download_url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "operation_type", "status", "export_manifest_id", "download_url"] - - @field_validator('operation_type') - def operation_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['export', 'import']): - raise ValueError("must be one of enum values ('export', 'import')") - return value - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['completed', 'failed', 'processing', 'in_progress']): - raise ValueError("must be one of enum values ('completed', 'failed', 'processing', 'in_progress')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PackageResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PackageResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "operation_type": obj.get("operation_type"), - "status": obj.get("status"), - "export_manifest_id": obj.get("export_manifest_id"), - "download_url": obj.get("download_url") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/picklist_request.py b/src/workato_platform/client/workato_api/models/picklist_request.py deleted file mode 100644 index 4fcaeb4..0000000 --- a/src/workato_platform/client/workato_api/models/picklist_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PicklistRequest(BaseModel): - """ - PicklistRequest - """ # noqa: E501 - pick_list_name: StrictStr = Field(description="Name of the pick list") - pick_list_params: Optional[Dict[str, Any]] = Field(default=None, description="Picklist parameters, required in some picklists") - __properties: ClassVar[List[str]] = ["pick_list_name", "pick_list_params"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PicklistRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PicklistRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pick_list_name": obj.get("pick_list_name"), - "pick_list_params": obj.get("pick_list_params") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/picklist_response.py b/src/workato_platform/client/workato_api/models/picklist_response.py deleted file mode 100644 index cebdc4a..0000000 --- a/src/workato_platform/client/workato_api/models/picklist_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class PicklistResponse(BaseModel): - """ - PicklistResponse - """ # noqa: E501 - data: List[Annotated[List[Any], Field(min_length=4, max_length=4)]] = Field(description="Array of picklist value tuples [display_name, value, null, boolean]") - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PicklistResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PicklistResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": obj.get("data") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/platform_connector.py b/src/workato_platform/client/workato_api/models/platform_connector.py deleted file mode 100644 index 6959d6b..0000000 --- a/src/workato_platform/client/workato_api/models/platform_connector.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.connector_action import ConnectorAction -from typing import Optional, Set -from typing_extensions import Self - -class PlatformConnector(BaseModel): - """ - PlatformConnector - """ # noqa: E501 - name: StrictStr - title: StrictStr - categories: List[StrictStr] - oauth: StrictBool - deprecated: StrictBool - secondary: StrictBool - triggers: List[ConnectorAction] - actions: List[ConnectorAction] - __properties: ClassVar[List[str]] = ["name", "title", "categories", "oauth", "deprecated", "secondary", "triggers", "actions"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PlatformConnector from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in triggers (list) - _items = [] - if self.triggers: - for _item_triggers in self.triggers: - if _item_triggers: - _items.append(_item_triggers.to_dict()) - _dict['triggers'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in actions (list) - _items = [] - if self.actions: - for _item_actions in self.actions: - if _item_actions: - _items.append(_item_actions.to_dict()) - _dict['actions'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PlatformConnector from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "title": obj.get("title"), - "categories": obj.get("categories"), - "oauth": obj.get("oauth"), - "deprecated": obj.get("deprecated"), - "secondary": obj.get("secondary"), - "triggers": [ConnectorAction.from_dict(_item) for _item in obj["triggers"]] if obj.get("triggers") is not None else None, - "actions": [ConnectorAction.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/platform_connector_list_response.py b/src/workato_platform/client/workato_api/models/platform_connector_list_response.py deleted file mode 100644 index 2488bda..0000000 --- a/src/workato_platform/client/workato_api/models/platform_connector_list_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector -from typing import Optional, Set -from typing_extensions import Self - -class PlatformConnectorListResponse(BaseModel): - """ - PlatformConnectorListResponse - """ # noqa: E501 - items: List[PlatformConnector] - count: StrictInt - page: StrictInt - per_page: StrictInt - __properties: ClassVar[List[str]] = ["items", "count", "page", "per_page"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PlatformConnectorListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PlatformConnectorListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [PlatformConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "count": obj.get("count"), - "page": obj.get("page"), - "per_page": obj.get("per_page") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/project.py b/src/workato_platform/client/workato_api/models/project.py deleted file mode 100644 index c84ca87..0000000 --- a/src/workato_platform/client/workato_api/models/project.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Project(BaseModel): - """ - Project - """ # noqa: E501 - id: StrictInt - description: Optional[StrictStr] = None - folder_id: StrictInt - name: StrictStr - __properties: ClassVar[List[str]] = ["id", "description", "folder_id", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Project from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Project from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "description": obj.get("description"), - "folder_id": obj.get("folder_id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/recipe.py b/src/workato_platform/client/workato_api/models/recipe.py deleted file mode 100644 index 8688772..0000000 --- a/src/workato_platform/client/workato_api/models/recipe.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner -from typing import Optional, Set -from typing_extensions import Self - -class Recipe(BaseModel): - """ - Recipe - """ # noqa: E501 - id: StrictInt - user_id: StrictInt - name: StrictStr - created_at: datetime - updated_at: datetime - copy_count: StrictInt - trigger_application: Optional[StrictStr] = None - action_applications: List[StrictStr] - applications: List[StrictStr] - description: StrictStr - parameters_schema: List[Any] - parameters: Dict[str, Any] - webhook_url: Optional[StrictStr] - folder_id: StrictInt - running: StrictBool - job_succeeded_count: StrictInt - job_failed_count: StrictInt - lifetime_task_count: StrictInt - last_run_at: Optional[datetime] = None - stopped_at: Optional[datetime] = None - version_no: StrictInt - stop_cause: Optional[StrictStr] - config: List[RecipeConfigInner] - trigger_closure: Optional[Any] - code: StrictStr = Field(description="Recipe code (may be truncated if exclude_code is true)") - author_name: StrictStr - version_author_name: StrictStr - version_author_email: StrictStr - version_comment: Optional[StrictStr] - tags: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["id", "user_id", "name", "created_at", "updated_at", "copy_count", "trigger_application", "action_applications", "applications", "description", "parameters_schema", "parameters", "webhook_url", "folder_id", "running", "job_succeeded_count", "job_failed_count", "lifetime_task_count", "last_run_at", "stopped_at", "version_no", "stop_cause", "config", "trigger_closure", "code", "author_name", "version_author_name", "version_author_email", "version_comment", "tags"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Recipe from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in config (list) - _items = [] - if self.config: - for _item_config in self.config: - if _item_config: - _items.append(_item_config.to_dict()) - _dict['config'] = _items - # set to None if webhook_url (nullable) is None - # and model_fields_set contains the field - if self.webhook_url is None and "webhook_url" in self.model_fields_set: - _dict['webhook_url'] = None - - # set to None if stop_cause (nullable) is None - # and model_fields_set contains the field - if self.stop_cause is None and "stop_cause" in self.model_fields_set: - _dict['stop_cause'] = None - - # set to None if trigger_closure (nullable) is None - # and model_fields_set contains the field - if self.trigger_closure is None and "trigger_closure" in self.model_fields_set: - _dict['trigger_closure'] = None - - # set to None if version_comment (nullable) is None - # and model_fields_set contains the field - if self.version_comment is None and "version_comment" in self.model_fields_set: - _dict['version_comment'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Recipe from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "copy_count": obj.get("copy_count"), - "trigger_application": obj.get("trigger_application"), - "action_applications": obj.get("action_applications"), - "applications": obj.get("applications"), - "description": obj.get("description"), - "parameters_schema": obj.get("parameters_schema"), - "parameters": obj.get("parameters"), - "webhook_url": obj.get("webhook_url"), - "folder_id": obj.get("folder_id"), - "running": obj.get("running"), - "job_succeeded_count": obj.get("job_succeeded_count"), - "job_failed_count": obj.get("job_failed_count"), - "lifetime_task_count": obj.get("lifetime_task_count"), - "last_run_at": obj.get("last_run_at"), - "stopped_at": obj.get("stopped_at"), - "version_no": obj.get("version_no"), - "stop_cause": obj.get("stop_cause"), - "config": [RecipeConfigInner.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, - "trigger_closure": obj.get("trigger_closure"), - "code": obj.get("code"), - "author_name": obj.get("author_name"), - "version_author_name": obj.get("version_author_name"), - "version_author_email": obj.get("version_author_email"), - "version_comment": obj.get("version_comment"), - "tags": obj.get("tags") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/recipe_config_inner.py b/src/workato_platform/client/workato_api/models/recipe_config_inner.py deleted file mode 100644 index 5634e1b..0000000 --- a/src/workato_platform/client/workato_api/models/recipe_config_inner.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RecipeConfigInner(BaseModel): - """ - RecipeConfigInner - """ # noqa: E501 - keyword: Optional[StrictStr] = None - name: Optional[StrictStr] = None - provider: Optional[StrictStr] = None - skip_validation: Optional[StrictBool] = None - account_id: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["keyword", "name", "provider", "skip_validation", "account_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RecipeConfigInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if account_id (nullable) is None - # and model_fields_set contains the field - if self.account_id is None and "account_id" in self.model_fields_set: - _dict['account_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RecipeConfigInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "keyword": obj.get("keyword"), - "name": obj.get("name"), - "provider": obj.get("provider"), - "skip_validation": obj.get("skip_validation"), - "account_id": obj.get("account_id") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py b/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py deleted file mode 100644 index 514a5f4..0000000 --- a/src/workato_platform/client/workato_api/models/recipe_connection_update_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class RecipeConnectionUpdateRequest(BaseModel): - """ - RecipeConnectionUpdateRequest - """ # noqa: E501 - adapter_name: StrictStr = Field(description="The internal name of the connector") - connection_id: StrictInt = Field(description="The ID of the connection that replaces the existing one") - __properties: ClassVar[List[str]] = ["adapter_name", "connection_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RecipeConnectionUpdateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RecipeConnectionUpdateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "adapter_name": obj.get("adapter_name"), - "connection_id": obj.get("connection_id") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/recipe_list_response.py b/src/workato_platform/client/workato_api/models/recipe_list_response.py deleted file mode 100644 index 504ece8..0000000 --- a/src/workato_platform/client/workato_api/models/recipe_list_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.recipe import Recipe -from typing import Optional, Set -from typing_extensions import Self - -class RecipeListResponse(BaseModel): - """ - RecipeListResponse - """ # noqa: E501 - items: List[Recipe] - __properties: ClassVar[List[str]] = ["items"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RecipeListResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RecipeListResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [Recipe.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/recipe_start_response.py b/src/workato_platform/client/workato_api/models/recipe_start_response.py deleted file mode 100644 index 38fb7d5..0000000 --- a/src/workato_platform/client/workato_api/models/recipe_start_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RecipeStartResponse(BaseModel): - """ - RecipeStartResponse - """ # noqa: E501 - success: StrictBool = Field(description="Indicates whether the recipe started successfully") - code_errors: Optional[List[List[Any]]] = Field(default=None, description="Code validation errors (only present on failure)") - config_errors: Optional[List[List[Any]]] = Field(default=None, description="Configuration errors (only present on failure)") - __properties: ClassVar[List[str]] = ["success", "code_errors", "config_errors"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RecipeStartResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RecipeStartResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "success": obj.get("success"), - "code_errors": obj.get("code_errors"), - "config_errors": obj.get("config_errors") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py deleted file mode 100644 index 2d72c01..0000000 --- a/src/workato_platform/client/workato_api/models/runtime_user_connection_create_request.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RuntimeUserConnectionCreateRequest(BaseModel): - """ - RuntimeUserConnectionCreateRequest - """ # noqa: E501 - parent_id: StrictInt = Field(description="ID of parent OAuth connector (connection must be established)") - name: Optional[StrictStr] = Field(default=None, description="Optional name for the runtime user connection") - folder_id: StrictInt = Field(description="Folder to put connection (uses current project if not specified)") - external_id: StrictStr = Field(description="End user string ID for identifying the connection") - callback_url: Optional[StrictStr] = Field(default=None, description="Optional URL called back after successful token acquisition") - redirect_url: Optional[StrictStr] = Field(default=None, description="Optional URL where user is redirected after successful authorization") - __properties: ClassVar[List[str]] = ["parent_id", "name", "folder_id", "external_id", "callback_url", "redirect_url"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "parent_id": obj.get("parent_id"), - "name": obj.get("name"), - "folder_id": obj.get("folder_id"), - "external_id": obj.get("external_id"), - "callback_url": obj.get("callback_url"), - "redirect_url": obj.get("redirect_url") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py deleted file mode 100644 index 468aabb..0000000 --- a/src/workato_platform/client/workato_api/models/runtime_user_connection_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData -from typing import Optional, Set -from typing_extensions import Self - -class RuntimeUserConnectionResponse(BaseModel): - """ - RuntimeUserConnectionResponse - """ # noqa: E501 - data: RuntimeUserConnectionResponseData - __properties: ClassVar[List[str]] = ["data"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": RuntimeUserConnectionResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py b/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py deleted file mode 100644 index 66bc271..0000000 --- a/src/workato_platform/client/workato_api/models/runtime_user_connection_response_data.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class RuntimeUserConnectionResponseData(BaseModel): - """ - RuntimeUserConnectionResponseData - """ # noqa: E501 - id: StrictInt = Field(description="The ID of the created runtime user connection") - url: StrictStr = Field(description="OAuth URL for user authorization") - __properties: ClassVar[List[str]] = ["id", "url"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionResponseData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RuntimeUserConnectionResponseData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "url": obj.get("url") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/success_response.py b/src/workato_platform/client/workato_api/models/success_response.py deleted file mode 100644 index c1bd4cf..0000000 --- a/src/workato_platform/client/workato_api/models/success_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class SuccessResponse(BaseModel): - """ - SuccessResponse - """ # noqa: E501 - success: StrictBool - __properties: ClassVar[List[str]] = ["success"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SuccessResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SuccessResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "success": obj.get("success") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py b/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py deleted file mode 100644 index d6b0c50..0000000 --- a/src/workato_platform/client/workato_api/models/upsert_project_properties_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class UpsertProjectPropertiesRequest(BaseModel): - """ - UpsertProjectPropertiesRequest - """ # noqa: E501 - properties: Dict[str, Annotated[str, Field(strict=True, max_length=1024)]] = Field(description="Contains the names and values of the properties you plan to upsert. Property names are limited to 100 characters, values to 1,024 characters. ") - __properties: ClassVar[List[str]] = ["properties"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpsertProjectPropertiesRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpsertProjectPropertiesRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "properties": obj.get("properties") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/user.py b/src/workato_platform/client/workato_api/models/user.py deleted file mode 100644 index 6c05427..0000000 --- a/src/workato_platform/client/workato_api/models/user.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class User(BaseModel): - """ - User - """ # noqa: E501 - id: StrictInt - name: StrictStr - created_at: datetime - plan_id: StrictStr - current_billing_period_start: datetime - current_billing_period_end: datetime - expert: Optional[StrictBool] = None - avatar_url: Optional[StrictStr] = None - recipes_count: StrictInt - interested_applications: Optional[List[StrictStr]] = None - company_name: Optional[StrictStr] - location: Optional[StrictStr] - last_seen: datetime - contact_phone: Optional[StrictStr] = None - contact_email: Optional[StrictStr] = None - about_me: Optional[StrictStr] = None - email: StrictStr - phone: Optional[StrictStr] = None - active_recipes_count: StrictInt - root_folder_id: StrictInt - __properties: ClassVar[List[str]] = ["id", "name", "created_at", "plan_id", "current_billing_period_start", "current_billing_period_end", "expert", "avatar_url", "recipes_count", "interested_applications", "company_name", "location", "last_seen", "contact_phone", "contact_email", "about_me", "email", "phone", "active_recipes_count", "root_folder_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of User from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if company_name (nullable) is None - # and model_fields_set contains the field - if self.company_name is None and "company_name" in self.model_fields_set: - _dict['company_name'] = None - - # set to None if location (nullable) is None - # and model_fields_set contains the field - if self.location is None and "location" in self.model_fields_set: - _dict['location'] = None - - # set to None if contact_phone (nullable) is None - # and model_fields_set contains the field - if self.contact_phone is None and "contact_phone" in self.model_fields_set: - _dict['contact_phone'] = None - - # set to None if contact_email (nullable) is None - # and model_fields_set contains the field - if self.contact_email is None and "contact_email" in self.model_fields_set: - _dict['contact_email'] = None - - # set to None if about_me (nullable) is None - # and model_fields_set contains the field - if self.about_me is None and "about_me" in self.model_fields_set: - _dict['about_me'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of User from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "plan_id": obj.get("plan_id"), - "current_billing_period_start": obj.get("current_billing_period_start"), - "current_billing_period_end": obj.get("current_billing_period_end"), - "expert": obj.get("expert"), - "avatar_url": obj.get("avatar_url"), - "recipes_count": obj.get("recipes_count"), - "interested_applications": obj.get("interested_applications"), - "company_name": obj.get("company_name"), - "location": obj.get("location"), - "last_seen": obj.get("last_seen"), - "contact_phone": obj.get("contact_phone"), - "contact_email": obj.get("contact_email"), - "about_me": obj.get("about_me"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "active_recipes_count": obj.get("active_recipes_count"), - "root_folder_id": obj.get("root_folder_id") - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/validation_error.py b/src/workato_platform/client/workato_api/models/validation_error.py deleted file mode 100644 index a520c80..0000000 --- a/src/workato_platform/client/workato_api/models/validation_error.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue -from typing import Optional, Set -from typing_extensions import Self - -class ValidationError(BaseModel): - """ - ValidationError - """ # noqa: E501 - message: Optional[StrictStr] = None - errors: Optional[Dict[str, ValidationErrorErrorsValue]] = None - __properties: ClassVar[List[str]] = ["message", "errors"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidationError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in errors (dict) - _field_dict = {} - if self.errors: - for _key_errors in self.errors: - if self.errors[_key_errors]: - _field_dict[_key_errors] = self.errors[_key_errors].to_dict() - _dict['errors'] = _field_dict - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidationError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message"), - "errors": dict( - (_k, ValidationErrorErrorsValue.from_dict(_v)) - for _k, _v in obj["errors"].items() - ) - if obj.get("errors") is not None - else None - }) - return _obj - - diff --git a/src/workato_platform/client/workato_api/models/validation_error_errors_value.py b/src/workato_platform/client/workato_api/models/validation_error_errors_value.py deleted file mode 100644 index 5ea338f..0000000 --- a/src/workato_platform/client/workato_api/models/validation_error_errors_value.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -VALIDATIONERRORERRORSVALUE_ONE_OF_SCHEMAS = ["List[str]", "str"] - -class ValidationErrorErrorsValue(BaseModel): - """ - ValidationErrorErrorsValue - """ - # data type: str - oneof_schema_1_validator: Optional[StrictStr] = None - # data type: List[str] - oneof_schema_2_validator: Optional[List[StrictStr]] = None - actual_instance: Optional[Union[List[str], str]] = None - one_of_schemas: Set[str] = { "List[str]", "str" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = ValidationErrorErrorsValue.model_construct() - error_messages = [] - match = 0 - # validate data type: str - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: List[str] - try: - instance.oneof_schema_2_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into str - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into List[str] - try: - # validation - instance.oneof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_2_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into ValidationErrorErrorsValue with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], List[str], str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/src/workato_platform/client/workato_api/rest.py b/src/workato_platform/client/workato_api/rest.py deleted file mode 100644 index bd1192e..0000000 --- a/src/workato_platform/client/workato_api/rest.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl -from typing import Optional, Union - -import aiohttp -import aiohttp_retry - -from workato_platform.client.workato_api.exceptions import ApiException, ApiValueError - -RESTResponseType = aiohttp.ClientResponse - -ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'}) - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - async def read(self): - if self.data is None: - self.data = await self.response.read() - return self.data - - def getheaders(self): - """Returns a CIMultiDictProxy of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - - # maxsize is number of requests to host that are allowed in parallel - self.maxsize = configuration.connection_pool_maxsize - - self.ssl_context = ssl.create_default_context( - cafile=configuration.ssl_ca_cert, - cadata=configuration.ca_cert_data, - ) - if configuration.cert_file: - self.ssl_context.load_cert_chain( - configuration.cert_file, keyfile=configuration.key_file - ) - - if not configuration.verify_ssl: - self.ssl_context.check_hostname = False - self.ssl_context.verify_mode = ssl.CERT_NONE - - self.proxy = configuration.proxy - self.proxy_headers = configuration.proxy_headers - - self.retries = configuration.retries - - self.pool_manager: Optional[aiohttp.ClientSession] = None - self.retry_client: Optional[aiohttp_retry.RetryClient] = None - - async def close(self) -> None: - if self.pool_manager: - await self.pool_manager.close() - if self.retry_client is not None: - await self.retry_client.close() - - async def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Execute request - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - # url already contains the URL query string - timeout = _request_timeout or 5 * 60 - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - args = { - "method": method, - "url": url, - "timeout": timeout, - "headers": headers - } - - if self.proxy: - args["proxy"] = self.proxy - if self.proxy_headers: - args["proxy_headers"] = self.proxy_headers - - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if re.search('json', headers['Content-Type'], re.IGNORECASE): - if body is not None: - body = json.dumps(body) - args["data"] = body - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': - args["data"] = aiohttp.FormData(post_params) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by aiohttp - del headers['Content-Type'] - data = aiohttp.FormData() - for param in post_params: - k, v = param - if isinstance(v, tuple) and len(v) == 3: - data.add_field( - k, - value=v[1], - filename=v[0], - content_type=v[2] - ) - else: - # Ensures that dict objects are serialized - if isinstance(v, dict): - v = json.dumps(v) - elif isinstance(v, int): - v = str(v) - data.add_field(k, v) - args["data"] = data - - # Pass a `bytes` or `str` parameter directly in the body to support - # other content types than Json when `body` argument is provided - # in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - args["data"] = body - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - - pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] - - # https pool manager - if self.pool_manager is None: - self.pool_manager = aiohttp.ClientSession( - connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context), - trust_env=True, - ) - pool_manager = self.pool_manager - - if self.retries is not None and method in ALLOW_RETRY_METHODS: - if self.retry_client is None: - self.retry_client = aiohttp_retry.RetryClient( - client_session=self.pool_manager, - retry_options=aiohttp_retry.ExponentialRetry( - attempts=self.retries, - factor=2.0, - start_timeout=0.1, - max_timeout=120.0 - ) - ) - pool_manager = self.retry_client - - r = await pool_manager.request(**args) - - return RESTResponse(r) diff --git a/src/workato_platform/client/workato_api/test/__init__.py b/src/workato_platform/client/workato_api/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/workato_platform/client/workato_api/test/test_api_client.py b/src/workato_platform/client/workato_api/test/test_api_client.py deleted file mode 100644 index 59dcf4d..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client import ApiClient - -class TestApiClient(unittest.TestCase): - """ApiClient unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClient: - """Test ApiClient - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClient` - """ - model = ApiClient() - if include_optional: - return ApiClient( - id = 1, - name = 'Test client', - description = '', - active_api_keys_count = 2, - total_api_keys_count = 2, - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - email = 'alex.das@workato.com', - auth_type = 'token', - api_token = '', - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3], - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ] - ) - else: - return ApiClient( - id = 1, - name = 'Test client', - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - auth_type = 'token', - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ], - ) - """ - - def testApiClient(self): - """Test ApiClient""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py b/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py deleted file mode 100644 index 35ce754..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner - -class TestApiClientApiCollectionsInner(unittest.TestCase): - """ApiClientApiCollectionsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClientApiCollectionsInner: - """Test ApiClientApiCollectionsInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClientApiCollectionsInner` - """ - model = ApiClientApiCollectionsInner() - if include_optional: - return ApiClientApiCollectionsInner( - id = 1, - name = 'Echo collection' - ) - else: - return ApiClientApiCollectionsInner( - ) - """ - - def testApiClientApiCollectionsInner(self): - """Test ApiClientApiCollectionsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py b/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py deleted file mode 100644 index d9ed7d5..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner - -class TestApiClientApiPoliciesInner(unittest.TestCase): - """ApiClientApiPoliciesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClientApiPoliciesInner: - """Test ApiClientApiPoliciesInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClientApiPoliciesInner` - """ - model = ApiClientApiPoliciesInner() - if include_optional: - return ApiClientApiPoliciesInner( - id = 2, - name = 'Internal – Admins' - ) - else: - return ApiClientApiPoliciesInner( - ) - """ - - def testApiClientApiPoliciesInner(self): - """Test ApiClientApiPoliciesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_create_request.py b/src/workato_platform/client/workato_api/test/test_api_client_create_request.py deleted file mode 100644 index 86dab25..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client_create_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest - -class TestApiClientCreateRequest(unittest.TestCase): - """ApiClientCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClientCreateRequest: - """Test ApiClientCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClientCreateRequest` - """ - model = ApiClientCreateRequest() - if include_optional: - return ApiClientCreateRequest( - name = 'Automation Inc.', - description = 'API client for Product Catalog', - project_id = 56, - api_portal_id = 56, - email = 'alex.das@workato.com', - api_collection_ids = [6883], - api_policy_id = 56, - auth_type = 'token', - jwt_method = 'hmac', - jwt_secret = '', - oidc_issuer = '', - oidc_jwks_uri = '', - access_profile_claim = '', - required_claims = [ - '' - ], - allowed_issuers = [ - '' - ], - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3] - ) - else: - return ApiClientCreateRequest( - name = 'Automation Inc.', - api_collection_ids = [6883], - auth_type = 'token', - ) - """ - - def testApiClientCreateRequest(self): - """Test ApiClientCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_list_response.py b/src/workato_platform/client/workato_api/test/test_api_client_list_response.py deleted file mode 100644 index c35fafb..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client_list_response.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse - -class TestApiClientListResponse(unittest.TestCase): - """ApiClientListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClientListResponse: - """Test ApiClientListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClientListResponse` - """ - model = ApiClientListResponse() - if include_optional: - return ApiClientListResponse( - data = [ - workato_platform.client.workato_api.models.api_client.ApiClient( - id = 1, - name = 'Test client', - description = '', - active_api_keys_count = 2, - total_api_keys_count = 2, - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - email = 'alex.das@workato.com', - auth_type = 'token', - api_token = '', - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3], - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ], ) - ], - count = 1, - page = 1, - per_page = 100 - ) - else: - return ApiClientListResponse( - data = [ - workato_platform.client.workato_api.models.api_client.ApiClient( - id = 1, - name = 'Test client', - description = '', - active_api_keys_count = 2, - total_api_keys_count = 2, - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - email = 'alex.das@workato.com', - auth_type = 'token', - api_token = '', - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3], - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ], ) - ], - count = 1, - page = 1, - per_page = 100, - ) - """ - - def testApiClientListResponse(self): - """Test ApiClientListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_client_response.py b/src/workato_platform/client/workato_api/test/test_api_client_response.py deleted file mode 100644 index 90dc225..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_client_response.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse - -class TestApiClientResponse(unittest.TestCase): - """ApiClientResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiClientResponse: - """Test ApiClientResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiClientResponse` - """ - model = ApiClientResponse() - if include_optional: - return ApiClientResponse( - data = workato_platform.client.workato_api.models.api_client.ApiClient( - id = 1, - name = 'Test client', - description = '', - active_api_keys_count = 2, - total_api_keys_count = 2, - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - email = 'alex.das@workato.com', - auth_type = 'token', - api_token = '', - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3], - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ], ) - ) - else: - return ApiClientResponse( - data = workato_platform.client.workato_api.models.api_client.ApiClient( - id = 1, - name = 'Test client', - description = '', - active_api_keys_count = 2, - total_api_keys_count = 2, - created_at = '2023-05-25T08:08:21.413-07:00', - updated_at = '2024-10-25T03:52:07.122-07:00', - logo = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/small/psyduck.png?1729853526', - logo_2x = 'https://s3-48296.alexv.awstf.workato.com/paperclip/api_customers/logos/000/000/001/medium/psyduck.png?1729853526', - is_legacy = True, - email = 'alex.das@workato.com', - auth_type = 'token', - api_token = '', - mtls_enabled = True, - validation_formula = 'OU=Workato', - cert_bundle_ids = [3], - api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( - id = 2, - name = 'Internal – Admins', ) - ], - api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( - id = 1, - name = 'Echo collection', ) - ], ), - ) - """ - - def testApiClientResponse(self): - """Test ApiClientResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_collection.py b/src/workato_platform/client/workato_api/test/test_api_collection.py deleted file mode 100644 index ed55188..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_collection.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_collection import ApiCollection - -class TestApiCollection(unittest.TestCase): - """ApiCollection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCollection: - """Test ApiCollection - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCollection` - """ - model = ApiCollection() - if include_optional: - return ApiCollection( - id = 1361, - name = 'Quote to cash', - project_id = '523144', - url = 'https://api.peatql.io/quote-to-cash-v1', - api_spec_url = 'https://www.workato.com/doc/service/quote-to-cash-v1/swagger?token={token}', - version = '1.0', - created_at = '2020-06-15T22:20:15.327-07:00', - updated_at = '2020-06-15T22:20:15.327-07:00', - message = 'Import completed successfully', - import_results = workato_platform.client.workato_api.models.import_results.ImportResults( - success = True, - total_endpoints = 1, - failed_endpoints = 0, - failed_actions = [], ) - ) - else: - return ApiCollection( - id = 1361, - name = 'Quote to cash', - project_id = '523144', - url = 'https://api.peatql.io/quote-to-cash-v1', - api_spec_url = 'https://www.workato.com/doc/service/quote-to-cash-v1/swagger?token={token}', - version = '1.0', - created_at = '2020-06-15T22:20:15.327-07:00', - updated_at = '2020-06-15T22:20:15.327-07:00', - ) - """ - - def testApiCollection(self): - """Test ApiCollection""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py b/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py deleted file mode 100644 index 1649d90..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_collection_create_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest - -class TestApiCollectionCreateRequest(unittest.TestCase): - """ApiCollectionCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCollectionCreateRequest: - """Test ApiCollectionCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCollectionCreateRequest` - """ - model = ApiCollectionCreateRequest() - if include_optional: - return ApiCollectionCreateRequest( - name = 'My API Collection', - project_id = 123, - proxy_connection_id = 456, - openapi_spec = workato_platform.client.workato_api.models.open_api_spec.OpenApiSpec( - content = '', - format = 'json', ) - ) - else: - return ApiCollectionCreateRequest( - name = 'My API Collection', - ) - """ - - def testApiCollectionCreateRequest(self): - """Test ApiCollectionCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_endpoint.py b/src/workato_platform/client/workato_api/test/test_api_endpoint.py deleted file mode 100644 index a544055..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_endpoint.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint - -class TestApiEndpoint(unittest.TestCase): - """ApiEndpoint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiEndpoint: - """Test ApiEndpoint - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiEndpoint` - """ - model = ApiEndpoint() - if include_optional: - return ApiEndpoint( - id = 9903, - api_collection_id = 1391, - flow_id = 39999, - name = 'salesforce search', - method = 'GET', - url = 'https://api.na.workato.com/abstergoi/netsuite-customers-v1/salesforce/search', - legacy_url = '', - base_path = '/abstergoi/netsuite-customers-v1/salesforce/search', - path = 'salesforce/search', - active = False, - legacy = False, - created_at = '2020-08-05T05:59:55.991-07:00', - updated_at = '2020-08-05T05:59:55.991-07:00' - ) - else: - return ApiEndpoint( - id = 9903, - api_collection_id = 1391, - flow_id = 39999, - name = 'salesforce search', - method = 'GET', - url = 'https://api.na.workato.com/abstergoi/netsuite-customers-v1/salesforce/search', - base_path = '/abstergoi/netsuite-customers-v1/salesforce/search', - path = 'salesforce/search', - active = False, - legacy = False, - created_at = '2020-08-05T05:59:55.991-07:00', - updated_at = '2020-08-05T05:59:55.991-07:00', - ) - """ - - def testApiEndpoint(self): - """Test ApiEndpoint""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key.py b/src/workato_platform/client/workato_api/test/test_api_key.py deleted file mode 100644 index 17ea816..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_key.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_key import ApiKey - -class TestApiKey(unittest.TestCase): - """ApiKey unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiKey: - """Test ApiKey - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiKey` - """ - model = ApiKey() - if include_optional: - return ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"], - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f' - ) - else: - return ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', - ) - """ - - def testApiKey(self): - """Test ApiKey""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_create_request.py b/src/workato_platform/client/workato_api/test/test_api_key_create_request.py deleted file mode 100644 index 99364d1..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_key_create_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest - -class TestApiKeyCreateRequest(unittest.TestCase): - """ApiKeyCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiKeyCreateRequest: - """Test ApiKeyCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiKeyCreateRequest` - """ - model = ApiKeyCreateRequest() - if include_optional: - return ApiKeyCreateRequest( - name = 'Automation Inc.', - active = True, - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"] - ) - else: - return ApiKeyCreateRequest( - name = 'Automation Inc.', - active = True, - ) - """ - - def testApiKeyCreateRequest(self): - """Test ApiKeyCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_list_response.py b/src/workato_platform/client/workato_api/test/test_api_key_list_response.py deleted file mode 100644 index 3c82d05..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_key_list_response.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse - -class TestApiKeyListResponse(unittest.TestCase): - """ApiKeyListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiKeyListResponse: - """Test ApiKeyListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiKeyListResponse` - """ - model = ApiKeyListResponse() - if include_optional: - return ApiKeyListResponse( - data = [ - workato_platform.client.workato_api.models.api_key.ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"], - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) - ], - count = 1, - page = 1, - per_page = 100 - ) - else: - return ApiKeyListResponse( - data = [ - workato_platform.client.workato_api.models.api_key.ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"], - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) - ], - count = 1, - page = 1, - per_page = 100, - ) - """ - - def testApiKeyListResponse(self): - """Test ApiKeyListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_key_response.py b/src/workato_platform/client/workato_api/test/test_api_key_response.py deleted file mode 100644 index 738a290..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_key_response.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse - -class TestApiKeyResponse(unittest.TestCase): - """ApiKeyResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiKeyResponse: - """Test ApiKeyResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiKeyResponse` - """ - model = ApiKeyResponse() - if include_optional: - return ApiKeyResponse( - data = workato_platform.client.workato_api.models.api_key.ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"], - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ) - ) - else: - return ApiKeyResponse( - data = workato_platform.client.workato_api.models.api_key.ApiKey( - id = 37326, - name = 'Automation Inc.', - auth_type = 'token', - ip_allow_list = ["8.8.8.8/24"], - ip_deny_list = ["192.168.0.0/16"], - active = True, - active_since = '2025-02-12T08:41:44+05:30', - auth_token = '72b378def0c1d83e6a015e654a744c380655565a68c591cf9f3598d0d14bdb5f', ), - ) - """ - - def testApiKeyResponse(self): - """Test ApiKeyResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_api_platform_api.py b/src/workato_platform/client/workato_api/test/test_api_platform_api.py deleted file mode 100644 index 99bd1d2..0000000 --- a/src/workato_platform/client/workato_api/test/test_api_platform_api.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi - - -class TestAPIPlatformApi(unittest.IsolatedAsyncioTestCase): - """APIPlatformApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = APIPlatformApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_create_api_client(self) -> None: - """Test case for create_api_client - - Create API client (v2) - """ - pass - - async def test_create_api_collection(self) -> None: - """Test case for create_api_collection - - Create API collection - """ - pass - - async def test_create_api_key(self) -> None: - """Test case for create_api_key - - Create an API key - """ - pass - - async def test_disable_api_endpoint(self) -> None: - """Test case for disable_api_endpoint - - Disable an API endpoint - """ - pass - - async def test_enable_api_endpoint(self) -> None: - """Test case for enable_api_endpoint - - Enable an API endpoint - """ - pass - - async def test_list_api_clients(self) -> None: - """Test case for list_api_clients - - List API clients (v2) - """ - pass - - async def test_list_api_collections(self) -> None: - """Test case for list_api_collections - - List API collections - """ - pass - - async def test_list_api_endpoints(self) -> None: - """Test case for list_api_endpoints - - List API endpoints - """ - pass - - async def test_list_api_keys(self) -> None: - """Test case for list_api_keys - - List API keys - """ - pass - - async def test_refresh_api_key_secret(self) -> None: - """Test case for refresh_api_key_secret - - Refresh API key secret - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_asset.py b/src/workato_platform/client/workato_api/test/test_asset.py deleted file mode 100644 index a8add17..0000000 --- a/src/workato_platform/client/workato_api/test/test_asset.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.asset import Asset - -class TestAsset(unittest.TestCase): - """Asset unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Asset: - """Test Asset - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Asset` - """ - model = Asset() - if include_optional: - return Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - version = 1, - folder = '', - absolute_path = 'All projects', - root_folder = False, - unreachable = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - status = 'added' - ) - else: - return Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - root_folder = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - ) - """ - - def testAsset(self): - """Test Asset""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_asset_reference.py b/src/workato_platform/client/workato_api/test/test_asset_reference.py deleted file mode 100644 index 8c63114..0000000 --- a/src/workato_platform/client/workato_api/test/test_asset_reference.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.asset_reference import AssetReference - -class TestAssetReference(unittest.TestCase): - """AssetReference unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssetReference: - """Test AssetReference - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssetReference` - """ - model = AssetReference() - if include_optional: - return AssetReference( - id = 56, - type = 'recipe', - checked = True, - version = 56, - folder = '', - absolute_path = '', - root_folder = True, - unreachable = True, - zip_name = '' - ) - else: - return AssetReference( - id = 56, - type = 'recipe', - absolute_path = '', - ) - """ - - def testAssetReference(self): - """Test AssetReference""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection.py b/src/workato_platform/client/workato_api/test/test_connection.py deleted file mode 100644 index 42fce8c..0000000 --- a/src/workato_platform/client/workato_api/test/test_connection.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.connection import Connection - -class TestConnection(unittest.TestCase): - """Connection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Connection: - """Test Connection - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Connection` - """ - model = Connection() - if include_optional: - return Connection( - id = 36, - application = 'salesforce', - name = 'ACME Production Salesforce connection', - description = '', - authorized_at = '2015-05-26T22:53:52.528Z', - authorization_status = 'success', - authorization_error = '', - created_at = '2015-05-26T22:53:52.532Z', - updated_at = '2015-05-26T22:53:52.532Z', - external_id = '', - folder_id = 4515, - connection_lost_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - connection_lost_reason = '', - parent_id = 56, - provider = 'jira', - tags = ["tag-ANgeffPL-3gxQwA"] - ) - else: - return Connection( - id = 36, - application = 'salesforce', - name = 'ACME Production Salesforce connection', - description = '', - authorized_at = '2015-05-26T22:53:52.528Z', - authorization_status = 'success', - authorization_error = '', - created_at = '2015-05-26T22:53:52.532Z', - updated_at = '2015-05-26T22:53:52.532Z', - external_id = '', - folder_id = 4515, - connection_lost_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - connection_lost_reason = '', - parent_id = 56, - tags = ["tag-ANgeffPL-3gxQwA"], - ) - """ - - def testConnection(self): - """Test Connection""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection_create_request.py b/src/workato_platform/client/workato_api/test/test_connection_create_request.py deleted file mode 100644 index fe0b547..0000000 --- a/src/workato_platform/client/workato_api/test/test_connection_create_request.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest - -class TestConnectionCreateRequest(unittest.TestCase): - """ConnectionCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionCreateRequest: - """Test ConnectionCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionCreateRequest` - """ - model = ConnectionCreateRequest() - if include_optional: - return ConnectionCreateRequest( - name = 'Prod JIRA connection', - provider = 'jira', - parent_id = 56, - folder_id = 56, - external_id = '', - shell_connection = True, - input = {"host_name":"acme.atlassian.net","auth_type":"api_token","email":"smith@acme.com","apitoken":"XXXXXXXX"} - ) - else: - return ConnectionCreateRequest( - name = 'Prod JIRA connection', - provider = 'jira', - ) - """ - - def testConnectionCreateRequest(self): - """Test ConnectionCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connection_update_request.py b/src/workato_platform/client/workato_api/test/test_connection_update_request.py deleted file mode 100644 index 16356d5..0000000 --- a/src/workato_platform/client/workato_api/test/test_connection_update_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest - -class TestConnectionUpdateRequest(unittest.TestCase): - """ConnectionUpdateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionUpdateRequest: - """Test ConnectionUpdateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionUpdateRequest` - """ - model = ConnectionUpdateRequest() - if include_optional: - return ConnectionUpdateRequest( - name = 'Updated Prod JIRA connection', - parent_id = 56, - folder_id = 56, - external_id = '', - shell_connection = True, - input = {"host_name":"updated.atlassian.net","auth_type":"api_token","email":"updated@acme.com","apitoken":"XXXXXXXX"} - ) - else: - return ConnectionUpdateRequest( - ) - """ - - def testConnectionUpdateRequest(self): - """Test ConnectionUpdateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connections_api.py b/src/workato_platform/client/workato_api/test/test_connections_api.py deleted file mode 100644 index 552fdb1..0000000 --- a/src/workato_platform/client/workato_api/test/test_connections_api.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi - - -class TestConnectionsApi(unittest.IsolatedAsyncioTestCase): - """ConnectionsApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = ConnectionsApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_create_connection(self) -> None: - """Test case for create_connection - - Create a connection - """ - pass - - async def test_create_runtime_user_connection(self) -> None: - """Test case for create_runtime_user_connection - - Create OAuth runtime user connection - """ - pass - - async def test_get_connection_oauth_url(self) -> None: - """Test case for get_connection_oauth_url - - Get OAuth URL for connection - """ - pass - - async def test_get_connection_picklist(self) -> None: - """Test case for get_connection_picklist - - Get picklist values - """ - pass - - async def test_list_connections(self) -> None: - """Test case for list_connections - - List connections - """ - pass - - async def test_update_connection(self) -> None: - """Test case for update_connection - - Update a connection - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connector_action.py b/src/workato_platform/client/workato_api/test/test_connector_action.py deleted file mode 100644 index 66d4f35..0000000 --- a/src/workato_platform/client/workato_api/test/test_connector_action.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.connector_action import ConnectorAction - -class TestConnectorAction(unittest.TestCase): - """ConnectorAction unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectorAction: - """Test ConnectorAction - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectorAction` - """ - model = ConnectorAction() - if include_optional: - return ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False - ) - else: - return ConnectorAction( - name = 'new_entry', - deprecated = False, - bulk = False, - batch = False, - ) - """ - - def testConnectorAction(self): - """Test ConnectorAction""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connector_version.py b/src/workato_platform/client/workato_api/test/test_connector_version.py deleted file mode 100644 index 664618f..0000000 --- a/src/workato_platform/client/workato_api/test/test_connector_version.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion - -class TestConnectorVersion(unittest.TestCase): - """ConnectorVersion unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectorVersion: - """Test ConnectorVersion - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectorVersion` - """ - model = ConnectorVersion() - if include_optional: - return ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00' - ) - else: - return ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00', - ) - """ - - def testConnectorVersion(self): - """Test ConnectorVersion""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_connectors_api.py b/src/workato_platform/client/workato_api/test/test_connectors_api.py deleted file mode 100644 index accf9f7..0000000 --- a/src/workato_platform/client/workato_api/test/test_connectors_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi - - -class TestConnectorsApi(unittest.IsolatedAsyncioTestCase): - """ConnectorsApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = ConnectorsApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_get_custom_connector_code(self) -> None: - """Test case for get_custom_connector_code - - Get custom connector code - """ - pass - - async def test_list_custom_connectors(self) -> None: - """Test case for list_custom_connectors - - List custom connectors - """ - pass - - async def test_list_platform_connectors(self) -> None: - """Test case for list_platform_connectors - - List platform connectors - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py b/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py deleted file mode 100644 index b864d9d..0000000 --- a/src/workato_platform/client/workato_api/test/test_create_export_manifest_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest - -class TestCreateExportManifestRequest(unittest.TestCase): - """CreateExportManifestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateExportManifestRequest: - """Test CreateExportManifestRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateExportManifestRequest` - """ - model = CreateExportManifestRequest() - if include_optional: - return CreateExportManifestRequest( - export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( - name = 'Test Manifest', - assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( - id = 56, - type = 'recipe', - checked = True, - version = 56, - folder = '', - absolute_path = '', - root_folder = True, - unreachable = True, - zip_name = '', ) - ], - folder_id = 56, - include_test_cases = True, - auto_generate_assets = True, - include_data = True, - include_tags = True, ) - ) - else: - return CreateExportManifestRequest( - export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( - name = 'Test Manifest', - assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( - id = 56, - type = 'recipe', - checked = True, - version = 56, - folder = '', - absolute_path = '', - root_folder = True, - unreachable = True, - zip_name = '', ) - ], - folder_id = 56, - include_test_cases = True, - auto_generate_assets = True, - include_data = True, - include_tags = True, ), - ) - """ - - def testCreateExportManifestRequest(self): - """Test CreateExportManifestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_create_folder_request.py b/src/workato_platform/client/workato_api/test/test_create_folder_request.py deleted file mode 100644 index f22442f..0000000 --- a/src/workato_platform/client/workato_api/test/test_create_folder_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest - -class TestCreateFolderRequest(unittest.TestCase): - """CreateFolderRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFolderRequest: - """Test CreateFolderRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateFolderRequest` - """ - model = CreateFolderRequest() - if include_optional: - return CreateFolderRequest( - name = 'Salesforce folder', - parent_id = '' - ) - else: - return CreateFolderRequest( - name = 'Salesforce folder', - ) - """ - - def testCreateFolderRequest(self): - """Test CreateFolderRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector.py b/src/workato_platform/client/workato_api/test/test_custom_connector.py deleted file mode 100644 index 77b11a1..0000000 --- a/src/workato_platform/client/workato_api/test/test_custom_connector.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.custom_connector import CustomConnector - -class TestCustomConnector(unittest.TestCase): - """CustomConnector unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CustomConnector: - """Test CustomConnector - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CustomConnector` - """ - model = CustomConnector() - if include_optional: - return CustomConnector( - id = 562523, - name = 'apps_by_workato_connector_804586_1719241698', - title = 'Apps by Workato', - latest_released_version = 2, - latest_released_version_note = 'Connector Version', - released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00', ) - ], - static_webhook_url = '' - ) - else: - return CustomConnector( - id = 562523, - name = 'apps_by_workato_connector_804586_1719241698', - title = 'Apps by Workato', - latest_released_version = 2, - latest_released_version_note = 'Connector Version', - released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00', ) - ], - static_webhook_url = '', - ) - """ - - def testCustomConnector(self): - """Test CustomConnector""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py deleted file mode 100644 index 24e53df..0000000 --- a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse - -class TestCustomConnectorCodeResponse(unittest.TestCase): - """CustomConnectorCodeResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CustomConnectorCodeResponse: - """Test CustomConnectorCodeResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CustomConnectorCodeResponse` - """ - model = CustomConnectorCodeResponse() - if include_optional: - return CustomConnectorCodeResponse( - data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( - code = '', ) - ) - else: - return CustomConnectorCodeResponse( - data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( - code = '', ), - ) - """ - - def testCustomConnectorCodeResponse(self): - """Test CustomConnectorCodeResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py b/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py deleted file mode 100644 index 63b884c..0000000 --- a/src/workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData - -class TestCustomConnectorCodeResponseData(unittest.TestCase): - """CustomConnectorCodeResponseData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CustomConnectorCodeResponseData: - """Test CustomConnectorCodeResponseData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CustomConnectorCodeResponseData` - """ - model = CustomConnectorCodeResponseData() - if include_optional: - return CustomConnectorCodeResponseData( - code = '' - ) - else: - return CustomConnectorCodeResponseData( - code = '', - ) - """ - - def testCustomConnectorCodeResponseData(self): - """Test CustomConnectorCodeResponseData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py b/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py deleted file mode 100644 index b166701..0000000 --- a/src/workato_platform/client/workato_api/test/test_custom_connector_list_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse - -class TestCustomConnectorListResponse(unittest.TestCase): - """CustomConnectorListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CustomConnectorListResponse: - """Test CustomConnectorListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CustomConnectorListResponse` - """ - model = CustomConnectorListResponse() - if include_optional: - return CustomConnectorListResponse( - result = [ - workato_platform.client.workato_api.models.custom_connector.CustomConnector( - id = 562523, - name = 'apps_by_workato_connector_804586_1719241698', - title = 'Apps by Workato', - latest_released_version = 2, - latest_released_version_note = 'Connector Version', - released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00', ) - ], - static_webhook_url = '', ) - ] - ) - else: - return CustomConnectorListResponse( - result = [ - workato_platform.client.workato_api.models.custom_connector.CustomConnector( - id = 562523, - name = 'apps_by_workato_connector_804586_1719241698', - title = 'Apps by Workato', - latest_released_version = 2, - latest_released_version_note = 'Connector Version', - released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( - version = 2, - version_note = '', - created_at = '2024-06-24T11:17:52.516-04:00', - released_at = '2024-06-24T11:17:53.999-04:00', ) - ], - static_webhook_url = '', ) - ], - ) - """ - - def testCustomConnectorListResponse(self): - """Test CustomConnectorListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table.py b/src/workato_platform/client/workato_api/test/test_data_table.py deleted file mode 100644 index 6182ee7..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table import DataTable - -class TestDataTable(unittest.TestCase): - """DataTable unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTable: - """Test DataTable - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTable` - """ - model = DataTable() - if include_optional: - return DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - var_schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00' - ) - else: - return DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - var_schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00', - ) - """ - - def testDataTable(self): - """Test DataTable""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column.py b/src/workato_platform/client/workato_api/test/test_data_table_column.py deleted file mode 100644 index 27b5cbe..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_column.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn - -class TestDataTableColumn(unittest.TestCase): - """DataTableColumn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableColumn: - """Test DataTableColumn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableColumn` - """ - model = DataTableColumn() - if include_optional: - return DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = None, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) - ) - else: - return DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = None, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), - ) - """ - - def testDataTableColumn(self): - """Test DataTableColumn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_column_request.py b/src/workato_platform/client/workato_api/test/test_data_table_column_request.py deleted file mode 100644 index 701a4ef..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_column_request.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest - -class TestDataTableColumnRequest(unittest.TestCase): - """DataTableColumnRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableColumnRequest: - """Test DataTableColumnRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableColumnRequest` - """ - model = DataTableColumnRequest() - if include_optional: - return DataTableColumnRequest( - type = 'boolean', - name = '', - optional = True, - field_id = 'bf325375-e030-fccb-a009-17317c574773', - hint = '', - default_value = None, - metadata = { }, - multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) - ) - else: - return DataTableColumnRequest( - type = 'boolean', - name = '', - optional = True, - ) - """ - - def testDataTableColumnRequest(self): - """Test DataTableColumnRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_request.py b/src/workato_platform/client/workato_api/test/test_data_table_create_request.py deleted file mode 100644 index 52bbf2a..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_create_request.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest - -class TestDataTableCreateRequest(unittest.TestCase): - """DataTableCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableCreateRequest: - """Test DataTableCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableCreateRequest` - """ - model = DataTableCreateRequest() - if include_optional: - return DataTableCreateRequest( - name = 'Expense reports 4', - folder_id = 75509, - var_schema = [ - workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( - type = 'boolean', - name = '', - optional = True, - field_id = 'bf325375-e030-fccb-a009-17317c574773', - hint = '', - default_value = null, - metadata = { }, - multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ] - ) - else: - return DataTableCreateRequest( - name = 'Expense reports 4', - folder_id = 75509, - var_schema = [ - workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( - type = 'boolean', - name = '', - optional = True, - field_id = 'bf325375-e030-fccb-a009-17317c574773', - hint = '', - default_value = null, - metadata = { }, - multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - ) - """ - - def testDataTableCreateRequest(self): - """Test DataTableCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_create_response.py b/src/workato_platform/client/workato_api/test/test_data_table_create_response.py deleted file mode 100644 index 28537c8..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_create_response.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse - -class TestDataTableCreateResponse(unittest.TestCase): - """DataTableCreateResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableCreateResponse: - """Test DataTableCreateResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableCreateResponse` - """ - model = DataTableCreateResponse() - if include_optional: - return DataTableCreateResponse( - data = workato_platform.client.workato_api.models.data_table.DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00', ) - ) - else: - return DataTableCreateResponse( - data = workato_platform.client.workato_api.models.data_table.DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00', ), - ) - """ - - def testDataTableCreateResponse(self): - """Test DataTableCreateResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_list_response.py b/src/workato_platform/client/workato_api/test/test_data_table_list_response.py deleted file mode 100644 index 988e146..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_list_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse - -class TestDataTableListResponse(unittest.TestCase): - """DataTableListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableListResponse: - """Test DataTableListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableListResponse` - """ - model = DataTableListResponse() - if include_optional: - return DataTableListResponse( - data = [ - workato_platform.client.workato_api.models.data_table.DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00', ) - ] - ) - else: - return DataTableListResponse( - data = [ - workato_platform.client.workato_api.models.data_table.DataTable( - id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', - name = 'Resume screening', - schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( - type = 'string', - name = 'application_id', - optional = True, - field_id = '8f4a57d6-f524-47f2-ae59-be1a80dc2dd5', - hint = 'Greenhouse application ID', - default_value = null, - metadata = { }, - multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) - ], - folder_id = 24468824, - created_at = '2025-04-04T11:35:04.544-07:00', - updated_at = '2025-04-04T11:55:50.473-07:00', ) - ], - ) - """ - - def testDataTableListResponse(self): - """Test DataTableListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_table_relation.py b/src/workato_platform/client/workato_api/test/test_data_table_relation.py deleted file mode 100644 index ec79fa0..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_table_relation.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation - -class TestDataTableRelation(unittest.TestCase): - """DataTableRelation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DataTableRelation: - """Test DataTableRelation - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataTableRelation` - """ - model = DataTableRelation() - if include_optional: - return DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2' - ) - else: - return DataTableRelation( - table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', - field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', - ) - """ - - def testDataTableRelation(self): - """Test DataTableRelation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_data_tables_api.py b/src/workato_platform/client/workato_api/test/test_data_tables_api.py deleted file mode 100644 index 831ef85..0000000 --- a/src/workato_platform/client/workato_api/test/test_data_tables_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi - - -class TestDataTablesApi(unittest.IsolatedAsyncioTestCase): - """DataTablesApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = DataTablesApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_create_data_table(self) -> None: - """Test case for create_data_table - - Create data table - """ - pass - - async def test_list_data_tables(self) -> None: - """Test case for list_data_tables - - List data tables - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_delete_project403_response.py b/src/workato_platform/client/workato_api/test/test_delete_project403_response.py deleted file mode 100644 index 5991160..0000000 --- a/src/workato_platform/client/workato_api/test/test_delete_project403_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response - -class TestDeleteProject403Response(unittest.TestCase): - """DeleteProject403Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteProject403Response: - """Test DeleteProject403Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DeleteProject403Response` - """ - model = DeleteProject403Response() - if include_optional: - return DeleteProject403Response( - message = 'Cannot destroy folder' - ) - else: - return DeleteProject403Response( - ) - """ - - def testDeleteProject403Response(self): - """Test DeleteProject403Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_error.py b/src/workato_platform/client/workato_api/test/test_error.py deleted file mode 100644 index e25a187..0000000 --- a/src/workato_platform/client/workato_api/test/test_error.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - message = 'Authentication failed' - ) - else: - return Error( - message = 'Authentication failed', - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_api.py b/src/workato_platform/client/workato_api/test/test_export_api.py deleted file mode 100644 index 6211cad..0000000 --- a/src/workato_platform/client/workato_api/test/test_export_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.export_api import ExportApi - - -class TestExportApi(unittest.IsolatedAsyncioTestCase): - """ExportApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = ExportApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_create_export_manifest(self) -> None: - """Test case for create_export_manifest - - Create an export manifest - """ - pass - - async def test_list_assets_in_folder(self) -> None: - """Test case for list_assets_in_folder - - View assets in a folder - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_request.py b/src/workato_platform/client/workato_api/test/test_export_manifest_request.py deleted file mode 100644 index ee4681d..0000000 --- a/src/workato_platform/client/workato_api/test/test_export_manifest_request.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest - -class TestExportManifestRequest(unittest.TestCase): - """ExportManifestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExportManifestRequest: - """Test ExportManifestRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExportManifestRequest` - """ - model = ExportManifestRequest() - if include_optional: - return ExportManifestRequest( - name = 'Test Manifest', - assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( - id = 56, - type = 'recipe', - checked = True, - version = 56, - folder = '', - absolute_path = '', - root_folder = True, - unreachable = True, - zip_name = '', ) - ], - folder_id = 56, - include_test_cases = True, - auto_generate_assets = True, - include_data = True, - include_tags = True - ) - else: - return ExportManifestRequest( - name = 'Test Manifest', - ) - """ - - def testExportManifestRequest(self): - """Test ExportManifestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response.py b/src/workato_platform/client/workato_api/test/test_export_manifest_response.py deleted file mode 100644 index 8009581..0000000 --- a/src/workato_platform/client/workato_api/test/test_export_manifest_response.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse - -class TestExportManifestResponse(unittest.TestCase): - """ExportManifestResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExportManifestResponse: - """Test ExportManifestResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExportManifestResponse` - """ - model = ExportManifestResponse() - if include_optional: - return ExportManifestResponse( - result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( - id = 12, - name = 'Test Manifest', - last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - created_at = '2023-02-27T02:44:59.447-08:00', - updated_at = '2023-02-27T02:44:59.447-08:00', - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - project_path = 'Folder 1', - status = 'working', ) - ) - else: - return ExportManifestResponse( - result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( - id = 12, - name = 'Test Manifest', - last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - created_at = '2023-02-27T02:44:59.447-08:00', - updated_at = '2023-02-27T02:44:59.447-08:00', - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - project_path = 'Folder 1', - status = 'working', ), - ) - """ - - def testExportManifestResponse(self): - """Test ExportManifestResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py b/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py deleted file mode 100644 index 1f99297..0000000 --- a/src/workato_platform/client/workato_api/test/test_export_manifest_response_result.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult - -class TestExportManifestResponseResult(unittest.TestCase): - """ExportManifestResponseResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExportManifestResponseResult: - """Test ExportManifestResponseResult - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExportManifestResponseResult` - """ - model = ExportManifestResponseResult() - if include_optional: - return ExportManifestResponseResult( - id = 12, - name = 'Test Manifest', - last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - created_at = '2023-02-27T02:44:59.447-08:00', - updated_at = '2023-02-27T02:44:59.447-08:00', - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - project_path = 'Folder 1', - status = 'working' - ) - else: - return ExportManifestResponseResult( - id = 12, - name = 'Test Manifest', - last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - created_at = '2023-02-27T02:44:59.447-08:00', - updated_at = '2023-02-27T02:44:59.447-08:00', - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - project_path = 'Folder 1', - status = 'working', - ) - """ - - def testExportManifestResponseResult(self): - """Test ExportManifestResponseResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder.py b/src/workato_platform/client/workato_api/test/test_folder.py deleted file mode 100644 index 3ccc6d2..0000000 --- a/src/workato_platform/client/workato_api/test/test_folder.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.folder import Folder - -class TestFolder(unittest.TestCase): - """Folder unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Folder: - """Test Folder - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Folder` - """ - model = Folder() - if include_optional: - return Folder( - id = 7498, - name = 'Netsuite production', - parent_id = 3319, - is_project = False, - project_id = 4567, - created_at = '2020-07-31T03:08:29.486-07:00', - updated_at = '2020-07-31T03:08:29.493-07:00' - ) - else: - return Folder( - id = 7498, - name = 'Netsuite production', - parent_id = 3319, - is_project = False, - project_id = 4567, - created_at = '2020-07-31T03:08:29.486-07:00', - updated_at = '2020-07-31T03:08:29.493-07:00', - ) - """ - - def testFolder(self): - """Test Folder""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response.py b/src/workato_platform/client/workato_api/test/test_folder_assets_response.py deleted file mode 100644 index 3c594fa..0000000 --- a/src/workato_platform/client/workato_api/test/test_folder_assets_response.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse - -class TestFolderAssetsResponse(unittest.TestCase): - """FolderAssetsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderAssetsResponse: - """Test FolderAssetsResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderAssetsResponse` - """ - model = FolderAssetsResponse() - if include_optional: - return FolderAssetsResponse( - result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( - assets = [ - workato_platform.client.workato_api.models.asset.Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - version = 1, - folder = '', - absolute_path = 'All projects', - root_folder = False, - unreachable = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - status = 'added', ) - ], ) - ) - else: - return FolderAssetsResponse( - result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( - assets = [ - workato_platform.client.workato_api.models.asset.Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - version = 1, - folder = '', - absolute_path = 'All projects', - root_folder = False, - unreachable = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - status = 'added', ) - ], ), - ) - """ - - def testFolderAssetsResponse(self): - """Test FolderAssetsResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py b/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py deleted file mode 100644 index eb6fbdd..0000000 --- a/src/workato_platform/client/workato_api/test/test_folder_assets_response_result.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult - -class TestFolderAssetsResponseResult(unittest.TestCase): - """FolderAssetsResponseResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderAssetsResponseResult: - """Test FolderAssetsResponseResult - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderAssetsResponseResult` - """ - model = FolderAssetsResponseResult() - if include_optional: - return FolderAssetsResponseResult( - assets = [ - workato_platform.client.workato_api.models.asset.Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - version = 1, - folder = '', - absolute_path = 'All projects', - root_folder = False, - unreachable = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - status = 'added', ) - ] - ) - else: - return FolderAssetsResponseResult( - assets = [ - workato_platform.client.workato_api.models.asset.Asset( - id = 12, - name = 'Copy of Recipeops', - type = 'recipe', - version = 1, - folder = '', - absolute_path = 'All projects', - root_folder = False, - unreachable = False, - zip_name = 'copy_of_recipeops.recipe.json', - checked = True, - status = 'added', ) - ], - ) - """ - - def testFolderAssetsResponseResult(self): - """Test FolderAssetsResponseResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folder_creation_response.py b/src/workato_platform/client/workato_api/test/test_folder_creation_response.py deleted file mode 100644 index c993e9f..0000000 --- a/src/workato_platform/client/workato_api/test/test_folder_creation_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse - -class TestFolderCreationResponse(unittest.TestCase): - """FolderCreationResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderCreationResponse: - """Test FolderCreationResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderCreationResponse` - """ - model = FolderCreationResponse() - if include_optional: - return FolderCreationResponse( - id = 80, - name = 'My Project', - parent_id = 1, - created_at = '2025-09-04T06:25:36.102-07:00', - updated_at = '2025-09-04T06:25:36.102-07:00', - project_id = 58, - is_project = True - ) - else: - return FolderCreationResponse( - id = 80, - name = 'My Project', - parent_id = 1, - created_at = '2025-09-04T06:25:36.102-07:00', - updated_at = '2025-09-04T06:25:36.102-07:00', - project_id = 58, - is_project = True, - ) - """ - - def testFolderCreationResponse(self): - """Test FolderCreationResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_folders_api.py b/src/workato_platform/client/workato_api/test/test_folders_api.py deleted file mode 100644 index fec0291..0000000 --- a/src/workato_platform/client/workato_api/test/test_folders_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.folders_api import FoldersApi - - -class TestFoldersApi(unittest.IsolatedAsyncioTestCase): - """FoldersApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = FoldersApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_create_folder(self) -> None: - """Test case for create_folder - - Create a folder - """ - pass - - async def test_list_folders(self) -> None: - """Test case for list_folders - - List folders - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_import_results.py b/src/workato_platform/client/workato_api/test/test_import_results.py deleted file mode 100644 index 69d82a8..0000000 --- a/src/workato_platform/client/workato_api/test/test_import_results.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.import_results import ImportResults - -class TestImportResults(unittest.TestCase): - """ImportResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ImportResults: - """Test ImportResults - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ImportResults` - """ - model = ImportResults() - if include_optional: - return ImportResults( - success = True, - total_endpoints = 1, - failed_endpoints = 0, - failed_actions = [] - ) - else: - return ImportResults( - success = True, - total_endpoints = 1, - failed_endpoints = 0, - failed_actions = [], - ) - """ - - def testImportResults(self): - """Test ImportResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py b/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py deleted file mode 100644 index 6e3a0f2..0000000 --- a/src/workato_platform/client/workato_api/test/test_o_auth_url_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse - -class TestOAuthUrlResponse(unittest.TestCase): - """OAuthUrlResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OAuthUrlResponse: - """Test OAuthUrlResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OAuthUrlResponse` - """ - model = OAuthUrlResponse() - if include_optional: - return OAuthUrlResponse( - data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( - url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ) - ) - else: - return OAuthUrlResponse( - data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( - url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ), - ) - """ - - def testOAuthUrlResponse(self): - """Test OAuthUrlResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py b/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py deleted file mode 100644 index a0cfeaa..0000000 --- a/src/workato_platform/client/workato_api/test/test_o_auth_url_response_data.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData - -class TestOAuthUrlResponseData(unittest.TestCase): - """OAuthUrlResponseData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OAuthUrlResponseData: - """Test OAuthUrlResponseData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OAuthUrlResponseData` - """ - model = OAuthUrlResponseData() - if include_optional: - return OAuthUrlResponseData( - url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...' - ) - else: - return OAuthUrlResponseData( - url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', - ) - """ - - def testOAuthUrlResponseData(self): - """Test OAuthUrlResponseData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_open_api_spec.py b/src/workato_platform/client/workato_api/test/test_open_api_spec.py deleted file mode 100644 index 65d5651..0000000 --- a/src/workato_platform/client/workato_api/test/test_open_api_spec.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec - -class TestOpenApiSpec(unittest.TestCase): - """OpenApiSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenApiSpec: - """Test OpenApiSpec - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenApiSpec` - """ - model = OpenApiSpec() - if include_optional: - return OpenApiSpec( - content = '', - format = 'json' - ) - else: - return OpenApiSpec( - content = '', - format = 'json', - ) - """ - - def testOpenApiSpec(self): - """Test OpenApiSpec""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response.py b/src/workato_platform/client/workato_api/test/test_package_details_response.py deleted file mode 100644 index d7ef45c..0000000 --- a/src/workato_platform/client/workato_api/test/test_package_details_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse - -class TestPackageDetailsResponse(unittest.TestCase): - """PackageDetailsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PackageDetailsResponse: - """Test PackageDetailsResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PackageDetailsResponse` - """ - model = PackageDetailsResponse() - if include_optional: - return PackageDetailsResponse( - id = 242, - operation_type = 'export', - status = 'completed', - export_manifest_id = 3, - download_url = 'https://www.workato-staging-assets.com/packages/zip_files/000/000/242/original/exportdemo.zip', - error = 'error_message', - recipe_status = [ - workato_platform.client.workato_api.models.package_details_response_recipe_status_inner.PackageDetailsResponse_recipe_status_inner( - id = 12345, - import_result = 'no_update_or_updated_without_restart', ) - ] - ) - else: - return PackageDetailsResponse( - id = 242, - operation_type = 'export', - status = 'completed', - ) - """ - - def testPackageDetailsResponse(self): - """Test PackageDetailsResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py b/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py deleted file mode 100644 index 703ab7d..0000000 --- a/src/workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner - -class TestPackageDetailsResponseRecipeStatusInner(unittest.TestCase): - """PackageDetailsResponseRecipeStatusInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PackageDetailsResponseRecipeStatusInner: - """Test PackageDetailsResponseRecipeStatusInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PackageDetailsResponseRecipeStatusInner` - """ - model = PackageDetailsResponseRecipeStatusInner() - if include_optional: - return PackageDetailsResponseRecipeStatusInner( - id = 12345, - import_result = 'no_update_or_updated_without_restart' - ) - else: - return PackageDetailsResponseRecipeStatusInner( - ) - """ - - def testPackageDetailsResponseRecipeStatusInner(self): - """Test PackageDetailsResponseRecipeStatusInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_package_response.py b/src/workato_platform/client/workato_api/test/test_package_response.py deleted file mode 100644 index 123f28e..0000000 --- a/src/workato_platform/client/workato_api/test/test_package_response.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.package_response import PackageResponse - -class TestPackageResponse(unittest.TestCase): - """PackageResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PackageResponse: - """Test PackageResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PackageResponse` - """ - model = PackageResponse() - if include_optional: - return PackageResponse( - id = 242, - operation_type = 'export', - status = 'completed', - export_manifest_id = 3, - download_url = 'https://www.workato-staging-assets.com/packages/zip_files/000/000/242/original/exportdemo.zip' - ) - else: - return PackageResponse( - id = 242, - operation_type = 'export', - status = 'completed', - ) - """ - - def testPackageResponse(self): - """Test PackageResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_packages_api.py b/src/workato_platform/client/workato_api/test/test_packages_api.py deleted file mode 100644 index f3eeb1e..0000000 --- a/src/workato_platform/client/workato_api/test/test_packages_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.packages_api import PackagesApi - - -class TestPackagesApi(unittest.IsolatedAsyncioTestCase): - """PackagesApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = PackagesApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_download_package(self) -> None: - """Test case for download_package - - Download package - """ - pass - - async def test_export_package(self) -> None: - """Test case for export_package - - Export a package based on a manifest - """ - pass - - async def test_get_package(self) -> None: - """Test case for get_package - - Get package details - """ - pass - - async def test_import_package(self) -> None: - """Test case for import_package - - Import a package into a folder - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_picklist_request.py b/src/workato_platform/client/workato_api/test/test_picklist_request.py deleted file mode 100644 index 893bce2..0000000 --- a/src/workato_platform/client/workato_api/test/test_picklist_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest - -class TestPicklistRequest(unittest.TestCase): - """PicklistRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PicklistRequest: - """Test PicklistRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PicklistRequest` - """ - model = PicklistRequest() - if include_optional: - return PicklistRequest( - pick_list_name = 'sobject_fields', - pick_list_params = {"sobject_name":"Invoice__c"} - ) - else: - return PicklistRequest( - pick_list_name = 'sobject_fields', - ) - """ - - def testPicklistRequest(self): - """Test PicklistRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_picklist_response.py b/src/workato_platform/client/workato_api/test/test_picklist_response.py deleted file mode 100644 index 81b1079..0000000 --- a/src/workato_platform/client/workato_api/test/test_picklist_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse - -class TestPicklistResponse(unittest.TestCase): - """PicklistResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PicklistResponse: - """Test PicklistResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PicklistResponse` - """ - model = PicklistResponse() - if include_optional: - return PicklistResponse( - data = [["Record ID","Id"],["Owner ID","OwnerId"],["Invoice Name","Name"],["Created Date","CreatedDate"],["Status","Status__c"]] - ) - else: - return PicklistResponse( - data = [["Record ID","Id"],["Owner ID","OwnerId"],["Invoice Name","Name"],["Created Date","CreatedDate"],["Status","Status__c"]], - ) - """ - - def testPicklistResponse(self): - """Test PicklistResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector.py b/src/workato_platform/client/workato_api/test/test_platform_connector.py deleted file mode 100644 index 45deae8..0000000 --- a/src/workato_platform/client/workato_api/test/test_platform_connector.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector - -class TestPlatformConnector(unittest.TestCase): - """PlatformConnector unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PlatformConnector: - """Test PlatformConnector - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PlatformConnector` - """ - model = PlatformConnector() - if include_optional: - return PlatformConnector( - name = 'active_directory', - title = 'Active Directory', - categories = ["Directory Services","Marketing"], - oauth = False, - deprecated = False, - secondary = False, - triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], - actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ] - ) - else: - return PlatformConnector( - name = 'active_directory', - title = 'Active Directory', - categories = ["Directory Services","Marketing"], - oauth = False, - deprecated = False, - secondary = False, - triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], - actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], - ) - """ - - def testPlatformConnector(self): - """Test PlatformConnector""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py b/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py deleted file mode 100644 index d6baa85..0000000 --- a/src/workato_platform/client/workato_api/test/test_platform_connector_list_response.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse - -class TestPlatformConnectorListResponse(unittest.TestCase): - """PlatformConnectorListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PlatformConnectorListResponse: - """Test PlatformConnectorListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PlatformConnectorListResponse` - """ - model = PlatformConnectorListResponse() - if include_optional: - return PlatformConnectorListResponse( - items = [ - workato_platform.client.workato_api.models.platform_connector.PlatformConnector( - name = 'active_directory', - title = 'Active Directory', - categories = ["Directory Services","Marketing"], - oauth = False, - deprecated = False, - secondary = False, - triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], - actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], ) - ], - count = 304, - page = 1, - per_page = 100 - ) - else: - return PlatformConnectorListResponse( - items = [ - workato_platform.client.workato_api.models.platform_connector.PlatformConnector( - name = 'active_directory', - title = 'Active Directory', - categories = ["Directory Services","Marketing"], - oauth = False, - deprecated = False, - secondary = False, - triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], - actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( - name = 'new_entry', - title = 'New entry', - deprecated = False, - bulk = False, - batch = False, ) - ], ) - ], - count = 304, - page = 1, - per_page = 100, - ) - """ - - def testPlatformConnectorListResponse(self): - """Test PlatformConnectorListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_project.py b/src/workato_platform/client/workato_api/test/test_project.py deleted file mode 100644 index fdcbb82..0000000 --- a/src/workato_platform/client/workato_api/test/test_project.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.project import Project - -class TestProject(unittest.TestCase): - """Project unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Project: - """Test Project - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Project` - """ - model = Project() - if include_optional: - return Project( - id = 649122, - description = 'Coupa to Netsuite automations', - folder_id = 1563029, - name = 'Procure to Pay' - ) - else: - return Project( - id = 649122, - folder_id = 1563029, - name = 'Procure to Pay', - ) - """ - - def testProject(self): - """Test Project""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_projects_api.py b/src/workato_platform/client/workato_api/test/test_projects_api.py deleted file mode 100644 index 3a8e251..0000000 --- a/src/workato_platform/client/workato_api/test/test_projects_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.projects_api import ProjectsApi - - -class TestProjectsApi(unittest.IsolatedAsyncioTestCase): - """ProjectsApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = ProjectsApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_delete_project(self) -> None: - """Test case for delete_project - - Delete a project - """ - pass - - async def test_list_projects(self) -> None: - """Test case for list_projects - - List projects - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_properties_api.py b/src/workato_platform/client/workato_api/test/test_properties_api.py deleted file mode 100644 index 7816a0e..0000000 --- a/src/workato_platform/client/workato_api/test/test_properties_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.properties_api import PropertiesApi - - -class TestPropertiesApi(unittest.IsolatedAsyncioTestCase): - """PropertiesApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = PropertiesApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_list_project_properties(self) -> None: - """Test case for list_project_properties - - List project properties - """ - pass - - async def test_upsert_project_properties(self) -> None: - """Test case for upsert_project_properties - - Upsert project properties - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe.py b/src/workato_platform/client/workato_api/test/test_recipe.py deleted file mode 100644 index ce794f0..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipe.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.recipe import Recipe - -class TestRecipe(unittest.TestCase): - """Recipe unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Recipe: - """Test Recipe - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Recipe` - """ - model = Recipe() - if include_optional: - return Recipe( - id = 1913515, - user_id = 4848, - name = 'Callable service: JIRA ticket sync', - created_at = '2021-11-25T07:07:38.568-08:00', - updated_at = '2021-11-25T07:14:40.822-08:00', - copy_count = 1, - trigger_application = 'workato_service', - action_applications = ["jira"], - applications = ["workato_service","jira"], - description = 'When there is a new call for callable recipe, do action', - parameters_schema = [ - null - ], - parameters = None, - webhook_url = '', - folder_id = 241557, - running = False, - job_succeeded_count = 1, - job_failed_count = 0, - lifetime_task_count = 1, - last_run_at = '2021-11-25T07:10:27.424-08:00', - stopped_at = '2021-11-25T07:11:06.346-08:00', - version_no = 3, - stop_cause = '', - config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( - keyword = 'application', - name = 'workato_service', - provider = 'workato_service', - skip_validation = False, - account_id = 56, ) - ], - trigger_closure = None, - code = '', - author_name = 'Alex Fisher', - version_author_name = 'Alex Fisher', - version_author_email = 'alex.fisher@example.com', - version_comment = '', - tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"] - ) - else: - return Recipe( - id = 1913515, - user_id = 4848, - name = 'Callable service: JIRA ticket sync', - created_at = '2021-11-25T07:07:38.568-08:00', - updated_at = '2021-11-25T07:14:40.822-08:00', - copy_count = 1, - action_applications = ["jira"], - applications = ["workato_service","jira"], - description = 'When there is a new call for callable recipe, do action', - parameters_schema = [ - null - ], - parameters = None, - webhook_url = '', - folder_id = 241557, - running = False, - job_succeeded_count = 1, - job_failed_count = 0, - lifetime_task_count = 1, - version_no = 3, - stop_cause = '', - config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( - keyword = 'application', - name = 'workato_service', - provider = 'workato_service', - skip_validation = False, - account_id = 56, ) - ], - trigger_closure = None, - code = '', - author_name = 'Alex Fisher', - version_author_name = 'Alex Fisher', - version_author_email = 'alex.fisher@example.com', - version_comment = '', - ) - """ - - def testRecipe(self): - """Test Recipe""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py b/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py deleted file mode 100644 index 49c768d..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipe_config_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner - -class TestRecipeConfigInner(unittest.TestCase): - """RecipeConfigInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RecipeConfigInner: - """Test RecipeConfigInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RecipeConfigInner` - """ - model = RecipeConfigInner() - if include_optional: - return RecipeConfigInner( - keyword = 'application', - name = 'workato_service', - provider = 'workato_service', - skip_validation = False, - account_id = 56 - ) - else: - return RecipeConfigInner( - ) - """ - - def testRecipeConfigInner(self): - """Test RecipeConfigInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py b/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py deleted file mode 100644 index 8253213..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipe_connection_update_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest - -class TestRecipeConnectionUpdateRequest(unittest.TestCase): - """RecipeConnectionUpdateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RecipeConnectionUpdateRequest: - """Test RecipeConnectionUpdateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RecipeConnectionUpdateRequest` - """ - model = RecipeConnectionUpdateRequest() - if include_optional: - return RecipeConnectionUpdateRequest( - adapter_name = 'salesforce', - connection_id = 772461 - ) - else: - return RecipeConnectionUpdateRequest( - adapter_name = 'salesforce', - connection_id = 772461, - ) - """ - - def testRecipeConnectionUpdateRequest(self): - """Test RecipeConnectionUpdateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_list_response.py b/src/workato_platform/client/workato_api/test/test_recipe_list_response.py deleted file mode 100644 index 632dcf3..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipe_list_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse - -class TestRecipeListResponse(unittest.TestCase): - """RecipeListResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RecipeListResponse: - """Test RecipeListResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RecipeListResponse` - """ - model = RecipeListResponse() - if include_optional: - return RecipeListResponse( - items = [ - workato_platform.client.workato_api.models.recipe.Recipe( - id = 1913515, - user_id = 4848, - name = 'Callable service: JIRA ticket sync', - created_at = '2021-11-25T07:07:38.568-08:00', - updated_at = '2021-11-25T07:14:40.822-08:00', - copy_count = 1, - trigger_application = 'workato_service', - action_applications = ["jira"], - applications = ["workato_service","jira"], - description = 'When there is a new call for callable recipe, do action', - parameters_schema = [ - null - ], - parameters = workato_platform.client.workato_api.models.parameters.parameters(), - webhook_url = '', - folder_id = 241557, - running = False, - job_succeeded_count = 1, - job_failed_count = 0, - lifetime_task_count = 1, - last_run_at = '2021-11-25T07:10:27.424-08:00', - stopped_at = '2021-11-25T07:11:06.346-08:00', - version_no = 3, - stop_cause = '', - config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( - keyword = 'application', - name = 'workato_service', - provider = 'workato_service', - skip_validation = False, - account_id = 56, ) - ], - trigger_closure = null, - code = '', - author_name = 'Alex Fisher', - version_author_name = 'Alex Fisher', - version_author_email = 'alex.fisher@example.com', - version_comment = '', - tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"], ) - ] - ) - else: - return RecipeListResponse( - items = [ - workato_platform.client.workato_api.models.recipe.Recipe( - id = 1913515, - user_id = 4848, - name = 'Callable service: JIRA ticket sync', - created_at = '2021-11-25T07:07:38.568-08:00', - updated_at = '2021-11-25T07:14:40.822-08:00', - copy_count = 1, - trigger_application = 'workato_service', - action_applications = ["jira"], - applications = ["workato_service","jira"], - description = 'When there is a new call for callable recipe, do action', - parameters_schema = [ - null - ], - parameters = workato_platform.client.workato_api.models.parameters.parameters(), - webhook_url = '', - folder_id = 241557, - running = False, - job_succeeded_count = 1, - job_failed_count = 0, - lifetime_task_count = 1, - last_run_at = '2021-11-25T07:10:27.424-08:00', - stopped_at = '2021-11-25T07:11:06.346-08:00', - version_no = 3, - stop_cause = '', - config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( - keyword = 'application', - name = 'workato_service', - provider = 'workato_service', - skip_validation = False, - account_id = 56, ) - ], - trigger_closure = null, - code = '', - author_name = 'Alex Fisher', - version_author_name = 'Alex Fisher', - version_author_email = 'alex.fisher@example.com', - version_comment = '', - tags = ["tag-ANMNxAz9-oYDJRm","tag-ANgeffPL-3gxQwA"], ) - ], - ) - """ - - def testRecipeListResponse(self): - """Test RecipeListResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipe_start_response.py b/src/workato_platform/client/workato_api/test/test_recipe_start_response.py deleted file mode 100644 index 0d5de5f..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipe_start_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse - -class TestRecipeStartResponse(unittest.TestCase): - """RecipeStartResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RecipeStartResponse: - """Test RecipeStartResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RecipeStartResponse` - """ - model = RecipeStartResponse() - if include_optional: - return RecipeStartResponse( - success = True, - code_errors = [], - config_errors = [] - ) - else: - return RecipeStartResponse( - success = True, - ) - """ - - def testRecipeStartResponse(self): - """Test RecipeStartResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_recipes_api.py b/src/workato_platform/client/workato_api/test/test_recipes_api.py deleted file mode 100644 index eba2888..0000000 --- a/src/workato_platform/client/workato_api/test/test_recipes_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.recipes_api import RecipesApi - - -class TestRecipesApi(unittest.IsolatedAsyncioTestCase): - """RecipesApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = RecipesApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_list_recipes(self) -> None: - """Test case for list_recipes - - List recipes - """ - pass - - async def test_start_recipe(self) -> None: - """Test case for start_recipe - - Start a recipe - """ - pass - - async def test_stop_recipe(self) -> None: - """Test case for stop_recipe - - Stop a recipe - """ - pass - - async def test_update_recipe_connection(self) -> None: - """Test case for update_recipe_connection - - Update a connection for a recipe - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py deleted file mode 100644 index 1ba43af..0000000 --- a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest - -class TestRuntimeUserConnectionCreateRequest(unittest.TestCase): - """RuntimeUserConnectionCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuntimeUserConnectionCreateRequest: - """Test RuntimeUserConnectionCreateRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuntimeUserConnectionCreateRequest` - """ - model = RuntimeUserConnectionCreateRequest() - if include_optional: - return RuntimeUserConnectionCreateRequest( - parent_id = 12345, - name = 'John's Google Drive', - folder_id = 26204321, - external_id = 'user@example.com', - callback_url = 'https://myapp.com/oauth/callback', - redirect_url = 'https://myapp.com/success' - ) - else: - return RuntimeUserConnectionCreateRequest( - parent_id = 12345, - folder_id = 26204321, - external_id = 'user@example.com', - ) - """ - - def testRuntimeUserConnectionCreateRequest(self): - """Test RuntimeUserConnectionCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py deleted file mode 100644 index 411a49a..0000000 --- a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse - -class TestRuntimeUserConnectionResponse(unittest.TestCase): - """RuntimeUserConnectionResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuntimeUserConnectionResponse: - """Test RuntimeUserConnectionResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuntimeUserConnectionResponse` - """ - model = RuntimeUserConnectionResponse() - if include_optional: - return RuntimeUserConnectionResponse( - data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( - id = 18009027, - url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ) - ) - else: - return RuntimeUserConnectionResponse( - data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( - id = 18009027, - url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ), - ) - """ - - def testRuntimeUserConnectionResponse(self): - """Test RuntimeUserConnectionResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py b/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py deleted file mode 100644 index 0aebbd6..0000000 --- a/src/workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData - -class TestRuntimeUserConnectionResponseData(unittest.TestCase): - """RuntimeUserConnectionResponseData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuntimeUserConnectionResponseData: - """Test RuntimeUserConnectionResponseData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuntimeUserConnectionResponseData` - """ - model = RuntimeUserConnectionResponseData() - if include_optional: - return RuntimeUserConnectionResponseData( - id = 18009027, - url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027' - ) - else: - return RuntimeUserConnectionResponseData( - id = 18009027, - url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', - ) - """ - - def testRuntimeUserConnectionResponseData(self): - """Test RuntimeUserConnectionResponseData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_success_response.py b/src/workato_platform/client/workato_api/test/test_success_response.py deleted file mode 100644 index f9eb301..0000000 --- a/src/workato_platform/client/workato_api/test/test_success_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -class TestSuccessResponse(unittest.TestCase): - """SuccessResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SuccessResponse: - """Test SuccessResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SuccessResponse` - """ - model = SuccessResponse() - if include_optional: - return SuccessResponse( - success = True - ) - else: - return SuccessResponse( - success = True, - ) - """ - - def testSuccessResponse(self): - """Test SuccessResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py b/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py deleted file mode 100644 index f304058..0000000 --- a/src/workato_platform/client/workato_api/test/test_upsert_project_properties_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest - -class TestUpsertProjectPropertiesRequest(unittest.TestCase): - """UpsertProjectPropertiesRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpsertProjectPropertiesRequest: - """Test UpsertProjectPropertiesRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpsertProjectPropertiesRequest` - """ - model = UpsertProjectPropertiesRequest() - if include_optional: - return UpsertProjectPropertiesRequest( - properties = {"admin_email":"lucy.carrigan@example.com","public_url":"https://www.example.com"} - ) - else: - return UpsertProjectPropertiesRequest( - properties = {"admin_email":"lucy.carrigan@example.com","public_url":"https://www.example.com"}, - ) - """ - - def testUpsertProjectPropertiesRequest(self): - """Test UpsertProjectPropertiesRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_user.py b/src/workato_platform/client/workato_api/test/test_user.py deleted file mode 100644 index 430d9b2..0000000 --- a/src/workato_platform/client/workato_api/test/test_user.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.user import User - -class TestUser(unittest.TestCase): - """User unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> User: - """Test User - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `User` - """ - model = User() - if include_optional: - return User( - id = 17293, - name = 'ACME-API', - created_at = '2019-06-19T19:53:16.886-07:00', - plan_id = 'oem_plan', - current_billing_period_start = '2020-09-22T19:15:11.372-07:00', - current_billing_period_end = '2020-10-22T19:15:11.372-07:00', - expert = False, - avatar_url = 'https://workato-assets.s3.amazonaws.com/profiles/avatars/000/089/005/large/logo.png?1562399288', - recipes_count = 49, - interested_applications = [ - '' - ], - company_name = '', - location = '', - last_seen = '2020-08-23T23:22:24.329-07:00', - contact_phone = '', - contact_email = '', - about_me = '', - email = 'api-1@workato.com', - phone = 'xxxxxxxxxx', - active_recipes_count = 1, - root_folder_id = 10294 - ) - else: - return User( - id = 17293, - name = 'ACME-API', - created_at = '2019-06-19T19:53:16.886-07:00', - plan_id = 'oem_plan', - current_billing_period_start = '2020-09-22T19:15:11.372-07:00', - current_billing_period_end = '2020-10-22T19:15:11.372-07:00', - recipes_count = 49, - company_name = '', - location = '', - last_seen = '2020-08-23T23:22:24.329-07:00', - email = 'api-1@workato.com', - active_recipes_count = 1, - root_folder_id = 10294, - ) - """ - - def testUser(self): - """Test User""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_users_api.py b/src/workato_platform/client/workato_api/test/test_users_api.py deleted file mode 100644 index a107387..0000000 --- a/src/workato_platform/client/workato_api/test/test_users_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.api.users_api import UsersApi - - -class TestUsersApi(unittest.IsolatedAsyncioTestCase): - """UsersApi unit test stubs""" - - async def asyncSetUp(self) -> None: - self.api = UsersApi() - - async def asyncTearDown(self) -> None: - await self.api.api_client.close() - - async def test_get_workspace_details(self) -> None: - """Test case for get_workspace_details - - Get current user information - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_validation_error.py b/src/workato_platform/client/workato_api/test/test_validation_error.py deleted file mode 100644 index 547730d..0000000 --- a/src/workato_platform/client/workato_api/test/test_validation_error.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.validation_error import ValidationError - -class TestValidationError(unittest.TestCase): - """ValidationError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationError: - """Test ValidationError - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationError` - """ - model = ValidationError() - if include_optional: - return ValidationError( - message = 'Validation failed', - errors = {"name":["can't be blank"],"provider":["is not included in the list"]} - ) - else: - return ValidationError( - ) - """ - - def testValidationError(self): - """Test ValidationError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py b/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py deleted file mode 100644 index 151f1e7..0000000 --- a/src/workato_platform/client/workato_api/test/test_validation_error_errors_value.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Workato Platform API - - Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue - -class TestValidationErrorErrorsValue(unittest.TestCase): - """ValidationErrorErrorsValue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorErrorsValue: - """Test ValidationErrorErrorsValue - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationErrorErrorsValue` - """ - model = ValidationErrorErrorsValue() - if include_optional: - return ValidationErrorErrorsValue( - ) - else: - return ValidationErrorErrorsValue( - ) - """ - - def testValidationErrorErrorsValue(self): - """Test ValidationErrorErrorsValue""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/workato_platform/client/workato_api_README.md b/src/workato_platform/client/workato_api_README.md deleted file mode 100644 index da7d2f2..0000000 --- a/src/workato_platform/client/workato_api_README.md +++ /dev/null @@ -1,205 +0,0 @@ -# workato-platform-cli -Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` - -The `workato_platform.client.workato_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.16.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://docs.workato.com](https://docs.workato.com) - -## Requirements. - -Python 3.9+ - -## Installation & Usage - -This python library package is generated without supporting files like setup.py or requirements files - -To be able to use it, you will need these dependencies in your own package that uses this library: - -* urllib3 >= 2.1.0, < 3.0.0 -* python-dateutil >= 2.8.2 -* aiohttp >= 3.8.4 -* aiohttp-retry >= 2.8.3 -* pydantic >= 2 -* typing-extensions >= 4.7.1 - -## Getting Started - -In your own code, to use this library to connect and interact with workato-platform-cli, -you can run the following: - -```python - -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://www.workato.com -# See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( - host = "https://www.workato.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | - - try: - # Create API client (v2) - api_response = await api_instance.create_api_client(api_client_create_request) - print("The response of APIPlatformApi->create_api_client:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling APIPlatformApi->create_api_client: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://www.workato.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*APIPlatformApi* | [**create_api_client**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) -*APIPlatformApi* | [**create_api_collection**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection -*APIPlatformApi* | [**create_api_key**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key -*APIPlatformApi* | [**disable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint -*APIPlatformApi* | [**enable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint -*APIPlatformApi* | [**list_api_clients**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) -*APIPlatformApi* | [**list_api_collections**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections -*APIPlatformApi* | [**list_api_endpoints**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints -*APIPlatformApi* | [**list_api_keys**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys -*APIPlatformApi* | [**refresh_api_key_secret**](workato_platform/client/workato_api/docs/APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret -*ConnectionsApi* | [**create_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection -*ConnectionsApi* | [**create_runtime_user_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection -*ConnectionsApi* | [**get_connection_oauth_url**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection -*ConnectionsApi* | [**get_connection_picklist**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values -*ConnectionsApi* | [**list_connections**](workato_platform/client/workato_api/docs/ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections -*ConnectionsApi* | [**update_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection -*ConnectorsApi* | [**get_custom_connector_code**](workato_platform/client/workato_api/docs/ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code -*ConnectorsApi* | [**list_custom_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors -*ConnectorsApi* | [**list_platform_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors -*DataTablesApi* | [**create_data_table**](workato_platform/client/workato_api/docs/DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table -*DataTablesApi* | [**list_data_tables**](workato_platform/client/workato_api/docs/DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables -*ExportApi* | [**create_export_manifest**](workato_platform/client/workato_api/docs/ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest -*ExportApi* | [**list_assets_in_folder**](workato_platform/client/workato_api/docs/ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder -*FoldersApi* | [**create_folder**](workato_platform/client/workato_api/docs/FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder -*FoldersApi* | [**list_folders**](workato_platform/client/workato_api/docs/FoldersApi.md#list_folders) | **GET** /api/folders | List folders -*PackagesApi* | [**download_package**](workato_platform/client/workato_api/docs/PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package -*PackagesApi* | [**export_package**](workato_platform/client/workato_api/docs/PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest -*PackagesApi* | [**get_package**](workato_platform/client/workato_api/docs/PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details -*PackagesApi* | [**import_package**](workato_platform/client/workato_api/docs/PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder -*ProjectsApi* | [**delete_project**](workato_platform/client/workato_api/docs/ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project -*ProjectsApi* | [**list_projects**](workato_platform/client/workato_api/docs/ProjectsApi.md#list_projects) | **GET** /api/projects | List projects -*PropertiesApi* | [**list_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties -*PropertiesApi* | [**upsert_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties -*RecipesApi* | [**list_recipes**](workato_platform/client/workato_api/docs/RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes -*RecipesApi* | [**start_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe -*RecipesApi* | [**stop_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe -*RecipesApi* | [**update_recipe_connection**](workato_platform/client/workato_api/docs/RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe -*UsersApi* | [**get_workspace_details**](workato_platform/client/workato_api/docs/UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information - - -## Documentation For Models - - - [ApiClient](workato_platform/client/workato_api/docs/ApiClient.md) - - [ApiClientApiCollectionsInner](workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md) - - [ApiClientApiPoliciesInner](workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md) - - [ApiClientCreateRequest](workato_platform/client/workato_api/docs/ApiClientCreateRequest.md) - - [ApiClientListResponse](workato_platform/client/workato_api/docs/ApiClientListResponse.md) - - [ApiClientResponse](workato_platform/client/workato_api/docs/ApiClientResponse.md) - - [ApiCollection](workato_platform/client/workato_api/docs/ApiCollection.md) - - [ApiCollectionCreateRequest](workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md) - - [ApiEndpoint](workato_platform/client/workato_api/docs/ApiEndpoint.md) - - [ApiKey](workato_platform/client/workato_api/docs/ApiKey.md) - - [ApiKeyCreateRequest](workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md) - - [ApiKeyListResponse](workato_platform/client/workato_api/docs/ApiKeyListResponse.md) - - [ApiKeyResponse](workato_platform/client/workato_api/docs/ApiKeyResponse.md) - - [Asset](workato_platform/client/workato_api/docs/Asset.md) - - [AssetReference](workato_platform/client/workato_api/docs/AssetReference.md) - - [Connection](workato_platform/client/workato_api/docs/Connection.md) - - [ConnectionCreateRequest](workato_platform/client/workato_api/docs/ConnectionCreateRequest.md) - - [ConnectionUpdateRequest](workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md) - - [ConnectorAction](workato_platform/client/workato_api/docs/ConnectorAction.md) - - [ConnectorVersion](workato_platform/client/workato_api/docs/ConnectorVersion.md) - - [CreateExportManifestRequest](workato_platform/client/workato_api/docs/CreateExportManifestRequest.md) - - [CreateFolderRequest](workato_platform/client/workato_api/docs/CreateFolderRequest.md) - - [CustomConnector](workato_platform/client/workato_api/docs/CustomConnector.md) - - [CustomConnectorCodeResponse](workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md) - - [CustomConnectorCodeResponseData](workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md) - - [CustomConnectorListResponse](workato_platform/client/workato_api/docs/CustomConnectorListResponse.md) - - [DataTable](workato_platform/client/workato_api/docs/DataTable.md) - - [DataTableColumn](workato_platform/client/workato_api/docs/DataTableColumn.md) - - [DataTableColumnRequest](workato_platform/client/workato_api/docs/DataTableColumnRequest.md) - - [DataTableCreateRequest](workato_platform/client/workato_api/docs/DataTableCreateRequest.md) - - [DataTableCreateResponse](workato_platform/client/workato_api/docs/DataTableCreateResponse.md) - - [DataTableListResponse](workato_platform/client/workato_api/docs/DataTableListResponse.md) - - [DataTableRelation](workato_platform/client/workato_api/docs/DataTableRelation.md) - - [DeleteProject403Response](workato_platform/client/workato_api/docs/DeleteProject403Response.md) - - [Error](workato_platform/client/workato_api/docs/Error.md) - - [ExportManifestRequest](workato_platform/client/workato_api/docs/ExportManifestRequest.md) - - [ExportManifestResponse](workato_platform/client/workato_api/docs/ExportManifestResponse.md) - - [ExportManifestResponseResult](workato_platform/client/workato_api/docs/ExportManifestResponseResult.md) - - [Folder](workato_platform/client/workato_api/docs/Folder.md) - - [FolderAssetsResponse](workato_platform/client/workato_api/docs/FolderAssetsResponse.md) - - [FolderAssetsResponseResult](workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md) - - [FolderCreationResponse](workato_platform/client/workato_api/docs/FolderCreationResponse.md) - - [ImportResults](workato_platform/client/workato_api/docs/ImportResults.md) - - [OAuthUrlResponse](workato_platform/client/workato_api/docs/OAuthUrlResponse.md) - - [OAuthUrlResponseData](workato_platform/client/workato_api/docs/OAuthUrlResponseData.md) - - [OpenApiSpec](workato_platform/client/workato_api/docs/OpenApiSpec.md) - - [PackageDetailsResponse](workato_platform/client/workato_api/docs/PackageDetailsResponse.md) - - [PackageDetailsResponseRecipeStatusInner](workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md) - - [PackageResponse](workato_platform/client/workato_api/docs/PackageResponse.md) - - [PicklistRequest](workato_platform/client/workato_api/docs/PicklistRequest.md) - - [PicklistResponse](workato_platform/client/workato_api/docs/PicklistResponse.md) - - [PlatformConnector](workato_platform/client/workato_api/docs/PlatformConnector.md) - - [PlatformConnectorListResponse](workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md) - - [Project](workato_platform/client/workato_api/docs/Project.md) - - [Recipe](workato_platform/client/workato_api/docs/Recipe.md) - - [RecipeConfigInner](workato_platform/client/workato_api/docs/RecipeConfigInner.md) - - [RecipeConnectionUpdateRequest](workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md) - - [RecipeListResponse](workato_platform/client/workato_api/docs/RecipeListResponse.md) - - [RecipeStartResponse](workato_platform/client/workato_api/docs/RecipeStartResponse.md) - - [RuntimeUserConnectionCreateRequest](workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md) - - [RuntimeUserConnectionResponse](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md) - - [RuntimeUserConnectionResponseData](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md) - - [SuccessResponse](workato_platform/client/workato_api/docs/SuccessResponse.md) - - [UpsertProjectPropertiesRequest](workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md) - - [User](workato_platform/client/workato_api/docs/User.md) - - [ValidationError](workato_platform/client/workato_api/docs/ValidationError.md) - - [ValidationErrorErrorsValue](workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - From 6a51324ff2f36e3a80bea249cecea7f506fa9594 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 18:11:59 -0700 Subject: [PATCH 11/13] Rename package from workato_platform to workato_platform_cli - Update all import statements throughout source code - Regenerate OpenAPI client with correct package name - Restore _configure_retry_with_429_support function lost during rename - Update openapi-config.yaml packageName configuration - Fix all internal module references and dependencies --- openapi-config.yaml | 2 +- src/.openapi-generator/FILES | 491 +++++++++--------- src/workato_platform_cli/__init__.py | 76 +-- src/workato_platform_cli/_version.py | 4 +- src/workato_platform_cli/cli/__init__.py | 14 +- .../cli/commands/api_clients.py | 16 +- .../cli/commands/api_collections.py | 20 +- .../cli/commands/assets.py | 12 +- .../cli/commands/connections.py | 24 +- .../cli/commands/connectors/command.py | 6 +- .../commands/connectors/connector_manager.py | 6 +- .../cli/commands/data_tables.py | 18 +- src/workato_platform_cli/cli/commands/init.py | 12 +- .../cli/commands/profiles.py | 4 +- .../cli/commands/projects/command.py | 12 +- .../cli/commands/projects/project_manager.py | 16 +- .../cli/commands/properties.py | 12 +- src/workato_platform_cli/cli/commands/pull.py | 10 +- .../cli/commands/push/command.py | 12 +- .../cli/commands/recipes/command.py | 20 +- .../cli/commands/recipes/validator.py | 4 +- .../cli/commands/workspace.py | 8 +- src/workato_platform_cli/cli/containers.py | 12 +- .../cli/utils/config/manager.py | 8 +- .../cli/utils/exception_handler.py | 2 +- .../cli/utils/version_checker.py | 8 +- .../client/workato_api/__init__.py | 174 +++---- .../client/workato_api/api/__init__.py | 22 +- .../workato_api/api/api_platform_api.py | 28 +- .../client/workato_api/api/connections_api.py | 24 +- .../client/workato_api/api/connectors_api.py | 12 +- .../client/workato_api/api/data_tables_api.py | 12 +- .../client/workato_api/api/export_api.py | 12 +- .../client/workato_api/api/folders_api.py | 12 +- .../client/workato_api/api/packages_api.py | 10 +- .../client/workato_api/api/projects_api.py | 10 +- .../client/workato_api/api/properties_api.py | 10 +- .../client/workato_api/api/recipes_api.py | 16 +- .../client/workato_api/api/users_api.py | 8 +- .../client/workato_api/api_client.py | 12 +- .../client/workato_api/configuration.py | 2 +- .../client/workato_api/docs/APIPlatformApi.md | 154 +++--- .../client/workato_api/docs/ApiClient.md | 2 +- .../docs/ApiClientApiCollectionsInner.md | 2 +- .../docs/ApiClientApiPoliciesInner.md | 2 +- .../docs/ApiClientCreateRequest.md | 2 +- .../workato_api/docs/ApiClientListResponse.md | 2 +- .../workato_api/docs/ApiClientResponse.md | 2 +- .../client/workato_api/docs/ApiCollection.md | 2 +- .../docs/ApiCollectionCreateRequest.md | 2 +- .../client/workato_api/docs/ApiEndpoint.md | 2 +- .../client/workato_api/docs/ApiKey.md | 2 +- .../workato_api/docs/ApiKeyCreateRequest.md | 2 +- .../workato_api/docs/ApiKeyListResponse.md | 2 +- .../client/workato_api/docs/ApiKeyResponse.md | 2 +- .../client/workato_api/docs/Asset.md | 2 +- .../client/workato_api/docs/AssetReference.md | 2 +- .../client/workato_api/docs/Connection.md | 2 +- .../docs/ConnectionCreateRequest.md | 2 +- .../docs/ConnectionUpdateRequest.md | 2 +- .../client/workato_api/docs/ConnectionsApi.md | 102 ++-- .../workato_api/docs/ConnectorAction.md | 2 +- .../workato_api/docs/ConnectorVersion.md | 2 +- .../client/workato_api/docs/ConnectorsApi.md | 44 +- .../docs/CreateExportManifestRequest.md | 2 +- .../workato_api/docs/CreateFolderRequest.md | 2 +- .../workato_api/docs/CustomConnector.md | 2 +- .../docs/CustomConnectorCodeResponse.md | 2 +- .../docs/CustomConnectorCodeResponseData.md | 2 +- .../docs/CustomConnectorListResponse.md | 2 +- .../client/workato_api/docs/DataTable.md | 2 +- .../workato_api/docs/DataTableColumn.md | 2 +- .../docs/DataTableColumnRequest.md | 2 +- .../docs/DataTableCreateRequest.md | 2 +- .../docs/DataTableCreateResponse.md | 2 +- .../workato_api/docs/DataTableListResponse.md | 2 +- .../workato_api/docs/DataTableRelation.md | 2 +- .../client/workato_api/docs/DataTablesApi.md | 34 +- .../docs/DeleteProject403Response.md | 2 +- .../client/workato_api/docs/Error.md | 2 +- .../client/workato_api/docs/ExportApi.md | 34 +- .../workato_api/docs/ExportManifestRequest.md | 2 +- .../docs/ExportManifestResponse.md | 2 +- .../docs/ExportManifestResponseResult.md | 2 +- .../client/workato_api/docs/Folder.md | 2 +- .../workato_api/docs/FolderAssetsResponse.md | 2 +- .../docs/FolderAssetsResponseResult.md | 2 +- .../docs/FolderCreationResponse.md | 2 +- .../client/workato_api/docs/FoldersApi.md | 34 +- .../client/workato_api/docs/ImportResults.md | 2 +- .../workato_api/docs/OAuthUrlResponse.md | 2 +- .../workato_api/docs/OAuthUrlResponseData.md | 2 +- .../client/workato_api/docs/OpenApiSpec.md | 2 +- .../docs/PackageDetailsResponse.md | 2 +- ...PackageDetailsResponseRecipeStatusInner.md | 2 +- .../workato_api/docs/PackageResponse.md | 2 +- .../client/workato_api/docs/PackagesApi.md | 56 +- .../workato_api/docs/PicklistRequest.md | 2 +- .../workato_api/docs/PicklistResponse.md | 2 +- .../workato_api/docs/PlatformConnector.md | 2 +- .../docs/PlatformConnectorListResponse.md | 2 +- .../client/workato_api/docs/Project.md | 2 +- .../client/workato_api/docs/ProjectsApi.md | 30 +- .../client/workato_api/docs/PropertiesApi.md | 32 +- .../client/workato_api/docs/Recipe.md | 2 +- .../workato_api/docs/RecipeConfigInner.md | 2 +- .../docs/RecipeConnectionUpdateRequest.md | 2 +- .../workato_api/docs/RecipeListResponse.md | 2 +- .../workato_api/docs/RecipeStartResponse.md | 2 +- .../client/workato_api/docs/RecipesApi.md | 62 +-- .../RuntimeUserConnectionCreateRequest.md | 2 +- .../docs/RuntimeUserConnectionResponse.md | 2 +- .../docs/RuntimeUserConnectionResponseData.md | 2 +- .../workato_api/docs/SuccessResponse.md | 2 +- .../docs/UpsertProjectPropertiesRequest.md | 2 +- .../client/workato_api/docs/User.md | 2 +- .../client/workato_api/docs/UsersApi.md | 16 +- .../workato_api/docs/ValidationError.md | 2 +- .../docs/ValidationErrorErrorsValue.md | 2 +- .../client/workato_api/models/__init__.py | 134 ++--- .../client/workato_api/models/api_client.py | 4 +- .../models/api_client_list_response.py | 2 +- .../workato_api/models/api_client_response.py | 2 +- .../workato_api/models/api_collection.py | 2 +- .../models/api_collection_create_request.py | 2 +- .../models/api_key_list_response.py | 2 +- .../workato_api/models/api_key_response.py | 2 +- .../models/create_export_manifest_request.py | 2 +- .../workato_api/models/custom_connector.py | 2 +- .../models/custom_connector_code_response.py | 2 +- .../models/custom_connector_list_response.py | 2 +- .../client/workato_api/models/data_table.py | 2 +- .../workato_api/models/data_table_column.py | 2 +- .../models/data_table_column_request.py | 2 +- .../models/data_table_create_request.py | 2 +- .../models/data_table_create_response.py | 2 +- .../models/data_table_list_response.py | 2 +- .../models/export_manifest_request.py | 2 +- .../models/export_manifest_response.py | 2 +- .../models/folder_assets_response.py | 2 +- .../models/folder_assets_response_result.py | 2 +- .../workato_api/models/o_auth_url_response.py | 2 +- .../models/package_details_response.py | 2 +- .../workato_api/models/platform_connector.py | 2 +- .../platform_connector_list_response.py | 2 +- .../client/workato_api/models/recipe.py | 2 +- .../models/recipe_list_response.py | 2 +- .../runtime_user_connection_response.py | 2 +- .../workato_api/models/validation_error.py | 2 +- .../client/workato_api/rest.py | 2 +- .../workato_api/test/test_api_client.py | 10 +- .../test_api_client_api_collections_inner.py | 2 +- .../test_api_client_api_policies_inner.py | 2 +- .../test/test_api_client_create_request.py | 2 +- .../test/test_api_client_list_response.py | 14 +- .../test/test_api_client_response.py | 14 +- .../workato_api/test/test_api_collection.py | 4 +- .../test_api_collection_create_request.py | 4 +- .../workato_api/test/test_api_endpoint.py | 2 +- .../client/workato_api/test/test_api_key.py | 2 +- .../test/test_api_key_create_request.py | 2 +- .../test/test_api_key_list_response.py | 6 +- .../workato_api/test/test_api_key_response.py | 6 +- .../workato_api/test/test_api_platform_api.py | 2 +- .../client/workato_api/test/test_asset.py | 2 +- .../workato_api/test/test_asset_reference.py | 2 +- .../workato_api/test/test_connection.py | 2 +- .../test/test_connection_create_request.py | 2 +- .../test/test_connection_update_request.py | 2 +- .../workato_api/test/test_connections_api.py | 2 +- .../workato_api/test/test_connector_action.py | 3 +- .../test/test_connector_version.py | 2 +- .../workato_api/test/test_connectors_api.py | 2 +- .../test_create_export_manifest_request.py | 10 +- .../test/test_create_folder_request.py | 2 +- .../workato_api/test/test_custom_connector.py | 6 +- .../test_custom_connector_code_response.py | 6 +- ...est_custom_connector_code_response_data.py | 2 +- .../test_custom_connector_list_response.py | 10 +- .../workato_api/test/test_data_table.py | 10 +- .../test/test_data_table_column.py | 6 +- .../test/test_data_table_column_request.py | 4 +- .../test/test_data_table_create_request.py | 10 +- .../test/test_data_table_create_response.py | 14 +- .../test/test_data_table_list_response.py | 14 +- .../test/test_data_table_relation.py | 2 +- .../workato_api/test/test_data_tables_api.py | 2 +- .../test/test_delete_project403_response.py | 2 +- .../client/workato_api/test/test_error.py | 2 +- .../workato_api/test/test_export_api.py | 2 +- .../test/test_export_manifest_request.py | 4 +- .../test/test_export_manifest_response.py | 6 +- .../test_export_manifest_response_result.py | 2 +- .../client/workato_api/test/test_folder.py | 2 +- .../test/test_folder_assets_response.py | 10 +- .../test_folder_assets_response_result.py | 6 +- .../test/test_folder_creation_response.py | 2 +- .../workato_api/test/test_folders_api.py | 2 +- .../workato_api/test/test_import_results.py | 2 +- .../test/test_o_auth_url_response.py | 6 +- .../test/test_o_auth_url_response_data.py | 2 +- .../workato_api/test/test_open_api_spec.py | 2 +- .../test/test_package_details_response.py | 4 +- ...ge_details_response_recipe_status_inner.py | 2 +- .../workato_api/test/test_package_response.py | 2 +- .../workato_api/test/test_packages_api.py | 2 +- .../workato_api/test/test_picklist_request.py | 2 +- .../test/test_picklist_response.py | 2 +- .../test/test_platform_connector.py | 10 +- .../test_platform_connector_list_response.py | 14 +- .../client/workato_api/test/test_project.py | 2 +- .../workato_api/test/test_projects_api.py | 2 +- .../workato_api/test/test_properties_api.py | 2 +- .../client/workato_api/test/test_recipe.py | 6 +- .../test/test_recipe_config_inner.py | 2 +- .../test_recipe_connection_update_request.py | 2 +- .../test/test_recipe_list_response.py | 14 +- .../test/test_recipe_start_response.py | 2 +- .../workato_api/test/test_recipes_api.py | 2 +- ..._runtime_user_connection_create_request.py | 2 +- .../test_runtime_user_connection_response.py | 6 +- ...t_runtime_user_connection_response_data.py | 2 +- .../workato_api/test/test_success_response.py | 2 +- .../test_upsert_project_properties_request.py | 2 +- .../client/workato_api/test/test_user.py | 2 +- .../client/workato_api/test/test_users_api.py | 2 +- .../workato_api/test/test_validation_error.py | 2 +- .../test_validation_error_errors_value.py | 2 +- .../client/workato_api_README.md | 226 ++++---- src/workato_platform_cli/py.typed | 0 230 files changed, 1344 insertions(+), 1338 deletions(-) delete mode 100644 src/workato_platform_cli/py.typed diff --git a/openapi-config.yaml b/openapi-config.yaml index 56fb6ce..29a5df1 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -1,5 +1,5 @@ library: asyncio -packageName: workato_platform.client.workato_api +packageName: workato_platform_cli.client.workato_api projectName: workato-platform-cli packageVersion: 1.0.0 packageUrl: https://github.com/workato/workato-platform-cli diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index 0759a61..e315fbb 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -1,245 +1,246 @@ -workato_platform/client/__init__.py -workato_platform/client/workato_api/__init__.py -workato_platform/client/workato_api/api/__init__.py -workato_platform/client/workato_api/api/api_platform_api.py -workato_platform/client/workato_api/api/connections_api.py -workato_platform/client/workato_api/api/connectors_api.py -workato_platform/client/workato_api/api/data_tables_api.py -workato_platform/client/workato_api/api/export_api.py -workato_platform/client/workato_api/api/folders_api.py -workato_platform/client/workato_api/api/packages_api.py -workato_platform/client/workato_api/api/projects_api.py -workato_platform/client/workato_api/api/properties_api.py -workato_platform/client/workato_api/api/recipes_api.py -workato_platform/client/workato_api/api/users_api.py -workato_platform/client/workato_api/api_client.py -workato_platform/client/workato_api/api_response.py -workato_platform/client/workato_api/configuration.py -workato_platform/client/workato_api/docs/APIPlatformApi.md -workato_platform/client/workato_api/docs/ApiClient.md -workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md -workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md -workato_platform/client/workato_api/docs/ApiClientCreateRequest.md -workato_platform/client/workato_api/docs/ApiClientListResponse.md -workato_platform/client/workato_api/docs/ApiClientResponse.md -workato_platform/client/workato_api/docs/ApiCollection.md -workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md -workato_platform/client/workato_api/docs/ApiEndpoint.md -workato_platform/client/workato_api/docs/ApiKey.md -workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md -workato_platform/client/workato_api/docs/ApiKeyListResponse.md -workato_platform/client/workato_api/docs/ApiKeyResponse.md -workato_platform/client/workato_api/docs/Asset.md -workato_platform/client/workato_api/docs/AssetReference.md -workato_platform/client/workato_api/docs/Connection.md -workato_platform/client/workato_api/docs/ConnectionCreateRequest.md -workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md -workato_platform/client/workato_api/docs/ConnectionsApi.md -workato_platform/client/workato_api/docs/ConnectorAction.md -workato_platform/client/workato_api/docs/ConnectorVersion.md -workato_platform/client/workato_api/docs/ConnectorsApi.md -workato_platform/client/workato_api/docs/CreateExportManifestRequest.md -workato_platform/client/workato_api/docs/CreateFolderRequest.md -workato_platform/client/workato_api/docs/CustomConnector.md -workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md -workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md -workato_platform/client/workato_api/docs/CustomConnectorListResponse.md -workato_platform/client/workato_api/docs/DataTable.md -workato_platform/client/workato_api/docs/DataTableColumn.md -workato_platform/client/workato_api/docs/DataTableColumnRequest.md -workato_platform/client/workato_api/docs/DataTableCreateRequest.md -workato_platform/client/workato_api/docs/DataTableCreateResponse.md -workato_platform/client/workato_api/docs/DataTableListResponse.md -workato_platform/client/workato_api/docs/DataTableRelation.md -workato_platform/client/workato_api/docs/DataTablesApi.md -workato_platform/client/workato_api/docs/DeleteProject403Response.md -workato_platform/client/workato_api/docs/Error.md -workato_platform/client/workato_api/docs/ExportApi.md -workato_platform/client/workato_api/docs/ExportManifestRequest.md -workato_platform/client/workato_api/docs/ExportManifestResponse.md -workato_platform/client/workato_api/docs/ExportManifestResponseResult.md -workato_platform/client/workato_api/docs/Folder.md -workato_platform/client/workato_api/docs/FolderAssetsResponse.md -workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md -workato_platform/client/workato_api/docs/FolderCreationResponse.md -workato_platform/client/workato_api/docs/FoldersApi.md -workato_platform/client/workato_api/docs/ImportResults.md -workato_platform/client/workato_api/docs/OAuthUrlResponse.md -workato_platform/client/workato_api/docs/OAuthUrlResponseData.md -workato_platform/client/workato_api/docs/OpenApiSpec.md -workato_platform/client/workato_api/docs/PackageDetailsResponse.md -workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md -workato_platform/client/workato_api/docs/PackageResponse.md -workato_platform/client/workato_api/docs/PackagesApi.md -workato_platform/client/workato_api/docs/PicklistRequest.md -workato_platform/client/workato_api/docs/PicklistResponse.md -workato_platform/client/workato_api/docs/PlatformConnector.md -workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md -workato_platform/client/workato_api/docs/Project.md -workato_platform/client/workato_api/docs/ProjectsApi.md -workato_platform/client/workato_api/docs/PropertiesApi.md -workato_platform/client/workato_api/docs/Recipe.md -workato_platform/client/workato_api/docs/RecipeConfigInner.md -workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md -workato_platform/client/workato_api/docs/RecipeListResponse.md -workato_platform/client/workato_api/docs/RecipeStartResponse.md -workato_platform/client/workato_api/docs/RecipesApi.md -workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md -workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md -workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md -workato_platform/client/workato_api/docs/SuccessResponse.md -workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md -workato_platform/client/workato_api/docs/User.md -workato_platform/client/workato_api/docs/UsersApi.md -workato_platform/client/workato_api/docs/ValidationError.md -workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md -workato_platform/client/workato_api/exceptions.py -workato_platform/client/workato_api/models/__init__.py -workato_platform/client/workato_api/models/api_client.py -workato_platform/client/workato_api/models/api_client_api_collections_inner.py -workato_platform/client/workato_api/models/api_client_api_policies_inner.py -workato_platform/client/workato_api/models/api_client_create_request.py -workato_platform/client/workato_api/models/api_client_list_response.py -workato_platform/client/workato_api/models/api_client_response.py -workato_platform/client/workato_api/models/api_collection.py -workato_platform/client/workato_api/models/api_collection_create_request.py -workato_platform/client/workato_api/models/api_endpoint.py -workato_platform/client/workato_api/models/api_key.py -workato_platform/client/workato_api/models/api_key_create_request.py -workato_platform/client/workato_api/models/api_key_list_response.py -workato_platform/client/workato_api/models/api_key_response.py -workato_platform/client/workato_api/models/asset.py -workato_platform/client/workato_api/models/asset_reference.py -workato_platform/client/workato_api/models/connection.py -workato_platform/client/workato_api/models/connection_create_request.py -workato_platform/client/workato_api/models/connection_update_request.py -workato_platform/client/workato_api/models/connector_action.py -workato_platform/client/workato_api/models/connector_version.py -workato_platform/client/workato_api/models/create_export_manifest_request.py -workato_platform/client/workato_api/models/create_folder_request.py -workato_platform/client/workato_api/models/custom_connector.py -workato_platform/client/workato_api/models/custom_connector_code_response.py -workato_platform/client/workato_api/models/custom_connector_code_response_data.py -workato_platform/client/workato_api/models/custom_connector_list_response.py -workato_platform/client/workato_api/models/data_table.py -workato_platform/client/workato_api/models/data_table_column.py -workato_platform/client/workato_api/models/data_table_column_request.py -workato_platform/client/workato_api/models/data_table_create_request.py -workato_platform/client/workato_api/models/data_table_create_response.py -workato_platform/client/workato_api/models/data_table_list_response.py -workato_platform/client/workato_api/models/data_table_relation.py -workato_platform/client/workato_api/models/delete_project403_response.py -workato_platform/client/workato_api/models/error.py -workato_platform/client/workato_api/models/export_manifest_request.py -workato_platform/client/workato_api/models/export_manifest_response.py -workato_platform/client/workato_api/models/export_manifest_response_result.py -workato_platform/client/workato_api/models/folder.py -workato_platform/client/workato_api/models/folder_assets_response.py -workato_platform/client/workato_api/models/folder_assets_response_result.py -workato_platform/client/workato_api/models/folder_creation_response.py -workato_platform/client/workato_api/models/import_results.py -workato_platform/client/workato_api/models/o_auth_url_response.py -workato_platform/client/workato_api/models/o_auth_url_response_data.py -workato_platform/client/workato_api/models/open_api_spec.py -workato_platform/client/workato_api/models/package_details_response.py -workato_platform/client/workato_api/models/package_details_response_recipe_status_inner.py -workato_platform/client/workato_api/models/package_response.py -workato_platform/client/workato_api/models/picklist_request.py -workato_platform/client/workato_api/models/picklist_response.py -workato_platform/client/workato_api/models/platform_connector.py -workato_platform/client/workato_api/models/platform_connector_list_response.py -workato_platform/client/workato_api/models/project.py -workato_platform/client/workato_api/models/recipe.py -workato_platform/client/workato_api/models/recipe_config_inner.py -workato_platform/client/workato_api/models/recipe_connection_update_request.py -workato_platform/client/workato_api/models/recipe_list_response.py -workato_platform/client/workato_api/models/recipe_start_response.py -workato_platform/client/workato_api/models/runtime_user_connection_create_request.py -workato_platform/client/workato_api/models/runtime_user_connection_response.py -workato_platform/client/workato_api/models/runtime_user_connection_response_data.py -workato_platform/client/workato_api/models/success_response.py -workato_platform/client/workato_api/models/upsert_project_properties_request.py -workato_platform/client/workato_api/models/user.py -workato_platform/client/workato_api/models/validation_error.py -workato_platform/client/workato_api/models/validation_error_errors_value.py -workato_platform/client/workato_api/rest.py -workato_platform/client/workato_api/test/__init__.py -workato_platform/client/workato_api/test/test_api_client.py -workato_platform/client/workato_api/test/test_api_client_api_collections_inner.py -workato_platform/client/workato_api/test/test_api_client_api_policies_inner.py -workato_platform/client/workato_api/test/test_api_client_create_request.py -workato_platform/client/workato_api/test/test_api_client_list_response.py -workato_platform/client/workato_api/test/test_api_client_response.py -workato_platform/client/workato_api/test/test_api_collection.py -workato_platform/client/workato_api/test/test_api_collection_create_request.py -workato_platform/client/workato_api/test/test_api_endpoint.py -workato_platform/client/workato_api/test/test_api_key.py -workato_platform/client/workato_api/test/test_api_key_create_request.py -workato_platform/client/workato_api/test/test_api_key_list_response.py -workato_platform/client/workato_api/test/test_api_key_response.py -workato_platform/client/workato_api/test/test_api_platform_api.py -workato_platform/client/workato_api/test/test_asset.py -workato_platform/client/workato_api/test/test_asset_reference.py -workato_platform/client/workato_api/test/test_connection.py -workato_platform/client/workato_api/test/test_connection_create_request.py -workato_platform/client/workato_api/test/test_connection_update_request.py -workato_platform/client/workato_api/test/test_connections_api.py -workato_platform/client/workato_api/test/test_connector_action.py -workato_platform/client/workato_api/test/test_connector_version.py -workato_platform/client/workato_api/test/test_connectors_api.py -workato_platform/client/workato_api/test/test_create_export_manifest_request.py -workato_platform/client/workato_api/test/test_create_folder_request.py -workato_platform/client/workato_api/test/test_custom_connector.py -workato_platform/client/workato_api/test/test_custom_connector_code_response.py -workato_platform/client/workato_api/test/test_custom_connector_code_response_data.py -workato_platform/client/workato_api/test/test_custom_connector_list_response.py -workato_platform/client/workato_api/test/test_data_table.py -workato_platform/client/workato_api/test/test_data_table_column.py -workato_platform/client/workato_api/test/test_data_table_column_request.py -workato_platform/client/workato_api/test/test_data_table_create_request.py -workato_platform/client/workato_api/test/test_data_table_create_response.py -workato_platform/client/workato_api/test/test_data_table_list_response.py -workato_platform/client/workato_api/test/test_data_table_relation.py -workato_platform/client/workato_api/test/test_data_tables_api.py -workato_platform/client/workato_api/test/test_delete_project403_response.py -workato_platform/client/workato_api/test/test_error.py -workato_platform/client/workato_api/test/test_export_api.py -workato_platform/client/workato_api/test/test_export_manifest_request.py -workato_platform/client/workato_api/test/test_export_manifest_response.py -workato_platform/client/workato_api/test/test_export_manifest_response_result.py -workato_platform/client/workato_api/test/test_folder.py -workato_platform/client/workato_api/test/test_folder_assets_response.py -workato_platform/client/workato_api/test/test_folder_assets_response_result.py -workato_platform/client/workato_api/test/test_folder_creation_response.py -workato_platform/client/workato_api/test/test_folders_api.py -workato_platform/client/workato_api/test/test_import_results.py -workato_platform/client/workato_api/test/test_o_auth_url_response.py -workato_platform/client/workato_api/test/test_o_auth_url_response_data.py -workato_platform/client/workato_api/test/test_open_api_spec.py -workato_platform/client/workato_api/test/test_package_details_response.py -workato_platform/client/workato_api/test/test_package_details_response_recipe_status_inner.py -workato_platform/client/workato_api/test/test_package_response.py -workato_platform/client/workato_api/test/test_packages_api.py -workato_platform/client/workato_api/test/test_picklist_request.py -workato_platform/client/workato_api/test/test_picklist_response.py -workato_platform/client/workato_api/test/test_platform_connector.py -workato_platform/client/workato_api/test/test_platform_connector_list_response.py -workato_platform/client/workato_api/test/test_project.py -workato_platform/client/workato_api/test/test_projects_api.py -workato_platform/client/workato_api/test/test_properties_api.py -workato_platform/client/workato_api/test/test_recipe.py -workato_platform/client/workato_api/test/test_recipe_config_inner.py -workato_platform/client/workato_api/test/test_recipe_connection_update_request.py -workato_platform/client/workato_api/test/test_recipe_list_response.py -workato_platform/client/workato_api/test/test_recipe_start_response.py -workato_platform/client/workato_api/test/test_recipes_api.py -workato_platform/client/workato_api/test/test_runtime_user_connection_create_request.py -workato_platform/client/workato_api/test/test_runtime_user_connection_response.py -workato_platform/client/workato_api/test/test_runtime_user_connection_response_data.py -workato_platform/client/workato_api/test/test_success_response.py -workato_platform/client/workato_api/test/test_upsert_project_properties_request.py -workato_platform/client/workato_api/test/test_user.py -workato_platform/client/workato_api/test/test_users_api.py -workato_platform/client/workato_api/test/test_validation_error.py -workato_platform/client/workato_api/test/test_validation_error_errors_value.py -workato_platform/client/workato_api_README.md +workato_platform_cli/__init__.py +workato_platform_cli/client/__init__.py +workato_platform_cli/client/workato_api/__init__.py +workato_platform_cli/client/workato_api/api/__init__.py +workato_platform_cli/client/workato_api/api/api_platform_api.py +workato_platform_cli/client/workato_api/api/connections_api.py +workato_platform_cli/client/workato_api/api/connectors_api.py +workato_platform_cli/client/workato_api/api/data_tables_api.py +workato_platform_cli/client/workato_api/api/export_api.py +workato_platform_cli/client/workato_api/api/folders_api.py +workato_platform_cli/client/workato_api/api/packages_api.py +workato_platform_cli/client/workato_api/api/projects_api.py +workato_platform_cli/client/workato_api/api/properties_api.py +workato_platform_cli/client/workato_api/api/recipes_api.py +workato_platform_cli/client/workato_api/api/users_api.py +workato_platform_cli/client/workato_api/api_client.py +workato_platform_cli/client/workato_api/api_response.py +workato_platform_cli/client/workato_api/configuration.py +workato_platform_cli/client/workato_api/docs/APIPlatformApi.md +workato_platform_cli/client/workato_api/docs/ApiClient.md +workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md +workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md +workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md +workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md +workato_platform_cli/client/workato_api/docs/ApiClientResponse.md +workato_platform_cli/client/workato_api/docs/ApiCollection.md +workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md +workato_platform_cli/client/workato_api/docs/ApiEndpoint.md +workato_platform_cli/client/workato_api/docs/ApiKey.md +workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md +workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md +workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md +workato_platform_cli/client/workato_api/docs/Asset.md +workato_platform_cli/client/workato_api/docs/AssetReference.md +workato_platform_cli/client/workato_api/docs/Connection.md +workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md +workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md +workato_platform_cli/client/workato_api/docs/ConnectionsApi.md +workato_platform_cli/client/workato_api/docs/ConnectorAction.md +workato_platform_cli/client/workato_api/docs/ConnectorVersion.md +workato_platform_cli/client/workato_api/docs/ConnectorsApi.md +workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md +workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md +workato_platform_cli/client/workato_api/docs/CustomConnector.md +workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md +workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md +workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md +workato_platform_cli/client/workato_api/docs/DataTable.md +workato_platform_cli/client/workato_api/docs/DataTableColumn.md +workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md +workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md +workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md +workato_platform_cli/client/workato_api/docs/DataTableListResponse.md +workato_platform_cli/client/workato_api/docs/DataTableRelation.md +workato_platform_cli/client/workato_api/docs/DataTablesApi.md +workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md +workato_platform_cli/client/workato_api/docs/Error.md +workato_platform_cli/client/workato_api/docs/ExportApi.md +workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md +workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md +workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md +workato_platform_cli/client/workato_api/docs/Folder.md +workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md +workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md +workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md +workato_platform_cli/client/workato_api/docs/FoldersApi.md +workato_platform_cli/client/workato_api/docs/ImportResults.md +workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md +workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md +workato_platform_cli/client/workato_api/docs/OpenApiSpec.md +workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md +workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md +workato_platform_cli/client/workato_api/docs/PackageResponse.md +workato_platform_cli/client/workato_api/docs/PackagesApi.md +workato_platform_cli/client/workato_api/docs/PicklistRequest.md +workato_platform_cli/client/workato_api/docs/PicklistResponse.md +workato_platform_cli/client/workato_api/docs/PlatformConnector.md +workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md +workato_platform_cli/client/workato_api/docs/Project.md +workato_platform_cli/client/workato_api/docs/ProjectsApi.md +workato_platform_cli/client/workato_api/docs/PropertiesApi.md +workato_platform_cli/client/workato_api/docs/Recipe.md +workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md +workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md +workato_platform_cli/client/workato_api/docs/RecipeListResponse.md +workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md +workato_platform_cli/client/workato_api/docs/RecipesApi.md +workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md +workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md +workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md +workato_platform_cli/client/workato_api/docs/SuccessResponse.md +workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md +workato_platform_cli/client/workato_api/docs/User.md +workato_platform_cli/client/workato_api/docs/UsersApi.md +workato_platform_cli/client/workato_api/docs/ValidationError.md +workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md +workato_platform_cli/client/workato_api/exceptions.py +workato_platform_cli/client/workato_api/models/__init__.py +workato_platform_cli/client/workato_api/models/api_client.py +workato_platform_cli/client/workato_api/models/api_client_api_collections_inner.py +workato_platform_cli/client/workato_api/models/api_client_api_policies_inner.py +workato_platform_cli/client/workato_api/models/api_client_create_request.py +workato_platform_cli/client/workato_api/models/api_client_list_response.py +workato_platform_cli/client/workato_api/models/api_client_response.py +workato_platform_cli/client/workato_api/models/api_collection.py +workato_platform_cli/client/workato_api/models/api_collection_create_request.py +workato_platform_cli/client/workato_api/models/api_endpoint.py +workato_platform_cli/client/workato_api/models/api_key.py +workato_platform_cli/client/workato_api/models/api_key_create_request.py +workato_platform_cli/client/workato_api/models/api_key_list_response.py +workato_platform_cli/client/workato_api/models/api_key_response.py +workato_platform_cli/client/workato_api/models/asset.py +workato_platform_cli/client/workato_api/models/asset_reference.py +workato_platform_cli/client/workato_api/models/connection.py +workato_platform_cli/client/workato_api/models/connection_create_request.py +workato_platform_cli/client/workato_api/models/connection_update_request.py +workato_platform_cli/client/workato_api/models/connector_action.py +workato_platform_cli/client/workato_api/models/connector_version.py +workato_platform_cli/client/workato_api/models/create_export_manifest_request.py +workato_platform_cli/client/workato_api/models/create_folder_request.py +workato_platform_cli/client/workato_api/models/custom_connector.py +workato_platform_cli/client/workato_api/models/custom_connector_code_response.py +workato_platform_cli/client/workato_api/models/custom_connector_code_response_data.py +workato_platform_cli/client/workato_api/models/custom_connector_list_response.py +workato_platform_cli/client/workato_api/models/data_table.py +workato_platform_cli/client/workato_api/models/data_table_column.py +workato_platform_cli/client/workato_api/models/data_table_column_request.py +workato_platform_cli/client/workato_api/models/data_table_create_request.py +workato_platform_cli/client/workato_api/models/data_table_create_response.py +workato_platform_cli/client/workato_api/models/data_table_list_response.py +workato_platform_cli/client/workato_api/models/data_table_relation.py +workato_platform_cli/client/workato_api/models/delete_project403_response.py +workato_platform_cli/client/workato_api/models/error.py +workato_platform_cli/client/workato_api/models/export_manifest_request.py +workato_platform_cli/client/workato_api/models/export_manifest_response.py +workato_platform_cli/client/workato_api/models/export_manifest_response_result.py +workato_platform_cli/client/workato_api/models/folder.py +workato_platform_cli/client/workato_api/models/folder_assets_response.py +workato_platform_cli/client/workato_api/models/folder_assets_response_result.py +workato_platform_cli/client/workato_api/models/folder_creation_response.py +workato_platform_cli/client/workato_api/models/import_results.py +workato_platform_cli/client/workato_api/models/o_auth_url_response.py +workato_platform_cli/client/workato_api/models/o_auth_url_response_data.py +workato_platform_cli/client/workato_api/models/open_api_spec.py +workato_platform_cli/client/workato_api/models/package_details_response.py +workato_platform_cli/client/workato_api/models/package_details_response_recipe_status_inner.py +workato_platform_cli/client/workato_api/models/package_response.py +workato_platform_cli/client/workato_api/models/picklist_request.py +workato_platform_cli/client/workato_api/models/picklist_response.py +workato_platform_cli/client/workato_api/models/platform_connector.py +workato_platform_cli/client/workato_api/models/platform_connector_list_response.py +workato_platform_cli/client/workato_api/models/project.py +workato_platform_cli/client/workato_api/models/recipe.py +workato_platform_cli/client/workato_api/models/recipe_config_inner.py +workato_platform_cli/client/workato_api/models/recipe_connection_update_request.py +workato_platform_cli/client/workato_api/models/recipe_list_response.py +workato_platform_cli/client/workato_api/models/recipe_start_response.py +workato_platform_cli/client/workato_api/models/runtime_user_connection_create_request.py +workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py +workato_platform_cli/client/workato_api/models/runtime_user_connection_response_data.py +workato_platform_cli/client/workato_api/models/success_response.py +workato_platform_cli/client/workato_api/models/upsert_project_properties_request.py +workato_platform_cli/client/workato_api/models/user.py +workato_platform_cli/client/workato_api/models/validation_error.py +workato_platform_cli/client/workato_api/models/validation_error_errors_value.py +workato_platform_cli/client/workato_api/rest.py +workato_platform_cli/client/workato_api/test/__init__.py +workato_platform_cli/client/workato_api/test/test_api_client.py +workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py +workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py +workato_platform_cli/client/workato_api/test/test_api_client_create_request.py +workato_platform_cli/client/workato_api/test/test_api_client_list_response.py +workato_platform_cli/client/workato_api/test/test_api_client_response.py +workato_platform_cli/client/workato_api/test/test_api_collection.py +workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py +workato_platform_cli/client/workato_api/test/test_api_endpoint.py +workato_platform_cli/client/workato_api/test/test_api_key.py +workato_platform_cli/client/workato_api/test/test_api_key_create_request.py +workato_platform_cli/client/workato_api/test/test_api_key_list_response.py +workato_platform_cli/client/workato_api/test/test_api_key_response.py +workato_platform_cli/client/workato_api/test/test_api_platform_api.py +workato_platform_cli/client/workato_api/test/test_asset.py +workato_platform_cli/client/workato_api/test/test_asset_reference.py +workato_platform_cli/client/workato_api/test/test_connection.py +workato_platform_cli/client/workato_api/test/test_connection_create_request.py +workato_platform_cli/client/workato_api/test/test_connection_update_request.py +workato_platform_cli/client/workato_api/test/test_connections_api.py +workato_platform_cli/client/workato_api/test/test_connector_action.py +workato_platform_cli/client/workato_api/test/test_connector_version.py +workato_platform_cli/client/workato_api/test/test_connectors_api.py +workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py +workato_platform_cli/client/workato_api/test/test_create_folder_request.py +workato_platform_cli/client/workato_api/test/test_custom_connector.py +workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py +workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py +workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py +workato_platform_cli/client/workato_api/test/test_data_table.py +workato_platform_cli/client/workato_api/test/test_data_table_column.py +workato_platform_cli/client/workato_api/test/test_data_table_column_request.py +workato_platform_cli/client/workato_api/test/test_data_table_create_request.py +workato_platform_cli/client/workato_api/test/test_data_table_create_response.py +workato_platform_cli/client/workato_api/test/test_data_table_list_response.py +workato_platform_cli/client/workato_api/test/test_data_table_relation.py +workato_platform_cli/client/workato_api/test/test_data_tables_api.py +workato_platform_cli/client/workato_api/test/test_delete_project403_response.py +workato_platform_cli/client/workato_api/test/test_error.py +workato_platform_cli/client/workato_api/test/test_export_api.py +workato_platform_cli/client/workato_api/test/test_export_manifest_request.py +workato_platform_cli/client/workato_api/test/test_export_manifest_response.py +workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py +workato_platform_cli/client/workato_api/test/test_folder.py +workato_platform_cli/client/workato_api/test/test_folder_assets_response.py +workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py +workato_platform_cli/client/workato_api/test/test_folder_creation_response.py +workato_platform_cli/client/workato_api/test/test_folders_api.py +workato_platform_cli/client/workato_api/test/test_import_results.py +workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py +workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py +workato_platform_cli/client/workato_api/test/test_open_api_spec.py +workato_platform_cli/client/workato_api/test/test_package_details_response.py +workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py +workato_platform_cli/client/workato_api/test/test_package_response.py +workato_platform_cli/client/workato_api/test/test_packages_api.py +workato_platform_cli/client/workato_api/test/test_picklist_request.py +workato_platform_cli/client/workato_api/test/test_picklist_response.py +workato_platform_cli/client/workato_api/test/test_platform_connector.py +workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py +workato_platform_cli/client/workato_api/test/test_project.py +workato_platform_cli/client/workato_api/test/test_projects_api.py +workato_platform_cli/client/workato_api/test/test_properties_api.py +workato_platform_cli/client/workato_api/test/test_recipe.py +workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py +workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py +workato_platform_cli/client/workato_api/test/test_recipe_list_response.py +workato_platform_cli/client/workato_api/test/test_recipe_start_response.py +workato_platform_cli/client/workato_api/test/test_recipes_api.py +workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py +workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py +workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py +workato_platform_cli/client/workato_api/test/test_success_response.py +workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py +workato_platform_cli/client/workato_api/test/test_user.py +workato_platform_cli/client/workato_api/test/test_users_api.py +workato_platform_cli/client/workato_api/test/test_validation_error.py +workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py +workato_platform_cli/client/workato_api_README.md diff --git a/src/workato_platform_cli/__init__.py b/src/workato_platform_cli/__init__.py index 88d7111..d70018d 100644 --- a/src/workato_platform_cli/__init__.py +++ b/src/workato_platform_cli/__init__.py @@ -4,32 +4,28 @@ from typing import Any -import aiohttp_retry - try: - from workato_platform._version import __version__ + from workato_platform_cli._version import __version__ except ImportError: __version__ = "unknown" -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi -from workato_platform.client.workato_api.api.export_api import ExportApi -from workato_platform.client.workato_api.api.folders_api import FoldersApi -from workato_platform.client.workato_api.api.packages_api import PackagesApi -from workato_platform.client.workato_api.api.projects_api import ProjectsApi -from workato_platform.client.workato_api.api.properties_api import PropertiesApi -from workato_platform.client.workato_api.api.recipes_api import RecipesApi -from workato_platform.client.workato_api.api.users_api import UsersApi -from workato_platform.client.workato_api.api_client import ApiClient -from workato_platform.client.workato_api.configuration import Configuration - - -def _configure_retry_with_429_support( - rest_client: Any, configuration: Configuration -) -> None: +from workato_platform_cli.client.workato_api.api.api_platform_api import APIPlatformApi +from workato_platform_cli.client.workato_api.api.connections_api import ConnectionsApi +from workato_platform_cli.client.workato_api.api.connectors_api import ConnectorsApi +from workato_platform_cli.client.workato_api.api.data_tables_api import DataTablesApi +from workato_platform_cli.client.workato_api.api.export_api import ExportApi +from workato_platform_cli.client.workato_api.api.folders_api import FoldersApi +from workato_platform_cli.client.workato_api.api.packages_api import PackagesApi +from workato_platform_cli.client.workato_api.api.projects_api import ProjectsApi +from workato_platform_cli.client.workato_api.api.properties_api import PropertiesApi +from workato_platform_cli.client.workato_api.api.recipes_api import RecipesApi +from workato_platform_cli.client.workato_api.api.users_api import UsersApi +from workato_platform_cli.client.workato_api.api_client import ApiClient +from workato_platform_cli.client.workato_api.configuration import Configuration + + +def _configure_retry_with_429_support(rest_client: Any, configuration: Configuration) -> None: """ Configure REST client to retry on 429 (Too Many Requests) errors. @@ -54,17 +50,21 @@ def _configure_retry_with_429_support( # The retry_client will be lazily created on first request with our patched settings # We need to pre-create it here to ensure 429 support if rest_client.retries is not None: - rest_client.retry_client = aiohttp_retry.RetryClient( - client_session=rest_client.pool_manager, - retry_options=aiohttp_retry.ExponentialRetry( - attempts=rest_client.retries, - factor=2.0, - start_timeout=1.0, # Increased from default 0.1s for rate limiting - max_timeout=120.0, # 2 minutes max - statuses={429}, # Add 429 Too Many Requests - retry_all_server_errors=True, # Keep 5xx errors - ), - ) + try: + import aiohttp_retry + rest_client.retry_client = aiohttp_retry.RetryClient( + client_session=rest_client.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=rest_client.retries, + factor=2.0, + start_timeout=1.0, + max_timeout=120.0, + retry_all_server_errors=True, + statuses={429} + ) + ) + except ImportError: + pass class Workato: @@ -72,11 +72,20 @@ class Workato: def __init__(self, configuration: Configuration): self._configuration = configuration + + # Set default retries if not configured + if configuration.retries is None: + configuration.retries = 3 + self._api_client = ApiClient(configuration) # Set User-Agent header with CLI version user_agent = f"workato-platform-cli/{__version__}" self._api_client.user_agent = user_agent + + # Configure retries with 429 support + rest_client = self._api_client.rest_client + _configure_retry_with_429_support(rest_client, configuration) # Enforce TLS 1.2 minimum on the REST client's SSL context rest_client = self._api_client.rest_client @@ -87,9 +96,6 @@ def __init__(self, configuration: Configuration): ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 ) - # Configure retry logic with 429 (Too Many Requests) support - _configure_retry_with_429_support(rest_client, configuration) - # Initialize all API endpoints self.projects_api = ProjectsApi(self._api_client) self.properties_api = PropertiesApi(self._api_client) diff --git a/src/workato_platform_cli/_version.py b/src/workato_platform_cli/_version.py index 923dfa2..c0f7a48 100644 --- a/src/workato_platform_cli/_version.py +++ b/src/workato_platform_cli/_version.py @@ -28,7 +28,7 @@ commit_id: COMMIT_ID __commit_id__: COMMIT_ID -__version__ = version = '1.0.0rc4.dev0' -__version_tuple__ = version_tuple = (1, 0, 0, 'rc4', 'dev0') +__version__ = version = '1.0.0rc4.dev7' +__version_tuple__ = version_tuple = (1, 0, 0, 'rc4', 'dev7') __commit_id__ = commit_id = None diff --git a/src/workato_platform_cli/cli/__init__.py b/src/workato_platform_cli/cli/__init__.py index 2345b80..cc9e828 100644 --- a/src/workato_platform_cli/cli/__init__.py +++ b/src/workato_platform_cli/cli/__init__.py @@ -4,7 +4,7 @@ import asyncclick as click -from workato_platform.cli.commands import ( +from workato_platform_cli.cli.commands import ( api_clients, api_collections, assets, @@ -17,12 +17,12 @@ pull, workspace, ) -from workato_platform.cli.commands.connectors import command as connectors -from workato_platform.cli.commands.projects import command as projects -from workato_platform.cli.commands.push import command as push -from workato_platform.cli.commands.recipes import command as recipes -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.version_checker import check_updates_async +from workato_platform_cli.cli.commands.connectors import command as connectors +from workato_platform_cli.cli.commands.projects import command as projects +from workato_platform_cli.cli.commands.push import command as push +from workato_platform_cli.cli.commands.recipes import command as recipes +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.version_checker import check_updates_async class AliasedGroup(click.Group): diff --git a/src/workato_platform_cli/cli/commands/api_clients.py b/src/workato_platform_cli/cli/commands/api_clients.py index eb9b7cd..6d1ec0c 100644 --- a/src/workato_platform_cli/cli/commands/api_clients.py +++ b/src/workato_platform_cli/cli/commands/api_clients.py @@ -4,16 +4,16 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.cli.utils.spinner import Spinner -from workato_platform.client.workato_api.models.api_client import ApiClient -from workato_platform.client.workato_api.models.api_client_create_request import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.cli.utils.spinner import Spinner +from workato_platform_cli.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client_create_request import ( ApiClientCreateRequest, ) -from workato_platform.client.workato_api.models.api_key import ApiKey -from workato_platform.client.workato_api.models.api_key_create_request import ( +from workato_platform_cli.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key_create_request import ( ApiKeyCreateRequest, ) diff --git a/src/workato_platform_cli/cli/commands/api_collections.py b/src/workato_platform_cli/cli/commands/api_collections.py index 5d4b4ec..12fd548 100644 --- a/src/workato_platform_cli/cli/commands/api_collections.py +++ b/src/workato_platform_cli/cli/commands/api_collections.py @@ -5,18 +5,18 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ( ApiCollectionCreateRequest, ) -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec @click.group() diff --git a/src/workato_platform_cli/cli/commands/assets.py b/src/workato_platform_cli/cli/commands/assets.py index ebf2f96..64f8948 100644 --- a/src/workato_platform_cli/cli/commands/assets.py +++ b/src/workato_platform_cli/cli/commands/assets.py @@ -2,12 +2,12 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.asset import Asset +from workato_platform_cli import Workato +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.asset import Asset @click.command() diff --git a/src/workato_platform_cli/cli/commands/connections.py b/src/workato_platform_cli/cli/commands/connections.py index e66fd11..b2257a5 100644 --- a/src/workato_platform_cli/cli/commands/connections.py +++ b/src/workato_platform_cli/cli/commands/connections.py @@ -10,22 +10,22 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.commands.connectors.connector_manager import ConnectorManager -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_create_request import ( ConnectionCreateRequest, ) -from workato_platform.client.workato_api.models.connection_update_request import ( +from workato_platform_cli.client.workato_api.models.connection_update_request import ( ConnectionUpdateRequest, ) -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import ( # noqa: E501 +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import ( # noqa: E501 RuntimeUserConnectionCreateRequest, ) diff --git a/src/workato_platform_cli/cli/commands/connectors/command.py b/src/workato_platform_cli/cli/commands/connectors/command.py index 6df5307..c1548d9 100644 --- a/src/workato_platform_cli/cli/commands/connectors/command.py +++ b/src/workato_platform_cli/cli/commands/connectors/command.py @@ -2,9 +2,9 @@ from dependency_injector.wiring import Provide, inject -from workato_platform.cli.commands.connectors.connector_manager import ConnectorManager -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions @click.group() diff --git a/src/workato_platform_cli/cli/commands/connectors/connector_manager.py b/src/workato_platform_cli/cli/commands/connectors/connector_manager.py index 4037453..92bf5bc 100644 --- a/src/workato_platform_cli/cli/commands/connectors/connector_manager.py +++ b/src/workato_platform_cli/cli/commands/connectors/connector_manager.py @@ -9,9 +9,9 @@ from pydantic import BaseModel, Field -from workato_platform import Workato -from workato_platform.cli.utils import Spinner -from workato_platform.client.workato_api.models.platform_connector import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.client.workato_api.models.platform_connector import ( PlatformConnector, ) diff --git a/src/workato_platform_cli/cli/commands/data_tables.py b/src/workato_platform_cli/cli/commands/data_tables.py index aa78c70..c689624 100644 --- a/src/workato_platform_cli/cli/commands/data_tables.py +++ b/src/workato_platform_cli/cli/commands/data_tables.py @@ -7,17 +7,17 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.data_table import DataTable -from workato_platform.client.workato_api.models.data_table_column_request import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table_column_request import ( DataTableColumnRequest, ) -from workato_platform.client.workato_api.models.data_table_create_request import ( +from workato_platform_cli.client.workato_api.models.data_table_create_request import ( DataTableCreateRequest, ) diff --git a/src/workato_platform_cli/cli/commands/init.py b/src/workato_platform_cli/cli/commands/init.py index 7cac866..27ccf5a 100644 --- a/src/workato_platform_cli/cli/commands/init.py +++ b/src/workato_platform_cli/cli/commands/init.py @@ -7,12 +7,12 @@ import asyncclick as click import certifi -from workato_platform import Workato -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.commands.pull import _pull_project -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.configuration import Configuration +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.commands.pull import _pull_project +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.configuration import Configuration @click.command() diff --git a/src/workato_platform_cli/cli/commands/profiles.py b/src/workato_platform_cli/cli/commands/profiles.py index eb9f7eb..770944e 100644 --- a/src/workato_platform_cli/cli/commands/profiles.py +++ b/src/workato_platform_cli/cli/commands/profiles.py @@ -9,8 +9,8 @@ from dependency_injector.wiring import Provide, inject -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.config import ConfigData, ConfigManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.config import ConfigData, ConfigManager @click.group() diff --git a/src/workato_platform_cli/cli/commands/projects/command.py b/src/workato_platform_cli/cli/commands/projects/command.py index 65d9675..a1b4dc6 100644 --- a/src/workato_platform_cli/cli/commands/projects/command.py +++ b/src/workato_platform_cli/cli/commands/projects/command.py @@ -8,15 +8,15 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.containers import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.containers import ( Container, create_profile_aware_workato_config, ) -from workato_platform.cli.utils.config import ConfigData, ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli.cli.utils.config import ConfigData, ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.project import Project @click.group() diff --git a/src/workato_platform_cli/cli/commands/projects/project_manager.py b/src/workato_platform_cli/cli/commands/projects/project_manager.py index 9300b24..f07daf9 100644 --- a/src/workato_platform_cli/cli/commands/projects/project_manager.py +++ b/src/workato_platform_cli/cli/commands/projects/project_manager.py @@ -11,19 +11,19 @@ import asyncclick as click import inquirer -from workato_platform import Workato -from workato_platform.cli.utils.spinner import Spinner -from workato_platform.client.workato_api.models.asset import Asset -from workato_platform.client.workato_api.models.create_export_manifest_request import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.utils.spinner import Spinner +from workato_platform_cli.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import ( CreateExportManifestRequest, ) -from workato_platform.client.workato_api.models.create_folder_request import ( +from workato_platform_cli.client.workato_api.models.create_folder_request import ( CreateFolderRequest, ) -from workato_platform.client.workato_api.models.export_manifest_request import ( +from workato_platform_cli.client.workato_api.models.export_manifest_request import ( ExportManifestRequest, ) -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.models.project import Project class ProjectManager: @@ -283,7 +283,7 @@ async def delete_project(self, project_id: int) -> None: def save_project_to_config(self, project: Project) -> None: """Save project info to config - returns True if successful""" - from workato_platform.cli.utils.config import ConfigManager + from workato_platform_cli.cli.utils.config import ConfigManager config_manager = ConfigManager() diff --git a/src/workato_platform_cli/cli/commands/properties.py b/src/workato_platform_cli/cli/commands/properties.py index fb0f79c..c03af29 100644 --- a/src/workato_platform_cli/cli/commands/properties.py +++ b/src/workato_platform_cli/cli/commands/properties.py @@ -2,12 +2,12 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.upsert_project_properties_request import ( # noqa: E501 +from workato_platform_cli import Workato +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import ( # noqa: E501 UpsertProjectPropertiesRequest, ) diff --git a/src/workato_platform_cli/cli/commands/pull.py b/src/workato_platform_cli/cli/commands/pull.py index b7355e8..fdb3ae0 100644 --- a/src/workato_platform_cli/cli/commands/pull.py +++ b/src/workato_platform_cli/cli/commands/pull.py @@ -10,11 +10,11 @@ from dependency_injector.wiring import Provide, inject -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.cli.utils.ignore_patterns import ( +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.cli.utils.ignore_patterns import ( load_ignore_patterns, should_skip_file, ) diff --git a/src/workato_platform_cli/cli/commands/push/command.py b/src/workato_platform_cli/cli/commands/push/command.py index e338eca..616ab3f 100644 --- a/src/workato_platform_cli/cli/commands/push/command.py +++ b/src/workato_platform_cli/cli/commands/push/command.py @@ -7,15 +7,15 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.cli.utils.ignore_patterns import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.cli.utils.ignore_patterns import ( load_ignore_patterns, should_skip_file, ) -from workato_platform.cli.utils.spinner import Spinner +from workato_platform_cli.cli.utils.spinner import Spinner STATUS_INFO = { diff --git a/src/workato_platform_cli/cli/commands/recipes/command.py b/src/workato_platform_cli/cli/commands/recipes/command.py index c096b0c..c81092e 100644 --- a/src/workato_platform_cli/cli/commands/recipes/command.py +++ b/src/workato_platform_cli/cli/commands/recipes/command.py @@ -7,18 +7,18 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.commands.recipes.validator import RecipeValidator -from workato_platform.cli.containers import Container -from workato_platform.cli.utils import Spinner -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions -from workato_platform.client.workato_api.models.asset import Asset -from workato_platform.client.workato_api.models.recipe import Recipe -from workato_platform.client.workato_api.models.recipe_connection_update_request import ( # noqa: E501 +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.recipes.validator import RecipeValidator +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils import Spinner +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.recipe import Recipe +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import ( # noqa: E501 RecipeConnectionUpdateRequest, ) -from workato_platform.client.workato_api.models.recipe_start_response import ( +from workato_platform_cli.client.workato_api.models.recipe_start_response import ( RecipeStartResponse, ) diff --git a/src/workato_platform_cli/cli/commands/recipes/validator.py b/src/workato_platform_cli/cli/commands/recipes/validator.py index b6447fb..4e1621f 100644 --- a/src/workato_platform_cli/cli/commands/recipes/validator.py +++ b/src/workato_platform_cli/cli/commands/recipes/validator.py @@ -8,8 +8,8 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator -from workato_platform import Workato -from workato_platform.client.workato_api.models.platform_connector import ( +from workato_platform_cli import Workato +from workato_platform_cli.client.workato_api.models.platform_connector import ( PlatformConnector, ) diff --git a/src/workato_platform_cli/cli/commands/workspace.py b/src/workato_platform_cli/cli/commands/workspace.py index cab7bf5..6a70cae 100644 --- a/src/workato_platform_cli/cli/commands/workspace.py +++ b/src/workato_platform_cli/cli/commands/workspace.py @@ -2,10 +2,10 @@ from dependency_injector.wiring import Provide, inject -from workato_platform import Workato -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.exception_handler import handle_api_exceptions +from workato_platform_cli import Workato +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions @click.command() diff --git a/src/workato_platform_cli/cli/containers.py b/src/workato_platform_cli/cli/containers.py index 653a932..c321b82 100644 --- a/src/workato_platform_cli/cli/containers.py +++ b/src/workato_platform_cli/cli/containers.py @@ -2,12 +2,12 @@ from dependency_injector import containers, providers -from workato_platform import Workato -from workato_platform.cli.commands.connectors.connector_manager import ConnectorManager -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.commands.recipes.validator import RecipeValidator -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.client.workato_api.configuration import Configuration +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.commands.recipes.validator import RecipeValidator +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.client.workato_api.configuration import Configuration def create_workato_config(access_token: str, host: str) -> Configuration: diff --git a/src/workato_platform_cli/cli/utils/config/manager.py b/src/workato_platform_cli/cli/utils/config/manager.py index 40c5be2..605c154 100644 --- a/src/workato_platform_cli/cli/utils/config/manager.py +++ b/src/workato_platform_cli/cli/utils/config/manager.py @@ -11,10 +11,10 @@ import certifi import inquirer -from workato_platform import Workato -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.client.workato_api.configuration import Configuration -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.client.workato_api.configuration import Configuration +from workato_platform_cli.client.workato_api.models.project import Project from .models import AVAILABLE_REGIONS, ConfigData, ProfileData, ProjectInfo, RegionInfo from .profiles import ProfileManager, _validate_url_security diff --git a/src/workato_platform_cli/cli/utils/exception_handler.py b/src/workato_platform_cli/cli/utils/exception_handler.py index 2d9761e..0d50418 100644 --- a/src/workato_platform_cli/cli/utils/exception_handler.py +++ b/src/workato_platform_cli/cli/utils/exception_handler.py @@ -10,7 +10,7 @@ import asyncclick as click -from workato_platform.client.workato_api.exceptions import ( +from workato_platform_cli.client.workato_api.exceptions import ( ApiException, BadRequestException, ConflictException, diff --git a/src/workato_platform_cli/cli/utils/version_checker.py b/src/workato_platform_cli/cli/utils/version_checker.py index 506d59c..a4011f4 100644 --- a/src/workato_platform_cli/cli/utils/version_checker.py +++ b/src/workato_platform_cli/cli/utils/version_checker.py @@ -16,11 +16,11 @@ import asyncclick as click -from workato_platform.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.config import ConfigManager try: - from workato_platform._version import __version__ + from workato_platform_cli._version import __version__ except ImportError: # Fallback for development when not built with hatch __version__ = "0.0.0+unknown" @@ -175,7 +175,7 @@ def check_updates_async(func: Callable) -> Callable: @wraps(func) async def async_wrapper(*args: Any, **kwargs: Any) -> Any: # Import here to avoid circular imports - from workato_platform.cli.containers import Container + from workato_platform_cli.cli.containers import Container try: # Run main command first @@ -203,7 +203,7 @@ async def async_wrapper(*args: Any, **kwargs: Any) -> Any: @wraps(func) def sync_wrapper(*args: Any, **kwargs: Any) -> Any: # Import here to avoid circular imports - from workato_platform.cli.containers import Container + from workato_platform_cli.cli.containers import Container try: # Run main command first diff --git a/src/workato_platform_cli/client/workato_api/__init__.py b/src/workato_platform_cli/client/workato_api/__init__.py index 279a191..1e2c312 100644 --- a/src/workato_platform_cli/client/workato_api/__init__.py +++ b/src/workato_platform_cli/client/workato_api/__init__.py @@ -108,95 +108,95 @@ ] # import apis into sdk package -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi as APIPlatformApi -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi as ConnectionsApi -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi as ConnectorsApi -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi as DataTablesApi -from workato_platform.client.workato_api.api.export_api import ExportApi as ExportApi -from workato_platform.client.workato_api.api.folders_api import FoldersApi as FoldersApi -from workato_platform.client.workato_api.api.packages_api import PackagesApi as PackagesApi -from workato_platform.client.workato_api.api.projects_api import ProjectsApi as ProjectsApi -from workato_platform.client.workato_api.api.properties_api import PropertiesApi as PropertiesApi -from workato_platform.client.workato_api.api.recipes_api import RecipesApi as RecipesApi -from workato_platform.client.workato_api.api.users_api import UsersApi as UsersApi +from workato_platform_cli.client.workato_api.api.api_platform_api import APIPlatformApi as APIPlatformApi +from workato_platform_cli.client.workato_api.api.connections_api import ConnectionsApi as ConnectionsApi +from workato_platform_cli.client.workato_api.api.connectors_api import ConnectorsApi as ConnectorsApi +from workato_platform_cli.client.workato_api.api.data_tables_api import DataTablesApi as DataTablesApi +from workato_platform_cli.client.workato_api.api.export_api import ExportApi as ExportApi +from workato_platform_cli.client.workato_api.api.folders_api import FoldersApi as FoldersApi +from workato_platform_cli.client.workato_api.api.packages_api import PackagesApi as PackagesApi +from workato_platform_cli.client.workato_api.api.projects_api import ProjectsApi as ProjectsApi +from workato_platform_cli.client.workato_api.api.properties_api import PropertiesApi as PropertiesApi +from workato_platform_cli.client.workato_api.api.recipes_api import RecipesApi as RecipesApi +from workato_platform_cli.client.workato_api.api.users_api import UsersApi as UsersApi # import ApiClient -from workato_platform.client.workato_api.api_response import ApiResponse as ApiResponse -from workato_platform.client.workato_api.api_client import ApiClient as ApiClient -from workato_platform.client.workato_api.configuration import Configuration as Configuration -from workato_platform.client.workato_api.exceptions import OpenApiException as OpenApiException -from workato_platform.client.workato_api.exceptions import ApiTypeError as ApiTypeError -from workato_platform.client.workato_api.exceptions import ApiValueError as ApiValueError -from workato_platform.client.workato_api.exceptions import ApiKeyError as ApiKeyError -from workato_platform.client.workato_api.exceptions import ApiAttributeError as ApiAttributeError -from workato_platform.client.workato_api.exceptions import ApiException as ApiException +from workato_platform_cli.client.workato_api.api_response import ApiResponse as ApiResponse +from workato_platform_cli.client.workato_api.api_client import ApiClient as ApiClient +from workato_platform_cli.client.workato_api.configuration import Configuration as Configuration +from workato_platform_cli.client.workato_api.exceptions import OpenApiException as OpenApiException +from workato_platform_cli.client.workato_api.exceptions import ApiTypeError as ApiTypeError +from workato_platform_cli.client.workato_api.exceptions import ApiValueError as ApiValueError +from workato_platform_cli.client.workato_api.exceptions import ApiKeyError as ApiKeyError +from workato_platform_cli.client.workato_api.exceptions import ApiAttributeError as ApiAttributeError +from workato_platform_cli.client.workato_api.exceptions import ApiException as ApiException # import models into sdk package -from workato_platform.client.workato_api.models.api_client import ApiClient as ApiClient -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner as ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner as ApiClientApiPoliciesInner -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest as ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse as ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse as ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection as ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest as ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint as ApiEndpoint -from workato_platform.client.workato_api.models.api_key import ApiKey as ApiKey -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest as ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse as ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse as ApiKeyResponse -from workato_platform.client.workato_api.models.asset import Asset as Asset -from workato_platform.client.workato_api.models.asset_reference import AssetReference as AssetReference -from workato_platform.client.workato_api.models.connection import Connection as Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest as ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest as ConnectionUpdateRequest -from workato_platform.client.workato_api.models.connector_action import ConnectorAction as ConnectorAction -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion as ConnectorVersion -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest as CreateExportManifestRequest -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest as CreateFolderRequest -from workato_platform.client.workato_api.models.custom_connector import CustomConnector as CustomConnector -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse as CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData as CustomConnectorCodeResponseData -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse as CustomConnectorListResponse -from workato_platform.client.workato_api.models.data_table import DataTable as DataTable -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn as DataTableColumn -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest as DataTableColumnRequest -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest as DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse as DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse as DataTableListResponse -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation as DataTableRelation -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response as DeleteProject403Response -from workato_platform.client.workato_api.models.error import Error as Error -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest as ExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse as ExportManifestResponse -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult as ExportManifestResponseResult -from workato_platform.client.workato_api.models.folder import Folder as Folder -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse as FolderAssetsResponse -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult as FolderAssetsResponseResult -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse as FolderCreationResponse -from workato_platform.client.workato_api.models.import_results import ImportResults as ImportResults -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse as OAuthUrlResponse -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData as OAuthUrlResponseData -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec as OpenApiSpec -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse as PackageDetailsResponse -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner as PackageDetailsResponseRecipeStatusInner -from workato_platform.client.workato_api.models.package_response import PackageResponse as PackageResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest as PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse as PicklistResponse -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector as PlatformConnector -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse as PlatformConnectorListResponse -from workato_platform.client.workato_api.models.project import Project as Project -from workato_platform.client.workato_api.models.recipe import Recipe as Recipe -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner as RecipeConfigInner -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest as RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse as RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse as RecipeStartResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest as RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse as RuntimeUserConnectionResponse -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData as RuntimeUserConnectionResponseData -from workato_platform.client.workato_api.models.success_response import SuccessResponse as SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest as UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.models.user import User as User -from workato_platform.client.workato_api.models.validation_error import ValidationError as ValidationError -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue as ValidationErrorErrorsValue +from workato_platform_cli.client.workato_api.models.api_client import ApiClient as ApiClient +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner as ApiClientApiCollectionsInner +from workato_platform_cli.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner as ApiClientApiPoliciesInner +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest as ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse as ApiClientListResponse +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse as ApiClientResponse +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection as ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest as ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint as ApiEndpoint +from workato_platform_cli.client.workato_api.models.api_key import ApiKey as ApiKey +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest as ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse as ApiKeyListResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse as ApiKeyResponse +from workato_platform_cli.client.workato_api.models.asset import Asset as Asset +from workato_platform_cli.client.workato_api.models.asset_reference import AssetReference as AssetReference +from workato_platform_cli.client.workato_api.models.connection import Connection as Connection +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest as ConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest as ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.connector_action import ConnectorAction as ConnectorAction +from workato_platform_cli.client.workato_api.models.connector_version import ConnectorVersion as ConnectorVersion +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest as CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest as CreateFolderRequest +from workato_platform_cli.client.workato_api.models.custom_connector import CustomConnector as CustomConnector +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse as CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData as CustomConnectorCodeResponseData +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse as CustomConnectorListResponse +from workato_platform_cli.client.workato_api.models.data_table import DataTable as DataTable +from workato_platform_cli.client.workato_api.models.data_table_column import DataTableColumn as DataTableColumn +from workato_platform_cli.client.workato_api.models.data_table_column_request import DataTableColumnRequest as DataTableColumnRequest +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest as DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse as DataTableCreateResponse +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse as DataTableListResponse +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation as DataTableRelation +from workato_platform_cli.client.workato_api.models.delete_project403_response import DeleteProject403Response as DeleteProject403Response +from workato_platform_cli.client.workato_api.models.error import Error as Error +from workato_platform_cli.client.workato_api.models.export_manifest_request import ExportManifestRequest as ExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse as ExportManifestResponse +from workato_platform_cli.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult as ExportManifestResponseResult +from workato_platform_cli.client.workato_api.models.folder import Folder as Folder +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse as FolderAssetsResponse +from workato_platform_cli.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult as FolderAssetsResponseResult +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse as FolderCreationResponse +from workato_platform_cli.client.workato_api.models.import_results import ImportResults as ImportResults +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse as OAuthUrlResponse +from workato_platform_cli.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData as OAuthUrlResponseData +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec as OpenApiSpec +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse as PackageDetailsResponse +from workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner as PackageDetailsResponseRecipeStatusInner +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse as PackageResponse +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest as PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse as PicklistResponse +from workato_platform_cli.client.workato_api.models.platform_connector import PlatformConnector as PlatformConnector +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse as PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.models.project import Project as Project +from workato_platform_cli.client.workato_api.models.recipe import Recipe as Recipe +from workato_platform_cli.client.workato_api.models.recipe_config_inner import RecipeConfigInner as RecipeConfigInner +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest as RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse as RecipeListResponse +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse as RecipeStartResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest as RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse as RuntimeUserConnectionResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData as RuntimeUserConnectionResponseData +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse as SuccessResponse +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest as UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.models.user import User as User +from workato_platform_cli.client.workato_api.models.validation_error import ValidationError as ValidationError +from workato_platform_cli.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue as ValidationErrorErrorsValue diff --git a/src/workato_platform_cli/client/workato_api/api/__init__.py b/src/workato_platform_cli/client/workato_api/api/__init__.py index a0e5380..ce0579f 100644 --- a/src/workato_platform_cli/client/workato_api/api/__init__.py +++ b/src/workato_platform_cli/client/workato_api/api/__init__.py @@ -1,15 +1,15 @@ # flake8: noqa # import apis into api package -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi -from workato_platform.client.workato_api.api.export_api import ExportApi -from workato_platform.client.workato_api.api.folders_api import FoldersApi -from workato_platform.client.workato_api.api.packages_api import PackagesApi -from workato_platform.client.workato_api.api.projects_api import ProjectsApi -from workato_platform.client.workato_api.api.properties_api import PropertiesApi -from workato_platform.client.workato_api.api.recipes_api import RecipesApi -from workato_platform.client.workato_api.api.users_api import UsersApi +from workato_platform_cli.client.workato_api.api.api_platform_api import APIPlatformApi +from workato_platform_cli.client.workato_api.api.connections_api import ConnectionsApi +from workato_platform_cli.client.workato_api.api.connectors_api import ConnectorsApi +from workato_platform_cli.client.workato_api.api.data_tables_api import DataTablesApi +from workato_platform_cli.client.workato_api.api.export_api import ExportApi +from workato_platform_cli.client.workato_api.api.folders_api import FoldersApi +from workato_platform_cli.client.workato_api.api.packages_api import PackagesApi +from workato_platform_cli.client.workato_api.api.projects_api import ProjectsApi +from workato_platform_cli.client.workato_api.api.properties_api import PropertiesApi +from workato_platform_cli.client.workato_api.api.recipes_api import RecipesApi +from workato_platform_cli.client.workato_api.api.users_api import UsersApi diff --git a/src/workato_platform_cli/client/workato_api/api/api_platform_api.py b/src/workato_platform_cli/client/workato_api/api/api_platform_api.py index 8103398..990e6c7 100644 --- a/src/workato_platform_cli/client/workato_api/api/api_platform_api.py +++ b/src/workato_platform_cli/client/workato_api/api/api_platform_api.py @@ -19,20 +19,20 @@ from pydantic import Field, StrictInt from typing import List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse + +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class APIPlatformApi: diff --git a/src/workato_platform_cli/client/workato_api/api/connections_api.py b/src/workato_platform_cli/client/workato_api/api/connections_api.py index 467e9a4..fc2785e 100644 --- a/src/workato_platform_cli/client/workato_api/api/connections_api.py +++ b/src/workato_platform_cli/client/workato_api/api/connections_api.py @@ -19,18 +19,18 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse + +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class ConnectionsApi: diff --git a/src/workato_platform_cli/client/workato_api/api/connectors_api.py b/src/workato_platform_cli/client/workato_api/api/connectors_api.py index e51fcb8..5c2dab6 100644 --- a/src/workato_platform_cli/client/workato_api/api/connectors_api.py +++ b/src/workato_platform_cli/client/workato_api/api/connectors_api.py @@ -19,13 +19,13 @@ from pydantic import Field, StrictInt from typing import Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class ConnectorsApi: diff --git a/src/workato_platform_cli/client/workato_api/api/data_tables_api.py b/src/workato_platform_cli/client/workato_api/api/data_tables_api.py index c47e59f..605f664 100644 --- a/src/workato_platform_cli/client/workato_api/api/data_tables_api.py +++ b/src/workato_platform_cli/client/workato_api/api/data_tables_api.py @@ -19,13 +19,13 @@ from pydantic import Field, StrictInt from typing import Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class DataTablesApi: diff --git a/src/workato_platform_cli/client/workato_api/api/export_api.py b/src/workato_platform_cli/client/workato_api/api/export_api.py index 60fb7fd..1592063 100644 --- a/src/workato_platform_cli/client/workato_api/api/export_api.py +++ b/src/workato_platform_cli/client/workato_api/api/export_api.py @@ -19,13 +19,13 @@ from pydantic import Field, StrictBool, StrictInt from typing import Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class ExportApi: diff --git a/src/workato_platform_cli/client/workato_api/api/folders_api.py b/src/workato_platform_cli/client/workato_api/api/folders_api.py index b1cc3b5..d939b37 100644 --- a/src/workato_platform_cli/client/workato_api/api/folders_api.py +++ b/src/workato_platform_cli/client/workato_api/api/folders_api.py @@ -19,13 +19,13 @@ from pydantic import Field, StrictInt from typing import List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform_cli.client.workato_api.models.folder import Folder +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class FoldersApi: diff --git a/src/workato_platform_cli/client/workato_api/api/packages_api.py b/src/workato_platform_cli/client/workato_api/api/packages_api.py index def7dab..94ff44f 100644 --- a/src/workato_platform_cli/client/workato_api/api/packages_api.py +++ b/src/workato_platform_cli/client/workato_api/api/packages_api.py @@ -19,12 +19,12 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr from typing import Optional, Tuple, Union from typing_extensions import Annotated -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class PackagesApi: diff --git a/src/workato_platform_cli/client/workato_api/api/projects_api.py b/src/workato_platform_cli/client/workato_api/api/projects_api.py index b9770ec..fbaebfc 100644 --- a/src/workato_platform_cli/client/workato_api/api/projects_api.py +++ b/src/workato_platform_cli/client/workato_api/api/projects_api.py @@ -19,12 +19,12 @@ from pydantic import Field, StrictInt from typing import List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class ProjectsApi: diff --git a/src/workato_platform_cli/client/workato_api/api/properties_api.py b/src/workato_platform_cli/client/workato_api/api/properties_api.py index 2f35eb0..af75a49 100644 --- a/src/workato_platform_cli/client/workato_api/api/properties_api.py +++ b/src/workato_platform_cli/client/workato_api/api/properties_api.py @@ -19,12 +19,12 @@ from pydantic import Field, StrictInt, StrictStr from typing import Dict from typing_extensions import Annotated -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class PropertiesApi: diff --git a/src/workato_platform_cli/client/workato_api/api/recipes_api.py b/src/workato_platform_cli/client/workato_api/api/recipes_api.py index d2ff2b6..99568d9 100644 --- a/src/workato_platform_cli/client/workato_api/api/recipes_api.py +++ b/src/workato_platform_cli/client/workato_api/api/recipes_api.py @@ -20,14 +20,14 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.models.success_response import SuccessResponse - -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse + +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class RecipesApi: diff --git a/src/workato_platform_cli/client/workato_api/api/users_api.py b/src/workato_platform_cli/client/workato_api/api/users_api.py index c1933fc..d2fbd91 100644 --- a/src/workato_platform_cli/client/workato_api/api/users_api.py +++ b/src/workato_platform_cli/client/workato_api/api/users_api.py @@ -16,11 +16,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from workato_platform.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.models.user import User -from workato_platform.client.workato_api.api_client import ApiClient, RequestSerialized -from workato_platform.client.workato_api.api_response import ApiResponse -from workato_platform.client.workato_api.rest import RESTResponseType +from workato_platform_cli.client.workato_api.api_client import ApiClient, RequestSerialized +from workato_platform_cli.client.workato_api.api_response import ApiResponse +from workato_platform_cli.client.workato_api.rest import RESTResponseType class UsersApi: diff --git a/src/workato_platform_cli/client/workato_api/api_client.py b/src/workato_platform_cli/client/workato_api/api_client.py index ea849af..d8374d2 100644 --- a/src/workato_platform_cli/client/workato_api/api_client.py +++ b/src/workato_platform_cli/client/workato_api/api_client.py @@ -27,11 +27,11 @@ from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr -from workato_platform.client.workato_api.configuration import Configuration -from workato_platform.client.workato_api.api_response import ApiResponse, T as ApiResponseT -import workato_platform.client.workato_api.models -from workato_platform.client.workato_api import rest -from workato_platform.client.workato_api.exceptions import ( +from workato_platform_cli.client.workato_api.configuration import Configuration +from workato_platform_cli.client.workato_api.api_response import ApiResponse, T as ApiResponseT +import workato_platform_cli.client.workato_api.models +from workato_platform_cli.client.workato_api import rest +from workato_platform_cli.client.workato_api.exceptions import ( ApiValueError, ApiException, BadRequestException, @@ -459,7 +459,7 @@ def __deserialize(self, data, klass): if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(workato_platform.client.workato_api.models, klass) + klass = getattr(workato_platform_cli.client.workato_api.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) diff --git a/src/workato_platform_cli/client/workato_api/configuration.py b/src/workato_platform_cli/client/workato_api/configuration.py index 7259fc9..f50f5fa 100644 --- a/src/workato_platform_cli/client/workato_api/configuration.py +++ b/src/workato_platform_cli/client/workato_api/configuration.py @@ -232,7 +232,7 @@ def __init__( self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("workato_platform.client.workato_api") + self.logger["package_logger"] = logging.getLogger("workato_platform_cli.client.workato_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format diff --git a/src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md b/src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md index 2d15179..0b520f9 100644 --- a/src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/APIPlatformApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.APIPlatformApi +# workato_platform_cli.client.workato_api.APIPlatformApi All URIs are relative to *https://www.workato.com* @@ -28,15 +28,15 @@ Create a new API client within a project with various authentication methods * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -46,15 +46,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) + api_client_create_request = workato_platform_cli.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | try: # Create API client (v2) @@ -111,15 +111,15 @@ This generates both recipes and endpoints from the provided spec. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -129,15 +129,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_collection_create_request = workato_platform.client.workato_api.ApiCollectionCreateRequest() # ApiCollectionCreateRequest | + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) + api_collection_create_request = workato_platform_cli.client.workato_api.ApiCollectionCreateRequest() # ApiCollectionCreateRequest | try: # Create API collection @@ -192,15 +192,15 @@ Create a new API key for an API client * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -210,16 +210,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_client_id = 56 # int | Specify the ID of the API client to create the API key for - api_key_create_request = workato_platform.client.workato_api.ApiKeyCreateRequest() # ApiKeyCreateRequest | + api_key_create_request = workato_platform_cli.client.workato_api.ApiKeyCreateRequest() # ApiKeyCreateRequest | try: # Create an API key @@ -276,14 +276,14 @@ Disables an active API endpoint. The endpoint can no longer be called by a clien * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -293,14 +293,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_endpoint_id = 56 # int | ID of the API endpoint try: @@ -357,14 +357,14 @@ the API endpoint successfully. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -374,14 +374,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_endpoint_id = 56 # int | ID of the API endpoint try: @@ -438,14 +438,14 @@ in the response. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -455,14 +455,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) project_id = 56 # int | The ID of a specific project. Retrieve a list of project IDs with the list projects endpoint (optional) page = 1 # int | Page number (optional) (default to 1) per_page = 100 # int | Page size. The maximum page size is 100 (optional) (default to 100) @@ -525,14 +525,14 @@ to which the collections belong in the response. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -542,14 +542,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) per_page = 100 # int | Number of API collections to return in a single page (optional) (default to 100) page = 1 # int | Page number of the API collections to fetch (optional) (default to 1) @@ -608,14 +608,14 @@ of endpoints in a specific collection. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -625,14 +625,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_collection_id = 56 # int | ID of the API collection. If not provided, all API endpoints are returned (optional) per_page = 100 # int | Number of API endpoints to return in a single page (optional) (default to 100) page = 1 # int | Page number of the API endpoints to fetch (optional) (default to 1) @@ -693,14 +693,14 @@ to filter keys for a specific client. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -710,14 +710,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_client_id = 56 # int | Filter API keys for a specific API client try: @@ -773,14 +773,14 @@ Refresh the authentication token or OAuth 2.0 client secret for an API key. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -790,14 +790,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) api_client_id = 56 # int | ID of the API client that owns the API key api_key_id = 56 # int | ID of the API key to refresh diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClient.md b/src/workato_platform_cli/client/workato_api/docs/ApiClient.md index ede7345..130654e 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClient.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClient.md @@ -27,7 +27,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client import ApiClient # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md index c6117d1..6e44744 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md index f40a500..35f0b47 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from workato_platform_cli.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md index b750791..0b2ba1a 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md @@ -27,7 +27,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md index 6d3346c..79b4e8e 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md index c979f83..b1fa8dc 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiClientResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiCollection.md b/src/workato_platform_cli/client/workato_api/docs/ApiCollection.md index c656934..1f81fab 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiCollection.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiCollection.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md index 94b268e..8ccfebc 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md b/src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md index 9dbdfff..e4404e5 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiEndpoint.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiKey.md b/src/workato_platform_cli/client/workato_api/docs/ApiKey.md index 7c746e5..a961b00 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiKey.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiKey.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key import ApiKey # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md index be1c78f..6eacd25 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md index e3d720a..070417a 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md b/src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md index d2caff2..528d6fd 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/Asset.md b/src/workato_platform_cli/client/workato_api/docs/Asset.md index 826d944..32c7c37 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Asset.md +++ b/src/workato_platform_cli/client/workato_api/docs/Asset.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.asset import Asset # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/AssetReference.md b/src/workato_platform_cli/client/workato_api/docs/AssetReference.md index fff1d09..a832b69 100644 --- a/src/workato_platform_cli/client/workato_api/docs/AssetReference.md +++ b/src/workato_platform_cli/client/workato_api/docs/AssetReference.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.asset_reference import AssetReference +from workato_platform_cli.client.workato_api.models.asset_reference import AssetReference # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/Connection.md b/src/workato_platform_cli/client/workato_api/docs/Connection.md index 7762ced..8cf841f 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Connection.md +++ b/src/workato_platform_cli/client/workato_api/docs/Connection.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection import Connection # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md index 4b9fd14..b896c1b 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md index 2ae2444..aeea25d 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md b/src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md index 2e111dd..4f42be6 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectionsApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.ConnectionsApi +# workato_platform_cli.client.workato_api.ConnectionsApi All URIs are relative to *https://www.workato.com* @@ -27,15 +27,15 @@ for authentication, but can create shell connections for OAuth providers. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -45,15 +45,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - connection_create_request = workato_platform.client.workato_api.ConnectionCreateRequest() # ConnectionCreateRequest | + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) + connection_create_request = workato_platform_cli.client.workato_api.ConnectionCreateRequest() # ConnectionCreateRequest | try: # Create a connection @@ -111,15 +111,15 @@ a URL for end user authorization. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -129,15 +129,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) - runtime_user_connection_create_request = workato_platform.client.workato_api.RuntimeUserConnectionCreateRequest() # RuntimeUserConnectionCreateRequest | + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) + runtime_user_connection_create_request = workato_platform_cli.client.workato_api.RuntimeUserConnectionCreateRequest() # RuntimeUserConnectionCreateRequest | try: # Create OAuth runtime user connection @@ -196,14 +196,14 @@ a connection. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -213,14 +213,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) connection_id = 56 # int | Connection ID try: @@ -279,15 +279,15 @@ used in forms or dropdowns for the connected application. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -297,16 +297,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) connection_id = 56 # int | ID of the connection. This can be found in the URL of the app connection or is the result of the List connections endpoint. - picklist_request = workato_platform.client.workato_api.PicklistRequest() # PicklistRequest | + picklist_request = workato_platform_cli.client.workato_api.PicklistRequest() # PicklistRequest | try: # Get picklist values @@ -363,14 +363,14 @@ Returns all connections and associated data for the authenticated user * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -380,14 +380,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) folder_id = 56 # int | Folder ID of the connection (optional) parent_id = 56 # int | Parent ID of the connection (must be same provider) (optional) external_id = 'external_id_example' # str | External identifier for the connection (optional) @@ -452,15 +452,15 @@ metadata and parameters without requiring full re-creation. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -470,16 +470,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectionsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectionsApi(api_client) connection_id = 56 # int | The ID of the connection - connection_update_request = workato_platform.client.workato_api.ConnectionUpdateRequest() # ConnectionUpdateRequest | (optional) + connection_update_request = workato_platform_cli.client.workato_api.ConnectionUpdateRequest() # ConnectionUpdateRequest | (optional) try: # Update a connection diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md index dbc4713..80cb46b 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectorAction.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.connector_action import ConnectorAction +from workato_platform_cli.client.workato_api.models.connector_action import ConnectorAction # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md index 8a4b96a..ed8ab63 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectorVersion.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion +from workato_platform_cli.client.workato_api.models.connector_version import ConnectorVersion # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md b/src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md index 4fc5804..3da5213 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/ConnectorsApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.ConnectorsApi +# workato_platform_cli.client.workato_api.ConnectorsApi All URIs are relative to *https://www.workato.com* @@ -21,14 +21,14 @@ Fetch the code for a specific custom connector * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -38,14 +38,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectorsApi(api_client) id = 56 # int | The ID of the custom connector try: @@ -101,14 +101,14 @@ Returns a list of all custom connectors * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -118,14 +118,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectorsApi(api_client) try: # List custom connectors @@ -178,14 +178,14 @@ triggers and actions. This includes both standard and platform connectors. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -195,14 +195,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ConnectorsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ConnectorsApi(api_client) page = 1 # int | Page number (optional) (default to 1) per_page = 1 # int | Number of records per page (max 100) (optional) (default to 1) diff --git a/src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md b/src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md index f50f7ba..83a4995 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md b/src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md index 8442e86..c7f32f3 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/CustomConnector.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnector.md index 15a1b48..e1d2047 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CustomConnector.md +++ b/src/workato_platform_cli/client/workato_api/docs/CustomConnector.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.custom_connector import CustomConnector +from workato_platform_cli.client.workato_api.models.custom_connector import CustomConnector # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md index a8636b9..682b356 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md index 3207395..a2cabf1 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md +++ b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from workato_platform_cli.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md index 4263eea..d00a61f 100644 --- a/src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTable.md b/src/workato_platform_cli/client/workato_api/docs/DataTable.md index ada0419..920f854 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTable.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTable.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table import DataTable # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md b/src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md index 2a03cf1..16e54f0 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableColumn.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn +from workato_platform_cli.client.workato_api.models.data_table_column import DataTableColumn # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md b/src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md index 8725adb..6254aee 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from workato_platform_cli.client.workato_api.models.data_table_column_request import DataTableColumnRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md index 889bfc1..18fc953 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md index b359033..68bd45f 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md b/src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md index 9c0cc37..58a7757 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableListResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md b/src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md index 71cf924..09366e1 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTableRelation.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md b/src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md index 360e436..4d0b0d9 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/DataTablesApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.DataTablesApi +# workato_platform_cli.client.workato_api.DataTablesApi All URIs are relative to *https://www.workato.com* @@ -20,15 +20,15 @@ Creates a data table in a folder you specify * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -38,15 +38,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) - data_table_create_request = workato_platform.client.workato_api.DataTableCreateRequest() # DataTableCreateRequest | + api_instance = workato_platform_cli.client.workato_api.DataTablesApi(api_client) + data_table_create_request = workato_platform_cli.client.workato_api.DataTableCreateRequest() # DataTableCreateRequest | try: # Create data table @@ -101,14 +101,14 @@ Returns a list of all data tables in your workspace * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -118,14 +118,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.DataTablesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.DataTablesApi(api_client) page = 1 # int | Page number of the data tables to fetch (optional) (default to 1) per_page = 100 # int | Page size (max 100) (optional) (default to 100) diff --git a/src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md b/src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md index c86cf44..e16a038 100644 --- a/src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md +++ b/src/workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response +from workato_platform_cli.client.workato_api.models.delete_project403_response import DeleteProject403Response # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/Error.md b/src/workato_platform_cli/client/workato_api/docs/Error.md index 617e9e9..7ce7a5e 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Error.md +++ b/src/workato_platform_cli/client/workato_api/docs/Error.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.error import Error +from workato_platform_cli.client.workato_api.models.error import Error # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ExportApi.md b/src/workato_platform_cli/client/workato_api/docs/ExportApi.md index e71277b..86ee836 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ExportApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/ExportApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.ExportApi +# workato_platform_cli.client.workato_api.ExportApi All URIs are relative to *https://www.workato.com* @@ -20,15 +20,15 @@ Create an export manifest for exporting assets * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -38,15 +38,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ExportApi(api_client) - create_export_manifest_request = workato_platform.client.workato_api.CreateExportManifestRequest() # CreateExportManifestRequest | + api_instance = workato_platform_cli.client.workato_api.ExportApi(api_client) + create_export_manifest_request = workato_platform_cli.client.workato_api.CreateExportManifestRequest() # CreateExportManifestRequest | try: # Create an export manifest @@ -102,14 +102,14 @@ View assets in a folder. Useful for creating or updating export manifests. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -119,14 +119,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ExportApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ExportApi(api_client) folder_id = 56 # int | The ID of the folder containing the assets (optional) include_test_cases = False # bool | Include test cases (currently not supported) (optional) (default to False) include_data = False # bool | Include data from the list of assets (optional) (default to False) diff --git a/src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md index 4d64ee0..158c508 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_request import ExportManifestRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md index ed8e5b7..20ff8f9 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md index 4c5e8e3..25fd22a 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md +++ b/src/workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from workato_platform_cli.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/Folder.md b/src/workato_platform_cli/client/workato_api/docs/Folder.md index 28207b4..2cb3850 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Folder.md +++ b/src/workato_platform_cli/client/workato_api/docs/Folder.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.folder import Folder +from workato_platform_cli.client.workato_api.models.folder import Folder # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md index 382a3f3..1c723a5 100644 --- a/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md index 95a5929..80694df 100644 --- a/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md +++ b/src/workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from workato_platform_cli.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md b/src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md index 2617a2e..7987e25 100644 --- a/src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/FoldersApi.md b/src/workato_platform_cli/client/workato_api/docs/FoldersApi.md index f4d2aa5..794a4af 100644 --- a/src/workato_platform_cli/client/workato_api/docs/FoldersApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/FoldersApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.FoldersApi +# workato_platform_cli.client.workato_api.FoldersApi All URIs are relative to *https://www.workato.com* @@ -22,15 +22,15 @@ is specified, creates the folder as a top-level folder in the home folder. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -40,15 +40,15 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.FoldersApi(api_client) - create_folder_request = workato_platform.client.workato_api.CreateFolderRequest() # CreateFolderRequest | + api_instance = workato_platform_cli.client.workato_api.FoldersApi(api_client) + create_folder_request = workato_platform_cli.client.workato_api.CreateFolderRequest() # CreateFolderRequest | try: # Create a folder @@ -103,14 +103,14 @@ Lists all folders. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.folder import Folder +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -120,14 +120,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.FoldersApi(api_client) + api_instance = workato_platform_cli.client.workato_api.FoldersApi(api_client) parent_id = 56 # int | Parent folder ID. Defaults to Home folder. (optional) page = 1 # int | Page number. Defaults to 1. (optional) (default to 1) per_page = 100 # int | Page size. Defaults to 100 (maximum is 100). (optional) (default to 100) diff --git a/src/workato_platform_cli/client/workato_api/docs/ImportResults.md b/src/workato_platform_cli/client/workato_api/docs/ImportResults.md index 3b81dbf..d42ebee 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ImportResults.md +++ b/src/workato_platform_cli/client/workato_api/docs/ImportResults.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.import_results import ImportResults +from workato_platform_cli.client.workato_api.models.import_results import ImportResults # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md index 9bc51e4..bf93379 100644 --- a/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md index f7db6ae..c8dfe66 100644 --- a/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md +++ b/src/workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from workato_platform_cli.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md b/src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md index b923b62..4a30461 100644 --- a/src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md +++ b/src/workato_platform_cli/client/workato_api/docs/OpenApiSpec.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md index b653df2..01e7f18 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md index 489d79e..0151343 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md +++ b/src/workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PackageResponse.md b/src/workato_platform_cli/client/workato_api/docs/PackageResponse.md index 0af6f19..5729b95 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PackageResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/PackageResponse.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PackagesApi.md b/src/workato_platform_cli/client/workato_api/docs/PackagesApi.md index 43aaf2c..0bb190f 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PackagesApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/PackagesApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.PackagesApi +# workato_platform_cli.client.workato_api.PackagesApi All URIs are relative to *https://www.workato.com* @@ -24,13 +24,13 @@ Use the -L flag in cURL to follow redirects. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -40,14 +40,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PackagesApi(api_client) package_id = 56 # int | Package ID try: @@ -119,14 +119,14 @@ when calling the Create an export manifest endpoint. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -136,14 +136,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PackagesApi(api_client) id = 'id_example' # str | Export manifest ID try: @@ -198,14 +198,14 @@ Get details of an imported or exported package including status * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -215,14 +215,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PackagesApi(api_client) package_id = 56 # int | Package ID try: @@ -286,14 +286,14 @@ The input (zip file) is an application/octet-stream payload containing package c * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -303,14 +303,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PackagesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PackagesApi(api_client) id = 56 # int | Folder ID body = None # bytearray | restart_recipes = False # bool | Value must be true to allow the restarting of running recipes during import. Packages cannot be imported if there are running recipes and this parameter equals false or is not provided. (optional) (default to False) diff --git a/src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md b/src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md index 9b5ab09..23f27ca 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/PicklistRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md b/src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md index c462628..1067fd7 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/PicklistResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md b/src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md index 549a48e..f6de282 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md +++ b/src/workato_platform_cli/client/workato_api/docs/PlatformConnector.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector +from workato_platform_cli.client.workato_api.models.platform_connector import PlatformConnector # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md b/src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md index 0bca4ce..ce63a3d 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/Project.md b/src/workato_platform_cli/client/workato_api/docs/Project.md index 92a5b9b..5c86aeb 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Project.md +++ b/src/workato_platform_cli/client/workato_api/docs/Project.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.models.project import Project # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md b/src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md index 279d8ca..524f0f2 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/ProjectsApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.ProjectsApi +# workato_platform_cli.client.workato_api.ProjectsApi All URIs are relative to *https://www.workato.com* @@ -22,14 +22,14 @@ recipes, connections, and Workflow apps assets inside the project. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -39,14 +39,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ProjectsApi(api_client) project_id = 56 # int | The ID of the project to delete try: @@ -102,14 +102,14 @@ Returns a list of projects belonging to the authenticated user with pagination s * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -119,14 +119,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.ProjectsApi(api_client) + api_instance = workato_platform_cli.client.workato_api.ProjectsApi(api_client) page = 1 # int | Page number (optional) (default to 1) per_page = 100 # int | Number of projects per page (optional) (default to 100) diff --git a/src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md b/src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md index 56b0eda..e41356c 100644 --- a/src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/PropertiesApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.PropertiesApi +# workato_platform_cli.client.workato_api.PropertiesApi All URIs are relative to *https://www.workato.com* @@ -25,13 +25,13 @@ salesforce_sync.admin_email, with the project_id you provided is returned. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -41,14 +41,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PropertiesApi(api_client) prefix = 'salesforce_sync.' # str | Returns properties that contain the prefix you provided. For example, if the prefix is salesforce_sync. the property salesforce_sync.admin_email is returned. project_id = 523144 # int | Returns project-level properties that match the project_id you specify. If this parameter is not present, this call returns environment properties. @@ -113,15 +113,15 @@ the names you provide in the request. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -131,16 +131,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.PropertiesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.PropertiesApi(api_client) project_id = 523144 # int | Provide the project ID that contains the project properties you plan to upsert. If this parameter is not present, this call upserts environment properties. - upsert_project_properties_request = workato_platform.client.workato_api.UpsertProjectPropertiesRequest() # UpsertProjectPropertiesRequest | + upsert_project_properties_request = workato_platform_cli.client.workato_api.UpsertProjectPropertiesRequest() # UpsertProjectPropertiesRequest | try: # Upsert project properties diff --git a/src/workato_platform_cli/client/workato_api/docs/Recipe.md b/src/workato_platform_cli/client/workato_api/docs/Recipe.md index 3a9490a..0c94616 100644 --- a/src/workato_platform_cli/client/workato_api/docs/Recipe.md +++ b/src/workato_platform_cli/client/workato_api/docs/Recipe.md @@ -39,7 +39,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.recipe import Recipe +from workato_platform_cli.client.workato_api.models.recipe import Recipe # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md b/src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md index faf7290..1e076af 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md +++ b/src/workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from workato_platform_cli.client.workato_api.models.recipe_config_inner import RecipeConfigInner # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md b/src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md index 34a36e2..fb01095 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md b/src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md index c9e96c4..3aedc24 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/RecipeListResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md b/src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md index daeb5e4..772840e 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RecipesApi.md b/src/workato_platform_cli/client/workato_api/docs/RecipesApi.md index 4e6a282..ebe214a 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RecipesApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/RecipesApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.RecipesApi +# workato_platform_cli.client.workato_api.RecipesApi All URIs are relative to *https://www.workato.com* @@ -24,14 +24,14 @@ Recipes are returned in descending ID order. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -41,14 +41,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.RecipesApi(api_client) adapter_names_all = 'adapter_names_all_example' # str | Comma-separated adapter names (recipes must use ALL) (optional) adapter_names_any = 'adapter_names_any_example' # str | Comma-separated adapter names (recipes must use ANY) (optional) folder_id = 56 # int | Return recipes in specified folder (optional) @@ -127,14 +127,14 @@ Starts a recipe specified by recipe ID * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -144,14 +144,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.RecipesApi(api_client) recipe_id = 56 # int | Recipe ID try: @@ -209,14 +209,14 @@ Stops a recipe specified by recipe ID * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -226,14 +226,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.RecipesApi(api_client) recipe_id = 56 # int | Recipe ID try: @@ -292,15 +292,15 @@ Updates the chosen connection for a specific connector in a stopped recipe. * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -310,16 +310,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.RecipesApi(api_client) + api_instance = workato_platform_cli.client.workato_api.RecipesApi(api_client) recipe_id = 56 # int | ID of the recipe - recipe_connection_update_request = workato_platform.client.workato_api.RecipeConnectionUpdateRequest() # RecipeConnectionUpdateRequest | + recipe_connection_update_request = workato_platform_cli.client.workato_api.RecipeConnectionUpdateRequest() # RecipeConnectionUpdateRequest | try: # Update a connection for a recipe diff --git a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md index 68a224d..fd12431 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md index fc124cc..089b5da 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md index 0377d39..53f76a3 100644 --- a/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md +++ b/src/workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md b/src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md index eba19ad..aa09908 100644 --- a/src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md +++ b/src/workato_platform_cli/client/workato_api/docs/SuccessResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md b/src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md index 372c05f..f6b0d30 100644 --- a/src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md +++ b/src/workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/User.md b/src/workato_platform_cli/client/workato_api/docs/User.md index 5d2db1f..dadf663 100644 --- a/src/workato_platform_cli/client/workato_api/docs/User.md +++ b/src/workato_platform_cli/client/workato_api/docs/User.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.models.user import User # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/UsersApi.md b/src/workato_platform_cli/client/workato_api/docs/UsersApi.md index abd1bdc..341a2e4 100644 --- a/src/workato_platform_cli/client/workato_api/docs/UsersApi.md +++ b/src/workato_platform_cli/client/workato_api/docs/UsersApi.md @@ -1,4 +1,4 @@ -# workato_platform.client.workato_api.UsersApi +# workato_platform_cli.client.workato_api.UsersApi All URIs are relative to *https://www.workato.com* @@ -19,14 +19,14 @@ Returns information about the authenticated user * Bearer Authentication (BearerAuth): ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.models.user import User -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -36,14 +36,14 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.UsersApi(api_client) + api_instance = workato_platform_cli.client.workato_api.UsersApi(api_client) try: # Get current user information diff --git a/src/workato_platform_cli/client/workato_api/docs/ValidationError.md b/src/workato_platform_cli/client/workato_api/docs/ValidationError.md index 0cc7200..89e4509 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ValidationError.md +++ b/src/workato_platform_cli/client/workato_api/docs/ValidationError.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.validation_error import ValidationError +from workato_platform_cli.client.workato_api.models.validation_error import ValidationError # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md b/src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md index 6329125..6970ab1 100644 --- a/src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md +++ b/src/workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ## Example ```python -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue +from workato_platform_cli.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue # TODO update the JSON string below json = "{}" diff --git a/src/workato_platform_cli/client/workato_api/models/__init__.py b/src/workato_platform_cli/client/workato_api/models/__init__.py index 28c8fe0..276da22 100644 --- a/src/workato_platform_cli/client/workato_api/models/__init__.py +++ b/src/workato_platform_cli/client/workato_api/models/__init__.py @@ -13,71 +13,71 @@ """ # noqa: E501 # import models into model package -from workato_platform.client.workato_api.models.api_client import ApiClient -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.api_key import ApiKey -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse -from workato_platform.client.workato_api.models.asset import Asset -from workato_platform.client.workato_api.models.asset_reference import AssetReference -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest -from workato_platform.client.workato_api.models.connector_action import ConnectorAction -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest -from workato_platform.client.workato_api.models.custom_connector import CustomConnector -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse -from workato_platform.client.workato_api.models.data_table import DataTable -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response -from workato_platform.client.workato_api.models.error import Error -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult -from workato_platform.client.workato_api.models.folder import Folder -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse -from workato_platform.client.workato_api.models.import_results import ImportResults -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner -from workato_platform.client.workato_api.models.package_response import PackageResponse -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse -from workato_platform.client.workato_api.models.project import Project -from workato_platform.client.workato_api.models.recipe import Recipe -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData -from workato_platform.client.workato_api.models.success_response import SuccessResponse -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest -from workato_platform.client.workato_api.models.user import User -from workato_platform.client.workato_api.models.validation_error import ValidationError -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue +from workato_platform_cli.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform_cli.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.asset_reference import AssetReference +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.connector_action import ConnectorAction +from workato_platform_cli.client.workato_api.models.connector_version import ConnectorVersion +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform_cli.client.workato_api.models.custom_connector import CustomConnector +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform_cli.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table_column import DataTableColumn +from workato_platform_cli.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform_cli.client.workato_api.models.delete_project403_response import DeleteProject403Response +from workato_platform_cli.client.workato_api.models.error import Error +from workato_platform_cli.client.workato_api.models.export_manifest_request import ExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform_cli.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from workato_platform_cli.client.workato_api.models.folder import Folder +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform_cli.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform_cli.client.workato_api.models.import_results import ImportResults +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform_cli.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform_cli.client.workato_api.models.platform_connector import PlatformConnector +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.models.recipe import Recipe +from workato_platform_cli.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.models.validation_error import ValidationError +from workato_platform_cli.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue diff --git a/src/workato_platform_cli/client/workato_api/models/api_client.py b/src/workato_platform_cli/client/workato_api/models/api_client.py index 1d3e84b..0cf9cb9 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_client.py +++ b/src/workato_platform_cli/client/workato_api/models/api_client.py @@ -20,8 +20,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform_cli.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_client_list_response.py b/src/workato_platform_cli/client/workato_api/models/api_client_list_response.py index ff4c94d..766a40d 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_client_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/api_client_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client import ApiClient from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_client_response.py b/src/workato_platform_cli/client/workato_api/models/api_client_response.py index a379b09..f407fb9 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_client_response.py +++ b/src/workato_platform_cli/client/workato_api/models/api_client_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client import ApiClient from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_collection.py b/src/workato_platform_cli/client/workato_api/models/api_collection.py index 7fb1ceb..0774649 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_collection.py +++ b/src/workato_platform_cli/client/workato_api/models/api_collection.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.import_results import ImportResults +from workato_platform_cli.client.workato_api.models.import_results import ImportResults from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py b/src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py index 973c52e..63f3436 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py +++ b/src/workato_platform_cli/client/workato_api/models/api_collection_create_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_key_list_response.py b/src/workato_platform_cli/client/workato_api/models/api_key_list_response.py index 7d36419..9262d80 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_key_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/api_key_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key import ApiKey from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/api_key_response.py b/src/workato_platform_cli/client/workato_api/models/api_key_response.py index 045f239..0be8b0c 100644 --- a/src/workato_platform_cli/client/workato_api/models/api_key_response.py +++ b/src/workato_platform_cli/client/workato_api/models/api_key_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key import ApiKey from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py index 1fc4fdb..7120340 100644 --- a/src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py +++ b/src/workato_platform_cli/client/workato_api/models/create_export_manifest_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_request import ExportManifestRequest from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/custom_connector.py b/src/workato_platform_cli/client/workato_api/models/custom_connector.py index c56b961..bf056e3 100644 --- a/src/workato_platform_cli/client/workato_api/models/custom_connector.py +++ b/src/workato_platform_cli/client/workato_api/models/custom_connector.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion +from workato_platform_cli.client.workato_api.models.connector_version import ConnectorVersion from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py b/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py index ee74d40..9109dfe 100644 --- a/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py +++ b/src/workato_platform_cli/client/workato_api/models/custom_connector_code_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from workato_platform_cli.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py b/src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py index 3977b62..8cb9535 100644 --- a/src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/custom_connector_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.custom_connector import CustomConnector +from workato_platform_cli.client.workato_api.models.custom_connector import CustomConnector from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table.py b/src/workato_platform_cli/client/workato_api/models/data_table.py index dd1048c..0de2274 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from uuid import UUID -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn +from workato_platform_cli.client.workato_api.models.data_table_column import DataTableColumn from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table_column.py b/src/workato_platform_cli/client/workato_api/models/data_table_column.py index 3bb7b48..df5fe28 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table_column.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table_column.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table_column_request.py b/src/workato_platform_cli/client/workato_api/models/data_table_column_request.py index 0f9ab45..ed49e11 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table_column_request.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table_column_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table_create_request.py b/src/workato_platform_cli/client/workato_api/models/data_table_create_request.py index 04d5ba2..49b2b67 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table_create_request.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table_create_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from workato_platform_cli.client.workato_api.models.data_table_column_request import DataTableColumnRequest from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table_create_response.py b/src/workato_platform_cli/client/workato_api/models/data_table_create_response.py index e97badb..613ae4e 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table_create_response.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table_create_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table import DataTable from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/data_table_list_response.py b/src/workato_platform_cli/client/workato_api/models/data_table_list_response.py index 58c4b31..b8bd28d 100644 --- a/src/workato_platform_cli/client/workato_api/models/data_table_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/data_table_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table import DataTable from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/export_manifest_request.py b/src/workato_platform_cli/client/workato_api/models/export_manifest_request.py index 83d7b47..3c05937 100644 --- a/src/workato_platform_cli/client/workato_api/models/export_manifest_request.py +++ b/src/workato_platform_cli/client/workato_api/models/export_manifest_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.asset_reference import AssetReference +from workato_platform_cli.client.workato_api.models.asset_reference import AssetReference from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/export_manifest_response.py b/src/workato_platform_cli/client/workato_api/models/export_manifest_response.py index f9cb5c6..323e45f 100644 --- a/src/workato_platform_cli/client/workato_api/models/export_manifest_response.py +++ b/src/workato_platform_cli/client/workato_api/models/export_manifest_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from workato_platform_cli.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/folder_assets_response.py b/src/workato_platform_cli/client/workato_api/models/folder_assets_response.py index 874744c..3a5e9f3 100644 --- a/src/workato_platform_cli/client/workato_api/models/folder_assets_response.py +++ b/src/workato_platform_cli/client/workato_api/models/folder_assets_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from workato_platform_cli.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py b/src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py index af85754..5e114ba 100644 --- a/src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py +++ b/src/workato_platform_cli/client/workato_api/models/folder_assets_response_result.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.asset import Asset from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py b/src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py index 821ee05..b1779ea 100644 --- a/src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py +++ b/src/workato_platform_cli/client/workato_api/models/o_auth_url_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from workato_platform_cli.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/package_details_response.py b/src/workato_platform_cli/client/workato_api/models/package_details_response.py index c2cdd02..f23f5b4 100644 --- a/src/workato_platform_cli/client/workato_api/models/package_details_response.py +++ b/src/workato_platform_cli/client/workato_api/models/package_details_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/platform_connector.py b/src/workato_platform_cli/client/workato_api/models/platform_connector.py index 6959d6b..57c33e0 100644 --- a/src/workato_platform_cli/client/workato_api/models/platform_connector.py +++ b/src/workato_platform_cli/client/workato_api/models/platform_connector.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.connector_action import ConnectorAction +from workato_platform_cli.client.workato_api.models.connector_action import ConnectorAction from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py b/src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py index 2488bda..bc0bc7a 100644 --- a/src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/platform_connector_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector +from workato_platform_cli.client.workato_api.models.platform_connector import PlatformConnector from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/recipe.py b/src/workato_platform_cli/client/workato_api/models/recipe.py index 8688772..54233a9 100644 --- a/src/workato_platform_cli/client/workato_api/models/recipe.py +++ b/src/workato_platform_cli/client/workato_api/models/recipe.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from workato_platform_cli.client.workato_api.models.recipe_config_inner import RecipeConfigInner from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/recipe_list_response.py b/src/workato_platform_cli/client/workato_api/models/recipe_list_response.py index 504ece8..189c8ef 100644 --- a/src/workato_platform_cli/client/workato_api/models/recipe_list_response.py +++ b/src/workato_platform_cli/client/workato_api/models/recipe_list_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.recipe import Recipe +from workato_platform_cli.client.workato_api.models.recipe import Recipe from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py b/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py index 468aabb..9df45c5 100644 --- a/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py +++ b/src/workato_platform_cli/client/workato_api/models/runtime_user_connection_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/models/validation_error.py b/src/workato_platform_cli/client/workato_api/models/validation_error.py index a520c80..a6ff6f1 100644 --- a/src/workato_platform_cli/client/workato_api/models/validation_error.py +++ b/src/workato_platform_cli/client/workato_api/models/validation_error.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue +from workato_platform_cli.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue from typing import Optional, Set from typing_extensions import Self diff --git a/src/workato_platform_cli/client/workato_api/rest.py b/src/workato_platform_cli/client/workato_api/rest.py index bd1192e..c7fb199 100644 --- a/src/workato_platform_cli/client/workato_api/rest.py +++ b/src/workato_platform_cli/client/workato_api/rest.py @@ -21,7 +21,7 @@ import aiohttp import aiohttp_retry -from workato_platform.client.workato_api.exceptions import ApiException, ApiValueError +from workato_platform_cli.client.workato_api.exceptions import ApiException, ApiValueError RESTResponseType = aiohttp.ClientResponse diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client.py b/src/workato_platform_cli/client/workato_api/test/test_api_client.py index 59dcf4d..e3f2cb0 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client import ApiClient class TestApiClient(unittest.TestCase): """ApiClient unit test stubs""" @@ -52,12 +52,12 @@ def make_instance(self, include_optional) -> ApiClient: validation_formula = 'OU=Workato', cert_bundle_ids = [3], api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ] @@ -73,12 +73,12 @@ def make_instance(self, include_optional) -> ApiClient: is_legacy = True, auth_type = 'token', api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ], diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py index 35ce754..c7d0f3a 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_collections_inner.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ApiClientApiCollectionsInner class TestApiClientApiCollectionsInner(unittest.TestCase): """ApiClientApiCollectionsInner unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py index d9ed7d5..7041581 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client_api_policies_inner.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner +from workato_platform_cli.client.workato_api.models.api_client_api_policies_inner import ApiClientApiPoliciesInner class TestApiClientApiPoliciesInner(unittest.TestCase): """ApiClientApiPoliciesInner unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py index 86dab25..1a4e3c6 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client_create_request import ApiClientCreateRequest +from workato_platform_cli.client.workato_api.models.api_client_create_request import ApiClientCreateRequest class TestApiClientCreateRequest(unittest.TestCase): """ApiClientCreateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py index c35fafb..9ddc457 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client_list_response import ApiClientListResponse +from workato_platform_cli.client.workato_api.models.api_client_list_response import ApiClientListResponse class TestApiClientListResponse(unittest.TestCase): """ApiClientListResponse unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ApiClientListResponse: if include_optional: return ApiClientListResponse( data = [ - workato_platform.client.workato_api.models.api_client.ApiClient( + workato_platform_cli.client.workato_api.models.api_client.ApiClient( id = 1, name = 'Test client', description = '', @@ -54,12 +54,12 @@ def make_instance(self, include_optional) -> ApiClientListResponse: validation_formula = 'OU=Workato', cert_bundle_ids = [3], api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ], ) @@ -71,7 +71,7 @@ def make_instance(self, include_optional) -> ApiClientListResponse: else: return ApiClientListResponse( data = [ - workato_platform.client.workato_api.models.api_client.ApiClient( + workato_platform_cli.client.workato_api.models.api_client.ApiClient( id = 1, name = 'Test client', description = '', @@ -89,12 +89,12 @@ def make_instance(self, include_optional) -> ApiClientListResponse: validation_formula = 'OU=Workato', cert_bundle_ids = [3], api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ], ) diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_client_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_client_response.py index 90dc225..d79c125 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_client_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_client_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_client_response import ApiClientResponse +from workato_platform_cli.client.workato_api.models.api_client_response import ApiClientResponse class TestApiClientResponse(unittest.TestCase): """ApiClientResponse unit test stubs""" @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> ApiClientResponse: model = ApiClientResponse() if include_optional: return ApiClientResponse( - data = workato_platform.client.workato_api.models.api_client.ApiClient( + data = workato_platform_cli.client.workato_api.models.api_client.ApiClient( id = 1, name = 'Test client', description = '', @@ -53,19 +53,19 @@ def make_instance(self, include_optional) -> ApiClientResponse: validation_formula = 'OU=Workato', cert_bundle_ids = [3], api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ], ) ) else: return ApiClientResponse( - data = workato_platform.client.workato_api.models.api_client.ApiClient( + data = workato_platform_cli.client.workato_api.models.api_client.ApiClient( id = 1, name = 'Test client', description = '', @@ -83,12 +83,12 @@ def make_instance(self, include_optional) -> ApiClientResponse: validation_formula = 'OU=Workato', cert_bundle_ids = [3], api_policies = [ - workato_platform.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( + workato_platform_cli.client.workato_api.models.api_client_api_policies_inner.ApiClient_api_policies_inner( id = 2, name = 'Internal – Admins', ) ], api_collections = [ - workato_platform.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( + workato_platform_cli.client.workato_api.models.api_client_api_collections_inner.ApiClient_api_collections_inner( id = 1, name = 'Echo collection', ) ], ), diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_collection.py b/src/workato_platform_cli/client/workato_api/test/test_api_collection.py index ed55188..fd18823 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_collection.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_collection.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection class TestApiCollection(unittest.TestCase): """ApiCollection unit test stubs""" @@ -44,7 +44,7 @@ def make_instance(self, include_optional) -> ApiCollection: created_at = '2020-06-15T22:20:15.327-07:00', updated_at = '2020-06-15T22:20:15.327-07:00', message = 'Import completed successfully', - import_results = workato_platform.client.workato_api.models.import_results.ImportResults( + import_results = workato_platform_cli.client.workato_api.models.import_results.ImportResults( success = True, total_endpoints = 1, failed_endpoints = 0, diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py index 1649d90..fcc3385 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_collection_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ApiCollectionCreateRequest class TestApiCollectionCreateRequest(unittest.TestCase): """ApiCollectionCreateRequest unit test stubs""" @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ApiCollectionCreateRequest: name = 'My API Collection', project_id = 123, proxy_connection_id = 456, - openapi_spec = workato_platform.client.workato_api.models.open_api_spec.OpenApiSpec( + openapi_spec = workato_platform_cli.client.workato_api.models.open_api_spec.OpenApiSpec( content = '', format = 'json', ) ) diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py b/src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py index a544055..f04568a 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_endpoint.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint class TestApiEndpoint(unittest.TestCase): """ApiEndpoint unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_key.py b/src/workato_platform_cli/client/workato_api/test/test_api_key.py index 17ea816..66b904b 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_key.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_key.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key import ApiKey class TestApiKey(unittest.TestCase): """ApiKey unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py index 99364d1..8aff16b 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_key_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest +from workato_platform_cli.client.workato_api.models.api_key_create_request import ApiKeyCreateRequest class TestApiKeyCreateRequest(unittest.TestCase): """ApiKeyCreateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py index 3c82d05..49fe437 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_key_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_key_list_response import ApiKeyListResponse +from workato_platform_cli.client.workato_api.models.api_key_list_response import ApiKeyListResponse class TestApiKeyListResponse(unittest.TestCase): """ApiKeyListResponse unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ApiKeyListResponse: if include_optional: return ApiKeyListResponse( data = [ - workato_platform.client.workato_api.models.api_key.ApiKey( + workato_platform_cli.client.workato_api.models.api_key.ApiKey( id = 37326, name = 'Automation Inc.', auth_type = 'token', @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> ApiKeyListResponse: else: return ApiKeyListResponse( data = [ - workato_platform.client.workato_api.models.api_key.ApiKey( + workato_platform_cli.client.workato_api.models.api_key.ApiKey( id = 37326, name = 'Automation Inc.', auth_type = 'token', diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_key_response.py b/src/workato_platform_cli/client/workato_api/test/test_api_key_response.py index 738a290..d7dab33 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_key_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_key_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse class TestApiKeyResponse(unittest.TestCase): """ApiKeyResponse unit test stubs""" @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> ApiKeyResponse: model = ApiKeyResponse() if include_optional: return ApiKeyResponse( - data = workato_platform.client.workato_api.models.api_key.ApiKey( + data = workato_platform_cli.client.workato_api.models.api_key.ApiKey( id = 37326, name = 'Automation Inc.', auth_type = 'token', @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> ApiKeyResponse: ) else: return ApiKeyResponse( - data = workato_platform.client.workato_api.models.api_key.ApiKey( + data = workato_platform_cli.client.workato_api.models.api_key.ApiKey( id = 37326, name = 'Automation Inc.', auth_type = 'token', diff --git a/src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py b/src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py index 99bd1d2..a0ab594 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_api_platform_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.api_platform_api import APIPlatformApi +from workato_platform_cli.client.workato_api.api.api_platform_api import APIPlatformApi class TestAPIPlatformApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_asset.py b/src/workato_platform_cli/client/workato_api/test/test_asset.py index a8add17..945d93a 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_asset.py +++ b/src/workato_platform_cli/client/workato_api/test/test_asset.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.asset import Asset +from workato_platform_cli.client.workato_api.models.asset import Asset class TestAsset(unittest.TestCase): """Asset unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_asset_reference.py b/src/workato_platform_cli/client/workato_api/test/test_asset_reference.py index 8c63114..d3cf3be 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_asset_reference.py +++ b/src/workato_platform_cli/client/workato_api/test/test_asset_reference.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.asset_reference import AssetReference +from workato_platform_cli.client.workato_api.models.asset_reference import AssetReference class TestAssetReference(unittest.TestCase): """AssetReference unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_connection.py b/src/workato_platform_cli/client/workato_api/test/test_connection.py index 42fce8c..a08c0c3 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connection.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connection.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection import Connection class TestConnection(unittest.TestCase): """Connection unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py index fe0b547..b4ba5da 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connection_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.connection_create_request import ConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.connection_create_request import ConnectionCreateRequest class TestConnectionCreateRequest(unittest.TestCase): """ConnectionCreateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py b/src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py index 16356d5..0e8bb23 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connection_update_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.connection_update_request import ConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.connection_update_request import ConnectionUpdateRequest class TestConnectionUpdateRequest(unittest.TestCase): """ConnectionUpdateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_connections_api.py b/src/workato_platform_cli/client/workato_api/test/test_connections_api.py index 552fdb1..89d5654 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connections_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connections_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.connections_api import ConnectionsApi +from workato_platform_cli.client.workato_api.api.connections_api import ConnectionsApi class TestConnectionsApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_connector_action.py b/src/workato_platform_cli/client/workato_api/test/test_connector_action.py index 53eb441..ad0ad24 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connector_action.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connector_action.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.connector_action import ConnectorAction +from workato_platform_cli.client.workato_api.models.connector_action import ConnectorAction class TestConnectorAction(unittest.TestCase): """ConnectorAction unit test stubs""" @@ -44,7 +44,6 @@ def make_instance(self, include_optional) -> ConnectorAction: else: return ConnectorAction( name = 'new_entry', - title = 'New entry', deprecated = False, bulk = False, batch = False, diff --git a/src/workato_platform_cli/client/workato_api/test/test_connector_version.py b/src/workato_platform_cli/client/workato_api/test/test_connector_version.py index 664618f..5176023 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connector_version.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connector_version.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.connector_version import ConnectorVersion +from workato_platform_cli.client.workato_api.models.connector_version import ConnectorVersion class TestConnectorVersion(unittest.TestCase): """ConnectorVersion unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_connectors_api.py b/src/workato_platform_cli/client/workato_api/test/test_connectors_api.py index accf9f7..d4d00ca 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_connectors_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_connectors_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.connectors_api import ConnectorsApi +from workato_platform_cli.client.workato_api.api.connectors_api import ConnectorsApi class TestConnectorsApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py index b864d9d..d1840dd 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_create_export_manifest_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import CreateExportManifestRequest class TestCreateExportManifestRequest(unittest.TestCase): """CreateExportManifestRequest unit test stubs""" @@ -35,10 +35,10 @@ def make_instance(self, include_optional) -> CreateExportManifestRequest: model = CreateExportManifestRequest() if include_optional: return CreateExportManifestRequest( - export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( + export_manifest = workato_platform_cli.client.workato_api.models.export_manifest_request.ExportManifestRequest( name = 'Test Manifest', assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( + workato_platform_cli.client.workato_api.models.asset_reference.AssetReference( id = 56, type = 'recipe', checked = True, @@ -57,10 +57,10 @@ def make_instance(self, include_optional) -> CreateExportManifestRequest: ) else: return CreateExportManifestRequest( - export_manifest = workato_platform.client.workato_api.models.export_manifest_request.ExportManifestRequest( + export_manifest = workato_platform_cli.client.workato_api.models.export_manifest_request.ExportManifestRequest( name = 'Test Manifest', assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( + workato_platform_cli.client.workato_api.models.asset_reference.AssetReference( id = 56, type = 'recipe', checked = True, diff --git a/src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py b/src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py index f22442f..2190255 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_create_folder_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.create_folder_request import CreateFolderRequest +from workato_platform_cli.client.workato_api.models.create_folder_request import CreateFolderRequest class TestCreateFolderRequest(unittest.TestCase): """CreateFolderRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_custom_connector.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector.py index 77b11a1..61a04aa 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_custom_connector.py +++ b/src/workato_platform_cli/client/workato_api/test/test_custom_connector.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.custom_connector import CustomConnector +from workato_platform_cli.client.workato_api.models.custom_connector import CustomConnector class TestCustomConnector(unittest.TestCase): """CustomConnector unit test stubs""" @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> CustomConnector: latest_released_version = 2, latest_released_version_note = 'Connector Version', released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + workato_platform_cli.client.workato_api.models.connector_version.ConnectorVersion( version = 2, version_note = '', created_at = '2024-06-24T11:17:52.516-04:00', @@ -57,7 +57,7 @@ def make_instance(self, include_optional) -> CustomConnector: latest_released_version = 2, latest_released_version_note = 'Connector Version', released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + workato_platform_cli.client.workato_api.models.connector_version.ConnectorVersion( version = 2, version_note = '', created_at = '2024-06-24T11:17:52.516-04:00', diff --git a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py index 24e53df..1dfd634 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse +from workato_platform_cli.client.workato_api.models.custom_connector_code_response import CustomConnectorCodeResponse class TestCustomConnectorCodeResponse(unittest.TestCase): """CustomConnectorCodeResponse unit test stubs""" @@ -35,12 +35,12 @@ def make_instance(self, include_optional) -> CustomConnectorCodeResponse: model = CustomConnectorCodeResponse() if include_optional: return CustomConnectorCodeResponse( - data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( + data = workato_platform_cli.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( code = '', ) ) else: return CustomConnectorCodeResponse( - data = workato_platform.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( + data = workato_platform_cli.client.workato_api.models.custom_connector_code_response_data.CustomConnectorCodeResponse_data( code = '', ), ) """ diff --git a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py index 63b884c..53cc48d 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py +++ b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_code_response_data.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData +from workato_platform_cli.client.workato_api.models.custom_connector_code_response_data import CustomConnectorCodeResponseData class TestCustomConnectorCodeResponseData(unittest.TestCase): """CustomConnectorCodeResponseData unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py index b166701..178cbd4 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_custom_connector_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse +from workato_platform_cli.client.workato_api.models.custom_connector_list_response import CustomConnectorListResponse class TestCustomConnectorListResponse(unittest.TestCase): """CustomConnectorListResponse unit test stubs""" @@ -36,14 +36,14 @@ def make_instance(self, include_optional) -> CustomConnectorListResponse: if include_optional: return CustomConnectorListResponse( result = [ - workato_platform.client.workato_api.models.custom_connector.CustomConnector( + workato_platform_cli.client.workato_api.models.custom_connector.CustomConnector( id = 562523, name = 'apps_by_workato_connector_804586_1719241698', title = 'Apps by Workato', latest_released_version = 2, latest_released_version_note = 'Connector Version', released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + workato_platform_cli.client.workato_api.models.connector_version.ConnectorVersion( version = 2, version_note = '', created_at = '2024-06-24T11:17:52.516-04:00', @@ -55,14 +55,14 @@ def make_instance(self, include_optional) -> CustomConnectorListResponse: else: return CustomConnectorListResponse( result = [ - workato_platform.client.workato_api.models.custom_connector.CustomConnector( + workato_platform_cli.client.workato_api.models.custom_connector.CustomConnector( id = 562523, name = 'apps_by_workato_connector_804586_1719241698', title = 'Apps by Workato', latest_released_version = 2, latest_released_version_note = 'Connector Version', released_versions = [ - workato_platform.client.workato_api.models.connector_version.ConnectorVersion( + workato_platform_cli.client.workato_api.models.connector_version.ConnectorVersion( version = 2, version_note = '', created_at = '2024-06-24T11:17:52.516-04:00', diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table.py b/src/workato_platform_cli/client/workato_api/test/test_data_table.py index 6182ee7..0974a07 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table import DataTable +from workato_platform_cli.client.workato_api.models.data_table import DataTable class TestDataTable(unittest.TestCase): """DataTable unit test stubs""" @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> DataTable: id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', var_schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> DataTable: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], @@ -60,7 +60,7 @@ def make_instance(self, include_optional) -> DataTable: id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', var_schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -69,7 +69,7 @@ def make_instance(self, include_optional) -> DataTable: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_column.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_column.py index 27b5cbe..fda955b 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_column.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_column.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_column import DataTableColumn +from workato_platform_cli.client.workato_api.models.data_table_column import DataTableColumn class TestDataTableColumn(unittest.TestCase): """DataTableColumn unit test stubs""" @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> DataTableColumn: default_value = None, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) ) @@ -57,7 +57,7 @@ def make_instance(self, include_optional) -> DataTableColumn: default_value = None, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py index 701a4ef..e242c44 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_column_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_column_request import DataTableColumnRequest +from workato_platform_cli.client.workato_api.models.data_table_column_request import DataTableColumnRequest class TestDataTableColumnRequest(unittest.TestCase): """DataTableColumnRequest unit test stubs""" @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> DataTableColumnRequest: default_value = None, metadata = { }, multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ) ) diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py index 52bbf2a..76bb0f6 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_create_request import DataTableCreateRequest +from workato_platform_cli.client.workato_api.models.data_table_create_request import DataTableCreateRequest class TestDataTableCreateRequest(unittest.TestCase): """DataTableCreateRequest unit test stubs""" @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> DataTableCreateRequest: name = 'Expense reports 4', folder_id = 75509, var_schema = [ - workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( + workato_platform_cli.client.workato_api.models.data_table_column_request.DataTableColumnRequest( type = 'boolean', name = '', optional = True, @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> DataTableCreateRequest: default_value = null, metadata = { }, multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ] @@ -57,7 +57,7 @@ def make_instance(self, include_optional) -> DataTableCreateRequest: name = 'Expense reports 4', folder_id = 75509, var_schema = [ - workato_platform.client.workato_api.models.data_table_column_request.DataTableColumnRequest( + workato_platform_cli.client.workato_api.models.data_table_column_request.DataTableColumnRequest( type = 'boolean', name = '', optional = True, @@ -66,7 +66,7 @@ def make_instance(self, include_optional) -> DataTableCreateRequest: default_value = null, metadata = { }, multivalue = True, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py index 28537c8..9c34cb8 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_create_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_create_response import DataTableCreateResponse +from workato_platform_cli.client.workato_api.models.data_table_create_response import DataTableCreateResponse class TestDataTableCreateResponse(unittest.TestCase): """DataTableCreateResponse unit test stubs""" @@ -35,11 +35,11 @@ def make_instance(self, include_optional) -> DataTableCreateResponse: model = DataTableCreateResponse() if include_optional: return DataTableCreateResponse( - data = workato_platform.client.workato_api.models.data_table.DataTable( + data = workato_platform_cli.client.workato_api.models.data_table.DataTable( id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -48,7 +48,7 @@ def make_instance(self, include_optional) -> DataTableCreateResponse: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], @@ -58,11 +58,11 @@ def make_instance(self, include_optional) -> DataTableCreateResponse: ) else: return DataTableCreateResponse( - data = workato_platform.client.workato_api.models.data_table.DataTable( + data = workato_platform_cli.client.workato_api.models.data_table.DataTable( id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -71,7 +71,7 @@ def make_instance(self, include_optional) -> DataTableCreateResponse: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py index 988e146..04773bc 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_list_response import DataTableListResponse +from workato_platform_cli.client.workato_api.models.data_table_list_response import DataTableListResponse class TestDataTableListResponse(unittest.TestCase): """DataTableListResponse unit test stubs""" @@ -36,11 +36,11 @@ def make_instance(self, include_optional) -> DataTableListResponse: if include_optional: return DataTableListResponse( data = [ - workato_platform.client.workato_api.models.data_table.DataTable( + workato_platform_cli.client.workato_api.models.data_table.DataTable( id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> DataTableListResponse: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], @@ -61,11 +61,11 @@ def make_instance(self, include_optional) -> DataTableListResponse: else: return DataTableListResponse( data = [ - workato_platform.client.workato_api.models.data_table.DataTable( + workato_platform_cli.client.workato_api.models.data_table.DataTable( id = 'f4d2e85d-c7f4-4877-8f16-6643a4b3fb23', name = 'Resume screening', schema = [ - workato_platform.client.workato_api.models.data_table_column.DataTableColumn( + workato_platform_cli.client.workato_api.models.data_table_column.DataTableColumn( type = 'string', name = 'application_id', optional = True, @@ -74,7 +74,7 @@ def make_instance(self, include_optional) -> DataTableListResponse: default_value = null, metadata = { }, multivalue = False, - relation = workato_platform.client.workato_api.models.data_table_relation.DataTableRelation( + relation = workato_platform_cli.client.workato_api.models.data_table_relation.DataTableRelation( table_id = '2507a39a-6847-4857-88ed-c3b9c8302e02', field_id = '900454f4-5b3d-4670-bc3c-d640915156f2', ), ) ], diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py b/src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py index ec79fa0..f618234 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_table_relation.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.data_table_relation import DataTableRelation +from workato_platform_cli.client.workato_api.models.data_table_relation import DataTableRelation class TestDataTableRelation(unittest.TestCase): """DataTableRelation unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py b/src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py index 831ef85..afdd899 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_data_tables_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.data_tables_api import DataTablesApi +from workato_platform_cli.client.workato_api.api.data_tables_api import DataTablesApi class TestDataTablesApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py b/src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py index 5991160..830100e 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_delete_project403_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.delete_project403_response import DeleteProject403Response +from workato_platform_cli.client.workato_api.models.delete_project403_response import DeleteProject403Response class TestDeleteProject403Response(unittest.TestCase): """DeleteProject403Response unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_error.py b/src/workato_platform_cli/client/workato_api/test/test_error.py index e25a187..2742872 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_error.py +++ b/src/workato_platform_cli/client/workato_api/test/test_error.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.error import Error +from workato_platform_cli.client.workato_api.models.error import Error class TestError(unittest.TestCase): """Error unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_export_api.py b/src/workato_platform_cli/client/workato_api/test/test_export_api.py index 6211cad..c3d12fb 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_export_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_export_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.export_api import ExportApi +from workato_platform_cli.client.workato_api.api.export_api import ExportApi class TestExportApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py index ee4681d..e1a32ba 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.export_manifest_request import ExportManifestRequest +from workato_platform_cli.client.workato_api.models.export_manifest_request import ExportManifestRequest class TestExportManifestRequest(unittest.TestCase): """ExportManifestRequest unit test stubs""" @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> ExportManifestRequest: return ExportManifestRequest( name = 'Test Manifest', assets = [ - workato_platform.client.workato_api.models.asset_reference.AssetReference( + workato_platform_cli.client.workato_api.models.asset_reference.AssetReference( id = 56, type = 'recipe', checked = True, diff --git a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py index 8009581..f3be0ba 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.export_manifest_response import ExportManifestResponse +from workato_platform_cli.client.workato_api.models.export_manifest_response import ExportManifestResponse class TestExportManifestResponse(unittest.TestCase): """ExportManifestResponse unit test stubs""" @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> ExportManifestResponse: model = ExportManifestResponse() if include_optional: return ExportManifestResponse( - result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( + result = workato_platform_cli.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( id = 12, name = 'Test Manifest', last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> ExportManifestResponse: ) else: return ExportManifestResponse( - result = workato_platform.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( + result = workato_platform_cli.client.workato_api.models.export_manifest_response_result.ExportManifestResponse_result( id = 12, name = 'Test Manifest', last_exported_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py index 1f99297..078929f 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py +++ b/src/workato_platform_cli/client/workato_api/test/test_export_manifest_response_result.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult +from workato_platform_cli.client.workato_api.models.export_manifest_response_result import ExportManifestResponseResult class TestExportManifestResponseResult(unittest.TestCase): """ExportManifestResponseResult unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_folder.py b/src/workato_platform_cli/client/workato_api/test/test_folder.py index 3ccc6d2..e6391af 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_folder.py +++ b/src/workato_platform_cli/client/workato_api/test/test_folder.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.folder import Folder +from workato_platform_cli.client.workato_api.models.folder import Folder class TestFolder(unittest.TestCase): """Folder unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py index 3c594fa..0e26b1a 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.folder_assets_response import FolderAssetsResponse +from workato_platform_cli.client.workato_api.models.folder_assets_response import FolderAssetsResponse class TestFolderAssetsResponse(unittest.TestCase): """FolderAssetsResponse unit test stubs""" @@ -35,9 +35,9 @@ def make_instance(self, include_optional) -> FolderAssetsResponse: model = FolderAssetsResponse() if include_optional: return FolderAssetsResponse( - result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( + result = workato_platform_cli.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( assets = [ - workato_platform.client.workato_api.models.asset.Asset( + workato_platform_cli.client.workato_api.models.asset.Asset( id = 12, name = 'Copy of Recipeops', type = 'recipe', @@ -53,9 +53,9 @@ def make_instance(self, include_optional) -> FolderAssetsResponse: ) else: return FolderAssetsResponse( - result = workato_platform.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( + result = workato_platform_cli.client.workato_api.models.folder_assets_response_result.FolderAssetsResponse_result( assets = [ - workato_platform.client.workato_api.models.asset.Asset( + workato_platform_cli.client.workato_api.models.asset.Asset( id = 12, name = 'Copy of Recipeops', type = 'recipe', diff --git a/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py index eb6fbdd..e7beb63 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py +++ b/src/workato_platform_cli/client/workato_api/test/test_folder_assets_response_result.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult +from workato_platform_cli.client.workato_api.models.folder_assets_response_result import FolderAssetsResponseResult class TestFolderAssetsResponseResult(unittest.TestCase): """FolderAssetsResponseResult unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> FolderAssetsResponseResult: if include_optional: return FolderAssetsResponseResult( assets = [ - workato_platform.client.workato_api.models.asset.Asset( + workato_platform_cli.client.workato_api.models.asset.Asset( id = 12, name = 'Copy of Recipeops', type = 'recipe', @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> FolderAssetsResponseResult: else: return FolderAssetsResponseResult( assets = [ - workato_platform.client.workato_api.models.asset.Asset( + workato_platform_cli.client.workato_api.models.asset.Asset( id = 12, name = 'Copy of Recipeops', type = 'recipe', diff --git a/src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py b/src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py index c993e9f..87a877c 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_folder_creation_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.folder_creation_response import FolderCreationResponse +from workato_platform_cli.client.workato_api.models.folder_creation_response import FolderCreationResponse class TestFolderCreationResponse(unittest.TestCase): """FolderCreationResponse unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_folders_api.py b/src/workato_platform_cli/client/workato_api/test/test_folders_api.py index fec0291..ca3adad 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_folders_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_folders_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.folders_api import FoldersApi +from workato_platform_cli.client.workato_api.api.folders_api import FoldersApi class TestFoldersApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_import_results.py b/src/workato_platform_cli/client/workato_api/test/test_import_results.py index 69d82a8..367cd32 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_import_results.py +++ b/src/workato_platform_cli/client/workato_api/test/test_import_results.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.import_results import ImportResults +from workato_platform_cli.client.workato_api.models.import_results import ImportResults class TestImportResults(unittest.TestCase): """ImportResults unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py index 6e3a0f2..692a333 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.o_auth_url_response import OAuthUrlResponse +from workato_platform_cli.client.workato_api.models.o_auth_url_response import OAuthUrlResponse class TestOAuthUrlResponse(unittest.TestCase): """OAuthUrlResponse unit test stubs""" @@ -35,12 +35,12 @@ def make_instance(self, include_optional) -> OAuthUrlResponse: model = OAuthUrlResponse() if include_optional: return OAuthUrlResponse( - data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( + data = workato_platform_cli.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ) ) else: return OAuthUrlResponse( - data = workato_platform.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( + data = workato_platform_cli.client.workato_api.models.o_auth_url_response_data.OAuthUrlResponse_data( url = 'https://login.microsoftonline.com/oauth2/v2.0/authorize?client_id=...', ), ) """ diff --git a/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py index a0cfeaa..61a6ce8 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py +++ b/src/workato_platform_cli/client/workato_api/test/test_o_auth_url_response_data.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData +from workato_platform_cli.client.workato_api.models.o_auth_url_response_data import OAuthUrlResponseData class TestOAuthUrlResponseData(unittest.TestCase): """OAuthUrlResponseData unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py b/src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py index 65d5651..0bbdd0d 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py +++ b/src/workato_platform_cli/client/workato_api/test/test_open_api_spec.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec class TestOpenApiSpec(unittest.TestCase): """OpenApiSpec unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_package_details_response.py b/src/workato_platform_cli/client/workato_api/test/test_package_details_response.py index d7ef45c..bd0b425 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_package_details_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_package_details_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.package_details_response import PackageDetailsResponse +from workato_platform_cli.client.workato_api.models.package_details_response import PackageDetailsResponse class TestPackageDetailsResponse(unittest.TestCase): """PackageDetailsResponse unit test stubs""" @@ -42,7 +42,7 @@ def make_instance(self, include_optional) -> PackageDetailsResponse: download_url = 'https://www.workato-staging-assets.com/packages/zip_files/000/000/242/original/exportdemo.zip', error = 'error_message', recipe_status = [ - workato_platform.client.workato_api.models.package_details_response_recipe_status_inner.PackageDetailsResponse_recipe_status_inner( + workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner.PackageDetailsResponse_recipe_status_inner( id = 12345, import_result = 'no_update_or_updated_without_restart', ) ] diff --git a/src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py b/src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py index 703ab7d..110c254 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py +++ b/src/workato_platform_cli/client/workato_api/test/test_package_details_response_recipe_status_inner.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner +from workato_platform_cli.client.workato_api.models.package_details_response_recipe_status_inner import PackageDetailsResponseRecipeStatusInner class TestPackageDetailsResponseRecipeStatusInner(unittest.TestCase): """PackageDetailsResponseRecipeStatusInner unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_package_response.py b/src/workato_platform_cli/client/workato_api/test/test_package_response.py index 123f28e..ab1b950 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_package_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_package_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.package_response import PackageResponse +from workato_platform_cli.client.workato_api.models.package_response import PackageResponse class TestPackageResponse(unittest.TestCase): """PackageResponse unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_packages_api.py b/src/workato_platform_cli/client/workato_api/test/test_packages_api.py index f3eeb1e..0f8017f 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_packages_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_packages_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.packages_api import PackagesApi +from workato_platform_cli.client.workato_api.api.packages_api import PackagesApi class TestPackagesApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_picklist_request.py b/src/workato_platform_cli/client/workato_api/test/test_picklist_request.py index 893bce2..c8caf52 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_picklist_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_picklist_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest class TestPicklistRequest(unittest.TestCase): """PicklistRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_picklist_response.py b/src/workato_platform_cli/client/workato_api/test/test_picklist_response.py index 81b1079..aa669f1 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_picklist_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_picklist_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.picklist_response import PicklistResponse +from workato_platform_cli.client.workato_api.models.picklist_response import PicklistResponse class TestPicklistResponse(unittest.TestCase): """PicklistResponse unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_platform_connector.py b/src/workato_platform_cli/client/workato_api/test/test_platform_connector.py index 45deae8..661fe38 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_platform_connector.py +++ b/src/workato_platform_cli/client/workato_api/test/test_platform_connector.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.platform_connector import PlatformConnector +from workato_platform_cli.client.workato_api.models.platform_connector import PlatformConnector class TestPlatformConnector(unittest.TestCase): """PlatformConnector unit test stubs""" @@ -42,7 +42,7 @@ def make_instance(self, include_optional) -> PlatformConnector: deprecated = False, secondary = False, triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -50,7 +50,7 @@ def make_instance(self, include_optional) -> PlatformConnector: batch = False, ) ], actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -67,7 +67,7 @@ def make_instance(self, include_optional) -> PlatformConnector: deprecated = False, secondary = False, triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -75,7 +75,7 @@ def make_instance(self, include_optional) -> PlatformConnector: batch = False, ) ], actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, diff --git a/src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py index d6baa85..718ab00 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_platform_connector_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse +from workato_platform_cli.client.workato_api.models.platform_connector_list_response import PlatformConnectorListResponse class TestPlatformConnectorListResponse(unittest.TestCase): """PlatformConnectorListResponse unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: if include_optional: return PlatformConnectorListResponse( items = [ - workato_platform.client.workato_api.models.platform_connector.PlatformConnector( + workato_platform_cli.client.workato_api.models.platform_connector.PlatformConnector( name = 'active_directory', title = 'Active Directory', categories = ["Directory Services","Marketing"], @@ -44,7 +44,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: deprecated = False, secondary = False, triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -52,7 +52,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: batch = False, ) ], actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -67,7 +67,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: else: return PlatformConnectorListResponse( items = [ - workato_platform.client.workato_api.models.platform_connector.PlatformConnector( + workato_platform_cli.client.workato_api.models.platform_connector.PlatformConnector( name = 'active_directory', title = 'Active Directory', categories = ["Directory Services","Marketing"], @@ -75,7 +75,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: deprecated = False, secondary = False, triggers = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, @@ -83,7 +83,7 @@ def make_instance(self, include_optional) -> PlatformConnectorListResponse: batch = False, ) ], actions = [ - workato_platform.client.workato_api.models.connector_action.ConnectorAction( + workato_platform_cli.client.workato_api.models.connector_action.ConnectorAction( name = 'new_entry', title = 'New entry', deprecated = False, diff --git a/src/workato_platform_cli/client/workato_api/test/test_project.py b/src/workato_platform_cli/client/workato_api/test/test_project.py index fdcbb82..12ac3df 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_project.py +++ b/src/workato_platform_cli/client/workato_api/test/test_project.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli.client.workato_api.models.project import Project class TestProject(unittest.TestCase): """Project unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_projects_api.py b/src/workato_platform_cli/client/workato_api/test/test_projects_api.py index 3a8e251..7e6d720 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_projects_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_projects_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.projects_api import ProjectsApi +from workato_platform_cli.client.workato_api.api.projects_api import ProjectsApi class TestProjectsApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_properties_api.py b/src/workato_platform_cli/client/workato_api/test/test_properties_api.py index 7816a0e..3cdec4b 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_properties_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_properties_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.properties_api import PropertiesApi +from workato_platform_cli.client.workato_api.api.properties_api import PropertiesApi class TestPropertiesApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipe.py b/src/workato_platform_cli/client/workato_api/test/test_recipe.py index ce794f0..9ed5916 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipe.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipe.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.recipe import Recipe +from workato_platform_cli.client.workato_api.models.recipe import Recipe class TestRecipe(unittest.TestCase): """Recipe unit test stubs""" @@ -60,7 +60,7 @@ def make_instance(self, include_optional) -> Recipe: version_no = 3, stop_cause = '', config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + workato_platform_cli.client.workato_api.models.recipe_config_inner.Recipe_config_inner( keyword = 'application', name = 'workato_service', provider = 'workato_service', @@ -99,7 +99,7 @@ def make_instance(self, include_optional) -> Recipe: version_no = 3, stop_cause = '', config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + workato_platform_cli.client.workato_api.models.recipe_config_inner.Recipe_config_inner( keyword = 'application', name = 'workato_service', provider = 'workato_service', diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py index 49c768d..8c449fe 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipe_config_inner.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.recipe_config_inner import RecipeConfigInner +from workato_platform_cli.client.workato_api.models.recipe_config_inner import RecipeConfigInner class TestRecipeConfigInner(unittest.TestCase): """RecipeConfigInner unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py index 8253213..ebf030b 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipe_connection_update_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest +from workato_platform_cli.client.workato_api.models.recipe_connection_update_request import RecipeConnectionUpdateRequest class TestRecipeConnectionUpdateRequest(unittest.TestCase): """RecipeConnectionUpdateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py index 632dcf3..c2ce590 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipe_list_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.recipe_list_response import RecipeListResponse +from workato_platform_cli.client.workato_api.models.recipe_list_response import RecipeListResponse class TestRecipeListResponse(unittest.TestCase): """RecipeListResponse unit test stubs""" @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: if include_optional: return RecipeListResponse( items = [ - workato_platform.client.workato_api.models.recipe.Recipe( + workato_platform_cli.client.workato_api.models.recipe.Recipe( id = 1913515, user_id = 4848, name = 'Callable service: JIRA ticket sync', @@ -50,7 +50,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: parameters_schema = [ null ], - parameters = workato_platform.client.workato_api.models.parameters.parameters(), + parameters = workato_platform_cli.client.workato_api.models.parameters.parameters(), webhook_url = '', folder_id = 241557, running = False, @@ -62,7 +62,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: version_no = 3, stop_cause = '', config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + workato_platform_cli.client.workato_api.models.recipe_config_inner.Recipe_config_inner( keyword = 'application', name = 'workato_service', provider = 'workato_service', @@ -81,7 +81,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: else: return RecipeListResponse( items = [ - workato_platform.client.workato_api.models.recipe.Recipe( + workato_platform_cli.client.workato_api.models.recipe.Recipe( id = 1913515, user_id = 4848, name = 'Callable service: JIRA ticket sync', @@ -95,7 +95,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: parameters_schema = [ null ], - parameters = workato_platform.client.workato_api.models.parameters.parameters(), + parameters = workato_platform_cli.client.workato_api.models.parameters.parameters(), webhook_url = '', folder_id = 241557, running = False, @@ -107,7 +107,7 @@ def make_instance(self, include_optional) -> RecipeListResponse: version_no = 3, stop_cause = '', config = [ - workato_platform.client.workato_api.models.recipe_config_inner.Recipe_config_inner( + workato_platform_cli.client.workato_api.models.recipe_config_inner.Recipe_config_inner( keyword = 'application', name = 'workato_service', provider = 'workato_service', diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py b/src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py index 0d5de5f..582d534 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipe_start_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.recipe_start_response import RecipeStartResponse +from workato_platform_cli.client.workato_api.models.recipe_start_response import RecipeStartResponse class TestRecipeStartResponse(unittest.TestCase): """RecipeStartResponse unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_recipes_api.py b/src/workato_platform_cli/client/workato_api/test/test_recipes_api.py index eba2888..cae4541 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_recipes_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_recipes_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.recipes_api import RecipesApi +from workato_platform_cli.client.workato_api.api.recipes_api import RecipesApi class TestRecipesApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py index 1ba43af..aec8946 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_create_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest +from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import RuntimeUserConnectionCreateRequest class TestRuntimeUserConnectionCreateRequest(unittest.TestCase): """RuntimeUserConnectionCreateRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py index 411a49a..d7b34c1 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response import RuntimeUserConnectionResponse class TestRuntimeUserConnectionResponse(unittest.TestCase): """RuntimeUserConnectionResponse unit test stubs""" @@ -35,13 +35,13 @@ def make_instance(self, include_optional) -> RuntimeUserConnectionResponse: model = RuntimeUserConnectionResponse() if include_optional: return RuntimeUserConnectionResponse( - data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( + data = workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( id = 18009027, url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ) ) else: return RuntimeUserConnectionResponse( - data = workato_platform.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( + data = workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data.RuntimeUserConnectionResponse_data( id = 18009027, url = 'https://oauth.workato.com/oauth/authorize?connection_id=18009027', ), ) diff --git a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py index 0aebbd6..351f3ab 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py +++ b/src/workato_platform_cli/client/workato_api/test/test_runtime_user_connection_response_data.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData +from workato_platform_cli.client.workato_api.models.runtime_user_connection_response_data import RuntimeUserConnectionResponseData class TestRuntimeUserConnectionResponseData(unittest.TestCase): """RuntimeUserConnectionResponseData unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_success_response.py b/src/workato_platform_cli/client/workato_api/test/test_success_response.py index f9eb301..1b2a855 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_success_response.py +++ b/src/workato_platform_cli/client/workato_api/test/test_success_response.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.success_response import SuccessResponse +from workato_platform_cli.client.workato_api.models.success_response import SuccessResponse class TestSuccessResponse(unittest.TestCase): """SuccessResponse unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py b/src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py index f304058..b3158fc 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py +++ b/src/workato_platform_cli/client/workato_api/test/test_upsert_project_properties_request.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest +from workato_platform_cli.client.workato_api.models.upsert_project_properties_request import UpsertProjectPropertiesRequest class TestUpsertProjectPropertiesRequest(unittest.TestCase): """UpsertProjectPropertiesRequest unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_user.py b/src/workato_platform_cli/client/workato_api/test/test_user.py index 430d9b2..f9f5bda 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_user.py +++ b/src/workato_platform_cli/client/workato_api/test/test_user.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.models.user import User class TestUser(unittest.TestCase): """User unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_users_api.py b/src/workato_platform_cli/client/workato_api/test/test_users_api.py index a107387..ecb4b2a 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_users_api.py +++ b/src/workato_platform_cli/client/workato_api/test/test_users_api.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.api.users_api import UsersApi +from workato_platform_cli.client.workato_api.api.users_api import UsersApi class TestUsersApi(unittest.IsolatedAsyncioTestCase): diff --git a/src/workato_platform_cli/client/workato_api/test/test_validation_error.py b/src/workato_platform_cli/client/workato_api/test/test_validation_error.py index 547730d..19946ad 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_validation_error.py +++ b/src/workato_platform_cli/client/workato_api/test/test_validation_error.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.validation_error import ValidationError +from workato_platform_cli.client.workato_api.models.validation_error import ValidationError class TestValidationError(unittest.TestCase): """ValidationError unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py b/src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py index 151f1e7..a1a62bc 100644 --- a/src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py +++ b/src/workato_platform_cli/client/workato_api/test/test_validation_error_errors_value.py @@ -14,7 +14,7 @@ import unittest -from workato_platform.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue +from workato_platform_cli.client.workato_api.models.validation_error_errors_value import ValidationErrorErrorsValue class TestValidationErrorErrorsValue(unittest.TestCase): """ValidationErrorErrorsValue unit test stubs""" diff --git a/src/workato_platform_cli/client/workato_api_README.md b/src/workato_platform_cli/client/workato_api_README.md index da7d2f2..0a23b54 100644 --- a/src/workato_platform_cli/client/workato_api_README.md +++ b/src/workato_platform_cli/client/workato_api_README.md @@ -1,7 +1,7 @@ # workato-platform-cli Official Workato Platform API for managing recipes, connections, projects, and other automation resources. ## Authentication All endpoints require a Bearer token in the Authorization header. ## Base URL The base URL varies by region: - US: `https://www.workato.com` - EU: `https://app.eu.workato.com` - JP: `https://app.jp.workato.com` - SG: `https://app.sg.workato.com` - AU: `https://app.au.workato.com` - IL: `https://app.il.workato.com` - Trial: `https://app.trial.workato.com` -The `workato_platform.client.workato_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: +The `workato_platform_cli.client.workato_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 - Package version: 1.0.0 @@ -33,13 +33,13 @@ you can run the following: ```python -import workato_platform.client.workato_api -from workato_platform.client.workato_api.rest import ApiException +import workato_platform_cli.client.workato_api +from workato_platform_cli.client.workato_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://www.workato.com # See configuration.py for a list of all supported configuration parameters. -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( host = "https://www.workato.com" ) @@ -49,16 +49,16 @@ configuration = workato_platform.client.workato_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = workato_platform.client.workato_api.Configuration( +configuration = workato_platform_cli.client.workato_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -async with workato_platform.client.workato_api.ApiClient(configuration) as api_client: +async with workato_platform_cli.client.workato_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = workato_platform.client.workato_api.APIPlatformApi(api_client) - api_client_create_request = workato_platform.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | + api_instance = workato_platform_cli.client.workato_api.APIPlatformApi(api_client) + api_client_create_request = workato_platform_cli.client.workato_api.ApiClientCreateRequest() # ApiClientCreateRequest | try: # Create API client (v2) @@ -76,115 +76,115 @@ All URIs are relative to *https://www.workato.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIPlatformApi* | [**create_api_client**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) -*APIPlatformApi* | [**create_api_collection**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection -*APIPlatformApi* | [**create_api_key**](workato_platform/client/workato_api/docs/APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key -*APIPlatformApi* | [**disable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint -*APIPlatformApi* | [**enable_api_endpoint**](workato_platform/client/workato_api/docs/APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint -*APIPlatformApi* | [**list_api_clients**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) -*APIPlatformApi* | [**list_api_collections**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections -*APIPlatformApi* | [**list_api_endpoints**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints -*APIPlatformApi* | [**list_api_keys**](workato_platform/client/workato_api/docs/APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys -*APIPlatformApi* | [**refresh_api_key_secret**](workato_platform/client/workato_api/docs/APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret -*ConnectionsApi* | [**create_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection -*ConnectionsApi* | [**create_runtime_user_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection -*ConnectionsApi* | [**get_connection_oauth_url**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection -*ConnectionsApi* | [**get_connection_picklist**](workato_platform/client/workato_api/docs/ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values -*ConnectionsApi* | [**list_connections**](workato_platform/client/workato_api/docs/ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections -*ConnectionsApi* | [**update_connection**](workato_platform/client/workato_api/docs/ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection -*ConnectorsApi* | [**get_custom_connector_code**](workato_platform/client/workato_api/docs/ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code -*ConnectorsApi* | [**list_custom_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors -*ConnectorsApi* | [**list_platform_connectors**](workato_platform/client/workato_api/docs/ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors -*DataTablesApi* | [**create_data_table**](workato_platform/client/workato_api/docs/DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table -*DataTablesApi* | [**list_data_tables**](workato_platform/client/workato_api/docs/DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables -*ExportApi* | [**create_export_manifest**](workato_platform/client/workato_api/docs/ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest -*ExportApi* | [**list_assets_in_folder**](workato_platform/client/workato_api/docs/ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder -*FoldersApi* | [**create_folder**](workato_platform/client/workato_api/docs/FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder -*FoldersApi* | [**list_folders**](workato_platform/client/workato_api/docs/FoldersApi.md#list_folders) | **GET** /api/folders | List folders -*PackagesApi* | [**download_package**](workato_platform/client/workato_api/docs/PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package -*PackagesApi* | [**export_package**](workato_platform/client/workato_api/docs/PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest -*PackagesApi* | [**get_package**](workato_platform/client/workato_api/docs/PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details -*PackagesApi* | [**import_package**](workato_platform/client/workato_api/docs/PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder -*ProjectsApi* | [**delete_project**](workato_platform/client/workato_api/docs/ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project -*ProjectsApi* | [**list_projects**](workato_platform/client/workato_api/docs/ProjectsApi.md#list_projects) | **GET** /api/projects | List projects -*PropertiesApi* | [**list_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties -*PropertiesApi* | [**upsert_project_properties**](workato_platform/client/workato_api/docs/PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties -*RecipesApi* | [**list_recipes**](workato_platform/client/workato_api/docs/RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes -*RecipesApi* | [**start_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe -*RecipesApi* | [**stop_recipe**](workato_platform/client/workato_api/docs/RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe -*RecipesApi* | [**update_recipe_connection**](workato_platform/client/workato_api/docs/RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe -*UsersApi* | [**get_workspace_details**](workato_platform/client/workato_api/docs/UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information +*APIPlatformApi* | [**create_api_client**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#create_api_client) | **POST** /api/v2/api_clients | Create API client (v2) +*APIPlatformApi* | [**create_api_collection**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#create_api_collection) | **POST** /api/api_collections | Create API collection +*APIPlatformApi* | [**create_api_key**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#create_api_key) | **POST** /api/v2/api_clients/{api_client_id}/api_keys | Create an API key +*APIPlatformApi* | [**disable_api_endpoint**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#disable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/disable | Disable an API endpoint +*APIPlatformApi* | [**enable_api_endpoint**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#enable_api_endpoint) | **PUT** /api/api_endpoints/{api_endpoint_id}/enable | Enable an API endpoint +*APIPlatformApi* | [**list_api_clients**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#list_api_clients) | **GET** /api/v2/api_clients | List API clients (v2) +*APIPlatformApi* | [**list_api_collections**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#list_api_collections) | **GET** /api/api_collections | List API collections +*APIPlatformApi* | [**list_api_endpoints**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#list_api_endpoints) | **GET** /api/api_endpoints | List API endpoints +*APIPlatformApi* | [**list_api_keys**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#list_api_keys) | **GET** /api/v2/api_clients/{api_client_id}/api_keys | List API keys +*APIPlatformApi* | [**refresh_api_key_secret**](workato_platform_cli/client/workato_api/docs/APIPlatformApi.md#refresh_api_key_secret) | **PUT** /api/v2/api_clients/{api_client_id}/api_keys/{api_key_id}/refresh_secret | Refresh API key secret +*ConnectionsApi* | [**create_connection**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#create_connection) | **POST** /api/connections | Create a connection +*ConnectionsApi* | [**create_runtime_user_connection**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#create_runtime_user_connection) | **POST** /api/connections/runtime_user_connections | Create OAuth runtime user connection +*ConnectionsApi* | [**get_connection_oauth_url**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#get_connection_oauth_url) | **GET** /api/connections/runtime_user_connections/{connection_id}/get_oauth_url | Get OAuth URL for connection +*ConnectionsApi* | [**get_connection_picklist**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#get_connection_picklist) | **POST** /api/connections/{connection_id}/pick_list | Get picklist values +*ConnectionsApi* | [**list_connections**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#list_connections) | **GET** /api/connections | List connections +*ConnectionsApi* | [**update_connection**](workato_platform_cli/client/workato_api/docs/ConnectionsApi.md#update_connection) | **PUT** /api/connections/{connection_id} | Update a connection +*ConnectorsApi* | [**get_custom_connector_code**](workato_platform_cli/client/workato_api/docs/ConnectorsApi.md#get_custom_connector_code) | **GET** /api/custom_connectors/{id}/code | Get custom connector code +*ConnectorsApi* | [**list_custom_connectors**](workato_platform_cli/client/workato_api/docs/ConnectorsApi.md#list_custom_connectors) | **GET** /api/custom_connectors | List custom connectors +*ConnectorsApi* | [**list_platform_connectors**](workato_platform_cli/client/workato_api/docs/ConnectorsApi.md#list_platform_connectors) | **GET** /api/integrations/all | List platform connectors +*DataTablesApi* | [**create_data_table**](workato_platform_cli/client/workato_api/docs/DataTablesApi.md#create_data_table) | **POST** /api/data_tables | Create data table +*DataTablesApi* | [**list_data_tables**](workato_platform_cli/client/workato_api/docs/DataTablesApi.md#list_data_tables) | **GET** /api/data_tables | List data tables +*ExportApi* | [**create_export_manifest**](workato_platform_cli/client/workato_api/docs/ExportApi.md#create_export_manifest) | **POST** /api/export_manifests | Create an export manifest +*ExportApi* | [**list_assets_in_folder**](workato_platform_cli/client/workato_api/docs/ExportApi.md#list_assets_in_folder) | **GET** /api/export_manifests/folder_assets | View assets in a folder +*FoldersApi* | [**create_folder**](workato_platform_cli/client/workato_api/docs/FoldersApi.md#create_folder) | **POST** /api/folders | Create a folder +*FoldersApi* | [**list_folders**](workato_platform_cli/client/workato_api/docs/FoldersApi.md#list_folders) | **GET** /api/folders | List folders +*PackagesApi* | [**download_package**](workato_platform_cli/client/workato_api/docs/PackagesApi.md#download_package) | **GET** /api/packages/{package_id}/download | Download package +*PackagesApi* | [**export_package**](workato_platform_cli/client/workato_api/docs/PackagesApi.md#export_package) | **POST** /api/packages/export/{id} | Export a package based on a manifest +*PackagesApi* | [**get_package**](workato_platform_cli/client/workato_api/docs/PackagesApi.md#get_package) | **GET** /api/packages/{package_id} | Get package details +*PackagesApi* | [**import_package**](workato_platform_cli/client/workato_api/docs/PackagesApi.md#import_package) | **POST** /api/packages/import/{id} | Import a package into a folder +*ProjectsApi* | [**delete_project**](workato_platform_cli/client/workato_api/docs/ProjectsApi.md#delete_project) | **DELETE** /api/projects/{project_id} | Delete a project +*ProjectsApi* | [**list_projects**](workato_platform_cli/client/workato_api/docs/ProjectsApi.md#list_projects) | **GET** /api/projects | List projects +*PropertiesApi* | [**list_project_properties**](workato_platform_cli/client/workato_api/docs/PropertiesApi.md#list_project_properties) | **GET** /api/properties | List project properties +*PropertiesApi* | [**upsert_project_properties**](workato_platform_cli/client/workato_api/docs/PropertiesApi.md#upsert_project_properties) | **POST** /api/properties | Upsert project properties +*RecipesApi* | [**list_recipes**](workato_platform_cli/client/workato_api/docs/RecipesApi.md#list_recipes) | **GET** /api/recipes | List recipes +*RecipesApi* | [**start_recipe**](workato_platform_cli/client/workato_api/docs/RecipesApi.md#start_recipe) | **PUT** /api/recipes/{recipe_id}/start | Start a recipe +*RecipesApi* | [**stop_recipe**](workato_platform_cli/client/workato_api/docs/RecipesApi.md#stop_recipe) | **PUT** /api/recipes/{recipe_id}/stop | Stop a recipe +*RecipesApi* | [**update_recipe_connection**](workato_platform_cli/client/workato_api/docs/RecipesApi.md#update_recipe_connection) | **PUT** /api/recipes/{recipe_id}/connect | Update a connection for a recipe +*UsersApi* | [**get_workspace_details**](workato_platform_cli/client/workato_api/docs/UsersApi.md#get_workspace_details) | **GET** /api/users/me | Get current user information ## Documentation For Models - - [ApiClient](workato_platform/client/workato_api/docs/ApiClient.md) - - [ApiClientApiCollectionsInner](workato_platform/client/workato_api/docs/ApiClientApiCollectionsInner.md) - - [ApiClientApiPoliciesInner](workato_platform/client/workato_api/docs/ApiClientApiPoliciesInner.md) - - [ApiClientCreateRequest](workato_platform/client/workato_api/docs/ApiClientCreateRequest.md) - - [ApiClientListResponse](workato_platform/client/workato_api/docs/ApiClientListResponse.md) - - [ApiClientResponse](workato_platform/client/workato_api/docs/ApiClientResponse.md) - - [ApiCollection](workato_platform/client/workato_api/docs/ApiCollection.md) - - [ApiCollectionCreateRequest](workato_platform/client/workato_api/docs/ApiCollectionCreateRequest.md) - - [ApiEndpoint](workato_platform/client/workato_api/docs/ApiEndpoint.md) - - [ApiKey](workato_platform/client/workato_api/docs/ApiKey.md) - - [ApiKeyCreateRequest](workato_platform/client/workato_api/docs/ApiKeyCreateRequest.md) - - [ApiKeyListResponse](workato_platform/client/workato_api/docs/ApiKeyListResponse.md) - - [ApiKeyResponse](workato_platform/client/workato_api/docs/ApiKeyResponse.md) - - [Asset](workato_platform/client/workato_api/docs/Asset.md) - - [AssetReference](workato_platform/client/workato_api/docs/AssetReference.md) - - [Connection](workato_platform/client/workato_api/docs/Connection.md) - - [ConnectionCreateRequest](workato_platform/client/workato_api/docs/ConnectionCreateRequest.md) - - [ConnectionUpdateRequest](workato_platform/client/workato_api/docs/ConnectionUpdateRequest.md) - - [ConnectorAction](workato_platform/client/workato_api/docs/ConnectorAction.md) - - [ConnectorVersion](workato_platform/client/workato_api/docs/ConnectorVersion.md) - - [CreateExportManifestRequest](workato_platform/client/workato_api/docs/CreateExportManifestRequest.md) - - [CreateFolderRequest](workato_platform/client/workato_api/docs/CreateFolderRequest.md) - - [CustomConnector](workato_platform/client/workato_api/docs/CustomConnector.md) - - [CustomConnectorCodeResponse](workato_platform/client/workato_api/docs/CustomConnectorCodeResponse.md) - - [CustomConnectorCodeResponseData](workato_platform/client/workato_api/docs/CustomConnectorCodeResponseData.md) - - [CustomConnectorListResponse](workato_platform/client/workato_api/docs/CustomConnectorListResponse.md) - - [DataTable](workato_platform/client/workato_api/docs/DataTable.md) - - [DataTableColumn](workato_platform/client/workato_api/docs/DataTableColumn.md) - - [DataTableColumnRequest](workato_platform/client/workato_api/docs/DataTableColumnRequest.md) - - [DataTableCreateRequest](workato_platform/client/workato_api/docs/DataTableCreateRequest.md) - - [DataTableCreateResponse](workato_platform/client/workato_api/docs/DataTableCreateResponse.md) - - [DataTableListResponse](workato_platform/client/workato_api/docs/DataTableListResponse.md) - - [DataTableRelation](workato_platform/client/workato_api/docs/DataTableRelation.md) - - [DeleteProject403Response](workato_platform/client/workato_api/docs/DeleteProject403Response.md) - - [Error](workato_platform/client/workato_api/docs/Error.md) - - [ExportManifestRequest](workato_platform/client/workato_api/docs/ExportManifestRequest.md) - - [ExportManifestResponse](workato_platform/client/workato_api/docs/ExportManifestResponse.md) - - [ExportManifestResponseResult](workato_platform/client/workato_api/docs/ExportManifestResponseResult.md) - - [Folder](workato_platform/client/workato_api/docs/Folder.md) - - [FolderAssetsResponse](workato_platform/client/workato_api/docs/FolderAssetsResponse.md) - - [FolderAssetsResponseResult](workato_platform/client/workato_api/docs/FolderAssetsResponseResult.md) - - [FolderCreationResponse](workato_platform/client/workato_api/docs/FolderCreationResponse.md) - - [ImportResults](workato_platform/client/workato_api/docs/ImportResults.md) - - [OAuthUrlResponse](workato_platform/client/workato_api/docs/OAuthUrlResponse.md) - - [OAuthUrlResponseData](workato_platform/client/workato_api/docs/OAuthUrlResponseData.md) - - [OpenApiSpec](workato_platform/client/workato_api/docs/OpenApiSpec.md) - - [PackageDetailsResponse](workato_platform/client/workato_api/docs/PackageDetailsResponse.md) - - [PackageDetailsResponseRecipeStatusInner](workato_platform/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md) - - [PackageResponse](workato_platform/client/workato_api/docs/PackageResponse.md) - - [PicklistRequest](workato_platform/client/workato_api/docs/PicklistRequest.md) - - [PicklistResponse](workato_platform/client/workato_api/docs/PicklistResponse.md) - - [PlatformConnector](workato_platform/client/workato_api/docs/PlatformConnector.md) - - [PlatformConnectorListResponse](workato_platform/client/workato_api/docs/PlatformConnectorListResponse.md) - - [Project](workato_platform/client/workato_api/docs/Project.md) - - [Recipe](workato_platform/client/workato_api/docs/Recipe.md) - - [RecipeConfigInner](workato_platform/client/workato_api/docs/RecipeConfigInner.md) - - [RecipeConnectionUpdateRequest](workato_platform/client/workato_api/docs/RecipeConnectionUpdateRequest.md) - - [RecipeListResponse](workato_platform/client/workato_api/docs/RecipeListResponse.md) - - [RecipeStartResponse](workato_platform/client/workato_api/docs/RecipeStartResponse.md) - - [RuntimeUserConnectionCreateRequest](workato_platform/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md) - - [RuntimeUserConnectionResponse](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponse.md) - - [RuntimeUserConnectionResponseData](workato_platform/client/workato_api/docs/RuntimeUserConnectionResponseData.md) - - [SuccessResponse](workato_platform/client/workato_api/docs/SuccessResponse.md) - - [UpsertProjectPropertiesRequest](workato_platform/client/workato_api/docs/UpsertProjectPropertiesRequest.md) - - [User](workato_platform/client/workato_api/docs/User.md) - - [ValidationError](workato_platform/client/workato_api/docs/ValidationError.md) - - [ValidationErrorErrorsValue](workato_platform/client/workato_api/docs/ValidationErrorErrorsValue.md) + - [ApiClient](workato_platform_cli/client/workato_api/docs/ApiClient.md) + - [ApiClientApiCollectionsInner](workato_platform_cli/client/workato_api/docs/ApiClientApiCollectionsInner.md) + - [ApiClientApiPoliciesInner](workato_platform_cli/client/workato_api/docs/ApiClientApiPoliciesInner.md) + - [ApiClientCreateRequest](workato_platform_cli/client/workato_api/docs/ApiClientCreateRequest.md) + - [ApiClientListResponse](workato_platform_cli/client/workato_api/docs/ApiClientListResponse.md) + - [ApiClientResponse](workato_platform_cli/client/workato_api/docs/ApiClientResponse.md) + - [ApiCollection](workato_platform_cli/client/workato_api/docs/ApiCollection.md) + - [ApiCollectionCreateRequest](workato_platform_cli/client/workato_api/docs/ApiCollectionCreateRequest.md) + - [ApiEndpoint](workato_platform_cli/client/workato_api/docs/ApiEndpoint.md) + - [ApiKey](workato_platform_cli/client/workato_api/docs/ApiKey.md) + - [ApiKeyCreateRequest](workato_platform_cli/client/workato_api/docs/ApiKeyCreateRequest.md) + - [ApiKeyListResponse](workato_platform_cli/client/workato_api/docs/ApiKeyListResponse.md) + - [ApiKeyResponse](workato_platform_cli/client/workato_api/docs/ApiKeyResponse.md) + - [Asset](workato_platform_cli/client/workato_api/docs/Asset.md) + - [AssetReference](workato_platform_cli/client/workato_api/docs/AssetReference.md) + - [Connection](workato_platform_cli/client/workato_api/docs/Connection.md) + - [ConnectionCreateRequest](workato_platform_cli/client/workato_api/docs/ConnectionCreateRequest.md) + - [ConnectionUpdateRequest](workato_platform_cli/client/workato_api/docs/ConnectionUpdateRequest.md) + - [ConnectorAction](workato_platform_cli/client/workato_api/docs/ConnectorAction.md) + - [ConnectorVersion](workato_platform_cli/client/workato_api/docs/ConnectorVersion.md) + - [CreateExportManifestRequest](workato_platform_cli/client/workato_api/docs/CreateExportManifestRequest.md) + - [CreateFolderRequest](workato_platform_cli/client/workato_api/docs/CreateFolderRequest.md) + - [CustomConnector](workato_platform_cli/client/workato_api/docs/CustomConnector.md) + - [CustomConnectorCodeResponse](workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponse.md) + - [CustomConnectorCodeResponseData](workato_platform_cli/client/workato_api/docs/CustomConnectorCodeResponseData.md) + - [CustomConnectorListResponse](workato_platform_cli/client/workato_api/docs/CustomConnectorListResponse.md) + - [DataTable](workato_platform_cli/client/workato_api/docs/DataTable.md) + - [DataTableColumn](workato_platform_cli/client/workato_api/docs/DataTableColumn.md) + - [DataTableColumnRequest](workato_platform_cli/client/workato_api/docs/DataTableColumnRequest.md) + - [DataTableCreateRequest](workato_platform_cli/client/workato_api/docs/DataTableCreateRequest.md) + - [DataTableCreateResponse](workato_platform_cli/client/workato_api/docs/DataTableCreateResponse.md) + - [DataTableListResponse](workato_platform_cli/client/workato_api/docs/DataTableListResponse.md) + - [DataTableRelation](workato_platform_cli/client/workato_api/docs/DataTableRelation.md) + - [DeleteProject403Response](workato_platform_cli/client/workato_api/docs/DeleteProject403Response.md) + - [Error](workato_platform_cli/client/workato_api/docs/Error.md) + - [ExportManifestRequest](workato_platform_cli/client/workato_api/docs/ExportManifestRequest.md) + - [ExportManifestResponse](workato_platform_cli/client/workato_api/docs/ExportManifestResponse.md) + - [ExportManifestResponseResult](workato_platform_cli/client/workato_api/docs/ExportManifestResponseResult.md) + - [Folder](workato_platform_cli/client/workato_api/docs/Folder.md) + - [FolderAssetsResponse](workato_platform_cli/client/workato_api/docs/FolderAssetsResponse.md) + - [FolderAssetsResponseResult](workato_platform_cli/client/workato_api/docs/FolderAssetsResponseResult.md) + - [FolderCreationResponse](workato_platform_cli/client/workato_api/docs/FolderCreationResponse.md) + - [ImportResults](workato_platform_cli/client/workato_api/docs/ImportResults.md) + - [OAuthUrlResponse](workato_platform_cli/client/workato_api/docs/OAuthUrlResponse.md) + - [OAuthUrlResponseData](workato_platform_cli/client/workato_api/docs/OAuthUrlResponseData.md) + - [OpenApiSpec](workato_platform_cli/client/workato_api/docs/OpenApiSpec.md) + - [PackageDetailsResponse](workato_platform_cli/client/workato_api/docs/PackageDetailsResponse.md) + - [PackageDetailsResponseRecipeStatusInner](workato_platform_cli/client/workato_api/docs/PackageDetailsResponseRecipeStatusInner.md) + - [PackageResponse](workato_platform_cli/client/workato_api/docs/PackageResponse.md) + - [PicklistRequest](workato_platform_cli/client/workato_api/docs/PicklistRequest.md) + - [PicklistResponse](workato_platform_cli/client/workato_api/docs/PicklistResponse.md) + - [PlatformConnector](workato_platform_cli/client/workato_api/docs/PlatformConnector.md) + - [PlatformConnectorListResponse](workato_platform_cli/client/workato_api/docs/PlatformConnectorListResponse.md) + - [Project](workato_platform_cli/client/workato_api/docs/Project.md) + - [Recipe](workato_platform_cli/client/workato_api/docs/Recipe.md) + - [RecipeConfigInner](workato_platform_cli/client/workato_api/docs/RecipeConfigInner.md) + - [RecipeConnectionUpdateRequest](workato_platform_cli/client/workato_api/docs/RecipeConnectionUpdateRequest.md) + - [RecipeListResponse](workato_platform_cli/client/workato_api/docs/RecipeListResponse.md) + - [RecipeStartResponse](workato_platform_cli/client/workato_api/docs/RecipeStartResponse.md) + - [RuntimeUserConnectionCreateRequest](workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionCreateRequest.md) + - [RuntimeUserConnectionResponse](workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponse.md) + - [RuntimeUserConnectionResponseData](workato_platform_cli/client/workato_api/docs/RuntimeUserConnectionResponseData.md) + - [SuccessResponse](workato_platform_cli/client/workato_api/docs/SuccessResponse.md) + - [UpsertProjectPropertiesRequest](workato_platform_cli/client/workato_api/docs/UpsertProjectPropertiesRequest.md) + - [User](workato_platform_cli/client/workato_api/docs/User.md) + - [ValidationError](workato_platform_cli/client/workato_api/docs/ValidationError.md) + - [ValidationErrorErrorsValue](workato_platform_cli/client/workato_api/docs/ValidationErrorErrorsValue.md) diff --git a/src/workato_platform_cli/py.typed b/src/workato_platform_cli/py.typed deleted file mode 100644 index e69de29..0000000 From 6069b5049438c9c83b828fcae32607688dac9a6c Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 18:12:13 -0700 Subject: [PATCH 12/13] Update test imports for workato_platform_cli package rename - Fix all test import statements from workato_platform to workato_platform_cli - Update patch decorators and mock references - Fix path references in test files - Ensure all 903 tests pass with new package structure --- tests/conftest.py | 2 +- tests/integration/test_connection_workflow.py | 22 +-- tests/integration/test_profile_workflow.py | 4 +- tests/integration/test_recipe_workflow.py | 12 +- .../commands/connections/test_commands.py | 6 +- .../unit/commands/connections/test_helpers.py | 8 +- .../unit/commands/connectors/test_command.py | 6 +- .../connectors/test_connector_manager.py | 10 +- .../unit/commands/data_tables/test_command.py | 18 +- tests/unit/commands/projects/test_command.py | 68 ++++---- .../commands/projects/test_project_manager.py | 16 +- tests/unit/commands/push/test_command.py | 14 +- tests/unit/commands/recipes/test_command.py | 54 +++--- tests/unit/commands/recipes/test_validator.py | 4 +- tests/unit/commands/test_api_clients.py | 94 +++++------ tests/unit/commands/test_api_collections.py | 110 ++++++------ tests/unit/commands/test_assets.py | 10 +- tests/unit/commands/test_connections.py | 156 +++++++++--------- tests/unit/commands/test_data_tables.py | 24 +-- tests/unit/commands/test_guide.py | 2 +- tests/unit/commands/test_init.py | 2 +- tests/unit/commands/test_profiles.py | 8 +- tests/unit/commands/test_properties.py | 44 ++--- tests/unit/commands/test_pull.py | 42 ++--- tests/unit/commands/test_workspace.py | 6 +- tests/unit/config/test_manager.py | 10 +- tests/unit/config/test_models.py | 2 +- tests/unit/config/test_profiles.py | 60 +++---- tests/unit/config/test_workspace.py | 2 +- tests/unit/test_basic_imports.py | 24 +-- tests/unit/test_cli.py | 4 +- tests/unit/test_containers.py | 2 +- tests/unit/test_retry_429.py | 24 +-- tests/unit/test_version_checker.py | 54 +++--- tests/unit/test_webbrowser_mock.py | 2 +- tests/unit/test_workato_client.py | 62 +++---- tests/unit/utils/test_exception_handler.py | 156 +++++++++--------- tests/unit/utils/test_gitignore.py | 2 +- tests/unit/utils/test_ignore_patterns.py | 2 +- tests/unit/utils/test_spinner.py | 12 +- 40 files changed, 580 insertions(+), 580 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 78a5a00..1934152 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -71,7 +71,7 @@ def mock_webbrowser() -> Generator[dict[str, MagicMock], None, None]: with ( patch("webbrowser.open", return_value=None) as mock_open_global, patch( - "workato_platform.cli.commands.connections.webbrowser.open", + "workato_platform_cli.cli.commands.connections.webbrowser.open", return_value=None, ) as mock_open_connections, ): diff --git a/tests/integration/test_connection_workflow.py b/tests/integration/test_connection_workflow.py index c9e7c4f..3ded9fd 100644 --- a/tests/integration/test_connection_workflow.py +++ b/tests/integration/test_connection_workflow.py @@ -6,7 +6,7 @@ from asyncclick.testing import CliRunner -from workato_platform.cli import cli +from workato_platform_cli.cli import cli class TestConnectionWorkflow: @@ -17,7 +17,7 @@ async def test_oauth_connection_creation_workflow(self) -> None: """Test end-to-end OAuth connection creation.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() get_connection_oauth_url = ( mock_workato_client.connections_api.get_connection_oauth_url @@ -48,7 +48,7 @@ async def test_connection_discovery_workflow(self) -> None: """Test connection discovery and exploration workflow.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: # Mock connector manager mock_connector_manager = Mock() mock_connector_manager.get_available_connectors.return_value = [ @@ -76,7 +76,7 @@ async def test_connection_management_workflow(self) -> None: """Test connection listing and management.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() mock_workato_client.connections_api.list_connections.return_value = Mock( items=[ @@ -130,7 +130,7 @@ async def test_connection_picklist_workflow(self) -> None: """Test connection pick-list functionality.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() get_connection_pick_list = ( mock_workato_client.connections_api.get_connection_pick_list @@ -183,9 +183,9 @@ async def test_interactive_oauth_workflow(self) -> None: runner = CliRunner() with ( - patch("workato_platform.cli.containers.Container") as mock_container, + patch("workato_platform_cli.cli.containers.Container") as mock_container, patch( - "workato_platform.cli.commands.connections.click.prompt" + "workato_platform_cli.cli.commands.connections.click.prompt" ) as mock_prompt, ): mock_prompt.return_value = "authorization_code_12345" @@ -232,7 +232,7 @@ async def test_connection_error_handling_workflow(self) -> None: """Test connection workflow error handling.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() # Simulate API errors @@ -276,8 +276,8 @@ async def test_connection_polling_workflow(self) -> None: """Test OAuth connection polling workflow.""" with ( - patch("workato_platform.cli.containers.Container") as mock_container, - patch("workato_platform.cli.commands.connections.time.sleep"), + patch("workato_platform_cli.cli.containers.Container") as mock_container, + patch("workato_platform_cli.cli.commands.connections.time.sleep"), ): # Speed up polling mock_workato_client = Mock() @@ -296,7 +296,7 @@ async def test_connection_polling_workflow(self) -> None: # Test connection polling (if function exists) try: - from workato_platform.cli.commands.connections import ( + from workato_platform_cli.cli.commands.connections import ( poll_oauth_connection_status, ) diff --git a/tests/integration/test_profile_workflow.py b/tests/integration/test_profile_workflow.py index 572557d..73807bd 100644 --- a/tests/integration/test_profile_workflow.py +++ b/tests/integration/test_profile_workflow.py @@ -6,7 +6,7 @@ from asyncclick.testing import CliRunner -from workato_platform.cli import cli +from workato_platform_cli.cli import cli class TestProfileWorkflow: @@ -48,7 +48,7 @@ async def test_profile_with_api_operations(self, mock_workato_client: Mock) -> N # This test would require more complex mocking of the API client # For now, just test that commands don't fail with basic setup - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_instance = mock_container.return_value mock_instance.workato_api_client.return_value = mock_workato_client diff --git a/tests/integration/test_recipe_workflow.py b/tests/integration/test_recipe_workflow.py index 143d9bb..370ebcd 100644 --- a/tests/integration/test_recipe_workflow.py +++ b/tests/integration/test_recipe_workflow.py @@ -6,7 +6,7 @@ from asyncclick.testing import CliRunner -from workato_platform.cli import cli +from workato_platform_cli.cli import cli class TestRecipeWorkflow: @@ -17,7 +17,7 @@ async def test_recipe_validation_workflow(self) -> None: """Test end-to-end recipe validation workflow.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: # Mock the validator mock_validator = Mock() mock_validator.validate_recipe_structure.return_value = [] @@ -37,7 +37,7 @@ async def test_recipe_lifecycle_workflow(self) -> None: """Test recipe start/stop lifecycle.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() mock_workato_client.recipes_api.start_recipe.return_value = Mock( success=True @@ -67,7 +67,7 @@ async def test_recipe_bulk_operations_workflow(self) -> None: """Test bulk recipe operations.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() mock_workato_client.recipes_api.list_recipes.return_value = Mock( items=[ @@ -94,7 +94,7 @@ async def test_recipe_connection_update_workflow(self) -> None: """Test recipe connection update workflow.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_project_manager = Mock() mock_project_manager.get_project_recipes.return_value = [ Mock(id=1, name="Recipe 1"), @@ -130,7 +130,7 @@ async def test_recipe_async_operations(self) -> None: """Test async recipe operations.""" runner = CliRunner() - with patch("workato_platform.cli.containers.Container") as mock_container: + with patch("workato_platform_cli.cli.containers.Container") as mock_container: mock_workato_client = Mock() # Mock async methods diff --git a/tests/unit/commands/connections/test_commands.py b/tests/unit/commands/connections/test_commands.py index 153e9cf..a87b0b8 100644 --- a/tests/unit/commands/connections/test_commands.py +++ b/tests/unit/commands/connections/test_commands.py @@ -8,13 +8,13 @@ import pytest -import workato_platform.cli.commands.connections as connections_module +import workato_platform_cli.cli.commands.connections as connections_module -from workato_platform.cli.commands.connectors.connector_manager import ( +from workato_platform_cli.cli.commands.connectors.connector_manager import ( ConnectionParameter, ProviderData, ) -from workato_platform.cli.utils.config import ConfigData +from workato_platform_cli.cli.utils.config import ConfigData class DummySpinner: diff --git a/tests/unit/commands/connections/test_helpers.py b/tests/unit/commands/connections/test_helpers.py index fd76272..d58b4f6 100644 --- a/tests/unit/commands/connections/test_helpers.py +++ b/tests/unit/commands/connections/test_helpers.py @@ -9,16 +9,16 @@ import pytest -import workato_platform.cli.commands.connections as connections_module +import workato_platform_cli.cli.commands.connections as connections_module -from workato_platform.cli.commands.connections import ( +from workato_platform_cli.cli.commands.connections import ( _get_callback_url_from_api_host, display_connection_summary, group_connections_by_provider, parse_connection_input, show_connection_statistics, ) -from workato_platform.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection import Connection @pytest.fixture(autouse=True) @@ -29,7 +29,7 @@ def _record(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.connections.click.echo", + "workato_platform_cli.cli.commands.connections.click.echo", _record, ) return captured diff --git a/tests/unit/commands/connectors/test_command.py b/tests/unit/commands/connectors/test_command.py index 659fa06..568dd60 100644 --- a/tests/unit/commands/connectors/test_command.py +++ b/tests/unit/commands/connectors/test_command.py @@ -6,8 +6,8 @@ import pytest -from workato_platform.cli.commands.connectors import command -from workato_platform.cli.commands.connectors.connector_manager import ProviderData +from workato_platform_cli.cli.commands.connectors import command +from workato_platform_cli.cli.commands.connectors.connector_manager import ProviderData @pytest.fixture(autouse=True) @@ -18,7 +18,7 @@ def _record(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.connectors.command.click.echo", + "workato_platform_cli.cli.commands.connectors.command.click.echo", _record, ) return captured diff --git a/tests/unit/commands/connectors/test_connector_manager.py b/tests/unit/commands/connectors/test_connector_manager.py index 96ee159..9920ea2 100644 --- a/tests/unit/commands/connectors/test_connector_manager.py +++ b/tests/unit/commands/connectors/test_connector_manager.py @@ -9,8 +9,8 @@ import pytest -from workato_platform.cli.commands.connectors import connector_manager -from workato_platform.cli.commands.connectors.connector_manager import ( +from workato_platform_cli.cli.commands.connectors import connector_manager +from workato_platform_cli.cli.commands.connectors.connector_manager import ( ConnectionParameter, ConnectorManager, ProviderData, @@ -38,7 +38,7 @@ def update_message(self, message: str) -> None: @pytest.fixture(autouse=True) def patch_spinner(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.connectors.connector_manager.Spinner", + "workato_platform_cli.cli.commands.connectors.connector_manager.Spinner", DummySpinner, ) @@ -51,7 +51,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.connectors.connector_manager.click.echo", + "workato_platform_cli.cli.commands.connectors.connector_manager.click.echo", _capture, ) return captured @@ -157,7 +157,7 @@ async def mock_prompt(*_args: object, **_kwargs: object) -> str: return "https://example.atlassian.net" monkeypatch.setattr( - "workato_platform.cli.commands.connectors.connector_manager.click.prompt", + "workato_platform_cli.cli.commands.connectors.connector_manager.click.prompt", mock_prompt, ) diff --git a/tests/unit/commands/data_tables/test_command.py b/tests/unit/commands/data_tables/test_command.py index f933453..f9c91c3 100644 --- a/tests/unit/commands/data_tables/test_command.py +++ b/tests/unit/commands/data_tables/test_command.py @@ -9,21 +9,21 @@ import pytest -from workato_platform.cli.commands.data_tables import ( +from workato_platform_cli.cli.commands.data_tables import ( create_data_table, create_table, display_table_summary, list_data_tables, validate_schema, ) -from workato_platform.client.workato_api.models.data_table_column_request import ( +from workato_platform_cli.client.workato_api.models.data_table_column_request import ( DataTableColumnRequest, ) if TYPE_CHECKING: - from workato_platform import Workato - from workato_platform.client.workato_api.models.data_table import DataTable + from workato_platform_cli import Workato + from workato_platform_cli.client.workato_api.models.data_table import DataTable def _get_callback(cmd: Any) -> Callable[..., Any]: @@ -55,7 +55,7 @@ def update_message(self, message: str) -> None: @pytest.fixture(autouse=True) def patch_spinner(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.data_tables.Spinner", + "workato_platform_cli.cli.commands.data_tables.Spinner", DummySpinner, ) @@ -68,7 +68,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.data_tables.click.echo", + "workato_platform_cli.cli.commands.data_tables.click.echo", _capture, ) return captured @@ -173,7 +173,7 @@ async def test_create_data_table_validation_errors( with patch.object(config_manager, "load_config", return_value=Mock(folder_id=1)): monkeypatch.setattr( - "workato_platform.cli.commands.data_tables.validate_schema", + "workato_platform_cli.cli.commands.data_tables.validate_schema", lambda schema: ["Error"], ) @@ -189,12 +189,12 @@ async def test_create_data_table_success(monkeypatch: pytest.MonkeyPatch) -> Non with patch.object(config_manager, "load_config", return_value=Mock(folder_id=1)): monkeypatch.setattr( - "workato_platform.cli.commands.data_tables.validate_schema", + "workato_platform_cli.cli.commands.data_tables.validate_schema", lambda schema: [], ) create_table_mock = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.data_tables.create_table", + "workato_platform_cli.cli.commands.data_tables.create_table", create_table_mock, ) diff --git a/tests/unit/commands/projects/test_command.py b/tests/unit/commands/projects/test_command.py index 6add550..4f81454 100644 --- a/tests/unit/commands/projects/test_command.py +++ b/tests/unit/commands/projects/test_command.py @@ -13,8 +13,8 @@ import pytest -from workato_platform.cli.commands.projects import command -from workato_platform.cli.utils.config import ConfigData +from workato_platform_cli.cli.commands.projects import command +from workato_platform_cli.cli.utils.config import ConfigData @pytest.fixture(autouse=True) @@ -25,7 +25,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.click.echo", + "workato_platform_cli.cli.commands.projects.command.click.echo", _capture, ) return captured @@ -79,7 +79,7 @@ def load_config(self) -> ConfigData: return project_config monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -124,7 +124,7 @@ def load_config(self) -> ConfigData: return project_config if self.path == project_dir else workspace_config monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -188,7 +188,7 @@ def load_config(self) -> ConfigData: return ConfigData(project_name="alpha") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -229,7 +229,7 @@ def load_config(self) -> ConfigData: return ConfigData(project_name="alpha") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -298,7 +298,7 @@ def failing_config_manager(*_: Any, **__: Any) -> Any: return mock monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", failing_config_manager, ) @@ -329,7 +329,7 @@ def failing_config_manager(*_: Any, **__: Any) -> Any: return mock monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", failing_config_manager, ) @@ -381,7 +381,7 @@ def failing_config_manager(*_: Any, **__: Any) -> Any: return mock monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", failing_config_manager, ) @@ -479,7 +479,7 @@ def failing_config_manager(*_: Any, **__: Any) -> Any: return mock monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", failing_config_manager, ) @@ -517,7 +517,7 @@ def failing_config_manager(*_: Any, **__: Any) -> Any: return mock monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", failing_config_manager, ) @@ -604,7 +604,7 @@ def load_config(self) -> Any: return ConfigData(project_name="alpha") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -643,7 +643,7 @@ def load_config(self) -> Any: return ConfigData(project_name="alpha") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -690,7 +690,7 @@ def load_config(self) -> Any: return ConfigData(project_name="beta") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -742,7 +742,7 @@ def load_config(self) -> ConfigData: return ConfigData(project_name="Beta Display") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -793,7 +793,7 @@ def load_config(self) -> Any: return ConfigData(project_name="alpha") monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -830,7 +830,7 @@ async def test_list_projects_json_output_mode( mock_project_config_manager.load_config.return_value = project_config with patch( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", return_value=mock_project_config_manager, ): assert command.list_projects.callback @@ -896,7 +896,7 @@ async def test_list_projects_remote_source( mock_project_manager = Mock() # Mock remote projects - from workato_platform.client.workato_api.models.project import Project + from workato_platform_cli.client.workato_api.models.project import Project remote_project = Project( id=123, name="Remote Project", folder_id=456, description="A remote project" @@ -914,15 +914,15 @@ async def mock_aexit(_self: Any, *_args: Any) -> None: mock_workato_client.__aexit__ = mock_aexit monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.create_profile_aware_workato_config", + "workato_platform_cli.cli.commands.projects.command.create_profile_aware_workato_config", Mock(return_value=Mock()), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.Workato", + "workato_platform_cli.cli.commands.projects.command.Workato", Mock(return_value=mock_workato_client), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ProjectManager", + "workato_platform_cli.cli.commands.projects.command.ProjectManager", Mock(return_value=mock_project_manager), ) @@ -950,7 +950,7 @@ async def test_list_projects_remote_source_json( mock_project_manager = Mock() # Mock remote projects - from workato_platform.client.workato_api.models.project import Project + from workato_platform_cli.client.workato_api.models.project import Project remote_project = Project( id=123, name="Remote Project", folder_id=456, description="A remote project" @@ -968,15 +968,15 @@ async def mock_aexit(_self: Any, *_args: Any) -> None: mock_workato_client.__aexit__ = mock_aexit monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.create_profile_aware_workato_config", + "workato_platform_cli.cli.commands.projects.command.create_profile_aware_workato_config", Mock(return_value=Mock()), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.Workato", + "workato_platform_cli.cli.commands.projects.command.Workato", Mock(return_value=mock_workato_client), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ProjectManager", + "workato_platform_cli.cli.commands.projects.command.ProjectManager", Mock(return_value=mock_project_manager), ) @@ -1031,7 +1031,7 @@ def load_config(self) -> ConfigData: return project_config monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ConfigManager", + "workato_platform_cli.cli.commands.projects.command.ConfigManager", StubConfigManager, ) @@ -1039,7 +1039,7 @@ def load_config(self) -> ConfigData: mock_workato_client = Mock() mock_project_manager = Mock() - from workato_platform.client.workato_api.models.project import Project + from workato_platform_cli.client.workato_api.models.project import Project remote_project1 = Project( id=123, name="Alpha", folder_id=456, description="Synced project" @@ -1062,15 +1062,15 @@ async def mock_aexit(_self: Any, *_args: Any) -> None: mock_workato_client.__aexit__ = mock_aexit monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.create_profile_aware_workato_config", + "workato_platform_cli.cli.commands.projects.command.create_profile_aware_workato_config", Mock(return_value=Mock()), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.Workato", + "workato_platform_cli.cli.commands.projects.command.Workato", Mock(return_value=mock_workato_client), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ProjectManager", + "workato_platform_cli.cli.commands.projects.command.ProjectManager", Mock(return_value=mock_project_manager), ) @@ -1117,15 +1117,15 @@ async def mock_aexit(_self: Any, *_args: Any) -> None: mock_workato_client.__aexit__ = mock_aexit monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.create_profile_aware_workato_config", + "workato_platform_cli.cli.commands.projects.command.create_profile_aware_workato_config", mock_create_config, ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.Workato", + "workato_platform_cli.cli.commands.projects.command.Workato", Mock(return_value=mock_workato_client), ) monkeypatch.setattr( - "workato_platform.cli.commands.projects.command.ProjectManager", + "workato_platform_cli.cli.commands.projects.command.ProjectManager", Mock(return_value=mock_project_manager), ) diff --git a/tests/unit/commands/projects/test_project_manager.py b/tests/unit/commands/projects/test_project_manager.py index f90bf83..89fa960 100644 --- a/tests/unit/commands/projects/test_project_manager.py +++ b/tests/unit/commands/projects/test_project_manager.py @@ -10,8 +10,8 @@ import pytest -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.client.workato_api.models.project import Project +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.client.workato_api.models.project import Project class DummySpinner: @@ -37,7 +37,7 @@ def patch_spinner(monkeypatch: pytest.MonkeyPatch) -> None: """Patch spinner globally for deterministic tests.""" monkeypatch.setattr( - "workato_platform.cli.commands.projects.project_manager.Spinner", + "workato_platform_cli.cli.commands.projects.project_manager.Spinner", DummySpinner, ) @@ -50,7 +50,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.projects.project_manager.click.echo", + "workato_platform_cli.cli.commands.projects.project_manager.click.echo", _capture, ) return captured @@ -328,7 +328,7 @@ async def test_handle_post_api_sync_success( client = Mock() manager = ProjectManager(client) monkeypatch.setattr( - "workato_platform.cli.commands.projects.project_manager.subprocess.run", + "workato_platform_cli.cli.commands.projects.project_manager.subprocess.run", Mock(return_value=Mock(returncode=0, stderr="")), ) @@ -344,7 +344,7 @@ async def test_handle_post_api_sync_timeout( client = Mock() manager = ProjectManager(client) monkeypatch.setattr( - "workato_platform.cli.commands.projects.project_manager.subprocess.run", + "workato_platform_cli.cli.commands.projects.project_manager.subprocess.run", Mock(side_effect=subprocess.TimeoutExpired(cmd="workato", timeout=30)), ) @@ -372,7 +372,7 @@ def test_save_project_to_config(monkeypatch: pytest.MonkeyPatch) -> None: config_manager.load_config.return_value = Mock() monkeypatch.setattr( - "workato_platform.cli.utils.config.ConfigManager", + "workato_platform_cli.cli.utils.config.ConfigManager", Mock(return_value=config_manager), ) @@ -397,7 +397,7 @@ async def test_import_existing_project_workflow( manager = ProjectManager(client) monkeypatch.setattr( - "workato_platform.cli.commands.projects.project_manager.inquirer.prompt", + "workato_platform_cli.cli.commands.projects.project_manager.inquirer.prompt", lambda *_: {"project": manager._format_project_display(projects[0])}, ) diff --git a/tests/unit/commands/push/test_command.py b/tests/unit/commands/push/test_command.py index 740672e..37c7ca7 100644 --- a/tests/unit/commands/push/test_command.py +++ b/tests/unit/commands/push/test_command.py @@ -9,8 +9,8 @@ import pytest -from workato_platform import Workato -from workato_platform.cli.commands.push.command import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.commands.push.command import ( poll_import_status, push, upload_package, @@ -40,7 +40,7 @@ def patch_spinner(monkeypatch: pytest.MonkeyPatch) -> None: """Ensure spinner usage is deterministic across tests.""" monkeypatch.setattr( - "workato_platform.cli.commands.push.command.Spinner", + "workato_platform_cli.cli.commands.push.command.Spinner", DummySpinner, ) @@ -55,7 +55,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.push.command.click.echo", + "workato_platform_cli.cli.commands.push.command.click.echo", _capture, ) @@ -174,7 +174,7 @@ async def fake_upload(**kwargs: object) -> None: upload_mock = AsyncMock(side_effect=fake_upload) monkeypatch.setattr( - "workato_platform.cli.commands.push.command.upload_package", + "workato_platform_cli.cli.commands.push.command.upload_package", upload_mock, ) @@ -208,7 +208,7 @@ async def test_upload_package_handles_completed_status( poll_mock = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.push.command.poll_import_status", + "workato_platform_cli.cli.commands.push.command.poll_import_status", poll_mock, ) @@ -242,7 +242,7 @@ async def test_upload_package_triggers_poll_when_pending( poll_mock = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.push.command.poll_import_status", + "workato_platform_cli.cli.commands.push.command.poll_import_status", poll_mock, ) diff --git a/tests/unit/commands/recipes/test_command.py b/tests/unit/commands/recipes/test_command.py index f614d15..c13a877 100644 --- a/tests/unit/commands/recipes/test_command.py +++ b/tests/unit/commands/recipes/test_command.py @@ -10,12 +10,12 @@ import pytest -from workato_platform.cli.commands.recipes import command +from workato_platform_cli.cli.commands.recipes import command if TYPE_CHECKING: - from workato_platform import Workato - from workato_platform.client.workato_api.models.recipe_start_response import ( + from workato_platform_cli import Workato + from workato_platform_cli.client.workato_api.models.recipe_start_response import ( RecipeStartResponse, ) @@ -33,7 +33,7 @@ def _make_stub(**attrs: Any) -> Mock: def _workato_stub(**kwargs: Any) -> Workato: - from workato_platform import Workato + from workato_platform_cli import Workato stub = cast(Any, Mock(spec=Workato)) for key, value in kwargs.items(): @@ -60,7 +60,7 @@ def patch_spinner(monkeypatch: pytest.MonkeyPatch) -> None: """Ensure spinner interactions are deterministic in tests.""" monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.Spinner", + "workato_platform_cli.cli.commands.recipes.command.Spinner", DummySpinner, ) @@ -75,7 +75,7 @@ def _capture(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.click.echo", + "workato_platform_cli.cli.commands.recipes.command.click.echo", _capture, ) @@ -110,7 +110,7 @@ async def test_list_recipes_recursive_filters_running( mock_recursive = AsyncMock(return_value=[running_recipe, stopped_recipe]) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_recipes_recursive", + "workato_platform_cli.cli.commands.recipes.command.get_recipes_recursive", mock_recursive, ) @@ -120,7 +120,7 @@ def fake_display(recipe: Any) -> None: seen.append(recipe) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.display_recipe_summary", + "workato_platform_cli.cli.commands.recipes.command.display_recipe_summary", fake_display, ) @@ -152,7 +152,7 @@ async def test_list_recipes_non_recursive_with_filters( mock_paginated = AsyncMock(return_value=[recipe_stub]) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_all_recipes_paginated", + "workato_platform_cli.cli.commands.recipes.command.get_all_recipes_paginated", mock_paginated, ) @@ -162,7 +162,7 @@ def fake_display(recipe: Any) -> None: recorded.append(recipe) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.display_recipe_summary", + "workato_platform_cli.cli.commands.recipes.command.display_recipe_summary", fake_display, ) @@ -333,15 +333,15 @@ async def test_start_dispatches_correct_handler( folder = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.start_single_recipe", + "workato_platform_cli.cli.commands.recipes.command.start_single_recipe", single, ) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.start_project_recipes", + "workato_platform_cli.cli.commands.recipes.command.start_project_recipes", project, ) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.start_folder_recipes", + "workato_platform_cli.cli.commands.recipes.command.start_folder_recipes", folder, ) @@ -379,15 +379,15 @@ async def test_stop_dispatches_correct_handler(monkeypatch: pytest.MonkeyPatch) folder = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.stop_single_recipe", + "workato_platform_cli.cli.commands.recipes.command.stop_single_recipe", single, ) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.stop_project_recipes", + "workato_platform_cli.cli.commands.recipes.command.stop_project_recipes", project, ) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.stop_folder_recipes", + "workato_platform_cli.cli.commands.recipes.command.stop_folder_recipes", folder, ) @@ -469,7 +469,7 @@ async def test_start_project_recipes_delegates_to_folder( start_folder = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.start_folder_recipes", + "workato_platform_cli.cli.commands.recipes.command.start_folder_recipes", start_folder, ) @@ -490,7 +490,7 @@ async def test_start_folder_recipes_handles_success_and_failure( _make_stub(id=2, name="Recipe Two"), ] monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_folder_recipe_assets", + "workato_platform_cli.cli.commands.recipes.command.get_folder_recipe_assets", AsyncMock(return_value=assets), ) @@ -529,7 +529,7 @@ async def test_start_folder_recipes_handles_empty_folder( """No assets produces an informational message.""" monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_folder_recipe_assets", + "workato_platform_cli.cli.commands.recipes.command.get_folder_recipe_assets", AsyncMock(return_value=[]), ) @@ -578,7 +578,7 @@ async def test_stop_project_recipes_delegates(monkeypatch: pytest.MonkeyPatch) - stop_folder = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.stop_folder_recipes", + "workato_platform_cli.cli.commands.recipes.command.stop_folder_recipes", stop_folder, ) @@ -599,7 +599,7 @@ async def test_stop_folder_recipes_iterates_assets( _make_stub(id=2, name="Recipe Two"), ] monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_folder_recipe_assets", + "workato_platform_cli.cli.commands.recipes.command.get_folder_recipe_assets", AsyncMock(return_value=assets), ) @@ -621,7 +621,7 @@ async def test_stop_folder_recipes_no_assets( """No assets triggers informational output.""" monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_folder_recipe_assets", + "workato_platform_cli.cli.commands.recipes.command.get_folder_recipe_assets", AsyncMock(return_value=[]), ) @@ -707,7 +707,7 @@ async def _get_all_recipes_paginated(**kwargs: Any) -> list[Any]: mock_get_all = AsyncMock(side_effect=_get_all_recipes_paginated) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_all_recipes_paginated", + "workato_platform_cli.cli.commands.recipes.command.get_all_recipes_paginated", mock_get_all, ) @@ -725,7 +725,7 @@ async def _list_folders(parent_id: int, page: int, per_page: int) -> list[Any]: raw_recursive = cast(Any, command.get_recipes_recursive).__wrapped__ monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_recipes_recursive", + "workato_platform_cli.cli.commands.recipes.command.get_recipes_recursive", raw_recursive, ) @@ -746,7 +746,7 @@ async def test_get_recipes_recursive_skips_visited( mock_get_all = AsyncMock() monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_all_recipes_paginated", + "workato_platform_cli.cli.commands.recipes.command.get_all_recipes_paginated", mock_get_all, ) @@ -754,7 +754,7 @@ async def test_get_recipes_recursive_skips_visited( raw_recursive = cast(Any, command.get_recipes_recursive).__wrapped__ monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_recipes_recursive", + "workato_platform_cli.cli.commands.recipes.command.get_recipes_recursive", raw_recursive, ) @@ -852,7 +852,7 @@ async def test_list_recipes_no_results( config_manager.load_config.return_value = _make_stub(folder_id=50) monkeypatch.setattr( - "workato_platform.cli.commands.recipes.command.get_all_recipes_paginated", + "workato_platform_cli.cli.commands.recipes.command.get_all_recipes_paginated", AsyncMock(return_value=[]), ) diff --git a/tests/unit/commands/recipes/test_validator.py b/tests/unit/commands/recipes/test_validator.py index a25ce85..e52b2f4 100644 --- a/tests/unit/commands/recipes/test_validator.py +++ b/tests/unit/commands/recipes/test_validator.py @@ -15,7 +15,7 @@ import pytest # Tests cover a wide set of validator helpers; keep imports explicit for clarity. -from workato_platform.cli.commands.recipes.validator import ( +from workato_platform_cli.cli.commands.recipes.validator import ( ErrorType, Keyword, RecipeLine, @@ -27,7 +27,7 @@ if TYPE_CHECKING: - from workato_platform import Workato + from workato_platform_cli import Workato @pytest.fixture diff --git a/tests/unit/commands/test_api_clients.py b/tests/unit/commands/test_api_clients.py index f47ae03..90a26fa 100644 --- a/tests/unit/commands/test_api_clients.py +++ b/tests/unit/commands/test_api_clients.py @@ -7,7 +7,7 @@ from asyncclick.testing import CliRunner -from workato_platform.cli.commands.api_clients import ( +from workato_platform_cli.cli.commands.api_clients import ( api_clients, create, create_key, @@ -21,21 +21,21 @@ validate_create_parameters, validate_ip_address, ) -from workato_platform.client.workato_api.models.api_client import ApiClient -from workato_platform.client.workato_api.models.api_client_api_collections_inner import ( # noqa: E501 +from workato_platform_cli.client.workato_api.models.api_client import ApiClient +from workato_platform_cli.client.workato_api.models.api_client_api_collections_inner import ( # noqa: E501 ApiClientApiCollectionsInner, ) -from workato_platform.client.workato_api.models.api_client_list_response import ( +from workato_platform_cli.client.workato_api.models.api_client_list_response import ( ApiClientListResponse, ) -from workato_platform.client.workato_api.models.api_client_response import ( +from workato_platform_cli.client.workato_api.models.api_client_response import ( ApiClientResponse, ) -from workato_platform.client.workato_api.models.api_key import ApiKey -from workato_platform.client.workato_api.models.api_key_list_response import ( +from workato_platform_cli.client.workato_api.models.api_key import ApiKey +from workato_platform_cli.client.workato_api.models.api_key_list_response import ( ApiKeyListResponse, ) -from workato_platform.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse class TestApiClientsGroup: @@ -214,7 +214,7 @@ def test_display_client_summary_basic(self) -> None: updated_at=datetime(2024, 1, 15, 10, 30, 0), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_client_summary(client) # Verify key information is displayed @@ -239,7 +239,7 @@ def test_display_client_summary_with_collections(self) -> None: updated_at=datetime(2024, 1, 15, 10, 30, 0), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_client_summary(client) # Verify collections are displayed @@ -257,7 +257,7 @@ def test_display_key_summary_basic(self) -> None: active_since=datetime(2024, 1, 15, 12, 0, 0), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify key information is displayed @@ -276,7 +276,7 @@ def test_display_key_summary_with_ip_lists(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify IP lists are displayed @@ -294,7 +294,7 @@ def test_display_key_summary_inactive(self) -> None: active_since=datetime.now(), # active_since is required field ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify inactive status is shown @@ -312,7 +312,7 @@ def test_display_key_summary_truncated_token(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify token is truncated @@ -330,7 +330,7 @@ def test_display_key_summary_short_token(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify full short token is shown @@ -348,7 +348,7 @@ def test_display_key_summary_no_api_key(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: display_key_summary(key) # Verify output is generated @@ -378,8 +378,8 @@ async def test_refresh_api_key_secret_success(self) -> None: ) with ( - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.9 @@ -422,8 +422,8 @@ async def test_refresh_api_key_secret_with_timing(self) -> None: ) with ( - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.5 @@ -461,8 +461,8 @@ async def test_refresh_api_key_secret_with_new_token(self) -> None: ) with ( - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 @@ -502,8 +502,8 @@ async def test_refresh_api_key_secret_different_client_ids(self) -> None: ) with ( - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform.cli.commands.api_clients.click.echo"), + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo"), ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.0 # Return float for timing @@ -570,7 +570,7 @@ def test_validate_create_parameters_email_without_portal() -> None: def test_parse_ip_list_invalid_ip() -> None: """Test parse_ip_list with invalid IP addresses.""" - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: result = parse_ip_list("192.168.1.1,invalid_ip", "allow") # Should return None due to invalid IP @@ -593,7 +593,7 @@ def test_parse_ip_list_empty_ips() -> None: @pytest.mark.asyncio async def test_create_key_invalid_allow_list() -> None: """Test create-key command with invalid IP allow list.""" - with patch("workato_platform.cli.commands.api_clients.parse_ip_list") as mock_parse: + with patch("workato_platform_cli.cli.commands.api_clients.parse_ip_list") as mock_parse: mock_parse.return_value = None # Simulate parse failure assert create_key.callback result = await create_key.callback( @@ -612,7 +612,7 @@ async def test_create_key_invalid_allow_list() -> None: @pytest.mark.asyncio async def test_create_key_invalid_deny_list() -> None: """Test create-key command with invalid IP deny list.""" - with patch("workato_platform.cli.commands.api_clients.parse_ip_list") as mock_parse: + with patch("workato_platform_cli.cli.commands.api_clients.parse_ip_list") as mock_parse: # Return valid list for allow list, None for deny list mock_parse.side_effect = [["192.168.1.1"], None] @@ -642,8 +642,8 @@ async def test_create_key_no_api_key_in_response() -> None: mock_client.api_platform_api.create_api_key = AsyncMock(return_value=mock_response) with ( - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, ): mock_spinner.return_value.stop.return_value = 1.0 @@ -674,8 +674,8 @@ async def test_create_key_with_deny_list() -> None: mock_client.api_platform_api.create_api_key = AsyncMock(return_value=mock_response) with ( - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, ): mock_spinner.return_value.stop.return_value = 1.0 @@ -710,8 +710,8 @@ async def test_list_api_clients_empty() -> None: ) with ( - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, ): mock_spinner.return_value.stop.return_value = 1.0 @@ -732,8 +732,8 @@ async def test_list_api_keys_empty() -> None: mock_client.api_platform_api.list_api_keys = AsyncMock(return_value=mock_response) with ( - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, - patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, ): mock_spinner.return_value.stop.return_value = 1.0 @@ -785,7 +785,7 @@ async def test_create_success_minimal( mock_response ) - with patch("workato_platform.cli.commands.api_clients.Spinner") as mock_spinner: + with patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 mock_spinner.return_value = mock_spinner_instance @@ -852,7 +852,7 @@ async def test_create_command_callback_direct(self) -> None: mock_response ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: # Call the callback directly, passing workato_api_client as parameter assert create.callback await create.callback( @@ -909,7 +909,7 @@ async def test_create_key_command_callback_direct(self) -> None: mock_workato_client = AsyncMock() mock_workato_client.api_platform_api.create_api_key.return_value = mock_response - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: assert create_key.callback await create_key.callback( api_client_id=123, @@ -954,7 +954,7 @@ async def test_list_api_clients_callback_direct(self) -> None: mock_response ) - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: assert list_api_clients.callback await list_api_clients.callback( project_id=None, @@ -986,7 +986,7 @@ async def test_list_api_keys_callback_direct(self) -> None: mock_workato_client = AsyncMock() mock_workato_client.api_platform_api.list_api_keys.return_value = mock_response - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: assert list_api_keys.callback await list_api_keys.callback( api_client_id=123, @@ -1005,7 +1005,7 @@ async def test_list_api_keys_callback_direct(self) -> None: async def test_refresh_secret_with_cli_runner(self) -> None: """Test refresh-secret command using CliRunner since it has no injection.""" with patch( - "workato_platform.cli.commands.api_clients.refresh_api_key_secret" + "workato_platform_cli.cli.commands.api_clients.refresh_api_key_secret" ) as mock_refresh: runner = CliRunner() result = await runner.invoke( @@ -1024,7 +1024,7 @@ async def test_create_with_validation_errors(self) -> None: """Test create command with validation errors to hit error handling paths.""" mock_workato_client = AsyncMock() - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: # Call with invalid parameters that trigger validation errors assert create.callback await create.callback( @@ -1057,7 +1057,7 @@ async def test_create_with_invalid_collection_ids(self) -> None: """Test create command with invalid collection IDs.""" mock_workato_client = AsyncMock() - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: assert create.callback await create.callback( name="Test Client", @@ -1089,13 +1089,13 @@ async def test_create_with_invalid_collection_ids(self) -> None: def test_parse_ip_list_invalid_cidr() -> None: """Test parse_ip_list with invalid CIDR values.""" - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: # Test CIDR > 32 result = parse_ip_list("192.168.1.1/33", "allow") assert result is None mock_echo.assert_called() - with patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: # Test CIDR < 0 result = parse_ip_list("192.168.1.1/-1", "allow") assert result is None @@ -1106,9 +1106,9 @@ def test_parse_ip_list_invalid_cidr() -> None: async def test_refresh_secret_user_cancels() -> None: """Test refresh_secret when user cancels the confirmation.""" with ( - patch("workato_platform.cli.commands.api_clients.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, patch( - "workato_platform.cli.commands.api_clients.click.confirm", + "workato_platform_cli.cli.commands.api_clients.click.confirm", return_value=False, ) as mock_confirm, ): diff --git a/tests/unit/commands/test_api_collections.py b/tests/unit/commands/test_api_collections.py index 26a8844..4d83c92 100644 --- a/tests/unit/commands/test_api_collections.py +++ b/tests/unit/commands/test_api_collections.py @@ -8,7 +8,7 @@ import pytest -from workato_platform.cli.commands.api_collections import ( +from workato_platform_cli.cli.commands.api_collections import ( api_collections, create, display_collection_summary, @@ -19,9 +19,9 @@ list_collections, list_endpoints, ) -from workato_platform.client.workato_api.models.api_collection import ApiCollection -from workato_platform.client.workato_api.models.api_endpoint import ApiEndpoint -from workato_platform.client.workato_api.models.open_api_spec import OpenApiSpec +from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection +from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint +from workato_platform_cli.client.workato_api.models.open_api_spec import OpenApiSpec class TestApiCollectionsGroup: @@ -95,7 +95,7 @@ async def test_create_success_with_file_json( try: with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 @@ -151,7 +151,7 @@ async def test_create_success_with_file_yaml( try: with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 @@ -198,14 +198,14 @@ async def test_create_success_with_url( ) with patch( - "workato_platform.cli.commands.api_collections.aiohttp.ClientSession" + "workato_platform_cli.cli.commands.api_collections.aiohttp.ClientSession" ) as mock_session: mock_session.return_value.__aenter__.return_value.get.return_value = ( mock_response ) with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 2.0 @@ -241,7 +241,7 @@ async def test_create_no_project_id( mock_config_manager.load_config.return_value = MagicMock(project_id=None) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( @@ -268,7 +268,7 @@ async def test_create_file_not_found( ) -> None: """Test create when file doesn't exist.""" with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( @@ -303,7 +303,7 @@ async def test_create_file_read_error( os.chmod(temp_file_path, 0o000) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( @@ -347,7 +347,7 @@ async def test_create_uses_project_name_as_default( try: with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.0 @@ -398,7 +398,7 @@ async def test_create_uses_default_name_when_project_name_none( try: with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.0 @@ -475,14 +475,14 @@ async def test_list_collections_success( ) with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.api_collections.display_collection_summary" + "workato_platform_cli.cli.commands.api_collections.display_collection_summary" ) as mock_display: assert list_collections.callback await list_collections.callback( @@ -500,14 +500,14 @@ async def test_list_collections_empty(self, mock_workato_client: AsyncMock) -> N mock_workato_client.api_platform_api.list_api_collections.return_value = [] with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.8 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert list_collections.callback await list_collections.callback( @@ -522,7 +522,7 @@ async def test_list_collections_per_page_limit_exceeded( ) -> None: """Test listing with per_page limit exceeded.""" with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert list_collections.callback await list_collections.callback( @@ -560,7 +560,7 @@ async def test_list_collections_pagination_info( ) with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.0 @@ -568,10 +568,10 @@ async def test_list_collections_pagination_info( with ( patch( - "workato_platform.cli.commands.api_collections.display_collection_summary" + "workato_platform_cli.cli.commands.api_collections.display_collection_summary" ), patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): assert list_collections.callback @@ -644,14 +644,14 @@ async def test_list_endpoints_success( ) with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.api_collections.display_endpoint_summary" + "workato_platform_cli.cli.commands.api_collections.display_endpoint_summary" ) as mock_display: assert list_endpoints.callback await list_endpoints.callback( @@ -668,14 +668,14 @@ async def test_list_endpoints_empty(self, mock_workato_client: AsyncMock) -> Non mock_workato_client.api_platform_api.list_api_endpoints.return_value = [] with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.5 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert list_endpoints.callback await list_endpoints.callback( @@ -733,14 +733,14 @@ async def test_list_endpoints_pagination( ] with patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 2.0 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.api_collections.display_endpoint_summary" + "workato_platform_cli.cli.commands.api_collections.display_endpoint_summary" ): assert list_endpoints.callback await list_endpoints.callback( @@ -778,7 +778,7 @@ async def test_enable_endpoint_single_success( ) -> None: """Test enabling a single endpoint successfully.""" with patch( - "workato_platform.cli.commands.api_collections.enable_api_endpoint" + "workato_platform_cli.cli.commands.api_collections.enable_api_endpoint" ) as mock_enable: assert enable_endpoint.callback await enable_endpoint.callback( @@ -793,7 +793,7 @@ async def test_enable_endpoint_all_success( ) -> None: """Test enabling all endpoints in collection successfully.""" with patch( - "workato_platform.cli.commands.api_collections.enable_all_endpoints_in_collection" + "workato_platform_cli.cli.commands.api_collections.enable_all_endpoints_in_collection" ) as mock_enable_all: assert enable_endpoint.callback await enable_endpoint.callback( @@ -806,7 +806,7 @@ async def test_enable_endpoint_all_success( async def test_enable_endpoint_all_without_collection_id(self) -> None: """Test enabling all endpoints without collection ID fails.""" with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert enable_endpoint.callback await enable_endpoint.callback( @@ -819,7 +819,7 @@ async def test_enable_endpoint_all_without_collection_id(self) -> None: async def test_enable_endpoint_all_with_endpoint_id(self) -> None: """Test enabling all endpoints with endpoint ID fails.""" with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert enable_endpoint.callback await enable_endpoint.callback( @@ -834,7 +834,7 @@ async def test_enable_endpoint_all_with_endpoint_id(self) -> None: async def test_enable_endpoint_no_parameters(self) -> None: """Test enabling endpoint with no parameters fails.""" with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert enable_endpoint.callback await enable_endpoint.callback( @@ -918,10 +918,10 @@ async def test_enable_all_endpoints_success( with ( patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): mock_spinner_instance = MagicMock() @@ -953,10 +953,10 @@ async def test_enable_all_endpoints_no_endpoints( with ( patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): mock_spinner_instance = MagicMock() @@ -1011,10 +1011,10 @@ async def test_enable_all_endpoints_all_already_enabled( with ( patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): mock_spinner_instance = MagicMock() @@ -1053,10 +1053,10 @@ async def mock_enable_side_effect(api_endpoint_id: int) -> None: with ( patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): mock_spinner_instance = MagicMock() @@ -1093,10 +1093,10 @@ async def test_enable_api_endpoint_success( """Test successfully enabling a single API endpoint.""" with ( patch( - "workato_platform.cli.commands.api_collections.Spinner" + "workato_platform_cli.cli.commands.api_collections.Spinner" ) as mock_spinner, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): mock_spinner_instance = MagicMock() @@ -1134,7 +1134,7 @@ def test_display_endpoint_summary_active(self) -> None: ) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: display_endpoint_summary(endpoint) @@ -1166,7 +1166,7 @@ def test_display_endpoint_summary_disabled_with_legacy(self) -> None: ) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: display_endpoint_summary(endpoint) @@ -1188,7 +1188,7 @@ def test_display_collection_summary(self) -> None: ) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: display_collection_summary(collection) @@ -1218,7 +1218,7 @@ def test_display_collection_summary_no_updated_at(self) -> None: ) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: display_collection_summary(collection) @@ -1244,7 +1244,7 @@ def test_display_collection_summary_short_urls(self) -> None: ) with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: display_collection_summary(collection) @@ -1294,7 +1294,7 @@ async def test_create_command_callback_success_json(self) -> None: try: with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( @@ -1334,7 +1334,7 @@ async def test_create_command_callback_no_project_id(self) -> None: mock_workato_client = AsyncMock() with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( @@ -1385,10 +1385,10 @@ async def test_list_collections_callback_success(self) -> None: with ( patch( - "workato_platform.cli.commands.api_collections.display_collection_summary" + "workato_platform_cli.cli.commands.api_collections.display_collection_summary" ) as mock_display, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): assert list_collections.callback @@ -1415,7 +1415,7 @@ async def test_list_collections_callback_per_page_limit(self) -> None: mock_workato_client = AsyncMock() with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert list_collections.callback await list_collections.callback( @@ -1454,10 +1454,10 @@ async def test_list_endpoints_callback_success(self) -> None: with ( patch( - "workato_platform.cli.commands.api_collections.display_endpoint_summary" + "workato_platform_cli.cli.commands.api_collections.display_endpoint_summary" ) as mock_display, patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo, ): assert list_endpoints.callback @@ -1487,7 +1487,7 @@ async def test_create_command_callback_file_not_found(self) -> None: mock_workato_client = AsyncMock() with patch( - "workato_platform.cli.commands.api_collections.click.echo" + "workato_platform_cli.cli.commands.api_collections.click.echo" ) as mock_echo: assert create.callback await create.callback( diff --git a/tests/unit/commands/test_assets.py b/tests/unit/commands/test_assets.py index f52a363..cd06760 100644 --- a/tests/unit/commands/test_assets.py +++ b/tests/unit/commands/test_assets.py @@ -4,8 +4,8 @@ import pytest -from workato_platform.cli.commands.assets import assets -from workato_platform.cli.utils.config import ConfigData +from workato_platform_cli.cli.commands.assets import assets +from workato_platform_cli.cli.utils.config import ConfigData class DummySpinner: @@ -22,7 +22,7 @@ def stop(self) -> float: @pytest.mark.asyncio async def test_assets_lists_grouped_results(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.assets.Spinner", + "workato_platform_cli.cli.commands.assets.Spinner", DummySpinner, ) @@ -37,7 +37,7 @@ async def test_assets_lists_grouped_results(monkeypatch: pytest.MonkeyPatch) -> captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.assets.click.echo", + "workato_platform_cli.cli.commands.assets.click.echo", lambda msg="": captured.append(msg), ) @@ -72,7 +72,7 @@ async def test_assets_missing_folder(monkeypatch: pytest.MonkeyPatch) -> None: captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.assets.click.echo", + "workato_platform_cli.cli.commands.assets.click.echo", lambda msg="": captured.append(msg), ) diff --git a/tests/unit/commands/test_connections.py b/tests/unit/commands/test_connections.py index 3e03a00..b66e954 100644 --- a/tests/unit/commands/test_connections.py +++ b/tests/unit/commands/test_connections.py @@ -6,9 +6,9 @@ from asyncclick.testing import CliRunner -from workato_platform import Workato -from workato_platform.cli import cli -from workato_platform.cli.commands.connections import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli import cli +from workato_platform_cli.cli.commands.connections import ( OAUTH_TIMEOUT, _get_callback_url_from_api_host, connections, @@ -29,10 +29,10 @@ update, update_connection, ) -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.client.workato_api.models.connection import Connection -from workato_platform.client.workato_api.models.connection_update_request import ( +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.client.workato_api.models.connection import Connection +from workato_platform_cli.client.workato_api.models.connection_update_request import ( ConnectionUpdateRequest, ) @@ -55,7 +55,7 @@ async def test_connections_command_group_exists(self) -> None: assert result.exit_code == 0 assert "connection" in result.output.lower() - @patch("workato_platform.cli.commands.connections.Container") + @patch("workato_platform_cli.cli.commands.connections.Container") @pytest.mark.asyncio async def test_connections_create_oauth_command(self, mock_container: Mock) -> None: """Test the create-oauth subcommand.""" @@ -68,7 +68,7 @@ async def test_connections_create_oauth_command(self, mock_container: Mock) -> N ) mock_container_instance = Mock() - mock_container_instance.workato_platform.client.return_value = ( + mock_container_instance.workato_platform_cli.client.return_value = ( mock_workato_client ) mock_container.return_value = mock_container_instance @@ -89,7 +89,7 @@ async def test_connections_create_oauth_command(self, mock_container: Mock) -> N # Should not fail with command not found assert "No such command" not in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_list_command(self, mock_container: Mock) -> None: """Test the list command through CLI.""" @@ -111,7 +111,7 @@ async def test_connections_list_command(self, mock_container: Mock) -> None: # Should not crash and command should be found assert "No such command" not in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_list_with_filters(self, mock_container: Mock) -> None: """Test the list subcommand with filters.""" @@ -132,7 +132,7 @@ async def test_connections_list_with_filters(self, mock_container: Mock) -> None # Should not crash and command should be found assert "No such command" not in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_get_oauth_url_command( self, mock_container: Mock @@ -155,7 +155,7 @@ async def test_connections_get_oauth_url_command( # Should not crash and command should be found assert "No such command" not in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_pick_list_command(self, mock_container: Mock) -> None: """Test the pick-list subcommand.""" @@ -185,7 +185,7 @@ async def test_connections_pick_list_command(self, mock_container: Mock) -> None # Should not crash and command should be found assert "No such command" not in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_pick_lists_command(self, mock_container: Mock) -> None: """Test the pick-lists subcommand.""" @@ -214,7 +214,7 @@ async def test_connections_create_oauth_command_help(self) -> None: assert result.exit_code == 0 assert "Create an OAuth runtime user connection" in result.output - @patch("workato_platform.cli.containers.Container") + @patch("workato_platform_cli.cli.containers.Container") @pytest.mark.asyncio async def test_connections_update_command(self, mock_container: Mock) -> None: """Test the update subcommand.""" @@ -244,7 +244,7 @@ async def test_connections_update_command(self, mock_container: Mock) -> None: # Should not crash and command should be found assert "No such command" not in result.output - @patch("workato_platform.cli.commands.connections.Container") + @patch("workato_platform_cli.cli.commands.connections.Container") @pytest.mark.asyncio async def test_connections_error_handling(self, mock_container: Mock) -> None: """Test error handling in connections commands.""" @@ -254,7 +254,7 @@ async def test_connections_error_handling(self, mock_container: Mock) -> None: ) mock_container_instance = Mock() - mock_container_instance.workato_platform.client.return_value = ( + mock_container_instance.workato_platform_cli.client.return_value = ( mock_workato_client ) mock_container.return_value = mock_container_instance @@ -269,7 +269,7 @@ async def test_connections_error_handling(self, mock_container: Mock) -> None: async def test_connections_helper_functions(self) -> None: """Test helper functions in connections module.""" # Test helper functions that might exist - from workato_platform.cli.commands.connections import ( + from workato_platform_cli.cli.commands.connections import ( is_custom_connector_oauth, is_platform_oauth_provider, ) @@ -278,17 +278,17 @@ async def test_connections_helper_functions(self) -> None: assert callable(is_platform_oauth_provider) assert callable(is_custom_connector_oauth) - @patch("workato_platform.cli.commands.connections.Container") + @patch("workato_platform_cli.cli.commands.connections.Container") @pytest.mark.asyncio async def test_connections_oauth_polling(self, mock_container: Mock) -> None: """Test OAuth connection status polling.""" # Mock polling function if it exists try: - from workato_platform.cli.commands.connections import ( + from workato_platform_cli.cli.commands.connections import ( poll_oauth_connection_status, ) - with patch("workato_platform.cli.commands.connections.time.sleep"): + with patch("workato_platform_cli.cli.commands.connections.time.sleep"): # Should be callable without error assert callable(poll_oauth_connection_status) @@ -333,7 +333,7 @@ def test_get_callback_url_from_api_host_other_domain(self) -> None: def test_get_callback_url_from_api_host_parse_failure(self) -> None: """Test _get_callback_url_from_api_host when urlparse raises.""" with patch( - "workato_platform.cli.commands.connections.urlparse", + "workato_platform_cli.cli.commands.connections.urlparse", side_effect=ValueError("bad url"), ): result = _get_callback_url_from_api_host("https://anything") @@ -381,8 +381,8 @@ async def test_requires_oauth_flow_none_provider(self) -> None: result = await requires_oauth_flow("") assert result is False - @patch("workato_platform.cli.commands.connections.is_platform_oauth_provider") - @patch("workato_platform.cli.commands.connections.is_custom_connector_oauth") + @patch("workato_platform_cli.cli.commands.connections.is_platform_oauth_provider") + @patch("workato_platform_cli.cli.commands.connections.is_custom_connector_oauth") @pytest.mark.asyncio async def test_requires_oauth_flow_platform_oauth( self, mock_custom: Mock, mock_platform: Mock @@ -394,8 +394,8 @@ async def test_requires_oauth_flow_platform_oauth( result = await requires_oauth_flow("salesforce") assert result is True - @patch("workato_platform.cli.commands.connections.is_platform_oauth_provider") - @patch("workato_platform.cli.commands.connections.is_custom_connector_oauth") + @patch("workato_platform_cli.cli.commands.connections.is_platform_oauth_provider") + @patch("workato_platform_cli.cli.commands.connections.is_custom_connector_oauth") @pytest.mark.asyncio async def test_requires_oauth_flow_custom_oauth( self, mock_custom: Mock, mock_platform: Mock @@ -508,10 +508,10 @@ def test_group_connections_by_provider(self) -> None: assert len(result["Hubspot"]) == 1 assert len(result["Custom"]) == 1 - @patch("workato_platform.cli.commands.connections.click.echo") + @patch("workato_platform_cli.cli.commands.connections.click.echo") def test_display_connection_summary(self, mock_echo: Mock) -> None: """Test display_connection_summary function.""" - from workato_platform.client.workato_api.models.connection import Connection + from workato_platform_cli.client.workato_api.models.connection import Connection connection = Mock(spec=Connection) connection.name = "Test Connection" @@ -528,7 +528,7 @@ def test_display_connection_summary(self, mock_echo: Mock) -> None: # Verify echo was called multiple times assert mock_echo.call_count > 0 - @patch("workato_platform.cli.commands.connections.click.echo") + @patch("workato_platform_cli.cli.commands.connections.click.echo") def test_show_connection_statistics(self, mock_echo: Mock) -> None: """Test show_connection_statistics function.""" # Create mock connections with proper attributes @@ -558,7 +558,7 @@ class TestConnectionCreationEdgeCases: @pytest.mark.asyncio async def test_create_missing_provider_and_name(self) -> None: """Test create command with missing provider and name.""" - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert create.callback await create.callback( name="", @@ -580,7 +580,7 @@ async def test_create_invalid_json_input(self) -> None: load_config=Mock(return_value=make_stub(folder_id=123)) ) - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert create.callback await create.callback( name="Test", @@ -611,14 +611,14 @@ async def test_create_oauth_browser_error(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.webbrowser.open", + "workato_platform_cli.cli.commands.connections.webbrowser.open", side_effect=OSError("Browser error"), ), patch( - "workato_platform.cli.commands.connections.poll_oauth_connection_status", + "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): assert create_oauth.callback await create_oauth.callback( @@ -643,7 +643,7 @@ async def test_create_oauth_missing_folder_id(self) -> None: api_host="https://www.workato.com", ) - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert create_oauth.callback await create_oauth.callback( parent_id=1, @@ -681,14 +681,14 @@ async def test_create_oauth_opens_browser_success(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.webbrowser.open", + "workato_platform_cli.cli.commands.connections.webbrowser.open", return_value=True, ), patch( - "workato_platform.cli.commands.connections.poll_oauth_connection_status", + "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): assert create_oauth.callback await create_oauth.callback( @@ -722,14 +722,14 @@ async def test_get_oauth_url_browser_error(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), patch( - "workato_platform.cli.commands.connections.webbrowser.open", + "workato_platform_cli.cli.commands.connections.webbrowser.open", side_effect=OSError("Browser error"), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await get_connection_oauth_url( connection_id=123, @@ -772,10 +772,10 @@ async def test_update_connection_unauthorized_status(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await update_connection( 123, @@ -827,10 +827,10 @@ async def test_update_connection_authorized_status(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await update_connection( 77, @@ -852,7 +852,7 @@ async def test_update_connection_authorized_status(self) -> None: @pytest.mark.asyncio async def test_update_command_invalid_json(self) -> None: """Test update command handles invalid JSON input.""" - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert update.callback await update.callback( connection_id=5, @@ -870,7 +870,7 @@ async def test_update_command_invalid_json(self) -> None: async def test_update_command_invokes_update_connection(self) -> None: """Test update command builds request and invokes update_connection.""" with patch( - "workato_platform.cli.commands.connections.update_connection", + "workato_platform_cli.cli.commands.connections.update_connection", new=AsyncMock(), ) as mock_update: assert update.callback @@ -902,7 +902,7 @@ async def test_create_missing_folder_id(self) -> None: load_config=Mock(return_value=make_stub(folder_id=None)) ) - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert create.callback await create.callback( name="Test", @@ -945,18 +945,18 @@ async def test_create_oauth_success_flow(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.requires_oauth_flow", + "workato_platform_cli.cli.commands.connections.requires_oauth_flow", new=AsyncMock(return_value=True), ), patch( - "workato_platform.cli.commands.connections.get_connection_oauth_url", + "workato_platform_cli.cli.commands.connections.get_connection_oauth_url", new=AsyncMock(), ) as mock_oauth_url, patch( - "workato_platform.cli.commands.connections.poll_oauth_connection_status", + "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): assert create.callback await create.callback( @@ -1001,22 +1001,22 @@ async def test_create_oauth_manual_fallback(self) -> None: with ( patch( - "workato_platform.cli.commands.connections.requires_oauth_flow", + "workato_platform_cli.cli.commands.connections.requires_oauth_flow", new=AsyncMock(return_value=True), ), patch( - "workato_platform.cli.commands.connections.get_connection_oauth_url", + "workato_platform_cli.cli.commands.connections.get_connection_oauth_url", new=AsyncMock(side_effect=RuntimeError("no url")), ), patch( - "workato_platform.cli.commands.connections.poll_oauth_connection_status", + "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), patch( - "workato_platform.cli.commands.connections.webbrowser.open", + "workato_platform_cli.cli.commands.connections.webbrowser.open", side_effect=OSError("browser blocked"), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): assert create.callback await create.callback( @@ -1041,7 +1041,7 @@ class TestPicklistFunctions: @pytest.mark.asyncio async def test_pick_list_invalid_json_params(self) -> None: """Test pick_list command with invalid JSON params.""" - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert pick_list.callback await pick_list.callback( id=123, @@ -1057,15 +1057,15 @@ async def test_pick_list_invalid_json_params(self) -> None: ] assert any("Invalid JSON" in message for message in messages) - @patch("workato_platform.cli.commands.connections.Path.exists") - @patch("workato_platform.cli.commands.connections.open") + @patch("workato_platform_cli.cli.commands.connections.Path.exists") + @patch("workato_platform_cli.cli.commands.connections.open") def test_pick_lists_data_file_not_found( self, mock_open: Mock, mock_exists: Mock ) -> None: """Test pick_lists command when data file doesn't exist.""" mock_exists.return_value = False - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert pick_lists.callback pick_lists.callback() @@ -1076,8 +1076,8 @@ def test_pick_lists_data_file_not_found( ] assert any("Picklist data not found" in message for message in messages) - @patch("workato_platform.cli.commands.connections.Path.exists") - @patch("workato_platform.cli.commands.connections.open") + @patch("workato_platform_cli.cli.commands.connections.Path.exists") + @patch("workato_platform_cli.cli.commands.connections.open") def test_pick_lists_data_file_load_error( self, mock_open: Mock, mock_exists: Mock ) -> None: @@ -1085,7 +1085,7 @@ def test_pick_lists_data_file_load_error( mock_exists.return_value = True mock_open.side_effect = PermissionError("Permission denied") - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert pick_lists.callback pick_lists.callback() @@ -1096,8 +1096,8 @@ def test_pick_lists_data_file_load_error( ] assert any("Failed to load picklist data" in message for message in messages) - @patch("workato_platform.cli.commands.connections.Path.exists") - @patch("workato_platform.cli.commands.connections.open") + @patch("workato_platform_cli.cli.commands.connections.Path.exists") + @patch("workato_platform_cli.cli.commands.connections.open") def test_pick_lists_adapter_not_found( self, mock_open: Mock, mock_exists: Mock ) -> None: @@ -1107,7 +1107,7 @@ def test_pick_lists_adapter_not_found( '{"salesforce": []}' ) - with patch("workato_platform.cli.commands.connections.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: assert pick_lists.callback pick_lists.callback(adapter="nonexistent") @@ -1122,7 +1122,7 @@ def test_pick_lists_adapter_not_found( class TestOAuthPolling: """Test OAuth polling functionality.""" - @patch("workato_platform.cli.commands.connections.time.sleep") + @patch("workato_platform_cli.cli.commands.connections.time.sleep") @pytest.mark.asyncio async def test_poll_oauth_connection_status_connection_not_found( self, mock_sleep: Mock @@ -1144,10 +1144,10 @@ async def test_poll_oauth_connection_status_connection_not_found( with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await poll_oauth_connection_status( 123, @@ -1158,7 +1158,7 @@ async def test_poll_oauth_connection_status_connection_not_found( assert any("not found" in call.args[0] for call in mock_echo.call_args_list) - @patch("workato_platform.cli.commands.connections.time.sleep") + @patch("workato_platform_cli.cli.commands.connections.time.sleep") @pytest.mark.asyncio async def test_poll_oauth_connection_status_timeout(self, mock_sleep: Mock) -> None: """Test OAuth polling timeout scenario.""" @@ -1188,14 +1188,14 @@ async def test_poll_oauth_connection_status_timeout(self, mock_sleep: Mock) -> N with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), patch( - "workato_platform.cli.commands.connections.time.time", + "workato_platform_cli.cli.commands.connections.time.time", side_effect=lambda: next(time_values), ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await poll_oauth_connection_status( 123, @@ -1206,7 +1206,7 @@ async def test_poll_oauth_connection_status_timeout(self, mock_sleep: Mock) -> N assert any("Timeout" in call.args[0] for call in mock_echo.call_args_list) - @patch("workato_platform.cli.commands.connections.time.sleep") + @patch("workato_platform_cli.cli.commands.connections.time.sleep") @pytest.mark.asyncio async def test_poll_oauth_connection_status_keyboard_interrupt( self, mock_sleep: Mock @@ -1236,10 +1236,10 @@ async def test_poll_oauth_connection_status_keyboard_interrupt( with ( patch( - "workato_platform.cli.commands.connections.Spinner", + "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform.cli.commands.connections.click.echo") as mock_echo, + patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, ): await poll_oauth_connection_status( 123, @@ -1259,7 +1259,7 @@ async def test_poll_oauth_connection_status_keyboard_interrupt( class TestConnectionListFilters: """Test connection listing with various filters.""" - @patch("workato_platform.cli.commands.connections.Container") + @patch("workato_platform_cli.cli.commands.connections.Container") @pytest.mark.asyncio async def test_list_connections_with_filters(self, mock_container: Mock) -> None: """Test list_connections with various filter combinations.""" diff --git a/tests/unit/commands/test_data_tables.py b/tests/unit/commands/test_data_tables.py index 060cbc7..189b766 100644 --- a/tests/unit/commands/test_data_tables.py +++ b/tests/unit/commands/test_data_tables.py @@ -7,13 +7,13 @@ import pytest -from workato_platform.cli.commands.data_tables import ( +from workato_platform_cli.cli.commands.data_tables import ( create_data_table, create_table, list_data_tables, validate_schema, ) -from workato_platform.client.workato_api.models.data_table_column_request import ( +from workato_platform_cli.client.workato_api.models.data_table_column_request import ( DataTableColumnRequest, ) @@ -96,13 +96,13 @@ async def test_list_data_tables_success( mock_response ) - with patch("workato_platform.cli.commands.data_tables.Spinner") as mock_spinner: + with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.data_tables.display_table_summary" + "workato_platform_cli.cli.commands.data_tables.display_table_summary" ) as mock_display: assert list_data_tables.callback await list_data_tables.callback(workato_api_client=mock_workato_client) @@ -119,13 +119,13 @@ async def test_list_data_tables_empty(self, mock_workato_client: AsyncMock) -> N mock_response ) - with patch("workato_platform.cli.commands.data_tables.Spinner") as mock_spinner: + with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.8 mock_spinner.return_value = mock_spinner_instance with patch( - "workato_platform.cli.commands.data_tables.click.echo" + "workato_platform_cli.cli.commands.data_tables.click.echo" ) as mock_echo: assert list_data_tables.callback await list_data_tables.callback(workato_api_client=mock_workato_client) @@ -219,7 +219,7 @@ async def test_create_data_table_success( ) -> None: """Test successful data table creation.""" with patch( - "workato_platform.cli.commands.data_tables.create_table" + "workato_platform_cli.cli.commands.data_tables.create_table" ) as mock_create: assert create_data_table.callback await create_data_table.callback( @@ -247,7 +247,7 @@ async def test_create_data_table_with_explicit_folder_id( ) -> None: """Test data table creation with explicit folder ID.""" with patch( - "workato_platform.cli.commands.data_tables.create_table" + "workato_platform_cli.cli.commands.data_tables.create_table" ) as mock_create: assert create_data_table.callback await create_data_table.callback( @@ -271,7 +271,7 @@ async def test_create_data_table_invalid_json( mock_config_manager: MagicMock, ) -> None: """Test data table creation with invalid JSON.""" - with patch("workato_platform.cli.commands.data_tables.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -290,7 +290,7 @@ async def test_create_data_table_non_list_schema( mock_config_manager: MagicMock, ) -> None: """Test data table creation with non-list schema.""" - with patch("workato_platform.cli.commands.data_tables.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -311,7 +311,7 @@ async def test_create_data_table_no_folder_id( mock_config.folder_id = None mock_config_manager.load_config.return_value = mock_config - with patch("workato_platform.cli.commands.data_tables.click.echo") as mock_echo: + with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -345,7 +345,7 @@ async def test_create_table_function( ) ] - with patch("workato_platform.cli.commands.data_tables.Spinner") as mock_spinner: + with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 mock_spinner.return_value = mock_spinner_instance diff --git a/tests/unit/commands/test_guide.py b/tests/unit/commands/test_guide.py index 3ea6142..146647c 100644 --- a/tests/unit/commands/test_guide.py +++ b/tests/unit/commands/test_guide.py @@ -6,7 +6,7 @@ import pytest -from workato_platform.cli.commands import guide +from workato_platform_cli.cli.commands import guide @pytest.fixture diff --git a/tests/unit/commands/test_init.py b/tests/unit/commands/test_init.py index 974185a..9f47adc 100644 --- a/tests/unit/commands/test_init.py +++ b/tests/unit/commands/test_init.py @@ -9,7 +9,7 @@ import asyncclick as click import pytest -from workato_platform.cli.commands import init as init_module +from workato_platform_cli.cli.commands import init as init_module @pytest.mark.asyncio diff --git a/tests/unit/commands/test_profiles.py b/tests/unit/commands/test_profiles.py index f8adc35..03d96ed 100644 --- a/tests/unit/commands/test_profiles.py +++ b/tests/unit/commands/test_profiles.py @@ -8,14 +8,14 @@ import pytest -from workato_platform.cli.commands.profiles import ( +from workato_platform_cli.cli.commands.profiles import ( delete, list_profiles, show, status, use, ) -from workato_platform.cli.utils.config import ConfigData, ProfileData +from workato_platform_cli.cli.utils.config import ConfigData, ProfileData @pytest.fixture @@ -416,7 +416,7 @@ async def test_delete_handles_failure( def test_profiles_group_exists() -> None: """Test that the profiles group command exists.""" - from workato_platform.cli.commands.profiles import profiles + from workato_platform_cli.cli.commands.profiles import profiles # Test that the profiles group function exists and is callable assert callable(profiles) @@ -482,7 +482,7 @@ async def test_use_updates_both_workspace_and_project_configs( # Mock ConfigManager constructor for project config with patch( - "workato_platform.cli.commands.profiles.ConfigManager", + "workato_platform_cli.cli.commands.profiles.ConfigManager", return_value=project_config_manager, ): assert use.callback diff --git a/tests/unit/commands/test_properties.py b/tests/unit/commands/test_properties.py index 21b9094..9a434ae 100644 --- a/tests/unit/commands/test_properties.py +++ b/tests/unit/commands/test_properties.py @@ -4,12 +4,12 @@ import pytest -from workato_platform.cli.commands.properties import ( +from workato_platform_cli.cli.commands.properties import ( list_properties, properties, upsert_properties, ) -from workato_platform.cli.utils.config import ConfigData +from workato_platform_cli.cli.utils.config import ConfigData class DummySpinner: @@ -29,7 +29,7 @@ def stop(self) -> float: @pytest.mark.asyncio async def test_list_properties_success(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -39,7 +39,7 @@ async def test_list_properties_success(monkeypatch: pytest.MonkeyPatch) -> None: captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -72,7 +72,7 @@ async def test_list_properties_success(monkeypatch: pytest.MonkeyPatch) -> None: @pytest.mark.asyncio async def test_list_properties_missing_project(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -80,7 +80,7 @@ async def test_list_properties_missing_project(monkeypatch: pytest.MonkeyPatch) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -102,14 +102,14 @@ async def test_upsert_properties_invalid_format( monkeypatch: pytest.MonkeyPatch, ) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) config_manager = Mock() captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -130,7 +130,7 @@ async def test_upsert_properties_invalid_format( @pytest.mark.asyncio async def test_upsert_properties_success(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -140,7 +140,7 @@ async def test_upsert_properties_success(monkeypatch: pytest.MonkeyPatch) -> Non captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -171,7 +171,7 @@ async def test_upsert_properties_success(monkeypatch: pytest.MonkeyPatch) -> Non @pytest.mark.asyncio async def test_upsert_properties_failure(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -181,7 +181,7 @@ async def test_upsert_properties_failure(monkeypatch: pytest.MonkeyPatch) -> Non captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -210,7 +210,7 @@ async def test_upsert_properties_failure(monkeypatch: pytest.MonkeyPatch) -> Non async def test_list_properties_empty_result(monkeypatch: pytest.MonkeyPatch) -> None: """Test list properties when no properties are found.""" monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -221,7 +221,7 @@ async def test_list_properties_empty_result(monkeypatch: pytest.MonkeyPatch) -> captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -253,7 +253,7 @@ async def test_upsert_properties_missing_project( ) -> None: """Test upsert properties when no project ID is provided.""" monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -261,7 +261,7 @@ async def test_upsert_properties_missing_project( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -286,7 +286,7 @@ async def test_upsert_properties_missing_project( async def test_upsert_properties_no_properties(monkeypatch: pytest.MonkeyPatch) -> None: """Test upsert properties when no properties are provided.""" monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -294,7 +294,7 @@ async def test_upsert_properties_no_properties(monkeypatch: pytest.MonkeyPatch) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -317,7 +317,7 @@ async def test_upsert_properties_no_properties(monkeypatch: pytest.MonkeyPatch) async def test_upsert_properties_name_too_long(monkeypatch: pytest.MonkeyPatch) -> None: """Test upsert properties with property name that's too long.""" monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -325,7 +325,7 @@ async def test_upsert_properties_name_too_long(monkeypatch: pytest.MonkeyPatch) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) @@ -353,7 +353,7 @@ async def test_upsert_properties_value_too_long( ) -> None: """Test upsert properties with property value that's too long.""" monkeypatch.setattr( - "workato_platform.cli.commands.properties.Spinner", + "workato_platform_cli.cli.commands.properties.Spinner", DummySpinner, ) @@ -361,7 +361,7 @@ async def test_upsert_properties_value_too_long( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.properties.click.echo", + "workato_platform_cli.cli.commands.properties.click.echo", lambda msg="": captured.append(msg), ) diff --git a/tests/unit/commands/test_pull.py b/tests/unit/commands/test_pull.py index ecb922c..5258f0c 100644 --- a/tests/unit/commands/test_pull.py +++ b/tests/unit/commands/test_pull.py @@ -8,8 +8,8 @@ import pytest -from workato_platform.cli.commands.projects.project_manager import ProjectManager -from workato_platform.cli.commands.pull import ( +from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager +from workato_platform_cli.cli.commands.pull import ( _pull_project, calculate_diff_stats, calculate_json_diff_stats, @@ -17,7 +17,7 @@ merge_directories, pull, ) -from workato_platform.cli.utils.config import ConfigData, ConfigManager +from workato_platform_cli.cli.utils.config import ConfigData, ConfigManager class TestPullCommand: @@ -150,7 +150,7 @@ def test_merge_directories( # Avoid interactive confirmation during test monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.confirm", + "workato_platform_cli.cli.commands.pull.click.confirm", lambda *args, **kwargs: True, ) @@ -189,11 +189,11 @@ def test_merge_directories_cancellation( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.confirm", + "workato_platform_cli.cli.commands.pull.click.confirm", lambda *args, **kwargs: False, ) @@ -223,11 +223,11 @@ def test_merge_directories_many_deletions( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.confirm", + "workato_platform_cli.cli.commands.pull.click.confirm", lambda *args, **kwargs: True, ) @@ -237,7 +237,7 @@ def test_merge_directories_many_deletions( assert any("... and 2 more" in msg for msg in captured) @pytest.mark.asyncio - @patch("workato_platform.cli.commands.pull.click.echo") + @patch("workato_platform_cli.cli.commands.pull.click.echo") async def test_pull_project_no_api_token(self, mock_echo: MagicMock) -> None: """Test _pull_project with no API token.""" mock_config_manager = MagicMock() @@ -251,7 +251,7 @@ async def test_pull_project_no_api_token(self, mock_echo: MagicMock) -> None: ) @pytest.mark.asyncio - @patch("workato_platform.cli.commands.pull.click.echo") + @patch("workato_platform_cli.cli.commands.pull.click.echo") async def test_pull_project_no_folder_id(self, mock_echo: MagicMock) -> None: """Test _pull_project with no folder ID.""" mock_config_manager = MagicMock() @@ -273,7 +273,7 @@ async def test_pull_command_calls_pull_project(self) -> None: mock_config_manager = MagicMock() mock_project_manager = MagicMock() - with patch("workato_platform.cli.commands.pull._pull_project") as mock_pull: + with patch("workato_platform_cli.cli.commands.pull._pull_project") as mock_pull: assert pull.callback await pull.callback( config_manager=mock_config_manager, @@ -308,7 +308,7 @@ async def test_pull_project_missing_project_root( project_manager = AsyncMock() captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -350,13 +350,13 @@ async def fake_export( } monkeypatch.setattr( - "workato_platform.cli.commands.pull.merge_directories", + "workato_platform_cli.cli.commands.pull.merge_directories", lambda *args, **kwargs: fake_changes, ) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -414,13 +414,13 @@ async def fake_export( } monkeypatch.setattr( - "workato_platform.cli.commands.pull.merge_directories", + "workato_platform_cli.cli.commands.pull.merge_directories", lambda *args, **kwargs: simple_changes, ) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -471,7 +471,7 @@ async def fake_export( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -529,7 +529,7 @@ async def fake_export( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -571,7 +571,7 @@ async def test_pull_project_failed_export( captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) @@ -624,13 +624,13 @@ async def fake_export( "removed": [], } monkeypatch.setattr( - "workato_platform.cli.commands.pull.merge_directories", + "workato_platform_cli.cli.commands.pull.merge_directories", lambda *args, **kwargs: empty_changes, ) captured: list[str] = [] monkeypatch.setattr( - "workato_platform.cli.commands.pull.click.echo", + "workato_platform_cli.cli.commands.pull.click.echo", lambda msg="": captured.append(msg), ) diff --git a/tests/unit/commands/test_workspace.py b/tests/unit/commands/test_workspace.py index 68b34d1..05222a2 100644 --- a/tests/unit/commands/test_workspace.py +++ b/tests/unit/commands/test_workspace.py @@ -4,8 +4,8 @@ import pytest -from workato_platform.cli.commands.workspace import workspace -from workato_platform.cli.utils.config import ConfigData, ProfileData +from workato_platform_cli.cli.commands.workspace import workspace +from workato_platform_cli.cli.utils.config import ConfigData, ProfileData @pytest.mark.asyncio @@ -42,7 +42,7 @@ def fake_echo(message: str = "") -> None: captured.append(message) monkeypatch.setattr( - "workato_platform.cli.commands.workspace.click.echo", + "workato_platform_cli.cli.commands.workspace.click.echo", fake_echo, ) diff --git a/tests/unit/config/test_manager.py b/tests/unit/config/test_manager.py index 47e7209..b72deb4 100644 --- a/tests/unit/config/test_manager.py +++ b/tests/unit/config/test_manager.py @@ -10,19 +10,19 @@ import asyncclick as click import pytest -from workato_platform import Workato -from workato_platform.cli.utils.config.manager import ( +from workato_platform_cli import Workato +from workato_platform_cli.cli.utils.config.manager import ( ConfigManager, ProfileManager, WorkspaceManager, ) -from workato_platform.cli.utils.config.models import ( +from workato_platform_cli.cli.utils.config.models import ( ConfigData, ProfileData, ProjectInfo, ) -from workato_platform.client.workato_api.configuration import Configuration -from workato_platform.client.workato_api.models.user import User +from workato_platform_cli.client.workato_api.configuration import Configuration +from workato_platform_cli.client.workato_api.models.user import User @pytest.fixture diff --git a/tests/unit/config/test_models.py b/tests/unit/config/test_models.py index d5ec515..516acb2 100644 --- a/tests/unit/config/test_models.py +++ b/tests/unit/config/test_models.py @@ -4,7 +4,7 @@ from pydantic import ValidationError -from workato_platform.cli.utils.config.models import ( +from workato_platform_cli.cli.utils.config.models import ( AVAILABLE_REGIONS, ConfigData, ProfileData, diff --git a/tests/unit/config/test_profiles.py b/tests/unit/config/test_profiles.py index 4ad0540..bb424b4 100644 --- a/tests/unit/config/test_profiles.py +++ b/tests/unit/config/test_profiles.py @@ -9,11 +9,11 @@ from keyring.errors import KeyringError, NoKeyringError -from workato_platform.cli.utils.config.models import ( +from workato_platform_cli.cli.utils.config.models import ( ProfileData, ProfilesConfig, ) -from workato_platform.cli.utils.config.profiles import ( +from workato_platform_cli.cli.utils.config.profiles import ( ProfileManager, _set_secure_permissions, _validate_url_security, @@ -652,7 +652,7 @@ def test_is_keyring_disabled_env_var( manager = ProfileManager() assert manager._is_keyring_enabled() is False - @patch("workato_platform.cli.utils.config.profiles.keyring.get_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_password") def test_get_token_from_keyring_success( self, mock_get_password: Mock, tmp_path: Path ) -> None: @@ -666,7 +666,7 @@ def test_get_token_from_keyring_success( result = manager._get_token_from_keyring("dev") assert result == "test-token" - @patch("workato_platform.cli.utils.config.profiles.keyring.get_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_password") def test_get_token_from_keyring_disabled( self, mock_get_password: Mock, tmp_path: Path ) -> None: @@ -679,7 +679,7 @@ def test_get_token_from_keyring_disabled( assert result is None mock_get_password.assert_not_called() - @patch("workato_platform.cli.utils.config.profiles.keyring.get_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_password") def test_get_token_from_keyring_no_keyring_error( self, mock_get_password: Mock, tmp_path: Path ) -> None: @@ -696,7 +696,7 @@ def test_get_token_from_keyring_no_keyring_error( manager._get_token_from_keyring("dev") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.get_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_password") def test_get_token_from_keyring_keyring_error( self, mock_get_password: Mock, tmp_path: Path ) -> None: @@ -713,7 +713,7 @@ def test_get_token_from_keyring_keyring_error( manager._get_token_from_keyring("dev") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.get_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_password") def test_get_token_from_keyring_general_exception( self, mock_get_password: Mock, tmp_path: Path ) -> None: @@ -727,7 +727,7 @@ def test_get_token_from_keyring_general_exception( result = manager._get_token_from_keyring("dev") assert result is None - @patch("workato_platform.cli.utils.config.profiles.keyring.set_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.set_password") def test_store_token_in_keyring_success( self, mock_set_password: Mock, tmp_path: Path ) -> None: @@ -742,7 +742,7 @@ def test_store_token_in_keyring_success( manager.keyring_service, "dev", "token123" ) - @patch("workato_platform.cli.utils.config.profiles.keyring.set_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.set_password") def test_store_token_in_keyring_disabled( self, mock_set_password: Mock, tmp_path: Path ) -> None: @@ -771,7 +771,7 @@ def test_ensure_keyring_backend_force_fallback(self, tmp_path: Path) -> None: with ( patch("pathlib.Path.home", return_value=tmp_path), patch( - "workato_platform.cli.utils.config.profiles.keyring.set_keyring" + "workato_platform_cli.cli.utils.config.profiles.keyring.set_keyring" ) as mock_set_keyring, ): manager = ProfileManager() @@ -780,7 +780,7 @@ def test_ensure_keyring_backend_force_fallback(self, tmp_path: Path) -> None: assert manager._using_fallback_keyring is True mock_set_keyring.assert_called() - @patch("workato_platform.cli.utils.config.profiles.keyring.get_keyring") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_keyring") def test_ensure_keyring_backend_no_backend( self, mock_get_keyring: Mock, tmp_path: Path ) -> None: @@ -902,7 +902,7 @@ def test_ensure_global_config_dir(self, tmp_path: Path) -> None: manager._ensure_global_config_dir() assert config_dir.exists() - @patch("workato_platform.cli.utils.config.profiles.keyring.delete_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.delete_password") def test_delete_token_from_keyring_success( self, mock_delete_password: Mock, tmp_path: Path ) -> None: @@ -915,7 +915,7 @@ def test_delete_token_from_keyring_success( assert result is True mock_delete_password.assert_called_once() - @patch("workato_platform.cli.utils.config.profiles.keyring.delete_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.delete_password") def test_delete_token_from_keyring_disabled( self, mock_delete_password: Mock, tmp_path: Path ) -> None: @@ -928,7 +928,7 @@ def test_delete_token_from_keyring_disabled( assert result is False mock_delete_password.assert_not_called() - @patch("workato_platform.cli.utils.config.profiles.keyring.delete_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.delete_password") def test_delete_token_from_keyring_no_keyring_error( self, mock_delete_password: Mock, tmp_path: Path ) -> None: @@ -945,7 +945,7 @@ def test_delete_token_from_keyring_no_keyring_error( manager._delete_token_from_keyring("dev") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.delete_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.delete_password") def test_delete_token_from_keyring_keyring_error( self, mock_delete_password: Mock, tmp_path: Path ) -> None: @@ -962,7 +962,7 @@ def test_delete_token_from_keyring_keyring_error( manager._delete_token_from_keyring("dev") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.delete_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.delete_password") def test_delete_token_from_keyring_general_exception( self, mock_delete_password: Mock, tmp_path: Path ) -> None: @@ -976,7 +976,7 @@ def test_delete_token_from_keyring_general_exception( result = manager._delete_token_from_keyring("dev") assert result is False - @patch("workato_platform.cli.utils.config.profiles.keyring.set_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.set_password") def test_store_token_in_keyring_no_keyring_error( self, mock_set_password: Mock, tmp_path: Path ) -> None: @@ -993,7 +993,7 @@ def test_store_token_in_keyring_no_keyring_error( manager._store_token_in_keyring("dev", "token123") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.set_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.set_password") def test_store_token_in_keyring_keyring_error( self, mock_set_password: Mock, tmp_path: Path ) -> None: @@ -1010,7 +1010,7 @@ def test_store_token_in_keyring_keyring_error( manager._store_token_in_keyring("dev", "token123") mock_ensure.assert_called_with(force_fallback=True) - @patch("workato_platform.cli.utils.config.profiles.keyring.set_password") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.set_password") def test_store_token_in_keyring_general_exception( self, mock_set_password: Mock, tmp_path: Path ) -> None: @@ -1024,7 +1024,7 @@ def test_store_token_in_keyring_general_exception( result = manager._store_token_in_keyring("dev", "token123") assert result is False - @patch("workato_platform.cli.utils.config.profiles.keyring.get_keyring") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_keyring") def test_ensure_keyring_backend_successful_backend( self, mock_get_keyring: Mock, tmp_path: Path ) -> None: @@ -1046,7 +1046,7 @@ def test_ensure_keyring_backend_successful_backend( # Should not fall back since backend is good assert manager._using_fallback_keyring is False - @patch("workato_platform.cli.utils.config.profiles.keyring.get_keyring") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_keyring") def test_ensure_keyring_backend_failed_backend( self, mock_get_keyring: Mock, tmp_path: Path ) -> None: @@ -1062,7 +1062,7 @@ def test_ensure_keyring_backend_failed_backend( with ( patch("pathlib.Path.home", return_value=tmp_path), patch( - "workato_platform.cli.utils.config.profiles.keyring.set_keyring" + "workato_platform_cli.cli.utils.config.profiles.keyring.set_keyring" ) as mock_set_keyring, ): manager = ProfileManager() @@ -1070,7 +1070,7 @@ def test_ensure_keyring_backend_failed_backend( assert manager._using_fallback_keyring is True mock_set_keyring.assert_called() - @patch("workato_platform.cli.utils.config.profiles.keyring.get_keyring") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_keyring") def test_ensure_keyring_backend_fail_module( self, mock_get_keyring: Mock, tmp_path: Path ) -> None: @@ -1085,7 +1085,7 @@ def test_ensure_keyring_backend_fail_module( with ( patch("pathlib.Path.home", return_value=tmp_path), patch( - "workato_platform.cli.utils.config.profiles.keyring.set_keyring" + "workato_platform_cli.cli.utils.config.profiles.keyring.set_keyring" ) as mock_set_keyring, ): manager = ProfileManager() @@ -1093,7 +1093,7 @@ def test_ensure_keyring_backend_fail_module( assert manager._using_fallback_keyring is True mock_set_keyring.assert_called() - @patch("workato_platform.cli.utils.config.profiles.keyring.get_keyring") + @patch("workato_platform_cli.cli.utils.config.profiles.keyring.get_keyring") def test_ensure_keyring_backend_zero_priority( self, mock_get_keyring: Mock, tmp_path: Path ) -> None: @@ -1108,7 +1108,7 @@ def test_ensure_keyring_backend_zero_priority( with ( patch("pathlib.Path.home", return_value=tmp_path), patch( - "workato_platform.cli.utils.config.profiles.keyring.set_keyring" + "workato_platform_cli.cli.utils.config.profiles.keyring.set_keyring" ) as mock_set_keyring, ): manager = ProfileManager() @@ -1125,7 +1125,7 @@ def test_get_token_from_keyring_fallback_after_error(self, tmp_path: Path) -> No with ( patch.object(manager, "_is_keyring_enabled", return_value=True), patch( - "workato_platform.cli.utils.config.profiles.keyring.get_password", + "workato_platform_cli.cli.utils.config.profiles.keyring.get_password", return_value="fallback-token", ), ): @@ -1141,7 +1141,7 @@ def test_store_token_fallback_keyring_success(self, tmp_path: Path) -> None: with ( patch.object(manager, "_is_keyring_enabled", return_value=True), patch( - "workato_platform.cli.utils.config.profiles.keyring.set_password" + "workato_platform_cli.cli.utils.config.profiles.keyring.set_password" ) as mock_set_password, patch.object(manager, "_ensure_keyring_backend"), ): @@ -1161,7 +1161,7 @@ def test_delete_token_fallback_keyring_success(self, tmp_path: Path) -> None: with ( patch.object(manager, "_is_keyring_enabled", return_value=True), patch( - "workato_platform.cli.utils.config.profiles.keyring.delete_password" + "workato_platform_cli.cli.utils.config.profiles.keyring.delete_password" ) as mock_delete_password, patch.object(manager, "_ensure_keyring_backend"), ): @@ -1183,7 +1183,7 @@ def test_get_token_fallback_keyring_after_keyring_error( with ( patch.object(manager, "_is_keyring_enabled", return_value=True), patch( - "workato_platform.cli.utils.config.profiles.keyring.get_password" + "workato_platform_cli.cli.utils.config.profiles.keyring.get_password" ) as mock_get_password, patch.object(manager, "_ensure_keyring_backend"), ): diff --git a/tests/unit/config/test_workspace.py b/tests/unit/config/test_workspace.py index 5b784a2..af197fa 100644 --- a/tests/unit/config/test_workspace.py +++ b/tests/unit/config/test_workspace.py @@ -6,7 +6,7 @@ import pytest -from workato_platform.cli.utils.config.workspace import WorkspaceManager +from workato_platform_cli.cli.utils.config.workspace import WorkspaceManager class TestWorkspaceManager: diff --git a/tests/unit/test_basic_imports.py b/tests/unit/test_basic_imports.py index f38eb93..ac64286 100644 --- a/tests/unit/test_basic_imports.py +++ b/tests/unit/test_basic_imports.py @@ -19,18 +19,18 @@ class TestBasicImports: def test_workato_cli_package_exists(self) -> None: """Test that the main package exists.""" try: - import workato_platform.cli + import workato_platform_cli.cli - assert workato_platform.cli is not None + assert workato_platform_cli.cli is not None except ImportError: - pytest.fail("workato_platform.cli package could not be imported") + pytest.fail("workato_platform_cli.cli package could not be imported") def test_version_is_available(self) -> None: """Test that version is available.""" try: - import workato_platform + import workato_platform_cli - version = getattr(workato_platform, "__version__", None) + version = getattr(workato_platform_cli, "__version__", None) assert version is not None assert isinstance(version, str) except ImportError: @@ -39,7 +39,7 @@ def test_version_is_available(self) -> None: def test_utils_package_structure(self) -> None: """Test that utils package has expected structure.""" try: - from workato_platform.cli.utils import version_checker + from workato_platform_cli.cli.utils import version_checker assert hasattr(version_checker, "VersionChecker") except ImportError: @@ -48,7 +48,7 @@ def test_utils_package_structure(self) -> None: def test_version_checker_class_structure(self) -> None: """Test version checker class structure.""" try: - from workato_platform.cli.utils.version_checker import VersionChecker + from workato_platform_cli.cli.utils.version_checker import VersionChecker # Check that class has expected methods assert hasattr(VersionChecker, "check_for_updates") @@ -60,7 +60,7 @@ def test_version_checker_class_structure(self) -> None: def test_commands_package_exists(self) -> None: """Test that commands package structure exists.""" - commands_path = src_path / "workato_platform" / "cli" / "commands" + commands_path = src_path / "workato_platform_cli" / "cli" / "commands" assert commands_path.exists() assert commands_path.is_dir() @@ -79,7 +79,7 @@ def test_commands_package_exists(self) -> None: def test_basic_configuration_can_be_created(self) -> None: """Test basic configuration without heavy dependencies.""" try: - from workato_platform.cli.utils.config import ConfigManager + from workato_platform_cli.cli.utils.config import ConfigManager # Should be able to import the class assert ConfigManager is not None @@ -90,7 +90,7 @@ def test_basic_configuration_can_be_created(self) -> None: def test_container_module_exists(self) -> None: """Test container module exists.""" try: - from workato_platform.cli import containers + from workato_platform_cli.cli import containers assert hasattr(containers, "Container") @@ -108,7 +108,7 @@ def test_required_files_exist(self) -> None: required_files = [ "pyproject.toml", "README.md", - "src/workato_platform/cli/__init__.py", + "src/workato_platform_cli/cli/__init__.py", ] for file_path in required_files: @@ -127,7 +127,7 @@ def test_test_structure_exists(self) -> None: def test_source_code_structure(self) -> None: """Test source code directory structure.""" src_path = ( - Path(__file__).parent.parent.parent / "src" / "workato_platform" / "cli" + Path(__file__).parent.parent.parent / "src" / "workato_platform_cli" / "cli" ) expected_dirs = ["commands", "utils"] diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index ec72cdb..38fa99b 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -6,7 +6,7 @@ from asyncclick.testing import CliRunner -from workato_platform.cli import cli +from workato_platform_cli.cli import cli class TestCLI: @@ -26,7 +26,7 @@ async def test_cli_with_profile(self) -> None: """Test CLI accepts profile option.""" runner = CliRunner() - with patch("workato_platform.cli.Container") as mock_container: + with patch("workato_platform_cli.cli.Container") as mock_container: # Mock the container to avoid actual initialization mock_instance = Mock() mock_container.return_value = mock_instance diff --git a/tests/unit/test_containers.py b/tests/unit/test_containers.py index 357d9d5..31e8ead 100644 --- a/tests/unit/test_containers.py +++ b/tests/unit/test_containers.py @@ -2,7 +2,7 @@ from unittest.mock import Mock -from workato_platform.cli.containers import ( +from workato_platform_cli.cli.containers import ( Container, create_profile_aware_workato_config, create_workato_config, diff --git a/tests/unit/test_retry_429.py b/tests/unit/test_retry_429.py index 874f90e..3abdd34 100644 --- a/tests/unit/test_retry_429.py +++ b/tests/unit/test_retry_429.py @@ -11,9 +11,9 @@ class TestRetry429Configuration: def test_retries_enabled_by_default(self) -> None: """Test that retries are enabled by default when not explicitly set.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_configuration.retries = None # Not explicitly set @@ -38,9 +38,9 @@ def test_retries_enabled_by_default(self) -> None: def test_custom_retry_count_preserved(self) -> None: """Test that explicitly set retry count is preserved.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_configuration.retries = 5 # Custom value @@ -65,10 +65,10 @@ def test_custom_retry_count_preserved(self) -> None: def test_retry_client_created_with_429_support(self) -> None: """Test that retry client is created with 429 status code support.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato with ( - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.ApiClient") as mock_api_client, patch("aiohttp_retry.RetryClient"), patch("aiohttp_retry.ExponentialRetry") as mock_exponential_retry, ): @@ -103,10 +103,10 @@ def test_retry_client_created_with_429_support(self) -> None: def test_exponential_backoff_timing(self) -> None: """Test that exponential backoff uses correct timing for rate limiting.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato with ( - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.ApiClient") as mock_api_client, patch("aiohttp_retry.ExponentialRetry") as mock_exponential_retry, ): mock_configuration = Mock() @@ -135,7 +135,7 @@ def test_exponential_backoff_timing(self) -> None: def test_configure_retry_helper_function(self) -> None: """Test the _configure_retry_with_429_support helper function directly.""" try: - from workato_platform import _configure_retry_with_429_support + from workato_platform_cli import _configure_retry_with_429_support with ( patch("aiohttp_retry.RetryClient") as mock_retry_client, @@ -163,7 +163,7 @@ def test_configure_retry_helper_function(self) -> None: def test_retry_client_recreated_if_exists(self) -> None: """Test that existing retry_client is recreated with new config.""" try: - from workato_platform import _configure_retry_with_429_support + from workato_platform_cli import _configure_retry_with_429_support with ( patch("aiohttp_retry.RetryClient") as mock_retry_client, @@ -187,10 +187,10 @@ def test_retry_client_recreated_if_exists(self) -> None: def test_server_errors_still_retried(self) -> None: """Test that 5xx server errors are still retried alongside 429.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato with ( - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.ApiClient") as mock_api_client, patch("aiohttp_retry.ExponentialRetry") as mock_exponential_retry, ): mock_configuration = Mock() diff --git a/tests/unit/test_version_checker.py b/tests/unit/test_version_checker.py index 1dabc3d..9ba0bb7 100644 --- a/tests/unit/test_version_checker.py +++ b/tests/unit/test_version_checker.py @@ -10,9 +10,9 @@ import pytest -from workato_platform.cli.containers import Container -from workato_platform.cli.utils.config import ConfigManager -from workato_platform.cli.utils.version_checker import ( +from workato_platform_cli.cli.containers import Container +from workato_platform_cli.cli.utils.config import ConfigManager +from workato_platform_cli.cli.utils.version_checker import ( CHECK_INTERVAL, VersionChecker, check_updates_async, @@ -50,7 +50,7 @@ def test_is_update_check_disabled_default( assert checker.is_update_check_disabled() is False - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_success( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -68,7 +68,7 @@ def test_get_latest_version_success( assert version == "1.2.3" - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_http_error( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -80,7 +80,7 @@ def test_get_latest_version_http_error( assert version is None - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_non_https_url( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -90,7 +90,7 @@ def test_get_latest_version_non_https_url( # Patch the PYPI_API_URL to use HTTP (should be rejected) with patch( - "workato_platform.cli.utils.version_checker.PYPI_API_URL", + "workato_platform_cli.cli.utils.version_checker.PYPI_API_URL", "http://pypi.org/test", ): version = checker.get_latest_version() @@ -98,7 +98,7 @@ def test_get_latest_version_non_https_url( # URL should not be called due to HTTPS validation mock_urlopen.assert_not_called() - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_non_200_status( self, mock_urlopen: MagicMock, @@ -151,7 +151,7 @@ def test_should_check_for_updates_disabled( assert checker.should_check_for_updates() is False - @patch("workato_platform.cli.utils.version_checker.HAS_DEPENDENCIES", True) + @patch("workato_platform_cli.cli.utils.version_checker.HAS_DEPENDENCIES", True) def test_should_check_for_updates_no_cache_file( self, mock_config_manager: ConfigManager, @@ -293,7 +293,7 @@ def test_background_update_check_skips_when_not_needed( check_for_updates_mock.assert_not_called() - @patch("workato_platform.cli.utils.version_checker.click.echo") + @patch("workato_platform_cli.cli.utils.version_checker.click.echo") def test_check_for_updates_handles_parse_error( self, mock_echo: MagicMock, @@ -306,7 +306,7 @@ def raising_parse(_value: str) -> None: raise ValueError("bad version") monkeypatch.setattr( - "workato_platform.cli.utils.version_checker.version.parse", + "workato_platform_cli.cli.utils.version_checker.version.parse", raising_parse, ) @@ -321,13 +321,13 @@ def test_should_check_for_updates_no_dependencies( ) -> None: checker = VersionChecker(mock_config_manager) with patch( - "workato_platform.cli.utils.version_checker.HAS_DEPENDENCIES", False + "workato_platform_cli.cli.utils.version_checker.HAS_DEPENDENCIES", False ): assert checker.should_check_for_updates() is False assert checker.get_latest_version() is None assert checker.check_for_updates("1.0.0") is None - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_without_tls_version( self, mock_urlopen: MagicMock, @@ -349,12 +349,12 @@ def test_get_latest_version_without_tls_version( ) mock_urlopen.return_value.__enter__.return_value = mock_response - with patch("workato_platform.cli.utils.version_checker.ssl", fake_ssl): + with patch("workato_platform_cli.cli.utils.version_checker.ssl", fake_ssl): checker = VersionChecker(mock_config_manager) assert checker.get_latest_version() == "9.9.9" fake_ssl.create_default_context.assert_called_once() - @patch("workato_platform.cli.utils.version_checker.click.echo") + @patch("workato_platform_cli.cli.utils.version_checker.click.echo") def test_show_update_notification_outputs( self, mock_echo: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -395,11 +395,11 @@ def test_check_updates_async_sync_wrapper( thread_instance = Mock() with ( patch( - "workato_platform.cli.utils.version_checker.VersionChecker", + "workato_platform_cli.cli.utils.version_checker.VersionChecker", Mock(return_value=checker_instance), ), patch( - "workato_platform.cli.utils.version_checker.threading.Thread", + "workato_platform_cli.cli.utils.version_checker.threading.Thread", Mock(return_value=thread_instance), ), patch.object( @@ -428,11 +428,11 @@ async def test_check_updates_async_async_wrapper( thread_mock = Mock() with ( patch( - "workato_platform.cli.utils.version_checker.VersionChecker", + "workato_platform_cli.cli.utils.version_checker.VersionChecker", Mock(return_value=checker_instance), ), patch( - "workato_platform.cli.utils.version_checker.threading.Thread", + "workato_platform_cli.cli.utils.version_checker.threading.Thread", thread_mock, ), patch.object( @@ -485,7 +485,7 @@ async def async_sample() -> None: with pytest.raises(RuntimeError): await async_sample() - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_json_error( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -500,7 +500,7 @@ def test_get_latest_version_json_error( assert version is None - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_missing_version_key( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -574,7 +574,7 @@ def test_is_update_check_disabled_various_values( monkeypatch.setenv("WORKATO_DISABLE_UPDATE_CHECK", value) assert checker.is_update_check_disabled() is False - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_handles_value_error( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -609,10 +609,10 @@ def test_should_check_for_updates_old_cache( old_time = time.time() - (CHECK_INTERVAL + 100) os.utime(checker.cache_file, (old_time, old_time)) - with patch("workato_platform.cli.utils.version_checker.HAS_DEPENDENCIES", True): + with patch("workato_platform_cli.cli.utils.version_checker.HAS_DEPENDENCIES", True): assert checker.should_check_for_updates() is True - @patch("workato_platform.cli.utils.version_checker.urllib.request.urlopen") + @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") def test_get_latest_version_invalid_scheme_validation( self, mock_urlopen: MagicMock, mock_config_manager: ConfigManager ) -> None: @@ -621,7 +621,7 @@ def test_get_latest_version_invalid_scheme_validation( # Test with non-https scheme in parsed URL with patch( - "workato_platform.cli.utils.version_checker.urlparse" + "workato_platform_cli.cli.utils.version_checker.urlparse" ) as mock_urlparse: mock_urlparse.return_value.scheme = "http" # Not https result = checker.get_latest_version() @@ -629,7 +629,7 @@ def test_get_latest_version_invalid_scheme_validation( mock_urlopen.assert_not_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.version_checker.threading.Thread") + @patch("workato_platform_cli.cli.utils.version_checker.threading.Thread") async def test_check_updates_async_thread_timeout( self, mock_thread: Mock, mock_config_manager: ConfigManager ) -> None: @@ -642,7 +642,7 @@ async def test_check_updates_async_thread_timeout( with ( patch( - "workato_platform.cli.utils.version_checker.VersionChecker", + "workato_platform_cli.cli.utils.version_checker.VersionChecker", Mock(return_value=checker_instance), ), patch.object( diff --git a/tests/unit/test_webbrowser_mock.py b/tests/unit/test_webbrowser_mock.py index 43bd0de..482bde8 100644 --- a/tests/unit/test_webbrowser_mock.py +++ b/tests/unit/test_webbrowser_mock.py @@ -14,7 +14,7 @@ def test_webbrowser_is_mocked() -> None: def test_connections_webbrowser_is_mocked() -> None: """Test that connections module webbrowser is also mocked.""" - from workato_platform.cli.commands.connections import ( + from workato_platform_cli.cli.commands.connections import ( webbrowser as connections_webbrowser, ) diff --git a/tests/unit/test_workato_client.py b/tests/unit/test_workato_client.py index ea5ea56..c719285 100644 --- a/tests/unit/test_workato_client.py +++ b/tests/unit/test_workato_client.py @@ -16,7 +16,7 @@ class TestWorkatoClient: def test_workato_class_can_be_imported(self) -> None: """Test that Workato class can be imported.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato assert Workato is not None except ImportError: @@ -25,11 +25,11 @@ def test_workato_class_can_be_imported(self) -> None: def test_workato_initialization_mocked(self) -> None: """Test Workato can be initialized with mocked dependencies.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato with ( - patch("workato_platform.Configuration") as mock_config, - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.Configuration") as mock_config, + patch("workato_platform_cli.ApiClient") as mock_api_client, ): mock_configuration = Mock() mock_config.return_value = mock_configuration @@ -45,7 +45,7 @@ def test_workato_initialization_mocked(self) -> None: def test_workato_api_endpoints_structure(self) -> None: """Test that Workato class structure can be analyzed.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato # Check expected API endpoint attributes expected_apis = [ @@ -63,8 +63,8 @@ def test_workato_api_endpoints_structure(self) -> None: # Create mock configuration with proper SSL attributes with ( - patch("workato_platform.Configuration") as mock_config, - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.Configuration") as mock_config, + patch("workato_platform_cli.ApiClient") as mock_api_client, ): mock_configuration = Mock() mock_configuration.connection_pool_maxsize = 10 @@ -94,9 +94,9 @@ def test_workato_api_endpoints_structure(self) -> None: def test_workato_configuration_property(self) -> None: """Test configuration property access.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient"): + with patch("workato_platform_cli.ApiClient"): mock_configuration = Mock() client = Workato(mock_configuration) @@ -108,9 +108,9 @@ def test_workato_configuration_property(self) -> None: def test_workato_api_client_property(self) -> None: """Test api_client property access.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_api_client.return_value = mock_client_instance @@ -125,9 +125,9 @@ def test_workato_api_client_property(self) -> None: def test_workato_ssl_context_with_tls_version(self) -> None: """Test SSL context configuration with TLSVersion available.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_rest_client = Mock() @@ -150,9 +150,9 @@ def test_workato_ssl_context_with_tls_version(self) -> None: async def test_workato_async_context_manager(self) -> None: """Test Workato async context manager.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_client_instance.close = ( @@ -173,9 +173,9 @@ async def test_workato_async_context_manager(self) -> None: async def test_workato_close_method(self) -> None: """Test Workato close method.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_client_instance.close = ( @@ -193,11 +193,11 @@ async def test_workato_close_method(self) -> None: def test_workato_version_attribute_exists(self) -> None: """Test that __version__ attribute is accessible.""" - import workato_platform + import workato_platform_cli # __version__ should be a string - assert isinstance(workato_platform.__version__, str) - assert len(workato_platform.__version__) > 0 + assert isinstance(workato_platform_cli.__version__, str) + assert len(workato_platform_cli.__version__) > 0 def test_workato_version_import_fallback(self) -> None: """Test __version__ fallback when _version import fails.""" @@ -205,24 +205,24 @@ def test_workato_version_import_fallback(self) -> None: # We can't easily reload the module, so let's test the behavior directly # Mock the import to fail and test the fallback logic - import workato_platform + import workato_platform_cli - original_version = workato_platform.__version__ + original_version = workato_platform_cli.__version__ try: # Simulate the fallback scenario - workato_platform.__version__ = "unknown" - assert workato_platform.__version__ == "unknown" + workato_platform_cli.__version__ = "unknown" + assert workato_platform_cli.__version__ == "unknown" finally: # Restore original version - workato_platform.__version__ = original_version + workato_platform_cli.__version__ = original_version def test_workato_ssl_context_older_python_fallback(self) -> None: """Test SSL context fallback for older Python versions.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_rest_client = Mock() @@ -254,9 +254,9 @@ def test_workato_ssl_context_older_python_fallback(self) -> None: def test_workato_all_api_endpoints_initialized(self) -> None: """Test that all API endpoints are properly initialized.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato - with patch("workato_platform.ApiClient") as mock_api_client: + with patch("workato_platform_cli.ApiClient") as mock_api_client: mock_configuration = Mock() mock_client_instance = Mock() mock_client_instance.rest_client = Mock() @@ -290,10 +290,10 @@ def test_workato_all_api_endpoints_initialized(self) -> None: def test_workato_retry_429_configured(self) -> None: """Test that retry logic with 429 support is configured.""" try: - from workato_platform import Workato + from workato_platform_cli import Workato with ( - patch("workato_platform.ApiClient") as mock_api_client, + patch("workato_platform_cli.ApiClient") as mock_api_client, patch("aiohttp_retry.RetryClient") as mock_retry_client, ): mock_configuration = Mock() diff --git a/tests/unit/utils/test_exception_handler.py b/tests/unit/utils/test_exception_handler.py index 7061411..b7c6b3d 100644 --- a/tests/unit/utils/test_exception_handler.py +++ b/tests/unit/utils/test_exception_handler.py @@ -4,11 +4,11 @@ import pytest -from workato_platform.cli.utils.exception_handler import ( +from workato_platform_cli.cli.utils.exception_handler import ( _extract_error_details, handle_api_exceptions, ) -from workato_platform.client.workato_api.exceptions import ( +from workato_platform_cli.client.workato_api.exceptions import ( ApiException, ConflictException, NotFoundException, @@ -68,12 +68,12 @@ def function_with_params(param1: str, param2: str = "default") -> str: result = function_with_params("test", param2="value") assert result == "test-value" - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_handles_generic_exception( self, mock_echo: MagicMock ) -> None: """Test that decorator handles API exceptions.""" - from workato_platform.client.workato_api.exceptions import ApiException + from workato_platform_cli.client.workato_api.exceptions import ApiException @handle_api_exceptions def failing_function() -> None: @@ -86,10 +86,10 @@ def failing_function() -> None: # Should have displayed error message mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_with_http_error(self, mock_echo: MagicMock) -> None: """Test handling of HTTP-like errors.""" - from workato_platform.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException @handle_api_exceptions def http_error_function() -> None: @@ -110,7 +110,7 @@ def http_error_function() -> None: (ServiceException, "Server error"), ], ) - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_specific_http_errors( self, mock_echo: MagicMock, @@ -130,7 +130,7 @@ def test_handle_api_exceptions_with_keyboard_interrupt(self) -> None: # Use unittest.mock to patch KeyboardInterrupt in the exception handler with patch( - "workato_platform.cli.utils.exception_handler.KeyboardInterrupt", + "workato_platform_cli.cli.utils.exception_handler.KeyboardInterrupt", KeyboardInterrupt, ): @@ -150,10 +150,10 @@ def interrupted_function() -> None: # Verify it's the expected exit code for KeyboardInterrupt assert exc_info.value.code == 130 - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_error_formatting(self, mock_echo: MagicMock) -> None: """Test that error messages are formatted appropriately.""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException @handle_api_exceptions def error_function() -> None: @@ -171,12 +171,12 @@ def error_function() -> None: assert len(call_args) > 0 @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_handles_forbidden_error( self, mock_echo: MagicMock, ) -> None: - from workato_platform.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ForbiddenException @handle_api_exceptions async def failing_async() -> None: @@ -186,36 +186,36 @@ async def failing_async() -> None: mock_echo.assert_any_call("❌ Access forbidden") def test_extract_error_details_from_message(self) -> None: - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException exc = BadRequestException(status=400, body='{"message": "Invalid data"}') assert _extract_error_details(exc) == "Invalid data" def test_extract_error_details_from_errors_list(self) -> None: - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException body = '{"errors": ["Field is required"]}' exc = BadRequestException(status=400, body=body) assert _extract_error_details(exc) == "Validation error: Field is required" def test_extract_error_details_from_errors_dict(self) -> None: - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException body = '{"errors": {"field": ["must be unique"]}}' exc = BadRequestException(status=400, body=body) assert _extract_error_details(exc) == "field: must be unique" def test_extract_error_details_fallback_to_raw(self) -> None: - from workato_platform.client.workato_api.exceptions import ServiceException + from workato_platform_cli.client.workato_api.exceptions import ServiceException exc = ServiceException(status=500, body="") assert _extract_error_details(exc).startswith("") # Additional tests for missing sync exception handler coverage - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_bad_request(self, mock_echo: MagicMock) -> None: """Test sync handler with BadRequestException""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException @handle_api_exceptions def sync_bad_request() -> None: @@ -225,10 +225,10 @@ def sync_bad_request() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_unprocessable_entity(self, mock_echo: MagicMock) -> None: """Test sync handler with UnprocessableEntityException""" - from workato_platform.client.workato_api.exceptions import ( + from workato_platform_cli.client.workato_api.exceptions import ( UnprocessableEntityException, ) @@ -240,10 +240,10 @@ def sync_unprocessable() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_unauthorized(self, mock_echo: MagicMock) -> None: """Test sync handler with UnauthorizedException""" - from workato_platform.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException @handle_api_exceptions def sync_unauthorized() -> None: @@ -253,10 +253,10 @@ def sync_unauthorized() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_forbidden(self, mock_echo: MagicMock) -> None: """Test sync handler with ForbiddenException""" - from workato_platform.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ForbiddenException @handle_api_exceptions def sync_forbidden() -> None: @@ -266,10 +266,10 @@ def sync_forbidden() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_not_found(self, mock_echo: MagicMock) -> None: """Test sync handler with NotFoundException""" - from workato_platform.client.workato_api.exceptions import NotFoundException + from workato_platform_cli.client.workato_api.exceptions import NotFoundException @handle_api_exceptions def sync_not_found() -> None: @@ -279,10 +279,10 @@ def sync_not_found() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_conflict(self, mock_echo: MagicMock) -> None: """Test sync handler with ConflictException""" - from workato_platform.client.workato_api.exceptions import ConflictException + from workato_platform_cli.client.workato_api.exceptions import ConflictException @handle_api_exceptions def sync_conflict() -> None: @@ -292,10 +292,10 @@ def sync_conflict() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_service_error(self, mock_echo: MagicMock) -> None: """Test sync handler with ServiceException""" - from workato_platform.client.workato_api.exceptions import ServiceException + from workato_platform_cli.client.workato_api.exceptions import ServiceException @handle_api_exceptions def sync_service_error() -> None: @@ -305,10 +305,10 @@ def sync_service_error() -> None: assert result is None mock_echo.assert_called() - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_generic_api_error(self, mock_echo: MagicMock) -> None: """Test sync handler with generic ApiException""" - from workato_platform.client.workato_api.exceptions import ApiException + from workato_platform_cli.client.workato_api.exceptions import ApiException @handle_api_exceptions def sync_generic_error() -> None: @@ -320,10 +320,10 @@ def sync_generic_error() -> None: # Additional async tests for missing coverage @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_bad_request(self, mock_echo: MagicMock) -> None: """Test async handler with BadRequestException""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException @handle_api_exceptions async def async_bad_request() -> None: @@ -333,12 +333,12 @@ async def async_bad_request() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_unprocessable_entity( self, mock_echo: MagicMock ) -> None: """Test async handler with UnprocessableEntityException""" - from workato_platform.client.workato_api.exceptions import ( + from workato_platform_cli.client.workato_api.exceptions import ( UnprocessableEntityException, ) @@ -350,10 +350,10 @@ async def async_unprocessable() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_unauthorized(self, mock_echo: MagicMock) -> None: """Test async handler with UnauthorizedException""" - from workato_platform.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException @handle_api_exceptions async def async_unauthorized() -> None: @@ -363,10 +363,10 @@ async def async_unauthorized() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_not_found(self, mock_echo: MagicMock) -> None: """Test async handler with NotFoundException""" - from workato_platform.client.workato_api.exceptions import NotFoundException + from workato_platform_cli.client.workato_api.exceptions import NotFoundException @handle_api_exceptions async def async_not_found() -> None: @@ -376,10 +376,10 @@ async def async_not_found() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_conflict(self, mock_echo: MagicMock) -> None: """Test async handler with ConflictException""" - from workato_platform.client.workato_api.exceptions import ConflictException + from workato_platform_cli.client.workato_api.exceptions import ConflictException @handle_api_exceptions async def async_conflict() -> None: @@ -389,10 +389,10 @@ async def async_conflict() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_service_error(self, mock_echo: MagicMock) -> None: """Test async handler with ServiceException""" - from workato_platform.client.workato_api.exceptions import ServiceException + from workato_platform_cli.client.workato_api.exceptions import ServiceException @handle_api_exceptions async def async_service_error() -> None: @@ -402,10 +402,10 @@ async def async_service_error() -> None: mock_echo.assert_called() @pytest.mark.asyncio - @patch("workato_platform.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_generic_api_error(self, mock_echo: MagicMock) -> None: """Test async handler with generic ApiException""" - from workato_platform.client.workato_api.exceptions import ApiException + from workato_platform_cli.client.workato_api.exceptions import ApiException @handle_api_exceptions async def async_generic_error() -> None: @@ -416,7 +416,7 @@ async def async_generic_error() -> None: def test_extract_error_details_invalid_json(self) -> None: """Test error details extraction with invalid JSON""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException exc = BadRequestException(status=400, body="invalid json {") # Should fallback to raw body when JSON parsing fails @@ -424,7 +424,7 @@ def test_extract_error_details_invalid_json(self) -> None: def test_extract_error_details_no_message_or_errors(self) -> None: """Test error details extraction with valid JSON but no message/errors""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException exc = BadRequestException(status=400, body='{"other": "data"}') # Should fallback to raw body when no message/errors found @@ -432,7 +432,7 @@ def test_extract_error_details_no_message_or_errors(self) -> None: def test_extract_error_details_empty_errors_list(self) -> None: """Test error details extraction with empty errors list""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException exc = BadRequestException(status=400, body='{"errors": []}') # Should fallback to raw body when errors list is empty @@ -440,7 +440,7 @@ def test_extract_error_details_empty_errors_list(self) -> None: def test_extract_error_details_non_string_errors(self) -> None: """Test error details extraction with non-string errors""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException exc = BadRequestException(status=400, body='{"errors": [123, null]}') # Should handle non-string errors gracefully @@ -448,13 +448,13 @@ def test_extract_error_details_non_string_errors(self) -> None: assert "Validation error:" in result # JSON output mode tests - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_bad_request( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for BadRequestException""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException # Mock Click context to return json output mode mock_ctx = MagicMock() @@ -471,13 +471,13 @@ def bad_request_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('{"status": "error"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_unauthorized( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for UnauthorizedException""" - from workato_platform.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -492,13 +492,13 @@ def unauthorized_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "UNAUTHORIZED"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_forbidden( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for ForbiddenException""" - from workato_platform.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ForbiddenException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -513,13 +513,13 @@ def forbidden_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "FORBIDDEN"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_not_found( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for NotFoundException""" - from workato_platform.client.workato_api.exceptions import NotFoundException + from workato_platform_cli.client.workato_api.exceptions import NotFoundException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -534,13 +534,13 @@ def not_found_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "NOT_FOUND"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_conflict( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for ConflictException""" - from workato_platform.client.workato_api.exceptions import ConflictException + from workato_platform_cli.client.workato_api.exceptions import ConflictException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -555,13 +555,13 @@ def conflict_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "CONFLICT"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_server_error( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for ServiceException""" - from workato_platform.client.workato_api.exceptions import ServiceException + from workato_platform_cli.client.workato_api.exceptions import ServiceException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -576,13 +576,13 @@ def server_error_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "SERVER_ERROR"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_generic_api_error( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for generic ApiException""" - from workato_platform.client.workato_api.exceptions import ApiException + from workato_platform_cli.client.workato_api.exceptions import ApiException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -597,13 +597,13 @@ def generic_error_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any('"error_code": "API_ERROR"' in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.echo") - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_json_output_with_error_details( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output includes error details from body""" - from workato_platform.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import BadRequestException mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -620,20 +620,20 @@ def with_details_json() -> None: call_args = [call[0][0] for call in mock_echo.call_args_list] assert any("Field validation failed" in arg for arg in call_args) - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_get_output_mode_no_context(self, mock_get_context: MagicMock) -> None: """Test _get_output_mode returns 'table' when no context""" - from workato_platform.cli.utils.exception_handler import _get_output_mode + from workato_platform_cli.cli.utils.exception_handler import _get_output_mode mock_get_context.return_value = None result = _get_output_mode() assert result == "table" - @patch("workato_platform.cli.utils.exception_handler.click.get_current_context") + @patch("workato_platform_cli.cli.utils.exception_handler.click.get_current_context") def test_get_output_mode_no_params(self, mock_get_context: MagicMock) -> None: """Test _get_output_mode returns 'table' when context has no params""" - from workato_platform.cli.utils.exception_handler import _get_output_mode + from workato_platform_cli.cli.utils.exception_handler import _get_output_mode mock_ctx = MagicMock() del mock_ctx.params # Remove params attribute diff --git a/tests/unit/utils/test_gitignore.py b/tests/unit/utils/test_gitignore.py index 4687a98..1f18828 100644 --- a/tests/unit/utils/test_gitignore.py +++ b/tests/unit/utils/test_gitignore.py @@ -4,7 +4,7 @@ from pathlib import Path -from workato_platform.cli.utils.gitignore import ( +from workato_platform_cli.cli.utils.gitignore import ( ensure_gitignore_entry, ensure_stubs_in_gitignore, ) diff --git a/tests/unit/utils/test_ignore_patterns.py b/tests/unit/utils/test_ignore_patterns.py index 8eeccf2..91fe81b 100644 --- a/tests/unit/utils/test_ignore_patterns.py +++ b/tests/unit/utils/test_ignore_patterns.py @@ -3,7 +3,7 @@ from pathlib import Path from unittest.mock import patch -from workato_platform.cli.utils.ignore_patterns import ( +from workato_platform_cli.cli.utils.ignore_patterns import ( load_ignore_patterns, should_skip_file, ) diff --git a/tests/unit/utils/test_spinner.py b/tests/unit/utils/test_spinner.py index c4ef0be..882f11a 100644 --- a/tests/unit/utils/test_spinner.py +++ b/tests/unit/utils/test_spinner.py @@ -2,7 +2,7 @@ from unittest.mock import MagicMock, Mock, patch -from workato_platform.cli.utils.spinner import Spinner +from workato_platform_cli.cli.utils.spinner import Spinner class TestSpinner: @@ -21,7 +21,7 @@ def test_spinner_message_attribute(self) -> None: def test_spinner_start_stop_methods(self) -> None: """Test explicit start/stop methods.""" with patch( - "workato_platform.cli.utils.spinner.threading.Thread" + "workato_platform_cli.cli.utils.spinner.threading.Thread" ) as mock_thread: mock_thread_instance = Mock() mock_thread.return_value = mock_thread_instance @@ -52,7 +52,7 @@ def test_spinner_with_different_messages(self) -> None: def test_spinner_thread_safety(self) -> None: """Test that spinner handles threading correctly.""" with patch( - "workato_platform.cli.utils.spinner.threading.Thread" + "workato_platform_cli.cli.utils.spinner.threading.Thread" ) as mock_thread: mock_thread_instance = Mock() mock_thread.return_value = mock_thread_instance @@ -77,10 +77,10 @@ def test_spinner_animation_characters(self) -> None: # Should have animation characters defined assert hasattr(spinner, "spinner_chars") or hasattr(spinner, "chars") - @patch("workato_platform.cli.utils.spinner.sys.stdout") + @patch("workato_platform_cli.cli.utils.spinner.sys.stdout") def test_spinner_output_handling(self, mock_stdout: MagicMock) -> None: """Test that spinner handles terminal output correctly.""" - with patch("workato_platform.cli.utils.spinner.threading.Thread"): + with patch("workato_platform_cli.cli.utils.spinner.threading.Thread"): spinner = Spinner("Output test...") # Should not raise exception when dealing with stdout operations @@ -91,7 +91,7 @@ def test_spinner_output_handling(self, mock_stdout: MagicMock) -> None: assert mock_stdout.write.called assert mock_stdout.flush.called - @patch("workato_platform.cli.utils.spinner.sys.stdout") + @patch("workato_platform_cli.cli.utils.spinner.sys.stdout") def test_spinner_stop_without_start(self, mock_stdout: MagicMock) -> None: """Stop without starting should return zero elapsed time.""" spinner = Spinner("No start") From c83743999e22282969f925d7c86fa49da864ddad Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Tue, 28 Oct 2025 18:44:53 -0700 Subject: [PATCH 13/13] Fix lint errors: line length and import formatting - Break long function signatures and imports - Add noqa comments for unavoidable long imports - Format code with ruff - All lint checks now pass --- src/workato_platform_cli/__init__.py | 15 +-- src/workato_platform_cli/_version.py | 4 +- .../cli/commands/api_collections.py | 2 +- .../cli/commands/connections.py | 8 +- .../cli/commands/connectors/command.py | 4 +- .../cli/commands/projects/project_manager.py | 2 +- src/workato_platform_cli/cli/containers.py | 4 +- tests/unit/commands/test_api_clients.py | 100 +++++++++++++----- tests/unit/commands/test_connections.py | 76 +++++++++---- tests/unit/commands/test_data_tables.py | 24 +++-- tests/unit/test_version_checker.py | 4 +- tests/unit/utils/test_exception_handler.py | 76 +++++++++---- 12 files changed, 235 insertions(+), 84 deletions(-) diff --git a/src/workato_platform_cli/__init__.py b/src/workato_platform_cli/__init__.py index d70018d..1e30bb1 100644 --- a/src/workato_platform_cli/__init__.py +++ b/src/workato_platform_cli/__init__.py @@ -25,7 +25,9 @@ from workato_platform_cli.client.workato_api.configuration import Configuration -def _configure_retry_with_429_support(rest_client: Any, configuration: Configuration) -> None: +def _configure_retry_with_429_support( + rest_client: Any, configuration: Configuration +) -> None: """ Configure REST client to retry on 429 (Too Many Requests) errors. @@ -52,6 +54,7 @@ def _configure_retry_with_429_support(rest_client: Any, configuration: Configura if rest_client.retries is not None: try: import aiohttp_retry + rest_client.retry_client = aiohttp_retry.RetryClient( client_session=rest_client.pool_manager, retry_options=aiohttp_retry.ExponentialRetry( @@ -60,8 +63,8 @@ def _configure_retry_with_429_support(rest_client: Any, configuration: Configura start_timeout=1.0, max_timeout=120.0, retry_all_server_errors=True, - statuses={429} - ) + statuses={429}, + ), ) except ImportError: pass @@ -72,17 +75,17 @@ class Workato: def __init__(self, configuration: Configuration): self._configuration = configuration - + # Set default retries if not configured if configuration.retries is None: configuration.retries = 3 - + self._api_client = ApiClient(configuration) # Set User-Agent header with CLI version user_agent = f"workato-platform-cli/{__version__}" self._api_client.user_agent = user_agent - + # Configure retries with 429 support rest_client = self._api_client.rest_client _configure_retry_with_429_support(rest_client, configuration) diff --git a/src/workato_platform_cli/_version.py b/src/workato_platform_cli/_version.py index c0f7a48..4fe9451 100644 --- a/src/workato_platform_cli/_version.py +++ b/src/workato_platform_cli/_version.py @@ -28,7 +28,7 @@ commit_id: COMMIT_ID __commit_id__: COMMIT_ID -__version__ = version = '1.0.0rc4.dev7' -__version_tuple__ = version_tuple = (1, 0, 0, 'rc4', 'dev7') +__version__ = version = '1.0.0rc4.dev9' +__version_tuple__ = version_tuple = (1, 0, 0, 'rc4', 'dev9') __commit_id__ = commit_id = None diff --git a/src/workato_platform_cli/cli/commands/api_collections.py b/src/workato_platform_cli/cli/commands/api_collections.py index 12fd548..191e451 100644 --- a/src/workato_platform_cli/cli/commands/api_collections.py +++ b/src/workato_platform_cli/cli/commands/api_collections.py @@ -12,7 +12,7 @@ from workato_platform_cli.cli.utils.config import ConfigManager from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions from workato_platform_cli.client.workato_api.models.api_collection import ApiCollection -from workato_platform_cli.client.workato_api.models.api_collection_create_request import ( +from workato_platform_cli.client.workato_api.models.api_collection_create_request import ( # noqa: E501 ApiCollectionCreateRequest, ) from workato_platform_cli.client.workato_api.models.api_endpoint import ApiEndpoint diff --git a/src/workato_platform_cli/cli/commands/connections.py b/src/workato_platform_cli/cli/commands/connections.py index b2257a5..3b5348f 100644 --- a/src/workato_platform_cli/cli/commands/connections.py +++ b/src/workato_platform_cli/cli/commands/connections.py @@ -11,7 +11,9 @@ from dependency_injector.wiring import Provide, inject from workato_platform_cli import Workato -from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.commands.connectors.connector_manager import ( + ConnectorManager, +) from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager from workato_platform_cli.cli.containers import Container from workato_platform_cli.cli.utils import Spinner @@ -24,7 +26,9 @@ from workato_platform_cli.client.workato_api.models.connection_update_request import ( ConnectionUpdateRequest, ) -from workato_platform_cli.client.workato_api.models.picklist_request import PicklistRequest +from workato_platform_cli.client.workato_api.models.picklist_request import ( + PicklistRequest, +) from workato_platform_cli.client.workato_api.models.runtime_user_connection_create_request import ( # noqa: E501 RuntimeUserConnectionCreateRequest, ) diff --git a/src/workato_platform_cli/cli/commands/connectors/command.py b/src/workato_platform_cli/cli/commands/connectors/command.py index c1548d9..161eca5 100644 --- a/src/workato_platform_cli/cli/commands/connectors/command.py +++ b/src/workato_platform_cli/cli/commands/connectors/command.py @@ -2,7 +2,9 @@ from dependency_injector.wiring import Provide, inject -from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.commands.connectors.connector_manager import ( + ConnectorManager, +) from workato_platform_cli.cli.containers import Container from workato_platform_cli.cli.utils.exception_handler import handle_api_exceptions diff --git a/src/workato_platform_cli/cli/commands/projects/project_manager.py b/src/workato_platform_cli/cli/commands/projects/project_manager.py index f07daf9..2a3e84b 100644 --- a/src/workato_platform_cli/cli/commands/projects/project_manager.py +++ b/src/workato_platform_cli/cli/commands/projects/project_manager.py @@ -14,7 +14,7 @@ from workato_platform_cli import Workato from workato_platform_cli.cli.utils.spinner import Spinner from workato_platform_cli.client.workato_api.models.asset import Asset -from workato_platform_cli.client.workato_api.models.create_export_manifest_request import ( +from workato_platform_cli.client.workato_api.models.create_export_manifest_request import ( # noqa: E501 CreateExportManifestRequest, ) from workato_platform_cli.client.workato_api.models.create_folder_request import ( diff --git a/src/workato_platform_cli/cli/containers.py b/src/workato_platform_cli/cli/containers.py index c321b82..95e8fcb 100644 --- a/src/workato_platform_cli/cli/containers.py +++ b/src/workato_platform_cli/cli/containers.py @@ -3,7 +3,9 @@ from dependency_injector import containers, providers from workato_platform_cli import Workato -from workato_platform_cli.cli.commands.connectors.connector_manager import ConnectorManager +from workato_platform_cli.cli.commands.connectors.connector_manager import ( + ConnectorManager, +) from workato_platform_cli.cli.commands.projects.project_manager import ProjectManager from workato_platform_cli.cli.commands.recipes.validator import RecipeValidator from workato_platform_cli.cli.utils.config import ConfigManager diff --git a/tests/unit/commands/test_api_clients.py b/tests/unit/commands/test_api_clients.py index 90a26fa..3b071ff 100644 --- a/tests/unit/commands/test_api_clients.py +++ b/tests/unit/commands/test_api_clients.py @@ -35,7 +35,9 @@ from workato_platform_cli.client.workato_api.models.api_key_list_response import ( ApiKeyListResponse, ) -from workato_platform_cli.client.workato_api.models.api_key_response import ApiKeyResponse +from workato_platform_cli.client.workato_api.models.api_key_response import ( + ApiKeyResponse, +) class TestApiClientsGroup: @@ -214,7 +216,9 @@ def test_display_client_summary_basic(self) -> None: updated_at=datetime(2024, 1, 15, 10, 30, 0), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_client_summary(client) # Verify key information is displayed @@ -239,7 +243,9 @@ def test_display_client_summary_with_collections(self) -> None: updated_at=datetime(2024, 1, 15, 10, 30, 0), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_client_summary(client) # Verify collections are displayed @@ -257,7 +263,9 @@ def test_display_key_summary_basic(self) -> None: active_since=datetime(2024, 1, 15, 12, 0, 0), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify key information is displayed @@ -276,7 +284,9 @@ def test_display_key_summary_with_ip_lists(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify IP lists are displayed @@ -294,7 +304,9 @@ def test_display_key_summary_inactive(self) -> None: active_since=datetime.now(), # active_since is required field ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify inactive status is shown @@ -312,7 +324,9 @@ def test_display_key_summary_truncated_token(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify token is truncated @@ -330,7 +344,9 @@ def test_display_key_summary_short_token(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify full short token is shown @@ -348,7 +364,9 @@ def test_display_key_summary_no_api_key(self) -> None: active_since=datetime.now(), ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: display_key_summary(key) # Verify output is generated @@ -378,8 +396,12 @@ async def test_refresh_api_key_secret_success(self) -> None: ) with ( - patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.api_clients.Spinner" + ) as mock_spinner, + patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.9 @@ -422,8 +444,12 @@ async def test_refresh_api_key_secret_with_timing(self) -> None: ) with ( - patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.api_clients.Spinner" + ) as mock_spinner, + patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.5 @@ -461,8 +487,12 @@ async def test_refresh_api_key_secret_with_new_token(self) -> None: ) with ( - patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, - patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.api_clients.Spinner" + ) as mock_spinner, + patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo, ): mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 @@ -502,7 +532,9 @@ async def test_refresh_api_key_secret_different_client_ids(self) -> None: ) with ( - patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner, + patch( + "workato_platform_cli.cli.commands.api_clients.Spinner" + ) as mock_spinner, patch("workato_platform_cli.cli.commands.api_clients.click.echo"), ): mock_spinner_instance = MagicMock() @@ -593,7 +625,9 @@ def test_parse_ip_list_empty_ips() -> None: @pytest.mark.asyncio async def test_create_key_invalid_allow_list() -> None: """Test create-key command with invalid IP allow list.""" - with patch("workato_platform_cli.cli.commands.api_clients.parse_ip_list") as mock_parse: + with patch( + "workato_platform_cli.cli.commands.api_clients.parse_ip_list" + ) as mock_parse: mock_parse.return_value = None # Simulate parse failure assert create_key.callback result = await create_key.callback( @@ -612,7 +646,9 @@ async def test_create_key_invalid_allow_list() -> None: @pytest.mark.asyncio async def test_create_key_invalid_deny_list() -> None: """Test create-key command with invalid IP deny list.""" - with patch("workato_platform_cli.cli.commands.api_clients.parse_ip_list") as mock_parse: + with patch( + "workato_platform_cli.cli.commands.api_clients.parse_ip_list" + ) as mock_parse: # Return valid list for allow list, None for deny list mock_parse.side_effect = [["192.168.1.1"], None] @@ -785,7 +821,9 @@ async def test_create_success_minimal( mock_response ) - with patch("workato_platform_cli.cli.commands.api_clients.Spinner") as mock_spinner: + with patch( + "workato_platform_cli.cli.commands.api_clients.Spinner" + ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 mock_spinner.return_value = mock_spinner_instance @@ -852,7 +890,9 @@ async def test_create_command_callback_direct(self) -> None: mock_response ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: # Call the callback directly, passing workato_api_client as parameter assert create.callback await create.callback( @@ -909,7 +949,9 @@ async def test_create_key_command_callback_direct(self) -> None: mock_workato_client = AsyncMock() mock_workato_client.api_platform_api.create_api_key.return_value = mock_response - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: assert create_key.callback await create_key.callback( api_client_id=123, @@ -954,7 +996,9 @@ async def test_list_api_clients_callback_direct(self) -> None: mock_response ) - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: assert list_api_clients.callback await list_api_clients.callback( project_id=None, @@ -986,7 +1030,9 @@ async def test_list_api_keys_callback_direct(self) -> None: mock_workato_client = AsyncMock() mock_workato_client.api_platform_api.list_api_keys.return_value = mock_response - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: assert list_api_keys.callback await list_api_keys.callback( api_client_id=123, @@ -1024,7 +1070,9 @@ async def test_create_with_validation_errors(self) -> None: """Test create command with validation errors to hit error handling paths.""" mock_workato_client = AsyncMock() - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: # Call with invalid parameters that trigger validation errors assert create.callback await create.callback( @@ -1057,7 +1105,9 @@ async def test_create_with_invalid_collection_ids(self) -> None: """Test create command with invalid collection IDs.""" mock_workato_client = AsyncMock() - with patch("workato_platform_cli.cli.commands.api_clients.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.api_clients.click.echo" + ) as mock_echo: assert create.callback await create.callback( name="Test Client", diff --git a/tests/unit/commands/test_connections.py b/tests/unit/commands/test_connections.py index b66e954..cb629c0 100644 --- a/tests/unit/commands/test_connections.py +++ b/tests/unit/commands/test_connections.py @@ -558,7 +558,9 @@ class TestConnectionCreationEdgeCases: @pytest.mark.asyncio async def test_create_missing_provider_and_name(self) -> None: """Test create command with missing provider and name.""" - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert create.callback await create.callback( name="", @@ -580,7 +582,9 @@ async def test_create_invalid_json_input(self) -> None: load_config=Mock(return_value=make_stub(folder_id=123)) ) - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert create.callback await create.callback( name="Test", @@ -618,7 +622,9 @@ async def test_create_oauth_browser_error(self) -> None: "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): assert create_oauth.callback await create_oauth.callback( @@ -643,7 +649,9 @@ async def test_create_oauth_missing_folder_id(self) -> None: api_host="https://www.workato.com", ) - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert create_oauth.callback await create_oauth.callback( parent_id=1, @@ -688,7 +696,9 @@ async def test_create_oauth_opens_browser_success(self) -> None: "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): assert create_oauth.callback await create_oauth.callback( @@ -729,7 +739,9 @@ async def test_get_oauth_url_browser_error(self) -> None: "workato_platform_cli.cli.commands.connections.webbrowser.open", side_effect=OSError("Browser error"), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await get_connection_oauth_url( connection_id=123, @@ -775,7 +787,9 @@ async def test_update_connection_unauthorized_status(self) -> None: "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await update_connection( 123, @@ -830,7 +844,9 @@ async def test_update_connection_authorized_status(self) -> None: "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await update_connection( 77, @@ -852,7 +868,9 @@ async def test_update_connection_authorized_status(self) -> None: @pytest.mark.asyncio async def test_update_command_invalid_json(self) -> None: """Test update command handles invalid JSON input.""" - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert update.callback await update.callback( connection_id=5, @@ -902,7 +920,9 @@ async def test_create_missing_folder_id(self) -> None: load_config=Mock(return_value=make_stub(folder_id=None)) ) - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert create.callback await create.callback( name="Test", @@ -956,7 +976,9 @@ async def test_create_oauth_success_flow(self) -> None: "workato_platform_cli.cli.commands.connections.poll_oauth_connection_status", new=AsyncMock(), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): assert create.callback await create.callback( @@ -1016,7 +1038,9 @@ async def test_create_oauth_manual_fallback(self) -> None: "workato_platform_cli.cli.commands.connections.webbrowser.open", side_effect=OSError("browser blocked"), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): assert create.callback await create.callback( @@ -1041,7 +1065,9 @@ class TestPicklistFunctions: @pytest.mark.asyncio async def test_pick_list_invalid_json_params(self) -> None: """Test pick_list command with invalid JSON params.""" - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert pick_list.callback await pick_list.callback( id=123, @@ -1065,7 +1091,9 @@ def test_pick_lists_data_file_not_found( """Test pick_lists command when data file doesn't exist.""" mock_exists.return_value = False - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert pick_lists.callback pick_lists.callback() @@ -1085,7 +1113,9 @@ def test_pick_lists_data_file_load_error( mock_exists.return_value = True mock_open.side_effect = PermissionError("Permission denied") - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert pick_lists.callback pick_lists.callback() @@ -1107,7 +1137,9 @@ def test_pick_lists_adapter_not_found( '{"salesforce": []}' ) - with patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo: assert pick_lists.callback pick_lists.callback(adapter="nonexistent") @@ -1147,7 +1179,9 @@ async def test_poll_oauth_connection_status_connection_not_found( "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await poll_oauth_connection_status( 123, @@ -1195,7 +1229,9 @@ async def test_poll_oauth_connection_status_timeout(self, mock_sleep: Mock) -> N "workato_platform_cli.cli.commands.connections.time.time", side_effect=lambda: next(time_values), ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await poll_oauth_connection_status( 123, @@ -1239,7 +1275,9 @@ async def test_poll_oauth_connection_status_keyboard_interrupt( "workato_platform_cli.cli.commands.connections.Spinner", return_value=spinner_stub, ), - patch("workato_platform_cli.cli.commands.connections.click.echo") as mock_echo, + patch( + "workato_platform_cli.cli.commands.connections.click.echo" + ) as mock_echo, ): await poll_oauth_connection_status( 123, diff --git a/tests/unit/commands/test_data_tables.py b/tests/unit/commands/test_data_tables.py index 189b766..7efaaf9 100644 --- a/tests/unit/commands/test_data_tables.py +++ b/tests/unit/commands/test_data_tables.py @@ -96,7 +96,9 @@ async def test_list_data_tables_success( mock_response ) - with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: + with patch( + "workato_platform_cli.cli.commands.data_tables.Spinner" + ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.2 mock_spinner.return_value = mock_spinner_instance @@ -119,7 +121,9 @@ async def test_list_data_tables_empty(self, mock_workato_client: AsyncMock) -> N mock_response ) - with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: + with patch( + "workato_platform_cli.cli.commands.data_tables.Spinner" + ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 0.8 mock_spinner.return_value = mock_spinner_instance @@ -271,7 +275,9 @@ async def test_create_data_table_invalid_json( mock_config_manager: MagicMock, ) -> None: """Test data table creation with invalid JSON.""" - with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.data_tables.click.echo" + ) as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -290,7 +296,9 @@ async def test_create_data_table_non_list_schema( mock_config_manager: MagicMock, ) -> None: """Test data table creation with non-list schema.""" - with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.data_tables.click.echo" + ) as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -311,7 +319,9 @@ async def test_create_data_table_no_folder_id( mock_config.folder_id = None mock_config_manager.load_config.return_value = mock_config - with patch("workato_platform_cli.cli.commands.data_tables.click.echo") as mock_echo: + with patch( + "workato_platform_cli.cli.commands.data_tables.click.echo" + ) as mock_echo: assert create_data_table.callback await create_data_table.callback( name="Test Table", @@ -345,7 +355,9 @@ async def test_create_table_function( ) ] - with patch("workato_platform_cli.cli.commands.data_tables.Spinner") as mock_spinner: + with patch( + "workato_platform_cli.cli.commands.data_tables.Spinner" + ) as mock_spinner: mock_spinner_instance = MagicMock() mock_spinner_instance.stop.return_value = 1.5 mock_spinner.return_value = mock_spinner_instance diff --git a/tests/unit/test_version_checker.py b/tests/unit/test_version_checker.py index 9ba0bb7..1072e0f 100644 --- a/tests/unit/test_version_checker.py +++ b/tests/unit/test_version_checker.py @@ -609,7 +609,9 @@ def test_should_check_for_updates_old_cache( old_time = time.time() - (CHECK_INTERVAL + 100) os.utime(checker.cache_file, (old_time, old_time)) - with patch("workato_platform_cli.cli.utils.version_checker.HAS_DEPENDENCIES", True): + with patch( + "workato_platform_cli.cli.utils.version_checker.HAS_DEPENDENCIES", True + ): assert checker.should_check_for_updates() is True @patch("workato_platform_cli.cli.utils.version_checker.urllib.request.urlopen") diff --git a/tests/unit/utils/test_exception_handler.py b/tests/unit/utils/test_exception_handler.py index b7c6b3d..99300b5 100644 --- a/tests/unit/utils/test_exception_handler.py +++ b/tests/unit/utils/test_exception_handler.py @@ -89,7 +89,9 @@ def failing_function() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_with_http_error(self, mock_echo: MagicMock) -> None: """Test handling of HTTP-like errors.""" - from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import ( + UnauthorizedException, + ) @handle_api_exceptions def http_error_function() -> None: @@ -153,7 +155,9 @@ def interrupted_function() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_handle_api_exceptions_error_formatting(self, mock_echo: MagicMock) -> None: """Test that error messages are formatted appropriately.""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) @handle_api_exceptions def error_function() -> None: @@ -176,7 +180,9 @@ async def test_async_handler_handles_forbidden_error( self, mock_echo: MagicMock, ) -> None: - from workato_platform_cli.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ( + ForbiddenException, + ) @handle_api_exceptions async def failing_async() -> None: @@ -186,20 +192,26 @@ async def failing_async() -> None: mock_echo.assert_any_call("❌ Access forbidden") def test_extract_error_details_from_message(self) -> None: - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) exc = BadRequestException(status=400, body='{"message": "Invalid data"}') assert _extract_error_details(exc) == "Invalid data" def test_extract_error_details_from_errors_list(self) -> None: - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) body = '{"errors": ["Field is required"]}' exc = BadRequestException(status=400, body=body) assert _extract_error_details(exc) == "Validation error: Field is required" def test_extract_error_details_from_errors_dict(self) -> None: - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) body = '{"errors": {"field": ["must be unique"]}}' exc = BadRequestException(status=400, body=body) @@ -215,7 +227,9 @@ def test_extract_error_details_fallback_to_raw(self) -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_bad_request(self, mock_echo: MagicMock) -> None: """Test sync handler with BadRequestException""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) @handle_api_exceptions def sync_bad_request() -> None: @@ -243,7 +257,9 @@ def sync_unprocessable() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_unauthorized(self, mock_echo: MagicMock) -> None: """Test sync handler with UnauthorizedException""" - from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import ( + UnauthorizedException, + ) @handle_api_exceptions def sync_unauthorized() -> None: @@ -256,7 +272,9 @@ def sync_unauthorized() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") def test_sync_handler_forbidden(self, mock_echo: MagicMock) -> None: """Test sync handler with ForbiddenException""" - from workato_platform_cli.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ( + ForbiddenException, + ) @handle_api_exceptions def sync_forbidden() -> None: @@ -323,7 +341,9 @@ def sync_generic_error() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_bad_request(self, mock_echo: MagicMock) -> None: """Test async handler with BadRequestException""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) @handle_api_exceptions async def async_bad_request() -> None: @@ -353,7 +373,9 @@ async def async_unprocessable() -> None: @patch("workato_platform_cli.cli.utils.exception_handler.click.echo") async def test_async_handler_unauthorized(self, mock_echo: MagicMock) -> None: """Test async handler with UnauthorizedException""" - from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import ( + UnauthorizedException, + ) @handle_api_exceptions async def async_unauthorized() -> None: @@ -416,7 +438,9 @@ async def async_generic_error() -> None: def test_extract_error_details_invalid_json(self) -> None: """Test error details extraction with invalid JSON""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) exc = BadRequestException(status=400, body="invalid json {") # Should fallback to raw body when JSON parsing fails @@ -424,7 +448,9 @@ def test_extract_error_details_invalid_json(self) -> None: def test_extract_error_details_no_message_or_errors(self) -> None: """Test error details extraction with valid JSON but no message/errors""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) exc = BadRequestException(status=400, body='{"other": "data"}') # Should fallback to raw body when no message/errors found @@ -432,7 +458,9 @@ def test_extract_error_details_no_message_or_errors(self) -> None: def test_extract_error_details_empty_errors_list(self) -> None: """Test error details extraction with empty errors list""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) exc = BadRequestException(status=400, body='{"errors": []}') # Should fallback to raw body when errors list is empty @@ -440,7 +468,9 @@ def test_extract_error_details_empty_errors_list(self) -> None: def test_extract_error_details_non_string_errors(self) -> None: """Test error details extraction with non-string errors""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) exc = BadRequestException(status=400, body='{"errors": [123, null]}') # Should handle non-string errors gracefully @@ -454,7 +484,9 @@ def test_json_output_bad_request( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for BadRequestException""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) # Mock Click context to return json output mode mock_ctx = MagicMock() @@ -477,7 +509,9 @@ def test_json_output_unauthorized( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for UnauthorizedException""" - from workato_platform_cli.client.workato_api.exceptions import UnauthorizedException + from workato_platform_cli.client.workato_api.exceptions import ( + UnauthorizedException, + ) mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -498,7 +532,9 @@ def test_json_output_forbidden( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output for ForbiddenException""" - from workato_platform_cli.client.workato_api.exceptions import ForbiddenException + from workato_platform_cli.client.workato_api.exceptions import ( + ForbiddenException, + ) mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"} @@ -603,7 +639,9 @@ def test_json_output_with_error_details( self, mock_get_context: MagicMock, mock_echo: MagicMock ) -> None: """Test JSON output includes error details from body""" - from workato_platform_cli.client.workato_api.exceptions import BadRequestException + from workato_platform_cli.client.workato_api.exceptions import ( + BadRequestException, + ) mock_ctx = MagicMock() mock_ctx.params = {"output_mode": "json"}