跳转到正文

types API ​

完整接口目录 · 插件运行时用法 · 工具包下载

模块说明 ​

text
Public wire shapes. Values remain ordinary dictionaries; no inferred evidence.

Optional fields preserve absence on the wire. Types are documentation/static
checking aids, never a substitute for Host validation or current observations.

OperationState ​

python
OperationState = Literal['accepted', 'dispatching', 'running', 'succeeded', 'failed', 'cancelled', 'unknown']

TerminalState ​

python
TerminalState = Literal['succeeded', 'failed', 'cancelled', 'unknown']

BusCallState ​

python
BusCallState = Literal['running', 'succeeded', 'failed', 'cancelled', 'deadline_exceeded', 'unavailable']

BusIdentity ​

python
class BusIdentity(TypedDict)

字段(包含继承字段):

BusIdentity.installation ​

python
installation: str

必填;声明于 types.BusIdentity。

BusIdentity.generation ​

python
generation: int

必填;声明于 types.BusIdentity。

BusContract ​

python
class BusContract(TypedDict)

字段(包含继承字段):

BusContract.major ​

python
major: int

必填;声明于 types.BusContract。

BusContract.schema_digest ​

python
schema_digest: str

必填;声明于 types.BusContract。

BusContract.schema ​

python
schema: dict[str, Any]

必填;声明于 types.BusContract。

BusExport ​

python
class BusExport(TypedDict)

字段(包含继承字段):

BusExport.name ​

python
name: str

必填;声明于 types.BusExport。

BusExport.member ​

python
member: str

必填;声明于 types.BusExport。

BusExport.kind ​

python
kind: Literal['read', 'service']

必填;声明于 types.BusExport。

BusExport.major ​

python
major: int

必填;声明于 types.BusExport。

BusExport.shared ​

python
shared: bool

必填;声明于 types.BusExport。

BusExport.candidate_readable ​

python
candidate_readable: bool

必填;声明于 types.BusExport。

BusExport.contract ​

python
contract: BusContract

必填;声明于 types.BusExport。

BusEntry ​

python
class BusEntry(TypedDict)

字段(包含继承字段):

BusEntry.member ​

python
member: str

必填;声明于 types.BusEntry。

BusEntry.kind ​

python
kind: Literal['read', 'service']

必填;声明于 types.BusEntry。

BusEntry.contract ​

python
contract: BusContract

必填;声明于 types.BusEntry。

BusEntry.provider ​

python
provider: BusIdentity

必填;声明于 types.BusEntry。

BusEntry.availability ​

python
availability: str

必填;声明于 types.BusEntry。

BusEntry.authorized ​

python
authorized: bool

必填;声明于 types.BusEntry。

BusEntry.candidate_readable ​

python
candidate_readable: bool

必填;声明于 types.BusEntry。

BusEntry.shared ​

python
shared: bool

必填;声明于 types.BusEntry。

BusCatalog ​

python
class BusCatalog(TypedDict)

字段(包含继承字段):

BusCatalog.entries ​

python
entries: list[BusEntry]

必填;声明于 types.BusCatalog。

BusCallReceipt ​

python
class BusCallReceipt(_BusReceiptRequired, total=False)

字段(包含继承字段):

BusCallReceipt.call_id ​

python
call_id: str

必填;声明于 types._BusReceiptRequired。

BusCallReceipt.state ​

python
state: BusCallState

必填;声明于 types._BusReceiptRequired。

BusCallReceipt.actual_done ​

python
actual_done: bool

必填;声明于 types._BusReceiptRequired。

BusCallReceipt.result ​

python
result: Any

可省略;声明于 types.BusCallReceipt。

BusCallReceipt.error ​

python
error: dict[str, str]

可省略;声明于 types.BusCallReceipt。

PlayerIdentity ​

python
class PlayerIdentity(TypedDict)

字段(包含继承字段):

PlayerIdentity.name ​

python
name: str

必填;声明于 types.PlayerIdentity。

PlayerIdentity.uuid ​

python
uuid: str

必填;声明于 types.PlayerIdentity。

PlayerIdentity.xuid ​

python
xuid: str

必填;声明于 types.PlayerIdentity。

ChatPayload ​

python
class ChatPayload(_ChatRequired, total=False)

字段(包含继承字段):

ChatPayload.player ​

python
player: str

必填;声明于 types._ChatRequired。

ChatPayload.message ​

python
message: str

必填;声明于 types._ChatRequired。

ChatPayload.xuid ​

python
xuid: str

可省略;声明于 types.ChatPayload。

EventPayload ​

python
class EventPayload(TypedDict)

字段(包含继承字段):

EventPayload.subscription_id ​

python
subscription_id: str

必填;声明于 types.EventPayload。

EventPayload.delivery_token ​

python
delivery_token: str

必填;声明于 types.EventPayload。

EventPayload.event_id ​

python
event_id: str

必填;声明于 types.EventPayload。

EventPayload.boot_id ​

python
boot_id: str

必填;声明于 types.EventPayload。

EventPayload.session ​

python
session: str

必填;声明于 types.EventPayload。

EventPayload.ingress_seq ​

python
ingress_seq: int

必填;声明于 types.EventPayload。

EventPayload.kind ​

python
kind: str

必填;声明于 types.EventPayload。

EventPayload.payload ​

python
payload: dict[str, Any]

必填;声明于 types.EventPayload。

ActionResult ​

