|
| 1 | +from collections.abc import Sequence |
| 2 | +from typing import Any, final |
| 3 | + |
| 4 | +@final |
| 5 | +class BufferController: |
| 6 | + def ack(self, /, v: Sequence[int]) -> None: ... |
| 7 | + def callback(self, /, cb: Any) -> None: ... |
| 8 | + def clear_callback(self, /) -> None: ... |
| 9 | + def content(self, /) -> Promise: ... |
| 10 | + def path(self, /) -> str: ... |
| 11 | + def poll(self, /) -> Promise: ... |
| 12 | + def recv(self, /) -> Promise: ... |
| 13 | + def send(self, /, op: TextChange) -> None: ... |
| 14 | + def try_recv(self, /) -> Promise: ... |
| 15 | + def workspace_id(self, /) -> WorkspaceIdentifier: ... |
| 16 | + |
| 17 | +@final |
| 18 | +class BufferUpdate: |
| 19 | + @property |
| 20 | + def change(self, /) -> TextChange: ... |
| 21 | + @property |
| 22 | + def hash(self, /) -> int |None: ... |
| 23 | + @property |
| 24 | + def version(self, /) -> list[int]: ... |
| 25 | + |
| 26 | +@final |
| 27 | +class Client: |
| 28 | + def accept_invite(self, /, user: str, workspace: str) -> Promise: ... |
| 29 | + def active_workspaces(self, /) -> list[WorkspaceIdentifier]: ... |
| 30 | + def attach_workspace(self, /, user: str, workspace: str) -> Promise: ... |
| 31 | + def create_workspace(self, /, workspace: str) -> Promise: ... |
| 32 | + def current_user(self, /) -> UserInfo: ... |
| 33 | + def delete_workspace(self, /, workspace: str) -> Promise: ... |
| 34 | + def fetch_joined_workspaces(self, /) -> Promise: ... |
| 35 | + def fetch_owned_workspaces(self, /) -> Promise: ... |
| 36 | + def get_user_info(self, /, user: str) -> Promise: ... |
| 37 | + def get_workspace(self, /, user: str, workspace: str) -> Workspace |None: ... |
| 38 | + def invite_to_workspace(self, /, workspace: str, user: str) -> Promise: ... |
| 39 | + def leave_workspace(self, /, user: str, workspace: str) -> bool: ... |
| 40 | + def quit_workspace(self, /, user: str, workspace: str) -> Promise: ... |
| 41 | + def refresh(self, /) -> Promise: ... |
| 42 | + def reject_invite(self, /, user: str, workspace: str) -> Promise: ... |
| 43 | + |
| 44 | +@final |
| 45 | +class Config: |
| 46 | + def __new__(cls, /, *, username: str, password: str, **kwds) -> Config: ... |
| 47 | + def __str__(self, /) -> str: ... |
| 48 | + @property |
| 49 | + def host(self, /) -> str |None: ... |
| 50 | + @host.setter |
| 51 | + def host(self, /, value: str |None) -> None: ... |
| 52 | + @property |
| 53 | + def password(self, /) -> str: ... |
| 54 | + @password.setter |
| 55 | + def password(self, /, value: str) -> None: ... |
| 56 | + @property |
| 57 | + def port(self, /) -> int |None: ... |
| 58 | + @port.setter |
| 59 | + def port(self, /, value: int |None) -> None: ... |
| 60 | + @property |
| 61 | + def tls(self, /) -> bool |None: ... |
| 62 | + @tls.setter |
| 63 | + def tls(self, /, value: bool |None) -> None: ... |
| 64 | + @property |
| 65 | + def username(self, /) -> str: ... |
| 66 | + @username.setter |
| 67 | + def username(self, /, value: str) -> None: ... |
| 68 | + |
| 69 | +@final |
| 70 | +class CursorController: |
| 71 | + def callback(self, /, cb: Any) -> None: ... |
| 72 | + def clear_callback(self, /) -> None: ... |
| 73 | + def poll(self, /) -> Promise: ... |
| 74 | + def recv(self, /) -> Promise: ... |
| 75 | + def send(self, /, pos: CursorUpdate) -> None: ... |
| 76 | + def try_recv(self, /) -> Promise: ... |
| 77 | + def workspace_id(self, /) -> WorkspaceIdentifier: ... |
| 78 | + |
| 79 | +@final |
| 80 | +class CursorPosition: |
| 81 | + @property |
| 82 | + def finish(self, /) -> Any: ... |
| 83 | + @property |
| 84 | + def start(self, /) -> Any: ... |
| 85 | + |
| 86 | +@final |
| 87 | +class CursorUpdate: |
| 88 | + @property |
| 89 | + def buffer(self, /) -> str: ... |
| 90 | + @property |
| 91 | + def cursors(self, /) -> list[CursorPosition]: ... |
| 92 | + |
| 93 | +@final |
| 94 | +class Driver: |
| 95 | + def stop(self, /) -> None: ... |
| 96 | + |
| 97 | +@final |
| 98 | +class Promise: |
| 99 | + def done(self, /) -> bool: ... |
| 100 | + def wait(self, /) -> Any: ... |
| 101 | + |
| 102 | +@final |
| 103 | +class SessionEvent: |
| 104 | + @property |
| 105 | + def kind(self, /) -> int: ... |
| 106 | + @property |
| 107 | + def user(self, /) -> str: ... |
| 108 | + @property |
| 109 | + def workspace(self, /) -> WorkspaceIdentifier: ... |
| 110 | + |
| 111 | +@final |
| 112 | +class TextChange: |
| 113 | + def apply(self, /, txt: str) -> str: ... |
| 114 | + @property |
| 115 | + def content(self, /) -> str: ... |
| 116 | + @property |
| 117 | + def end_idx(self, /) -> int: ... |
| 118 | + def is_delete(self, /) -> bool: ... |
| 119 | + def is_empty(self, /) -> bool: ... |
| 120 | + def is_insert(self, /) -> bool: ... |
| 121 | + @property |
| 122 | + def start_idx(self, /) -> int: ... |
| 123 | + |
| 124 | +@final |
| 125 | +class UserInfo: |
| 126 | + @property |
| 127 | + def avatar(self, /) -> bytes |None: ... |
| 128 | + @property |
| 129 | + def description(self, /) -> str |None: ... |
| 130 | + @property |
| 131 | + def display_name(self, /) -> str |None: ... |
| 132 | + @property |
| 133 | + def name(self, /) -> str: ... |
| 134 | + |
| 135 | +@final |
| 136 | +class Workspace: |
| 137 | + def active_buffers(self, /) -> list[str]: ... |
| 138 | + def attach_buffer(self, /, path: str) -> Promise: ... |
| 139 | + def buffer_user_list(self, /, path: str) -> list[UserInfo]: ... |
| 140 | + def callback(self, /, cb: Any) -> None: ... |
| 141 | + def clear_callback(self, /) -> None: ... |
| 142 | + def create_buffer(self, /, path: str, attrs: Any |None) -> Promise: ... |
| 143 | + def cursor(self, /) -> CursorController: ... |
| 144 | + def delete_buffer(self, /, path: str) -> Promise: ... |
| 145 | + def detach_buffer(self, /, path: str) -> bool: ... |
| 146 | + def fetch_buffer_users(self, /, path: str) -> Promise: ... |
| 147 | + def fetch_buffers(self, /) -> Promise: ... |
| 148 | + def fetch_users(self, /) -> Promise: ... |
| 149 | + def get_buffer(self, /, path: str) -> BufferController |None: ... |
| 150 | + def id(self, /) -> WorkspaceIdentifier: ... |
| 151 | + def pin_buffer(self, /, path: str) -> Promise: ... |
| 152 | + def poll(self, /) -> Promise: ... |
| 153 | + def recv(self, /) -> Promise: ... |
| 154 | + def search_buffers(self, /, filter: str |None = None) -> list[Any]: ... |
| 155 | + def try_recv(self, /) -> Promise: ... |
| 156 | + def un_pin_buffer(self, /, path: str) -> Promise: ... |
| 157 | + def user_list(self, /) -> list[UserInfo]: ... |
| 158 | + |
| 159 | +@final |
| 160 | +class WorkspaceEvent: |
| 161 | + @property |
| 162 | + def after(self, /) -> str |None: ... |
| 163 | + @property |
| 164 | + def attributes(self, /) -> Any |None: ... |
| 165 | + @property |
| 166 | + def kind(self, /) -> int: ... |
| 167 | + @property |
| 168 | + def path(self, /) -> str |None: ... |
| 169 | + @property |
| 170 | + def user(self, /) -> str |None: ... |
| 171 | + |
| 172 | +@final |
| 173 | +class WorkspaceIdentifier: |
| 174 | + @property |
| 175 | + def user(self, /) -> str: ... |
| 176 | + @property |
| 177 | + def workspace(self, /) -> str: ... |
| 178 | + |
| 179 | +def connect(config: Config) -> Promise: ... |
| 180 | +def init() -> Driver: ... |
| 181 | +def set_logger(logging_cb: Any, debug: bool) -> bool: ... |
| 182 | +def version() -> str: ... |
0 commit comments