# Code generated by lark_sdk_gen. DO NOT EDIT.

import typing
from pylark.lark_request import Response

from pylark.api_service_approval_approval_get import (
    GetApprovalReq,
    GetApprovalResp,
    _gen_get_approval_req,
)
from pylark.api_service_approval_instance_list import (
    GetApprovalInstanceListReq,
    GetApprovalInstanceListResp,
    _gen_get_approval_instance_list_req,
)
from pylark.api_service_approval_instance_get import (
    GetApprovalInstanceReq,
    GetApprovalInstanceResp,
    _gen_get_approval_instance_req,
)
from pylark.api_service_approval_instance_create import (
    CreateApprovalInstanceReq,
    CreateApprovalInstanceResp,
    _gen_create_approval_instance_req,
)
from pylark.api_service_approval_instance_approve import (
    ApproveApprovalInstanceReq,
    ApproveApprovalInstanceResp,
    _gen_approve_approval_instance_req,
)
from pylark.api_service_approval_instance_reject import (
    RejectApprovalInstanceReq,
    RejectApprovalInstanceResp,
    _gen_reject_approval_instance_req,
)
from pylark.api_service_approval_instance_transfer import (
    TransferApprovalInstanceReq,
    TransferApprovalInstanceResp,
    _gen_transfer_approval_instance_req,
)
from pylark.api_service_approval_instance_cancel import (
    CancelApprovalInstanceReq,
    CancelApprovalInstanceResp,
    _gen_cancel_approval_instance_req,
)
from pylark.api_service_approval_file_upload import (
    UploadApprovalFileReq,
    UploadApprovalFileResp,
    _gen_upload_approval_file_req,
)
from pylark.api_service_approval_instance_search import (
    SearchApprovalInstanceReq,
    SearchApprovalInstanceResp,
    _gen_search_approval_instance_req,
)
from pylark.api_service_approval_task_search import (
    SearchApprovalTaskReq,
    SearchApprovalTaskResp,
    _gen_search_approval_task_req,
)
from pylark.api_service_approval_carbon_copy_search import (
    SearchApprovalCarbonCopyReq,
    SearchApprovalCarbonCopyResp,
    _gen_search_approval_carbon_copy_req,
)
from pylark.api_service_approval_carbon_copy_create import (
    CreateApprovalCarbonCopyReq,
    CreateApprovalCarbonCopyResp,
    _gen_create_approval_carbon_copy_req,
)


if typing.TYPE_CHECKING:
    from lark import Lark


class LarkApprovalService(object):
    cli: "Lark"

    def __init__(self, cli: "Lark"):
        self.cli = cli

    def get_approval(
        self, request: GetApprovalReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetApprovalResp, Response]:
        return self.cli.raw_request(_gen_get_approval_req(request, options))

    def get_approval_instance_list(
        self, request: GetApprovalInstanceListReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetApprovalInstanceListResp, Response]:
        return self.cli.raw_request(
            _gen_get_approval_instance_list_req(request, options)
        )

    def get_approval_instance(
        self, request: GetApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetApprovalInstanceResp, Response]:
        return self.cli.raw_request(_gen_get_approval_instance_req(request, options))

    def create_approval_instance(
        self, request: CreateApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[CreateApprovalInstanceResp, Response]:
        return self.cli.raw_request(_gen_create_approval_instance_req(request, options))

    def approve_approval_instance(
        self, request: ApproveApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[ApproveApprovalInstanceResp, Response]:
        return self.cli.raw_request(
            _gen_approve_approval_instance_req(request, options)
        )

    def reject_approval_instance(
        self, request: RejectApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[RejectApprovalInstanceResp, Response]:
        return self.cli.raw_request(_gen_reject_approval_instance_req(request, options))

    def transfer_approval_instance(
        self, request: TransferApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[TransferApprovalInstanceResp, Response]:
        return self.cli.raw_request(
            _gen_transfer_approval_instance_req(request, options)
        )

    def cancel_approval_instance(
        self, request: CancelApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[CancelApprovalInstanceResp, Response]:
        return self.cli.raw_request(_gen_cancel_approval_instance_req(request, options))

    def upload_approval_file(
        self, request: UploadApprovalFileReq, options: typing.List[str] = None
    ) -> typing.Tuple[UploadApprovalFileResp, Response]:
        return self.cli.raw_request(_gen_upload_approval_file_req(request, options))

    def search_approval_instance(
        self, request: SearchApprovalInstanceReq, options: typing.List[str] = None
    ) -> typing.Tuple[SearchApprovalInstanceResp, Response]:
        return self.cli.raw_request(_gen_search_approval_instance_req(request, options))

    def search_approval_task(
        self, request: SearchApprovalTaskReq, options: typing.List[str] = None
    ) -> typing.Tuple[SearchApprovalTaskResp, Response]:
        return self.cli.raw_request(_gen_search_approval_task_req(request, options))

    def search_approval_carbon_copy(
        self, request: SearchApprovalCarbonCopyReq, options: typing.List[str] = None
    ) -> typing.Tuple[SearchApprovalCarbonCopyResp, Response]:
        return self.cli.raw_request(
            _gen_search_approval_carbon_copy_req(request, options)
        )

    def create_approval_carbon_copy(
        self, request: CreateApprovalCarbonCopyReq, options: typing.List[str] = None
    ) -> typing.Tuple[CreateApprovalCarbonCopyResp, Response]:
        return self.cli.raw_request(
            _gen_create_approval_carbon_copy_req(request, options)
        )
