# coding: utf-8

from __future__ import absolute_import, division, print_function, unicode_literals

from miwork.__version__ import __version__  # NOQA
from miwork.api import OpenLark
from miwork.api_app_link import APIAppLink
from miwork.api_approval import ApprovalUploadFileType
from miwork.api_calendar import CalendarRole
from miwork.dt_application import App
from miwork.dt_approval import (ApprovalComment, ApprovalDefinition, ApprovalForm, ApprovalInstance, ApprovalNode,
                                ApprovalTask)
from miwork.dt_calendar import Calendar, CalendarAttendee, CalendarEvent
from miwork.dt_callback import (EventAppOpen, EventAppOpenUser, EventApproval, EventAppTicket,
                                EventContactDepartment, EventContactScope, EventContactUser, EventLeaveApproval,
                                EventMessage, EventMessageMergeForward, EventP2PCreateChat, EventP2PCreateChatUser,
                                EventRemedyApproval, EventRemoveAddBot, EventRemoveAddBotI18NTitle,
                                EventShiftApproval, EventTripApproval, EventTripApprovalSchedule,
                                EventUserInAndOutChat, EventWorkApproval)
from miwork.dt_code import Bot, Chat, I18NTitle, MinaCodeToSessionResp, OAuthCodeToSessionResp, SimpleUser, User
from miwork.dt_contact import (ContactAsyncChildTaskInfo, ContactAsyncTaskResult, DepartmentUser,
                               DepartmentUserAvatar, DepartmentUserCustomAttr, DepartmentUserCustomAttrValue,
                               DepartmentUserOrder, DepartmentUserPosition, DepartmentUserStatus, EmployeeType,
                               Gender, Role, SimpleDepartment, SimpleUserWithPosition)
from miwork.dt_drive import (DriveComment, DriveCopyFile, DriveCreateFile, DriveDeleteFile, DriveDeleteFlag,
                             DriveDocFileMeta, DriveFileMeta, DriveFilePermission,
                             DriveFilePublicLinkSharePermission, DriveFileToken, DriveFileType, DriveFileUser,
                             DriveFileUserPermission, DriveFolderMeta, DriveInsertSheet, DriveSheetCellAt,
                             DriveSheetCellURL, DriveSheetMergeType, DriveSheetMeta, DriveSheetStyle,
                             DriveSheetStyleBorderType, DriveSheetStyleFont, DriveSheetStyleHorizontalAlign,
                             DriveSheetStyleNumber, DriveSheetStyleTextDecoration, DriveSheetStyleVerticalAlign,
                             DriveSubSheetMeta, ReadDriveSheetRequest, WriteDriveSheetRequest)
from miwork.dt_enum import (ApprovalInstanceStatus, ApprovalTaskStatus, ApprovalTaskTypeStatus, ApprovalTimelineType,
                            CalendarEventVisibility, EventType, I18NType, ImageColor, MeetingReplyStatus,
                            MessageType, MethodType, PayBuyType, PayPricePlanType, PayStatus, UrgentType)
from miwork.dt_meeting_room import Building, Room, RoomFreeBusy
from miwork.dt_message import (CardAction, CardButton, CardHeader, CardURL, I18nText, MessageAt, MessageImage,
                               MessageLink, MessageText)