python
class ActionResult(_ActionResultRequired, total=False)

字段(包含继承字段):

ActionResult.state ​

python
state: TerminalState

必填;声明于 types._ActionResultRequired。

ActionResult.evidence ​

python
evidence: str

可省略;声明于 types.ActionResult。

ActionResult.reason ​

python
reason: str

可省略;声明于 types.ActionResult。

ActionResult.result ​

python
result: Any

可省略;声明于 types.ActionResult。

ActionResult.partial_effects ​

python
partial_effects: Any

可省略;声明于 types.ActionResult。

ActionResult.recovery_required ​

python
recovery_required: bool

可省略;声明于 types.ActionResult。

OperationReceipt ​

python
class OperationReceipt(TypedDict)

字段(包含继承字段):

OperationReceipt.request_id ​

python
request_id: str

必填;声明于 types.OperationReceipt。

OperationReceipt.operation_id ​

python
operation_id: str

必填;声明于 types.OperationReceipt。

OperationReceipt.state ​

python
state: OperationState

必填;声明于 types.OperationReceipt。

OperationReceipt.expires_at ​

python
expires_at: str

必填;声明于 types.OperationReceipt。

OperationReceipt.result ​

python
result: ActionResult | None

必填;声明于 types.OperationReceipt。

OperationReceipt.can_retry ​

python
can_retry: Literal[False]

必填;声明于 types.OperationReceipt。

CancellationReceipt ​

python
class CancellationReceipt(TypedDict)

字段(包含继承字段):

CancellationReceipt.request_id ​

python
request_id: str

必填;声明于 types.CancellationReceipt。

CancellationReceipt.operation_id ​

python
operation_id: str

必填;声明于 types.CancellationReceipt。

CancellationReceipt.state ​

python
state: OperationState

必填;声明于 types.CancellationReceipt。

CancellationReceipt.cancellation_requested ​

python
cancellation_requested: bool

必填;声明于 types.CancellationReceipt。

InventorySlot ​

python
class InventorySlot(_InventorySlotRequired, total=False)

字段(包含继承字段):

InventorySlot.slot ​

python
slot: int

必填;声明于 types._InventorySlotRequired。

InventorySlot.known ​

python
known: bool

必填;声明于 types._InventorySlotRequired。

InventorySlot.state ​

python
state: Literal['unknown', 'empty', 'occupied']

必填;声明于 types._InventorySlotRequired。

InventorySlot.empty ​

python
empty: bool

可省略;声明于 types.InventorySlot。

InventorySlot.stack_id ​

python
stack_id: int

可省略;声明于 types.InventorySlot。

InventorySlot.fingerprint ​

python
fingerprint: str

可省略;声明于 types.InventorySlot。

InventorySlot.attributes_fingerprint ​

python
attributes_fingerprint: str

可省略;声明于 types.InventorySlot。

InventorySlot.item ​

python
item: dict[str, Any]

可省略;声明于 types.InventorySlot。

InventorySlot.nbt_types ​

python
nbt_types: dict[str, Any] | str

可省略;声明于 types.InventorySlot。

InventorySlot.reconciliation_supported ​

python
reconciliation_supported: bool

可省略;声明于 types.InventorySlot。

InventorySlot.age_ms ​

python
age_ms: int

可省略;声明于 types.InventorySlot。

InventorySlot.observed_revision ​

python
observed_revision: int

可省略;声明于 types.InventorySlot。

InventorySlot.observed_at ​

python
observed_at: str

可省略;声明于 types.InventorySlot。

InventorySlot.packet_id ​

python
packet_id: int

可省略;声明于 types.InventorySlot。

InventoryObservation ​

python
class InventoryObservation(TypedDict)

字段(包含继承字段):

InventoryObservation.schema_version ​

python
schema_version: str

必填;声明于 types.InventoryObservation。

InventoryObservation.subject ​

python
subject: Literal['self']

必填;声明于 types.InventoryObservation。

InventoryObservation.source ​

python
source: Literal['native_inventory_packets']

必填;声明于 types.InventoryObservation。

InventoryObservation.connection_id ​

python
connection_id: str

必填;声明于 types.InventoryObservation。

InventoryObservation.connected_at ​

python
connected_at: str

必填;声明于 types.InventoryObservation。

InventoryObservation.revision ​

python
revision: int

必填;声明于 types.InventoryObservation。

InventoryObservation.sampled_at ​

python
sampled_at: str

必填;声明于 types.InventoryObservation。

InventoryObservation.window_id ​

python
window_id: int

必填;声明于 types.InventoryObservation。

InventoryObservation.slot_count ​

python
slot_count: int

必填;声明于 types.InventoryObservation。

InventoryObservation.shape_known ​

python
shape_known: bool

必填;声明于 types.InventoryObservation。

InventoryObservation.complete ​

python
complete: bool

必填;声明于 types.InventoryObservation。

InventoryObservation.slots ​

python
slots: list[InventorySlot]

必填;声明于 types.InventoryObservation。

InventoryObservation.coverage ​

python
coverage: dict[str, int]

必填;声明于 types.InventoryObservation。

InventoryObservation.freshness ​

python
freshness: dict[str, Any]

必填;声明于 types.InventoryObservation。

InventoryObservation.packet_diagnostics ​

python
packet_diagnostics: dict[str, Any] | None

必填;声明于 types.InventoryObservation。

Neomega · 使用、开发与参考文档