Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lexicons fetched from 46b108c committed 2023-10-26T22:29:51Z #178

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions atproto/xrpc_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
)
from atproto.xrpc_client.models.com.atproto.server import request_email_update as ComAtprotoServerRequestEmailUpdate
from atproto.xrpc_client.models.com.atproto.server import request_password_reset as ComAtprotoServerRequestPasswordReset
from atproto.xrpc_client.models.com.atproto.server import reserve_signing_key as ComAtprotoServerReserveSigningKey
from atproto.xrpc_client.models.com.atproto.server import reset_password as ComAtprotoServerResetPassword
from atproto.xrpc_client.models.com.atproto.server import revoke_app_password as ComAtprotoServerRevokeAppPassword
from atproto.xrpc_client.models.com.atproto.server import update_email as ComAtprotoServerUpdateEmail
Expand Down Expand Up @@ -272,6 +273,7 @@ class _Ids:
ComAtprotoServerRequestEmailConfirmation: str = 'com.atproto.server.requestEmailConfirmation'
ComAtprotoServerRequestEmailUpdate: str = 'com.atproto.server.requestEmailUpdate'
ComAtprotoServerRequestPasswordReset: str = 'com.atproto.server.requestPasswordReset'
ComAtprotoServerReserveSigningKey: str = 'com.atproto.server.reserveSigningKey'
ComAtprotoServerResetPassword: str = 'com.atproto.server.resetPassword'
ComAtprotoServerRevokeAppPassword: str = 'com.atproto.server.revokeAppPassword'
ComAtprotoServerUpdateEmail: str = 'com.atproto.server.updateEmail'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import typing_extensions as te
from pydantic import Field

if t.TYPE_CHECKING:
from atproto.xrpc_client.models.unknown_type import UnknownType
from atproto.xrpc_client.models import base


Expand All @@ -22,6 +24,7 @@ class Data(base.DataModelBase):
password: str #: Password.
did: t.Optional[str] = None #: Did.
invite_code: t.Optional[str] = Field(default=None, alias='inviteCode') #: Invite code.
plc_op: t.Optional[t.Union[str, bytes]] = Field(default=None, alias='plcOp') #: Plc op.
recovery_key: t.Optional[str] = Field(default=None, alias='recoveryKey') #: Recovery key.


Expand All @@ -31,6 +34,7 @@ class DataDict(te.TypedDict):
password: str #: Password.
did: te.NotRequired[t.Optional[str]] #: Did.
invite_code: te.NotRequired[t.Optional[str]] #: Invite code.
plc_op: te.NotRequired[t.Optional[t.Union[str, bytes]]] #: Plc op.
recovery_key: te.NotRequired[t.Optional[str]] #: Recovery key.


Expand All @@ -42,3 +46,4 @@ class Response(base.ResponseModelBase):
did: str #: Did.
handle: str #: Handle.
refresh_jwt: str = Field(alias='refreshJwt') #: Refresh jwt.
did_doc: t.Optional['UnknownType'] = Field(default=None, alias='didDoc') #: Did doc.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import typing_extensions as te
from pydantic import Field

if t.TYPE_CHECKING:
from atproto.xrpc_client.models.unknown_type import UnknownType
from atproto.xrpc_client.models import base


Expand All @@ -34,5 +36,6 @@ class Response(base.ResponseModelBase):
did: str #: Did.
handle: str #: Handle.
refresh_jwt: str = Field(alias='refreshJwt') #: Refresh jwt.
did_doc: t.Optional['UnknownType'] = Field(default=None, alias='didDoc') #: Did doc.
email: t.Optional[str] = None #: Email.
email_confirmed: t.Optional[bool] = Field(default=None, alias='emailConfirmed') #: Email confirmed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
##################################################################


import typing as t

from pydantic import Field

if t.TYPE_CHECKING:
from atproto.xrpc_client.models.unknown_type import UnknownType
from atproto.xrpc_client.models import base


Expand All @@ -18,3 +22,4 @@ class Response(base.ResponseModelBase):
did: str #: Did.
handle: str #: Handle.
refresh_jwt: str = Field(alias='refreshJwt') #: Refresh jwt.
did_doc: t.Optional['UnknownType'] = Field(default=None, alias='didDoc') #: Did doc.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2023 Ilya (Marshal) <https://github.com/MarshalX>.
# This file is part of Python atproto SDK. Licenced under MIT.
##################################################################


from pydantic import Field

from atproto.xrpc_client.models import base


class Response(base.ResponseModelBase):

"""Output data model for :obj:`com.atproto.server.reserveSigningKey`."""

signing_key: str = Field(alias='signingKey') #: Public signing key in the form of a did:key.
1 change: 1 addition & 0 deletions atproto/xrpc_client/models/com/atproto/sync/list_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Repo(base.ModelBase):

did: str #: Did.
head: str #: Head.
rev: str #: Rev.