from miwork.dt_pay import PayOrder
from miwork.dt_req import CreateDepartmentRequest, CreateUserRequest, UpdateUserRequest
from miwork.exception import (LarkAllOpenIDInvalidException, LarkAppHasNoBotException,
                              LarkAppIsNotVisibleToUserException, LarkAppNotExistException,
                              LarkApprovalApprovalCodeNotFoundException, LarkApprovalDepartmentValidFailedException,
                              LarkApprovalForbiddenException, LarkApprovalFormValidFailedException,
                              LarkApprovalInstanceCodeConflictException, LarkApprovalInstanceCodeNotFoundException,
                              LarkApprovalInvalidRequestParamsException, LarkApprovalNeedPayException,
                              LarkApprovalNotExistException, LarkApprovalSubscriptionExistException,
                              LarkApprovalTaskIDNotFoundException, LarkApprovalUserNotFoundException,
                              LarkAppUnavailableException, LarkAppUsageInfoNotExistException, LarkBanAtALLException,
                              LarkBotForbiddenToGetImageBelongToThemException, LarkBotInChatFullException,
                              LarkBotIsNotMessageOwnerException, LarkBotNotGroupAdminException,
                              LarkBotNotInChatException, LarkChatDisbandedException,
                              LarkCheckOpenChatIDFailException, LarkConflictAppIDException,
                              LarkDriveDuplicateException, LarkDriveEmptySheetIDException,
                              LarkDriveEmptySheetTitleException, LarkDriveEmptyValueException,
                              LarkDriveExistSheetIDException, LarkDriveExistSheetTitleException,
                              LarkDriveFailedException, LarkDriveFailException, LarkDriveForbiddenException,
                              LarkDriveInternalErrorException, LarkDriveInvalidOperationException,
                              LarkDriveInvalidUsersException, LarkDriveLoginRequiredException,
                              LarkDriveMetaDeletedException, LarkDriveMetaNotExistException,
                              LarkDriveOutOfLimitException, LarkDriveParamErrorException,
                              LarkDrivePermissionFailException, LarkDriveProcessingException,
                              LarkDriveReviewNotPassException, LarkDriveSameSheetIDOrTitleException,
                              LarkDriveSheetIDNotFoundException, LarkDriveSpreadSheetNotFoundException,
                              LarkDriveTimeoutException, LarkDriveTooManyRequestException,
                              LarkDriveUserNoSharePermissionException, LarkDriveWrongRangeException,
                              LarkDriveWrongRequestBodyException, LarkDriveWrongRequestJsonException,
                              LarkDriveWrongRowOrColException, LarkDriveWrongSheetIDException,
                              LarkEmployeeIDNotExistException, LarkEmptyChatIDException,
                              LarkForbiddenBotBatchSendMessageToDepartmentException,
                              LarkForbiddenBotBatchSendMessageToUserException, LarkForbiddenBotDisbandChatException,
                              LarkForbiddenSendMessageException, LarkForbiddenUrgentException,
                              LarkFrequencyLimitException, LarkGetAppAccessTokenFailException,
                              LarkGetChatIDFailException, LarkGetCheckSecurityTokenFailException,
                              LarkGetEmployeeIDFailException, LarkGetMessageIDFailException,
                              LarkGetOpenChatIDFailException, LarkGetOpenDepartmentIDFailException,
                              LarkGetOpenIDFailException, LarkGetSSOAccessTokenFailException,
                              LarkGetTenantAccessTokenFailException, LarkGetUserInfoFailOrUserIDNotExistException,
                              LarkImageKeyNotExistException, LarkInternalException,
                              LarkInvalidAppAccessTokenException, LarkInvalidAppIDException,
                              LarkInvalidAppTicketException, LarkInvalidArguments, LarkInvalidMessageIDException,
                              LarkInvalidOpenChatIDException, LarkInvalidTenantAccessTokenException,
                              LarkInvalidTenantCodeException, LarkInviteBotToChatFailException,
                              LarkInviteUserToChatInvalidParamsException, LarkMeetingRoomInvalidBuildingIDException,
                              LarkMeetingRoomInvalidFieldSelectionException,
                              LarkMeetingRoomInvalidPageTokenException, LarkMeetingRoomInvalidRoomIDException,
                              LarkMeetingRoomTimeFormatMustFollowRFC3339StandardException,
                              LarkMessageTooOldException, LarkNoPermissionToGotException,
                              LarkNotOpenApplicationSendMessagePermissionException,
                              LarkOnlyChatAdminCanInviteUserException, LarkOpenDepartmentIDNotExistException,
                              LarkOpenIDNotExistException, LarkOwnerOfBotIsNotInChatException,
                              LarkRemoveUserFromChatInvalidParamsException, LarkRequestParamsInvalidException,
                              LarkSendAppTicketFailException, LarkSendMessageFailException,
                              LarkUnsupportedChatCrossTenantException, LarkUnsupportedCrossTenantException,
                              LarkUnsupportedUrgentTypeException, LarkUpdateChatInvalidParamsException,
                              LarkUpdateChatNameFailException, LarkUploadImageInvalidParamsException,
                              LarkUserCannotGrantToChatAdminException, LarkUserNotActiveException,
                              LarkWrongAppSecretException, LarkWrongMessageIDException, OpenLarkException)

__author__ = 'chenyunpeng.1024 <chenyunpeng.1024@bytedance.com>'

