# coding: utf-8

"""
    Slack Web API

    One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.

    The version of the OpenAPI document: 1.7.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, StrictStr
from typing import Optional
from typing_extensions import Annotated
from slack_beta_ti.models.default_success_template import DefaultSuccessTemplate

from slack_beta_ti.api_client import ApiClient, RequestSerialized
from slack_beta_ti.api_response import ApiResponse
from slack_beta_ti.rest import RESTResponseType


class WorkflowsApi:
    """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
    def workflows_step_completed(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        outputs: Annotated[Optional[StrictStr], Field(description="Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """workflows_step_completed

        Indicate that an app's step in a workflow completed execution.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param outputs: Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.
        :type outputs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_completed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            outputs=outputs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def workflows_step_completed_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        outputs: Annotated[Optional[StrictStr], Field(description="Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """workflows_step_completed

        Indicate that an app's step in a workflow completed execution.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param outputs: Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.
        :type outputs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_completed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            outputs=outputs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def workflows_step_completed_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        outputs: Annotated[Optional[StrictStr], Field(description="Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """workflows_step_completed

        Indicate that an app's step in a workflow completed execution.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param outputs: Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.
        :type outputs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_completed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            outputs=outputs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _workflows_step_completed_serialize(
        self,
        token,
        workflow_step_execute_id,
        outputs,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 workflow_step_execute_id is not None:
            
            _query_params.append(('workflow_step_execute_id', workflow_step_execute_id))
            
        if outputs is not None:
            
            _query_params.append(('outputs', outputs))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/workflows.stepCompleted',
            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
    def workflows_step_failed(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        error: Annotated[StrictStr, Field(description="A JSON-based object with a `message` property that should contain a human readable error message.")],
        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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """workflows_step_failed

        Indicate that an app's step in a workflow failed to execute.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param error: A JSON-based object with a `message` property that should contain a human readable error message. (required)
        :type error: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_failed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            error=error,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def workflows_step_failed_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        error: Annotated[StrictStr, Field(description="A JSON-based object with a `message` property that should contain a human readable error message.")],
        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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """workflows_step_failed

        Indicate that an app's step in a workflow failed to execute.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param error: A JSON-based object with a `message` property that should contain a human readable error message. (required)
        :type error: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_failed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            error=error,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def workflows_step_failed_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_execute_id: Annotated[StrictStr, Field(description="Context identifier that maps to the correct workflow step execution.")],
        error: Annotated[StrictStr, Field(description="A JSON-based object with a `message` property that should contain a human readable error message.")],
        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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """workflows_step_failed

        Indicate that an app's step in a workflow failed to execute.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_execute_id: Context identifier that maps to the correct workflow step execution. (required)
        :type workflow_step_execute_id: str
        :param error: A JSON-based object with a `message` property that should contain a human readable error message. (required)
        :type error: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_step_failed_serialize(
            token=token,
            workflow_step_execute_id=workflow_step_execute_id,
            error=error,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _workflows_step_failed_serialize(
        self,
        token,
        workflow_step_execute_id,
        error,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 workflow_step_execute_id is not None:
            
            _query_params.append(('workflow_step_execute_id', workflow_step_execute_id))
            
        if error is not None:
            
            _query_params.append(('error', error))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/workflows.stepFailed',
            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
    def workflows_update_step(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_edit_id: Annotated[StrictStr, Field(description="A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.")],
        inputs: Annotated[Optional[StrictStr], Field(description="A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).")] = None,
        outputs: Annotated[Optional[StrictStr], Field(description="An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.")] = None,
        step_name: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override the step name that is shown in the Workflow Builder.")] = None,
        step_image_url: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override app image that is shown in the Workflow Builder.")] = 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__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """workflows_update_step

        Update the configuration for a workflow extension step.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_edit_id: A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`. (required)
        :type workflow_step_edit_id: str
        :param inputs: A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).
        :type inputs: str
        :param outputs: An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.
        :type outputs: str
        :param step_name: An optional field that can be used to override the step name that is shown in the Workflow Builder.
        :type step_name: str
        :param step_image_url: An optional field that can be used to override app image that is shown in the Workflow Builder.
        :type step_image_url: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_update_step_serialize(
            token=token,
            workflow_step_edit_id=workflow_step_edit_id,
            inputs=inputs,
            outputs=outputs,
            step_name=step_name,
            step_image_url=step_image_url,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def workflows_update_step_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_edit_id: Annotated[StrictStr, Field(description="A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.")],
        inputs: Annotated[Optional[StrictStr], Field(description="A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).")] = None,
        outputs: Annotated[Optional[StrictStr], Field(description="An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.")] = None,
        step_name: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override the step name that is shown in the Workflow Builder.")] = None,
        step_image_url: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override app image that is shown in the Workflow Builder.")] = 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__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """workflows_update_step

        Update the configuration for a workflow extension step.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_edit_id: A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`. (required)
        :type workflow_step_edit_id: str
        :param inputs: A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).
        :type inputs: str
        :param outputs: An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.
        :type outputs: str
        :param step_name: An optional field that can be used to override the step name that is shown in the Workflow Builder.
        :type step_name: str
        :param step_image_url: An optional field that can be used to override app image that is shown in the Workflow Builder.
        :type step_image_url: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_update_step_serialize(
            token=token,
            workflow_step_edit_id=workflow_step_edit_id,
            inputs=inputs,
            outputs=outputs,
            step_name=step_name,
            step_image_url=step_image_url,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def workflows_update_step_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `workflow.steps:execute`")],
        workflow_step_edit_id: Annotated[StrictStr, Field(description="A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.")],
        inputs: Annotated[Optional[StrictStr], Field(description="A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).")] = None,
        outputs: Annotated[Optional[StrictStr], Field(description="An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.")] = None,
        step_name: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override the step name that is shown in the Workflow Builder.")] = None,
        step_image_url: Annotated[Optional[StrictStr], Field(description="An optional field that can be used to override app image that is shown in the Workflow Builder.")] = 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__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """workflows_update_step

        Update the configuration for a workflow extension step.

        :param token: Authentication token. Requires scope: `workflow.steps:execute` (required)
        :type token: str
        :param workflow_step_edit_id: A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`. (required)
        :type workflow_step_edit_id: str
        :param inputs: A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).
        :type inputs: str
        :param outputs: An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.
        :type outputs: str
        :param step_name: An optional field that can be used to override the step name that is shown in the Workflow Builder.
        :type step_name: str
        :param step_image_url: An optional field that can be used to override app image that is shown in the Workflow Builder.
        :type step_image_url: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._workflows_update_step_serialize(
            token=token,
            workflow_step_edit_id=workflow_step_edit_id,
            inputs=inputs,
            outputs=outputs,
            step_name=step_name,
            step_image_url=step_image_url,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _workflows_update_step_serialize(
        self,
        token,
        workflow_step_edit_id,
        inputs,
        outputs,
        step_name,
        step_image_url,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _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 workflow_step_edit_id is not None:
            
            _query_params.append(('workflow_step_edit_id', workflow_step_edit_id))
            
        if inputs is not None:
            
            _query_params.append(('inputs', inputs))
            
        if outputs is not None:
            
            _query_params.append(('outputs', outputs))
            
        if step_name is not None:
            
            _query_params.append(('step_name', step_name))
            
        if step_image_url is not None:
            
            _query_params.append(('step_image_url', step_image_url))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/workflows.updateStep',
            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__
        )


