Skip to content
Merged
2 changes: 1 addition & 1 deletion src/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

workato_platform/__init__.py
workato_platform_cli/__init__.py
79 changes: 0 additions & 79 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
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
Expand Down Expand Up @@ -165,82 +164,4 @@ 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
10 changes: 9 additions & 1 deletion src/workato_platform_cli/cli/commands/api_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

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.exception_handler import (
handle_api_exceptions,
handle_cli_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 (
Expand Down Expand Up @@ -69,6 +72,7 @@ def api_clients() -> None:
@click.option(
"--cert-bundle-ids", help="Comma-separated list of certificate bundle IDs for mTLS"
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create(
Expand Down Expand Up @@ -242,6 +246,7 @@ def validate_create_parameters(
"--ip-allow-list", help="Comma-separated list of IP addresses to allowlist"
)
@click.option("--ip-deny-list", help="Comma-separated list of IP addresses to deny")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create_key(
Expand Down Expand Up @@ -374,6 +379,7 @@ def validate_ip_address(ip: str) -> bool:
"--api-key-id", required=True, type=int, help="ID of the API key to refresh"
)
@click.option("--force", is_flag=True, help="Skip confirmation prompt")
@handle_cli_exceptions
@handle_api_exceptions
async def refresh_secret(
api_client_id: int,
Expand Down Expand Up @@ -452,6 +458,7 @@ async def refresh_api_key_secret(

@api_clients.command(name="list")
@click.option("--project-id", type=int, help="Filter API clients by project ID")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_api_clients(
Expand Down Expand Up @@ -509,6 +516,7 @@ async def list_api_clients(
type=int,
help="ID of the API client to list keys for",
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_api_keys(
Expand Down
9 changes: 8 additions & 1 deletion src/workato_platform_cli/cli/commands/api_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
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.cli.utils.exception_handler import (
handle_api_exceptions,
handle_cli_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 ( # noqa: E501
ApiCollectionCreateRequest,
Expand Down Expand Up @@ -43,6 +46,7 @@ def api_collections() -> None:
type=int,
help="ID of the proxy connection to use",
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create(
Expand Down Expand Up @@ -144,6 +148,7 @@ async def create(
type=int,
help="Items per page (default: 100, max: 100)",
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_collections(
Expand Down Expand Up @@ -209,6 +214,7 @@ async def list_collections(
@click.option(
"--api-collection-id", required=True, type=int, help="ID of the API collection"
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_endpoints(
Expand Down Expand Up @@ -282,6 +288,7 @@ async def list_endpoints(
is_flag=True,
help="Enable all endpoints in the collection (requires --api-collection-id)",
)
@handle_cli_exceptions
@handle_api_exceptions
async def enable_endpoint(
api_endpoint_id: int,
Expand Down
6 changes: 5 additions & 1 deletion src/workato_platform_cli/cli/commands/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
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.cli.utils.exception_handler import (
handle_api_exceptions,
handle_cli_exceptions,
)
from workato_platform_cli.client.workato_api.models.asset import Asset


@click.command()
@click.option(
"--folder-id", help="Folder ID (uses current project folder if not specified)"
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def assets(
Expand Down
11 changes: 10 additions & 1 deletion src/workato_platform_cli/cli/commands/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
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.cli.utils.exception_handler import (
handle_api_exceptions,
handle_cli_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,
Expand Down Expand Up @@ -117,6 +120,7 @@ def connections() -> None:
help="Create as shell connection (no authentication test)", # noboost
)
@click.option("--input", "input_params", help="Connection parameters as JSON string")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create(
Expand Down Expand Up @@ -274,6 +278,7 @@ async def create(
"--redirect-url",
help="URL to redirect user after successful token acquisition (optional)",
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create_oauth(
Expand Down Expand Up @@ -382,6 +387,7 @@ async def create_oauth(
@click.option(
"--input-file", help="Path to JSON file containing updated connection parameters"
)
@handle_cli_exceptions
@handle_api_exceptions
async def update(
connection_id: int,
Expand Down Expand Up @@ -537,6 +543,7 @@ async def update_connection(
@click.option("--tags", help="Filter by connection tags")
@click.option("--provider", help="Filter by provider type (e.g., salesforce, jira)")
@click.option("--unauthorized", is_flag=True, help="Show only authorized connections")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_connections(
Expand Down Expand Up @@ -757,6 +764,7 @@ def display_connection_summary(connection: Connection) -> None:
default=True,
help="Automatically open OAuth URL in browser",
)
@handle_cli_exceptions
@handle_api_exceptions
async def get_oauth_url(
connection_id: int,
Expand Down Expand Up @@ -862,6 +870,7 @@ def show_connection_statistics(connections: list[Connection]) -> None:
"--params",
help='Pick list params as JSON string (e.g. \'{"sobject_name": "Invoice__c"}\')',
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def pick_list(
Expand Down
7 changes: 6 additions & 1 deletion src/workato_platform_cli/cli/commands/connectors/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
ConnectorManager,
)
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.exception_handler import (
handle_api_exceptions,
handle_cli_exceptions,
)


@click.group()
Expand All @@ -22,6 +25,7 @@ def connectors() -> None:
help="List platform connectors with trigger and action metadata",
)
@click.option("--custom", is_flag=True, help="List custom connectors")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_connectors(
Expand Down Expand Up @@ -57,6 +61,7 @@ async def list_connectors(
@click.option("--provider", help="Show parameters for a specific provider")
@click.option("--oauth-only", is_flag=True, help="Show only OAuth-enabled providers")
@click.option("--search", help="Search provider names (case-insensitive)")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def parameters(
Expand Down
7 changes: 6 additions & 1 deletion src/workato_platform_cli/cli/commands/data_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
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.cli.utils.exception_handler import (
handle_api_exceptions,
handle_cli_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,
Expand All @@ -29,6 +32,7 @@ def data_tables() -> None:


@data_tables.command(name="list")
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def list_data_tables(
Expand Down Expand Up @@ -78,6 +82,7 @@ async def list_data_tables(
@click.option(
"--schema-json", required=True, help="JSON string containing table schema"
)
@handle_cli_exceptions
@inject
@handle_api_exceptions
async def create_data_table(
Expand Down
6 changes: 5 additions & 1 deletion src/workato_platform_cli/cli/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
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.cli.utils.exception_handler import (
handle_api_exceptions,
handle_cli_exceptions,
)
from workato_platform_cli.client.workato_api.configuration import Configuration


Expand Down Expand Up @@ -39,6 +42,7 @@
default="table",
help="Output format: table (default) or json (only with --non-interactive)",
)
@handle_cli_exceptions
@handle_api_exceptions
async def init(
profile: str | None = None,
Expand Down
6 changes: 6 additions & 0 deletions src/workato_platform_cli/cli/commands/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from workato_platform_cli.cli.containers import Container
from workato_platform_cli.cli.utils.config import ConfigData, ConfigManager
from workato_platform_cli.cli.utils.exception_handler import handle_cli_exceptions


@click.group()
Expand All @@ -26,6 +27,7 @@ def profiles() -> None:
default="table",
help="Output format: table (default) or json",
)
@handle_cli_exceptions
@inject
async def list_profiles(
output_mode: str = "table",
Expand Down Expand Up @@ -66,6 +68,7 @@ async def list_profiles(


@profiles.command()
@handle_cli_exceptions
@inject
async def show(
profile_name: str,
Expand Down Expand Up @@ -117,6 +120,7 @@ async def show(

@profiles.command()
@click.argument("profile_name")
@handle_cli_exceptions
@inject
async def use(
profile_name: str,
Expand Down Expand Up @@ -168,6 +172,7 @@ async def use(
default="table",
help="Output format: table (default) or json",
)
@handle_cli_exceptions
@inject
async def status(
output_mode: str = "table",
Expand Down Expand Up @@ -335,6 +340,7 @@ async def status(
@profiles.command()
@click.argument("profile_name")
@click.confirmation_option(prompt="Are you sure you want to delete this profile?")
@handle_cli_exceptions
@inject
async def delete(
profile_name: str,
Expand Down
Loading