__all__ = {
    'OpenLark',

    # datatype
    'SimpleUser',
    'User',
    'Bot',
    'Chat',
    'MinaCodeToSessionResp',
    'OAuthCodeToSessionResp',
    'I18NTitle',

    'APIAppLink',

    # callback datatype
    'EventMessageMergeForward',
    'EventMessage',
    'EventApproval',
    'EventLeaveApproval',
    'EventWorkApproval',
    'EventShiftApproval',
    'EventRemedyApproval',
    'EventTripApprovalSchedule',
    'EventTripApproval',
    'EventAppOpenUser',
    'EventAppOpen',
    'EventContactUser',
    'EventContactDepartment',
    'EventContactScope',
    'EventRemoveAddBot',
    'EventRemoveAddBotI18NTitle',
    'EventAppTicket',
    'EventP2PCreateChat',
    'EventP2PCreateChatUser',
    'EventUserInAndOutChat',

    # message datatype,
    'MessageText',
    'MessageAt',
    'MessageImage',
    'MessageLink',
    'I18nText',
    'CardURL',
    'CardHeader',
    'CardButton',
    'CardAction',

    # 审批
    'ApprovalNode',
    'ApprovalForm',
    'ApprovalDefinition',
    'ApprovalComment',
    'ApprovalInstanceStatus',
    'ApprovalTaskStatus',
    'ApprovalTaskTypeStatus',
    'ApprovalTask',
    'ApprovalInstance',
    'ApprovalTimelineType',

    # calendar datatype
    'Calendar',
    'CalendarAttendee',
    'CalendarEvent',

    # drive folder
    'DriveFileType',
    'DriveFolderMeta',
    'DriveCreateFile',
    'DriveDeleteFile',
    'DriveCopyFile',
    'DriveDeleteFlag',
    'DriveDocFileMeta',
    'DriveComment',
    'DriveFileToken',
    'DriveFileMeta',
    'DriveSubSheetMeta',
    'DriveSheetMeta',
    'DriveInsertSheet',
    'DriveSheetCellURL',
    'DriveSheetCellAt',
    'DriveSheetStyleTextDecoration',
    'DriveSheetStyleNumber',
    'DriveSheetStyleHorizontalAlign',
    'DriveSheetStyleVerticalAlign',
    'DriveSheetStyleBorderType',
    'DriveSheetStyleFont',
    'DriveSheetStyle',
    'DriveSheetMergeType',
    'ReadDriveSheetRequest',
    'WriteDriveSheetRequest',
    'DriveFilePermission',
    'DriveFileUserPermission',
    'DriveFileUser',
    'DriveFilePublicLinkSharePermission',

    # 会议室
    'Building',
    'Room',
    'RoomFreeBusy',

    # 订单
    'PayPricePlanType',
    'PayBuyType',
    'PayStatus',
    'PayOrder',

    # 应用
    'App',

    # 通讯录
    'SimpleDepartment',
    'DepartmentUserStatus',
    'DepartmentUserAvatar',
    'EmployeeType',
    'Gender',
    'SimpleUserWithPosition',
    'DepartmentUserPosition',
    'DepartmentUserOrder',
    'DepartmentUserCustomAttrValue',
    'DepartmentUserCustomAttr',
    'DepartmentUser',
    'ContactAsyncChildTaskInfo',
    'ContactAsyncTaskResult',
    'Role',
    'CreateDepartmentRequest',
    'CreateUserRequest',
    'UpdateUserRequest',

    # enum
    'MessageType',
    'UrgentType',
    'I18NType',
    'ImageColor',
    'MethodType',
    'CalendarRole',
    'CalendarEventVisibility',
    'ApprovalUploadFileType',
    'EventType',
    'MeetingReplyStatus',

    # exception
    'OpenLarkException',
    'LarkInvalidArguments',

    # 数字特别大
    'LarkFrequencyLimitException',

    # 审批
    'LarkApprovalNotExistException',
    'LarkApprovalSubscriptionExistException',
    'LarkApprovalInvalidRequestParamsException',
    'LarkApprovalApprovalCodeNotFoundException',
    'LarkApprovalInstanceCodeNotFoundException',
    'LarkApprovalUserNotFoundException',
    'LarkApprovalForbiddenException',
    'LarkApprovalTaskIDNotFoundException',
    'LarkApprovalDepartmentValidFailedException',
    'LarkApprovalFormValidFailedException',
    'LarkApprovalNeedPayException',
    'LarkApprovalInstanceCodeConflictException',
    'LarkBotIsNotMessageOwnerException',
    'LarkBanAtALLException',
    'LarkUserNotActiveException',
    'LarkChatDisbandedException',
    'LarkMessageTooOldException',
    'LarkNoPermissionToGotException',
    'LarkInvalidTenantAccessTokenException',
    'LarkInvalidAppAccessTokenException',
    'LarkInvalidTenantCodeException',
    'LarkInvalidAppTicketException',

    # 机器人
    'LarkSendMessageFailException',
    'LarkRequestParamsInvalidException',
    'LarkGetUserInfoFailOrUserIDNotExistException',
    'LarkConflictAppIDException',
    'LarkGetOpenChatIDFailException',
    'LarkForbiddenSendMessageException',
    'LarkGetAppAccessTokenFailException',
    'LarkInvalidOpenChatIDException',
    'LarkGetTenantAccessTokenFailException',
    'LarkGetTenantAccessTokenFailException',
    'LarkWrongAppSecretException',
    'LarkSendAppTicketFailException',
    'LarkUnsupportedUrgentTypeException',
    'LarkWrongMessageIDException',
    'LarkForbiddenUrgentException',
    'LarkCheckOpenChatIDFailException',
    'LarkBotNotInChatException',
    'LarkAllOpenIDInvalidException',
    'LarkUnsupportedCrossTenantException',
    'LarkGetMessageIDFailException',
    'LarkGetSSOAccessTokenFailException',
    'LarkGetCheckSecurityTokenFailException',
    'LarkCheckOpenChatIDFailException',
    'LarkOpenIDNotExistException',
    'LarkGetOpenIDFailException',
    'LarkOpenDepartmentIDNotExistException',
    'LarkGetOpenDepartmentIDFailException',
    'LarkEmployeeIDNotExistException',
    'LarkGetEmployeeIDFailException',
    'LarkUpdateChatNameFailException',
    'LarkBotNotGroupAdminException',
    'LarkBotNotGroupAdminException',
    'LarkOnlyChatAdminCanInviteUserException',
    'LarkForbiddenBotBatchSendMessageToUserException',
    'LarkForbiddenBotBatchSendMessageToDepartmentException',
    'LarkAppHasNoBotException',
    'LarkUserCannotGrantToChatAdminException',
    'LarkAppUnavailableException',
    'LarkAppNotExistException',
    'LarkAppUsageInfoNotExistException',
    'LarkInviteUserToChatInvalidParamsException',
    'LarkRemoveUserFromChatInvalidParamsException',
    'LarkUpdateChatInvalidParamsException',
    'LarkUploadImageInvalidParamsException',
    'LarkEmptyChatIDException',
    'LarkGetChatIDFailException',
    'LarkInviteBotToChatFailException',
    'LarkBotInChatFullException',
    'LarkUnsupportedChatCrossTenantException',
    'LarkForbiddenBotDisbandChatException',
    'LarkBotForbiddenToGetImageBelongToThemException',
    'LarkOwnerOfBotIsNotInChatException',
    'LarkNotOpenApplicationSendMessagePermissionException',
    'LarkInvalidMessageIDException',
    'LarkAppIsNotVisibleToUserException',
    'LarkInvalidAppIDException',
    'LarkImageKeyNotExistException',
    'LarkInternalException',

    # 云空间
    'LarkDriveWrongRequestJsonException',
    'LarkDriveWrongRangeException',
    'LarkDriveFailException',
    'LarkDriveWrongRequestBodyException',
    'LarkDriveInvalidUsersException',
    'LarkDriveEmptySheetIDException',
    'LarkDriveEmptySheetTitleException',
    'LarkDriveSameSheetIDOrTitleException',
    'LarkDriveExistSheetIDException',
    'LarkDriveExistSheetTitleException',
    'LarkDriveWrongSheetIDException',
    'LarkDriveWrongRowOrColException',
    'LarkDrivePermissionFailException',
    'LarkDriveSpreadSheetNotFoundException',
    'LarkDriveSheetIDNotFoundException',
    'LarkDriveEmptyValueException',
    'LarkDriveTooManyRequestException',
    'LarkDriveTimeoutException',
    'LarkDriveProcessingException',
    'LarkDriveLoginRequiredException',
    'LarkDriveFailedException',
    'LarkDriveOutOfLimitException',
    'LarkDriveDuplicateException',
    'LarkDriveForbiddenException',
    'LarkDriveInvalidOperationException',
    'LarkDriveUserNoSharePermissionException',
    'LarkDriveParamErrorException',
    'LarkDriveMetaDeletedException',
    'LarkDriveMetaNotExistException',
    'LarkDriveReviewNotPassException',
    'LarkDriveInternalErrorException',

    # 会议室
    'LarkMeetingRoomInvalidPageTokenException',
    'LarkMeetingRoomInvalidFieldSelectionException',
    'LarkMeetingRoomTimeFormatMustFollowRFC3339StandardException',
    'LarkMeetingRoomInvalidBuildingIDException',
    'LarkMeetingRoomInvalidRoomIDException',
}
