mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
* chore: update python API * fix: remove non-exist return value * style: docstring of param of set_static_option * feat: python API get_image
70 lines
1.0 KiB
Python
70 lines
1.0 KiB
Python
from typing import Union, Dict, List, Any, Type
|
|
from enum import Enum, IntEnum, unique, auto
|
|
|
|
JSON = Union[Dict[str, Any], List[Any], int, str, float, bool, Type[None]]
|
|
|
|
|
|
class InstanceOptionType(IntEnum):
|
|
touch_type = 2
|
|
deployment_with_pause = 3
|
|
adblite_enabled = 4
|
|
kill_on_adb_exit = 5
|
|
|
|
|
|
class StaticOptionType(IntEnum):
|
|
invalid = 0
|
|
cpu_ocr = 1
|
|
gpu_ocr = 2
|
|
|
|
|
|
@unique
|
|
class Message(Enum):
|
|
"""
|
|
回调消息
|
|
|
|
请参考 docs/回调消息.md
|
|
"""
|
|
InternalError = 0
|
|
|
|
InitFailed = auto()
|
|
|
|
ConnectionInfo = auto()
|
|
|
|
AllTasksCompleted = auto()
|
|
|
|
AsyncCallInfo = auto()
|
|
|
|
Destroyed = auto()
|
|
|
|
TaskChainError = 10000
|
|
|
|
TaskChainStart = auto()
|
|
|
|
TaskChainCompleted = auto()
|
|
|
|
TaskChainExtraInfo = auto()
|
|
|
|
TaskChainStopped = auto()
|
|
|
|
SubTaskError = 20000
|
|
|
|
SubTaskStart = auto()
|
|
|
|
SubTaskCompleted = auto()
|
|
|
|
SubTaskExtraInfo = auto()
|
|
|
|
SubTaskStopped = auto()
|
|
|
|
|
|
@unique
|
|
class Version(Enum):
|
|
"""
|
|
目标版本
|
|
"""
|
|
Nightly = auto()
|
|
|
|
Beta = auto()
|
|
|
|
Stable = auto()
|