Skip to content

Commit

Permalink
Re-generate Python bindings typings
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed Jan 16, 2025
1 parent 68794c2 commit fb435a8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ from parsec._parsec import DateTime, SequesterServiceID, VlobID

class Req:
def __init__(
self, vlob_id: VlobID, key_index: int, timestamp: DateTime, version: int, blob: bytes
self,
realm_id: VlobID,
vlob_id: VlobID,
key_index: int,
timestamp: DateTime,
version: int,
blob: bytes,
) -> None: ...
def dump(self) -> bytes: ...
@property
def blob(self) -> bytes: ...
@property
def key_index(self) -> int: ...
@property
def realm_id(self) -> VlobID: ...
@property
def timestamp(self) -> DateTime: ...
@property
def version(self) -> int: ...
Expand Down Expand Up @@ -49,6 +57,11 @@ class RepBadKeyIndex(Rep):
@property
def last_realm_certificate_timestamp(self) -> DateTime: ...

class RepRealmNotFound(Rep):
def __init__(
self,
) -> None: ...

class RepVlobNotFound(Rep):
def __init__(
self,
Expand Down
15 changes: 13 additions & 2 deletions server/tests/common/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,21 @@ async def vlob_read_versions(
return authenticated_cmds.latest.vlob_read_versions.Rep.load(raw_rep)

async def vlob_update(
self, vlob_id: VlobID, key_index: int, timestamp: DateTime, version: int, blob: bytes
self,
realm_id: VlobID,
vlob_id: VlobID,
key_index: int,
timestamp: DateTime,
version: int,
blob: bytes,
) -> authenticated_cmds.latest.vlob_update.Rep:
req = authenticated_cmds.latest.vlob_update.Req(
vlob_id=vlob_id, key_index=key_index, timestamp=timestamp, version=version, blob=blob
realm_id=realm_id,
vlob_id=vlob_id,
key_index=key_index,
timestamp=timestamp,
version=version,
blob=blob,
)
raw_rep = await self._do_request(req.dump(), "authenticated")
return authenticated_cmds.latest.vlob_update.Rep.load(raw_rep)
Expand Down

0 comments on commit fb435a8

Please sign in to comment.