py_type: te.Literal['com.atproto.sync.listRepos#repo'] = Field(
default='com.atproto.sync.listRepos#repo', alias='$type', frozen=True
Expand Down
18 changes: 18 additions & 0 deletions atproto/xrpc_client/namespaces/async_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2348,6 +2348,24 @@ async def request_password_reset(
)
return get_response_model(response, bool)

async def reserve_signing_key(self, **kwargs: t.Any) -> 'models.ComAtprotoServerReserveSigningKey.Response':
"""Reserve a repo signing key for account creation.

Args:
**kwargs: Arbitrary arguments to HTTP request.

Returns:
:obj:`models.ComAtprotoServerReserveSigningKey.Response`: Output model.

Raises:
:class:`atproto.exceptions.AtProtocolError`: Base exception.
"""

response = await self._client.invoke_procedure(
'com.atproto.server.reserveSigningKey', output_encoding='application/json', **kwargs
)
return get_response_model(response, models.ComAtprotoServerReserveSigningKey.Response)

async def reset_password(
self,
data: t.Union[models.ComAtprotoServerResetPassword.Data, models.ComAtprotoServerResetPassword.DataDict],
Expand Down
18 changes: 18 additions & 0 deletions atproto/xrpc_client/namespaces/sync_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2348,6 +2348,24 @@ def request_password_reset(
)
return get_response_model(response, bool)

def reserve_signing_key(self, **kwargs: t.Any) -> 'models.ComAtprotoServerReserveSigningKey.Response':
"""Reserve a repo signing key for account creation.

Args:
**kwargs: Arbitrary arguments to HTTP request.

Returns:
:obj:`models.ComAtprotoServerReserveSigningKey.Response`: Output model.

Raises:
:class:`atproto.exceptions.AtProtocolError`: Base exception.
"""

response = self._client.invoke_procedure(
'com.atproto.server.reserveSigningKey', output_encoding='application/json', **kwargs
)
return get_response_model(response, models.ComAtprotoServerReserveSigningKey.Response)

def reset_password(
self,
data: t.Union[models.ComAtprotoServerResetPassword.Data, models.ComAtprotoServerResetPassword.DataDict],
Expand Down
1 change: 1 addition & 0 deletions docs/source/aliases_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
'models.ComAtprotoServerRequestEmailConfirmation': 'atproto.xrpc_client.models.com.atproto.server.request_email_confirmation',
'models.ComAtprotoServerRequestEmailUpdate': 'atproto.xrpc_client.models.com.atproto.server.request_email_update',
'models.ComAtprotoServerRequestPasswordReset': 'atproto.xrpc_client.models.com.atproto.server.request_password_reset',
'models.ComAtprotoServerReserveSigningKey': 'atproto.xrpc_client.models.com.atproto.server.reserve_signing_key',
'models.ComAtprotoServerResetPassword': 'atproto.xrpc_client.models.com.atproto.server.reset_password',
'models.ComAtprotoServerRevokeAppPassword': 'atproto.xrpc_client.models.com.atproto.server.revoke_app_password',
'models.ComAtprotoServerUpdateEmail': 'atproto.xrpc_client.models.com.atproto.server.update_email',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
com.atproto.server.reserve\_signing\_key
====================================================================

.. automodule:: atproto.xrpc_client.models.com.atproto.server.reserve_signing_key
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Submodules
atproto.xrpc_client.models.com.atproto.server.request_email_confirmation
atproto.xrpc_client.models.com.atproto.server.request_email_update
atproto.xrpc_client.models.com.atproto.server.request_password_reset
atproto.xrpc_client.models.com.atproto.server.reserve_signing_key
atproto.xrpc_client.models.com.atproto.server.reset_password
atproto.xrpc_client.models.com.atproto.server.revoke_app_password
atproto.xrpc_client.models.com.atproto.server.update_email
6 changes: 4 additions & 2 deletions lexicons/com.atproto.server.createAccount.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"did": { "type": "string", "format": "did" },
"inviteCode": { "type": "string" },
"password": { "type": "string" },
"recoveryKey": { "type": "string" }
"recoveryKey": { "type": "string" },
"plcOp": { "type": "bytes" }
}
}
},
Expand All @@ -29,7 +30,8 @@
"accessJwt": { "type": "string" },
"refreshJwt": { "type": "string" },
"handle": { "type": "string", "format": "handle" },
"did": { "type": "string", "format": "did" }
"did": { "type": "string", "format": "did" },
"didDoc": { "type": "unknown" }
}
}
},
Expand Down
1 change: 1 addition & 0 deletions lexicons/com.atproto.server.createSession.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"refreshJwt": { "type": "string" },
"handle": { "type": "string", "format": "handle" },
"did": { "type": "string", "format": "did" },
"didDoc": { "type": "unknown" },
"email": { "type": "string" },
"emailConfirmed": { "type": "boolean" }
}
Expand Down
3 changes: 2 additions & 1 deletion lexicons/com.atproto.server.refreshSession.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"accessJwt": { "type": "string" },
"refreshJwt": { "type": "string" },
"handle": { "type": "string", "format": "handle" },
"did": { "type": "string", "format": "did" }
"did": { "type": "string", "format": "did" },
"didDoc": { "type": "unknown" }
}
}
},
Expand Down
23 changes: 23 additions & 0 deletions lexicons/com.atproto.server.reserveSigningKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"lexicon": 1,
"id": "com.atproto.server.reserveSigningKey",
"defs": {
"main": {
"type": "procedure",
"description": "Reserve a repo signing key for account creation.",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["signingKey"],
"properties": {
"signingKey": {
"type": "string",
"description": "Public signing key in the form of a did:key."
}
}
}
}
}
}
}
5 changes: 3 additions & 2 deletions lexicons/com.atproto.sync.listRepos.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
},
"repo": {
"type": "object",
"required": ["did", "head"],
"required": ["did", "head", "rev"],
"properties": {
"did": { "type": "string", "format": "did" },
"head": { "type": "string", "format": "cid" }
"head": { "type": "string", "format": "cid" },
"rev": { "type": "string" }
}
}
}
Expand Down