From 64028e9e93799855d9d515a94d85d39b1b58c626 Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Thu, 22 Feb 2024 19:17:28 +0000 Subject: [PATCH] Update lexicons fetched from 514aab9 committed 2024-02-22T15:43:58Z --- docs/source/aliases_db.py | 14 +- ...tproto_client.models.com.atproto.admin.rst | 1 + ....atproto.admin.update_account_password.rst | 7 + ...entity.get_recommended_did_credentials.rst | 7 + ...entity.request_plc_operation_signature.rst | 7 + ...oto_client.models.com.atproto.identity.rst | 4 + ...om.atproto.identity.sign_plc_operation.rst | 7 + ....atproto.identity.submit_plc_operation.rst | 7 + ...t.models.com.atproto.repo.import_repo.rst} | 4 +- ...ls.com.atproto.repo.list_missing_blobs.rst | 7 + ...atproto_client.models.com.atproto.repo.rst | 2 + ...ls.com.atproto.server.activate_account.rst | 7 + ...om.atproto.server.check_account_status.rst | 7 + ....com.atproto.server.deactivate_account.rst | 7 + ...ls.com.atproto.server.get_service_auth.rst | 7 + ...proto_client.models.com.atproto.server.rst | 4 + ...ient.models.com.atproto.temp.push_blob.rst | 7 - ...atproto_client.models.com.atproto.temp.rst | 3 - ...dels.com.atproto.temp.transfer_account.rst | 7 - lexicons/app.bsky.actor.defs.json | 56 ++- lexicons/com.atproto.admin.defs.json | 25 ++ ...com.atproto.admin.emitModerationEvent.json | 3 +- ...m.atproto.admin.queryModerationEvents.json | 10 + ...atproto.admin.queryModerationStatuses.json | 8 + ...m.atproto.admin.updateAccountPassword.json | 21 ++ ...identity.getRecommendedDidCredentials.json | 29 ++ ...identity.requestPlcOperationSignature.json | 10 + ...com.atproto.identity.signPlcOperation.json | 45 +++ ...m.atproto.identity.submitPlcOperation.json | 20 + lexicons/com.atproto.repo.importRepo.json | 13 + .../com.atproto.repo.listMissingBlobs.json | 44 +++ .../com.atproto.server.activateAccount.json | 10 + ...com.atproto.server.checkAccountStatus.json | 38 ++ .../com.atproto.server.deactivateAccount.json | 23 ++ .../com.atproto.server.describeServer.json | 6 +- .../com.atproto.server.getServiceAuth.json | 33 ++ lexicons/com.atproto.sync.subscribeRepos.json | 25 +- lexicons/com.atproto.temp.importRepo.json | 27 -- lexicons/com.atproto.temp.pushBlob.json | 24 -- .../com.atproto.temp.transferAccount.json | 44 --- packages/atproto_client/models/__init__.py | 32 +- .../models/app/bsky/actor/defs.py | 36 ++ .../models/com/atproto/admin/defs.py | 13 + .../atproto/admin/emit_moderation_event.py | 2 + .../atproto/admin/query_moderation_events.py | 12 + .../admin/query_moderation_statuses.py | 4 + .../update_account_password.py} | 20 +- .../get_recommended_did_credentials.py | 23 ++ .../request_plc_operation_signature.py | 7 + .../atproto/identity/sign_plc_operation.py | 40 ++ .../submit_plc_operation.py} | 19 +- .../push_blob.py => repo/import_repo.py} | 13 - .../com/atproto/repo/list_missing_blobs.py | 45 +++ .../com/atproto/server/activate_account.py | 7 + .../atproto/server/check_account_status.py | 22 ++ .../com/atproto/server/deactivate_account.py | 28 ++ .../com/atproto/server/describe_server.py | 1 + .../com/atproto/server/get_service_auth.py | 26 ++ .../com/atproto/sync/subscribe_repos.py | 18 +- .../atproto_client/namespaces/async_ns.py | 342 +++++++++++++----- packages/atproto_client/namespaces/sync_ns.py | 342 +++++++++++++----- 61 files changed, 1331 insertions(+), 351 deletions(-) create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.admin.update_account_password.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.identity.get_recommended_did_credentials.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.identity.request_plc_operation_signature.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.identity.sign_plc_operation.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.identity.submit_plc_operation.rst rename docs/source/atproto/{atproto_client.models.com.atproto.temp.import_repo.rst => atproto_client.models.com.atproto.repo.import_repo.rst} (53%) create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.repo.list_missing_blobs.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.server.activate_account.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.server.check_account_status.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.server.deactivate_account.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.server.get_service_auth.rst delete mode 100644 docs/source/atproto/atproto_client.models.com.atproto.temp.push_blob.rst delete mode 100644 docs/source/atproto/atproto_client.models.com.atproto.temp.transfer_account.rst create mode 100644 lexicons/com.atproto.admin.updateAccountPassword.json create mode 100644 lexicons/com.atproto.identity.getRecommendedDidCredentials.json create mode 100644 lexicons/com.atproto.identity.requestPlcOperationSignature.json create mode 100644 lexicons/com.atproto.identity.signPlcOperation.json create mode 100644 lexicons/com.atproto.identity.submitPlcOperation.json create mode 100644 lexicons/com.atproto.repo.importRepo.json create mode 100644 lexicons/com.atproto.repo.listMissingBlobs.json create mode 100644 lexicons/com.atproto.server.activateAccount.json create mode 100644 lexicons/com.atproto.server.checkAccountStatus.json create mode 100644 lexicons/com.atproto.server.deactivateAccount.json create mode 100644 lexicons/com.atproto.server.getServiceAuth.json delete mode 100644 lexicons/com.atproto.temp.importRepo.json delete mode 100644 lexicons/com.atproto.temp.pushBlob.json delete mode 100644 lexicons/com.atproto.temp.transferAccount.json rename packages/atproto_client/models/com/atproto/{temp/import_repo.py => admin/update_account_password.py} (55%) create mode 100644 packages/atproto_client/models/com/atproto/identity/get_recommended_did_credentials.py create mode 100644 packages/atproto_client/models/com/atproto/identity/request_plc_operation_signature.py create mode 100644 packages/atproto_client/models/com/atproto/identity/sign_plc_operation.py rename packages/atproto_client/models/com/atproto/{temp/transfer_account.py => identity/submit_plc_operation.py} (53%) rename packages/atproto_client/models/com/atproto/{temp/push_blob.py => repo/import_repo.py} (61%) create mode 100644 packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py create mode 100644 packages/atproto_client/models/com/atproto/server/activate_account.py create mode 100644 packages/atproto_client/models/com/atproto/server/check_account_status.py create mode 100644 packages/atproto_client/models/com/atproto/server/deactivate_account.py create mode 100644 packages/atproto_client/models/com/atproto/server/get_service_auth.py diff --git a/docs/source/aliases_db.py b/docs/source/aliases_db.py index bcb176c8..d0c4d7bf 100644 --- a/docs/source/aliases_db.py +++ b/docs/source/aliases_db.py @@ -86,9 +86,14 @@ 'models.ComAtprotoAdminSendEmail': 'atproto_client.models.com.atproto.admin.send_email', 'models.ComAtprotoAdminUpdateAccountEmail': 'atproto_client.models.com.atproto.admin.update_account_email', 'models.ComAtprotoAdminUpdateAccountHandle': 'atproto_client.models.com.atproto.admin.update_account_handle', + 'models.ComAtprotoAdminUpdateAccountPassword': 'atproto_client.models.com.atproto.admin.update_account_password', 'models.ComAtprotoAdminUpdateCommunicationTemplate': 'atproto_client.models.com.atproto.admin.update_communication_template', 'models.ComAtprotoAdminUpdateSubjectStatus': 'atproto_client.models.com.atproto.admin.update_subject_status', + 'models.ComAtprotoIdentityGetRecommendedDidCredentials': 'atproto_client.models.com.atproto.identity.get_recommended_did_credentials', + 'models.ComAtprotoIdentityRequestPlcOperationSignature': 'atproto_client.models.com.atproto.identity.request_plc_operation_signature', 'models.ComAtprotoIdentityResolveHandle': 'atproto_client.models.com.atproto.identity.resolve_handle', + 'models.ComAtprotoIdentitySignPlcOperation': 'atproto_client.models.com.atproto.identity.sign_plc_operation', + 'models.ComAtprotoIdentitySubmitPlcOperation': 'atproto_client.models.com.atproto.identity.submit_plc_operation', 'models.ComAtprotoIdentityUpdateHandle': 'atproto_client.models.com.atproto.identity.update_handle', 'models.ComAtprotoLabelDefs': 'atproto_client.models.com.atproto.label.defs', 'models.ComAtprotoLabelQueryLabels': 'atproto_client.models.com.atproto.label.query_labels', @@ -100,21 +105,27 @@ 'models.ComAtprotoRepoDeleteRecord': 'atproto_client.models.com.atproto.repo.delete_record', 'models.ComAtprotoRepoDescribeRepo': 'atproto_client.models.com.atproto.repo.describe_repo', 'models.ComAtprotoRepoGetRecord': 'atproto_client.models.com.atproto.repo.get_record', + 'models.ComAtprotoRepoImportRepo': 'atproto_client.models.com.atproto.repo.import_repo', + 'models.ComAtprotoRepoListMissingBlobs': 'atproto_client.models.com.atproto.repo.list_missing_blobs', 'models.ComAtprotoRepoListRecords': 'atproto_client.models.com.atproto.repo.list_records', 'models.ComAtprotoRepoPutRecord': 'atproto_client.models.com.atproto.repo.put_record', 'models.ComAtprotoRepoStrongRef': 'atproto_client.models.com.atproto.repo.strong_ref', 'models.ComAtprotoRepoUploadBlob': 'atproto_client.models.com.atproto.repo.upload_blob', + 'models.ComAtprotoServerActivateAccount': 'atproto_client.models.com.atproto.server.activate_account', + 'models.ComAtprotoServerCheckAccountStatus': 'atproto_client.models.com.atproto.server.check_account_status', 'models.ComAtprotoServerConfirmEmail': 'atproto_client.models.com.atproto.server.confirm_email', 'models.ComAtprotoServerCreateAccount': 'atproto_client.models.com.atproto.server.create_account', 'models.ComAtprotoServerCreateAppPassword': 'atproto_client.models.com.atproto.server.create_app_password', 'models.ComAtprotoServerCreateInviteCode': 'atproto_client.models.com.atproto.server.create_invite_code', 'models.ComAtprotoServerCreateInviteCodes': 'atproto_client.models.com.atproto.server.create_invite_codes', 'models.ComAtprotoServerCreateSession': 'atproto_client.models.com.atproto.server.create_session', + 'models.ComAtprotoServerDeactivateAccount': 'atproto_client.models.com.atproto.server.deactivate_account', 'models.ComAtprotoServerDefs': 'atproto_client.models.com.atproto.server.defs', 'models.ComAtprotoServerDeleteAccount': 'atproto_client.models.com.atproto.server.delete_account', 'models.ComAtprotoServerDeleteSession': 'atproto_client.models.com.atproto.server.delete_session', 'models.ComAtprotoServerDescribeServer': 'atproto_client.models.com.atproto.server.describe_server', 'models.ComAtprotoServerGetAccountInviteCodes': 'atproto_client.models.com.atproto.server.get_account_invite_codes', + 'models.ComAtprotoServerGetServiceAuth': 'atproto_client.models.com.atproto.server.get_service_auth', 'models.ComAtprotoServerGetSession': 'atproto_client.models.com.atproto.server.get_session', 'models.ComAtprotoServerListAppPasswords': 'atproto_client.models.com.atproto.server.list_app_passwords', 'models.ComAtprotoServerRefreshSession': 'atproto_client.models.com.atproto.server.refresh_session', @@ -140,8 +151,5 @@ 'models.ComAtprotoSyncSubscribeRepos': 'atproto_client.models.com.atproto.sync.subscribe_repos', 'models.ComAtprotoTempCheckSignupQueue': 'atproto_client.models.com.atproto.temp.check_signup_queue', 'models.ComAtprotoTempFetchLabels': 'atproto_client.models.com.atproto.temp.fetch_labels', - 'models.ComAtprotoTempImportRepo': 'atproto_client.models.com.atproto.temp.import_repo', - 'models.ComAtprotoTempPushBlob': 'atproto_client.models.com.atproto.temp.push_blob', 'models.ComAtprotoTempRequestPhoneVerification': 'atproto_client.models.com.atproto.temp.request_phone_verification', - 'models.ComAtprotoTempTransferAccount': 'atproto_client.models.com.atproto.temp.transfer_account', } diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.rst index dfdf63a4..10ac7e7a 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.admin.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.rst @@ -34,5 +34,6 @@ Submodules atproto_client.models.com.atproto.admin.send_email atproto_client.models.com.atproto.admin.update_account_email atproto_client.models.com.atproto.admin.update_account_handle + atproto_client.models.com.atproto.admin.update_account_password atproto_client.models.com.atproto.admin.update_communication_template atproto_client.models.com.atproto.admin.update_subject_status diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.update_account_password.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.update_account_password.rst new file mode 100644 index 00000000..b26fe584 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.update_account_password.rst @@ -0,0 +1,7 @@ +com.atproto.admin.update\_account\_password +================================================================== + +.. automodule:: atproto_client.models.com.atproto.admin.update_account_password + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.identity.get_recommended_did_credentials.rst b/docs/source/atproto/atproto_client.models.com.atproto.identity.get_recommended_did_credentials.rst new file mode 100644 index 00000000..e3105767 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.identity.get_recommended_did_credentials.rst @@ -0,0 +1,7 @@ +com.atproto.identity.get\_recommended\_did\_credentials +============================================================================== + +.. automodule:: atproto_client.models.com.atproto.identity.get_recommended_did_credentials + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.identity.request_plc_operation_signature.rst b/docs/source/atproto/atproto_client.models.com.atproto.identity.request_plc_operation_signature.rst new file mode 100644 index 00000000..ab510dde --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.identity.request_plc_operation_signature.rst @@ -0,0 +1,7 @@ +com.atproto.identity.request\_plc\_operation\_signature +============================================================================== + +.. automodule:: atproto_client.models.com.atproto.identity.request_plc_operation_signature + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.identity.rst b/docs/source/atproto/atproto_client.models.com.atproto.identity.rst index 975fdc82..fc45784c 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.identity.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.identity.rst @@ -12,5 +12,9 @@ Submodules .. toctree:: :maxdepth: 4 + atproto_client.models.com.atproto.identity.get_recommended_did_credentials + atproto_client.models.com.atproto.identity.request_plc_operation_signature atproto_client.models.com.atproto.identity.resolve_handle + atproto_client.models.com.atproto.identity.sign_plc_operation + atproto_client.models.com.atproto.identity.submit_plc_operation atproto_client.models.com.atproto.identity.update_handle diff --git a/docs/source/atproto/atproto_client.models.com.atproto.identity.sign_plc_operation.rst b/docs/source/atproto/atproto_client.models.com.atproto.identity.sign_plc_operation.rst new file mode 100644 index 00000000..b308f677 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.identity.sign_plc_operation.rst @@ -0,0 +1,7 @@ +com.atproto.identity.sign\_plc\_operation +================================================================ + +.. automodule:: atproto_client.models.com.atproto.identity.sign_plc_operation + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.identity.submit_plc_operation.rst b/docs/source/atproto/atproto_client.models.com.atproto.identity.submit_plc_operation.rst new file mode 100644 index 00000000..a2a0f0fc --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.identity.submit_plc_operation.rst @@ -0,0 +1,7 @@ +com.atproto.identity.submit\_plc\_operation +================================================================== + +.. automodule:: atproto_client.models.com.atproto.identity.submit_plc_operation + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.import_repo.rst b/docs/source/atproto/atproto_client.models.com.atproto.repo.import_repo.rst similarity index 53% rename from docs/source/atproto/atproto_client.models.com.atproto.temp.import_repo.rst rename to docs/source/atproto/atproto_client.models.com.atproto.repo.import_repo.rst index 4316d07f..4a453cf7 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.temp.import_repo.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.repo.import_repo.rst @@ -1,7 +1,7 @@ -com.atproto.temp.import\_repo +com.atproto.repo.import\_repo ==================================================== -.. automodule:: atproto_client.models.com.atproto.temp.import_repo +.. automodule:: atproto_client.models.com.atproto.repo.import_repo :members: :undoc-members: :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.repo.list_missing_blobs.rst b/docs/source/atproto/atproto_client.models.com.atproto.repo.list_missing_blobs.rst new file mode 100644 index 00000000..065ff5ac --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.repo.list_missing_blobs.rst @@ -0,0 +1,7 @@ +com.atproto.repo.list\_missing\_blobs +============================================================ + +.. automodule:: atproto_client.models.com.atproto.repo.list_missing_blobs + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.repo.rst b/docs/source/atproto/atproto_client.models.com.atproto.repo.rst index 2003f815..e05ae4a4 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.repo.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.repo.rst @@ -17,6 +17,8 @@ Submodules atproto_client.models.com.atproto.repo.delete_record atproto_client.models.com.atproto.repo.describe_repo atproto_client.models.com.atproto.repo.get_record + atproto_client.models.com.atproto.repo.import_repo + atproto_client.models.com.atproto.repo.list_missing_blobs atproto_client.models.com.atproto.repo.list_records atproto_client.models.com.atproto.repo.put_record atproto_client.models.com.atproto.repo.strong_ref diff --git a/docs/source/atproto/atproto_client.models.com.atproto.server.activate_account.rst b/docs/source/atproto/atproto_client.models.com.atproto.server.activate_account.rst new file mode 100644 index 00000000..0eb58249 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.server.activate_account.rst @@ -0,0 +1,7 @@ +com.atproto.server.activate\_account +=========================================================== + +.. automodule:: atproto_client.models.com.atproto.server.activate_account + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.server.check_account_status.rst b/docs/source/atproto/atproto_client.models.com.atproto.server.check_account_status.rst new file mode 100644 index 00000000..9167227f --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.server.check_account_status.rst @@ -0,0 +1,7 @@ +com.atproto.server.check\_account\_status +================================================================ + +.. automodule:: atproto_client.models.com.atproto.server.check_account_status + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.server.deactivate_account.rst b/docs/source/atproto/atproto_client.models.com.atproto.server.deactivate_account.rst new file mode 100644 index 00000000..bb0adcc0 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.server.deactivate_account.rst @@ -0,0 +1,7 @@ +com.atproto.server.deactivate\_account +============================================================= + +.. automodule:: atproto_client.models.com.atproto.server.deactivate_account + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.server.get_service_auth.rst b/docs/source/atproto/atproto_client.models.com.atproto.server.get_service_auth.rst new file mode 100644 index 00000000..11902f41 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.server.get_service_auth.rst @@ -0,0 +1,7 @@ +com.atproto.server.get\_service\_auth +============================================================ + +.. automodule:: atproto_client.models.com.atproto.server.get_service_auth + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.server.rst b/docs/source/atproto/atproto_client.models.com.atproto.server.rst index 5d156e25..9b5461b4 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.server.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.server.rst @@ -12,17 +12,21 @@ Submodules .. toctree:: :maxdepth: 4 + atproto_client.models.com.atproto.server.activate_account + atproto_client.models.com.atproto.server.check_account_status atproto_client.models.com.atproto.server.confirm_email atproto_client.models.com.atproto.server.create_account atproto_client.models.com.atproto.server.create_app_password atproto_client.models.com.atproto.server.create_invite_code atproto_client.models.com.atproto.server.create_invite_codes atproto_client.models.com.atproto.server.create_session + atproto_client.models.com.atproto.server.deactivate_account atproto_client.models.com.atproto.server.defs atproto_client.models.com.atproto.server.delete_account atproto_client.models.com.atproto.server.delete_session atproto_client.models.com.atproto.server.describe_server atproto_client.models.com.atproto.server.get_account_invite_codes + atproto_client.models.com.atproto.server.get_service_auth atproto_client.models.com.atproto.server.get_session atproto_client.models.com.atproto.server.list_app_passwords atproto_client.models.com.atproto.server.refresh_session diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.push_blob.rst b/docs/source/atproto/atproto_client.models.com.atproto.temp.push_blob.rst deleted file mode 100644 index 81ad6c2b..00000000 --- a/docs/source/atproto/atproto_client.models.com.atproto.temp.push_blob.rst +++ /dev/null @@ -1,7 +0,0 @@ -com.atproto.temp.push\_blob -================================================== - -.. automodule:: atproto_client.models.com.atproto.temp.push_blob - :members: - :undoc-members: - :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.rst b/docs/source/atproto/atproto_client.models.com.atproto.temp.rst index 84bcb1e5..3a9a78a1 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.temp.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.temp.rst @@ -14,7 +14,4 @@ Submodules atproto_client.models.com.atproto.temp.check_signup_queue atproto_client.models.com.atproto.temp.fetch_labels - atproto_client.models.com.atproto.temp.import_repo - atproto_client.models.com.atproto.temp.push_blob atproto_client.models.com.atproto.temp.request_phone_verification - atproto_client.models.com.atproto.temp.transfer_account diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.transfer_account.rst b/docs/source/atproto/atproto_client.models.com.atproto.temp.transfer_account.rst deleted file mode 100644 index c4ca68c7..00000000 --- a/docs/source/atproto/atproto_client.models.com.atproto.temp.transfer_account.rst +++ /dev/null @@ -1,7 +0,0 @@ -com.atproto.temp.transfer\_account -========================================================= - -.. automodule:: atproto_client.models.com.atproto.temp.transfer_account - :members: - :undoc-members: - :show-inheritance: \ No newline at end of file diff --git a/lexicons/app.bsky.actor.defs.json b/lexicons/app.bsky.actor.defs.json index fa3772c4..4764c7c1 100644 --- a/lexicons/app.bsky.actor.defs.json +++ b/lexicons/app.bsky.actor.defs.json @@ -105,7 +105,9 @@ "#personalDetailsPref", "#feedViewPref", "#threadViewPref", - "#interestsPref" + "#interestsPref", + "#mutedWordsPref", + "#hiddenPostsPref" ] } }, @@ -215,6 +217,58 @@ "description": "A list of tags which describe the account owner's interests gathered during onboarding." } } + }, + "mutedWordTarget": { + "type": "string", + "knownValues": ["content", "tag"], + "maxLength": 640, + "maxGraphemes": 64 + }, + "mutedWord": { + "type": "object", + "description": "A word that the account owner has muted.", + "required": ["value", "targets"], + "properties": { + "value": { + "type": "string", + "description": "The muted word itself.", + "maxLength": 10000, + "maxGraphemes": 1000 + }, + "targets": { + "type": "array", + "description": "The intended targets of the muted word.", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#mutedWordTarget" + } + } + } + }, + "mutedWordsPref": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#mutedWord" + }, + "description": "A list of words the account owner has muted." + } + } + }, + "hiddenPostsPref": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { "type": "string", "format": "at-uri" }, + "description": "A list of URIs of posts the account owner has hidden." + } + } } } } diff --git a/lexicons/com.atproto.admin.defs.json b/lexicons/com.atproto.admin.defs.json index 133deaf9..e1315eb7 100644 --- a/lexicons/com.atproto.admin.defs.json +++ b/lexicons/com.atproto.admin.defs.json @@ -185,6 +185,10 @@ "suspendUntil": { "type": "string", "format": "datetime" + }, + "tags": { + "type": "array", + "items": { "type": "string" } } } }, @@ -587,6 +591,27 @@ } } }, + "modEventTag": { + "type": "object", + "description": "Add/Remove a tag on a subject", + "required": ["add", "remove"], + "properties": { + "add": { + "type": "array", + "items": { "type": "string" }, + "description": "Tags to be added to the subject. If already exists, won't be duplicated." + }, + "remove": { + "type": "array", + "items": { "type": "string" }, + "description": "Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated." + }, + "comment": { + "type": "string", + "description": "Additional comment about added/removed tags." + } + } + }, "communicationTemplateView": { "type": "object", "required": [ diff --git a/lexicons/com.atproto.admin.emitModerationEvent.json b/lexicons/com.atproto.admin.emitModerationEvent.json index f32ad184..44ef72aa 100644 --- a/lexicons/com.atproto.admin.emitModerationEvent.json +++ b/lexicons/com.atproto.admin.emitModerationEvent.json @@ -23,7 +23,8 @@ "com.atproto.admin.defs#modEventMute", "com.atproto.admin.defs#modEventReverseTakedown", "com.atproto.admin.defs#modEventUnmute", - "com.atproto.admin.defs#modEventEmail" + "com.atproto.admin.defs#modEventEmail", + "com.atproto.admin.defs#modEventTag" ] }, "subject": { diff --git a/lexicons/com.atproto.admin.queryModerationEvents.json b/lexicons/com.atproto.admin.queryModerationEvents.json index 887921cf..239c17bd 100644 --- a/lexicons/com.atproto.admin.queryModerationEvents.json +++ b/lexicons/com.atproto.admin.queryModerationEvents.json @@ -63,6 +63,16 @@ "items": { "type": "string" }, "description": "If specified, only events where all of these labels were removed are returned" }, + "addedTags": { + "type": "array", + "items": { "type": "string" }, + "description": "If specified, only events where all of these tags were added are returned" + }, + "removedTags": { + "type": "array", + "items": { "type": "string" }, + "description": "If specified, only events where all of these tags were removed are returned" + }, "reportTypes": { "type": "array", "items": { diff --git a/lexicons/com.atproto.admin.queryModerationStatuses.json b/lexicons/com.atproto.admin.queryModerationStatuses.json index e3e2a859..5ac915ce 100644 --- a/lexicons/com.atproto.admin.queryModerationStatuses.json +++ b/lexicons/com.atproto.admin.queryModerationStatuses.json @@ -74,6 +74,14 @@ "maximum": 100, "default": 50 }, + "tags": { + "type": "array", + "items": { "type": "string" } + }, + "excludeTags": { + "type": "array", + "items": { "type": "string" } + }, "cursor": { "type": "string" } } }, diff --git a/lexicons/com.atproto.admin.updateAccountPassword.json b/lexicons/com.atproto.admin.updateAccountPassword.json new file mode 100644 index 00000000..76c69fec --- /dev/null +++ b/lexicons/com.atproto.admin.updateAccountPassword.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateAccountPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Update the password for a user account as an administrator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "password"], + "properties": { + "did": { "type": "string", "format": "did" }, + "password": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.identity.getRecommendedDidCredentials.json b/lexicons/com.atproto.identity.getRecommendedDidCredentials.json new file mode 100644 index 00000000..3506dbec --- /dev/null +++ b/lexicons/com.atproto.identity.getRecommendedDidCredentials.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.getRecommendedDidCredentials", + "defs": { + "main": { + "type": "query", + "description": "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "rotationKeys": { + "description": "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.", + "type": "array", + "items": { "type": "string" } + }, + "alsoKnownAs": { + "type": "array", + "items": { "type": "string" } + }, + "verificationMethods": { "type": "unknown" }, + "services": { "type": "unknown" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.identity.requestPlcOperationSignature.json b/lexicons/com.atproto.identity.requestPlcOperationSignature.json new file mode 100644 index 00000000..4aa8b18f --- /dev/null +++ b/lexicons/com.atproto.identity.requestPlcOperationSignature.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.requestPlcOperationSignature", + "defs": { + "main": { + "type": "procedure", + "description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth." + } + } +} diff --git a/lexicons/com.atproto.identity.signPlcOperation.json b/lexicons/com.atproto.identity.signPlcOperation.json new file mode 100644 index 00000000..05a952ca --- /dev/null +++ b/lexicons/com.atproto.identity.signPlcOperation.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.signPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": "Signs a PLC operation to update some value(s) in the requesting DID's document.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "token": { + "description": "A token received through com.atproto.identity.requestPlcOperationSignature", + "type": "string" + }, + "rotationKeys": { + "type": "array", + "items": { "type": "string" } + }, + "alsoKnownAs": { + "type": "array", + "items": { "type": "string" } + }, + "verificationMethods": { "type": "unknown" }, + "services": { "type": "unknown" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["operation"], + "properties": { + "operation": { + "type": "unknown", + "description": "A signed DID PLC operation." + } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.identity.submitPlcOperation.json b/lexicons/com.atproto.identity.submitPlcOperation.json new file mode 100644 index 00000000..280f5003 --- /dev/null +++ b/lexicons/com.atproto.identity.submitPlcOperation.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.submitPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["operation"], + "properties": { + "operation": { "type": "unknown" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.repo.importRepo.json b/lexicons/com.atproto.repo.importRepo.json new file mode 100644 index 00000000..fc850b1a --- /dev/null +++ b/lexicons/com.atproto.repo.importRepo.json @@ -0,0 +1,13 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.importRepo", + "defs": { + "main": { + "type": "procedure", + "description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", + "input": { + "encoding": "application/vnd.ipld.car" + } + } + } +} diff --git a/lexicons/com.atproto.repo.listMissingBlobs.json b/lexicons/com.atproto.repo.listMissingBlobs.json new file mode 100644 index 00000000..c39913d5 --- /dev/null +++ b/lexicons/com.atproto.repo.listMissingBlobs.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.listMissingBlobs", + "defs": { + "main": { + "type": "query", + "description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["blobs"], + "properties": { + "cursor": { "type": "string" }, + "blobs": { + "type": "array", + "items": { "type": "ref", "ref": "#recordBlob" } + } + } + } + } + }, + "recordBlob": { + "type": "object", + "required": ["cid", "recordUri"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "recordUri": { "type": "string", "format": "at-uri" } + } + } + } +} diff --git a/lexicons/com.atproto.server.activateAccount.json b/lexicons/com.atproto.server.activateAccount.json new file mode 100644 index 00000000..e06935fc --- /dev/null +++ b/lexicons/com.atproto.server.activateAccount.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.activateAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup." + } + } +} diff --git a/lexicons/com.atproto.server.checkAccountStatus.json b/lexicons/com.atproto.server.checkAccountStatus.json new file mode 100644 index 00000000..d34596e6 --- /dev/null +++ b/lexicons/com.atproto.server.checkAccountStatus.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.checkAccountStatus", + "defs": { + "main": { + "type": "query", + "description": "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "activated", + "validDid", + "repoCommit", + "repoRev", + "repoBlocks", + "indexedRecords", + "privateStateValues", + "expectedBlobs", + "importedBlobs" + ], + "properties": { + "activated": { "type": "boolean" }, + "validDid": { "type": "boolean" }, + "repoCommit": { "type": "string", "format": "cid" }, + "repoRev": { "type": "string" }, + "repoBlocks": { "type": "integer" }, + "indexedRecords": { "type": "integer" }, + "privateStateValues": { "type": "integer" }, + "expectedBlobs": { "type": "integer" }, + "importedBlobs": { "type": "integer" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.server.deactivateAccount.json b/lexicons/com.atproto.server.deactivateAccount.json new file mode 100644 index 00000000..698fccf2 --- /dev/null +++ b/lexicons/com.atproto.server.deactivateAccount.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.deactivateAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "deleteAfter": { + "type": "string", + "format": "datetime", + "description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting." + } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.server.describeServer.json b/lexicons/com.atproto.server.describeServer.json index 908cb212..d7bd4ab7 100644 --- a/lexicons/com.atproto.server.describeServer.json +++ b/lexicons/com.atproto.server.describeServer.json @@ -9,7 +9,7 @@ "encoding": "application/json", "schema": { "type": "object", - "required": ["availableUserDomains"], + "required": ["did", "availableUserDomains"], "properties": { "inviteCodeRequired": { "type": "boolean", @@ -28,6 +28,10 @@ "type": "ref", "description": "URLs of service policy documents.", "ref": "#links" + }, + "did": { + "type": "string", + "format": "did" } } } diff --git a/lexicons/com.atproto.server.getServiceAuth.json b/lexicons/com.atproto.server.getServiceAuth.json new file mode 100644 index 00000000..95984c18 --- /dev/null +++ b/lexicons/com.atproto.server.getServiceAuth.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.getServiceAuth", + "defs": { + "main": { + "type": "query", + "description": "Get a signed token on behalf of the requesting DID for the requested service.", + "parameters": { + "type": "params", + "required": ["aud"], + "properties": { + "aud": { + "type": "string", + "format": "did", + "description": "The DID of the service that the token will be used to authenticate with" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["token"], + "properties": { + "token": { + "type": "string" + } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.sync.subscribeRepos.json b/lexicons/com.atproto.sync.subscribeRepos.json index 73a34a3b..31d68b91 100644 --- a/lexicons/com.atproto.sync.subscribeRepos.json +++ b/lexicons/com.atproto.sync.subscribeRepos.json @@ -17,7 +17,14 @@ "message": { "schema": { "type": "union", - "refs": ["#commit", "#handle", "#migrate", "#tombstone", "#info"] + "refs": [ + "#commit", + "#identity", + "#handle", + "#migrate", + "#tombstone", + "#info" + ] } }, "errors": [ @@ -104,9 +111,19 @@ } } }, + "identity": { + "type": "object", + "description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.", + "required": ["seq", "did", "time"], + "properties": { + "seq": { "type": "integer" }, + "did": { "type": "string", "format": "did" }, + "time": { "type": "string", "format": "datetime" } + } + }, "handle": { "type": "object", - "description": "Represents an update of the account's handle, or transition to/from invalid state.", + "description": "Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.", "required": ["seq", "did", "handle", "time"], "properties": { "seq": { "type": "integer" }, @@ -117,7 +134,7 @@ }, "migrate": { "type": "object", - "description": "Represents an account moving from one PDS instance to another. NOTE: not implemented; full account migration may introduce a new message instead.", + "description": "Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead", "required": ["seq", "did", "migrateTo", "time"], "nullable": ["migrateTo"], "properties": { @@ -129,7 +146,7 @@ }, "tombstone": { "type": "object", - "description": "Indicates that an account has been deleted.", + "description": "Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event", "required": ["seq", "did", "time"], "properties": { "seq": { "type": "integer" }, diff --git a/lexicons/com.atproto.temp.importRepo.json b/lexicons/com.atproto.temp.importRepo.json deleted file mode 100644 index f06daa09..00000000 --- a/lexicons/com.atproto.temp.importRepo.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.temp.importRepo", - "defs": { - "main": { - "type": "procedure", - "description": "Gets the did's repo, optionally catching up from a specific revision.", - "parameters": { - "type": "params", - "required": ["did"], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo." - } - } - }, - "input": { - "encoding": "application/vnd.ipld.car" - }, - "output": { - "encoding": "text/plain" - } - } - } -} diff --git a/lexicons/com.atproto.temp.pushBlob.json b/lexicons/com.atproto.temp.pushBlob.json deleted file mode 100644 index 9babc8f8..00000000 --- a/lexicons/com.atproto.temp.pushBlob.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.temp.pushBlob", - "defs": { - "main": { - "type": "procedure", - "description": "Gets the did's repo, optionally catching up from a specific revision.", - "parameters": { - "type": "params", - "required": ["did"], - "properties": { - "did": { - "type": "string", - "format": "did", - "description": "The DID of the repo." - } - } - }, - "input": { - "encoding": "*/*" - } - } - } -} diff --git a/lexicons/com.atproto.temp.transferAccount.json b/lexicons/com.atproto.temp.transferAccount.json deleted file mode 100644 index d4687d9b..00000000 --- a/lexicons/com.atproto.temp.transferAccount.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.temp.transferAccount", - "defs": { - "main": { - "type": "procedure", - "description": "Transfer an account. NOTE: temporary method, necessarily how account migration will be implemented.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["handle", "did", "plcOp"], - "properties": { - "handle": { "type": "string", "format": "handle" }, - "did": { "type": "string", "format": "did" }, - "plcOp": { "type": "unknown" } - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["accessJwt", "refreshJwt", "handle", "did"], - "properties": { - "accessJwt": { "type": "string" }, - "refreshJwt": { "type": "string" }, - "handle": { "type": "string", "format": "handle" }, - "did": { "type": "string", "format": "did" } - } - } - }, - "errors": [ - { "name": "InvalidHandle" }, - { "name": "InvalidPassword" }, - { "name": "InvalidInviteCode" }, - { "name": "HandleNotAvailable" }, - { "name": "UnsupportedDomain" }, - { "name": "UnresolvableDid" }, - { "name": "IncompatibleDidDoc" } - ] - } - } -} diff --git a/packages/atproto_client/models/__init__.py b/packages/atproto_client/models/__init__.py index 38a4933f..4ce68a5d 100644 --- a/packages/atproto_client/models/__init__.py +++ b/packages/atproto_client/models/__init__.py @@ -95,11 +95,20 @@ from atproto_client.models.com.atproto.admin import send_email as ComAtprotoAdminSendEmail from atproto_client.models.com.atproto.admin import update_account_email as ComAtprotoAdminUpdateAccountEmail from atproto_client.models.com.atproto.admin import update_account_handle as ComAtprotoAdminUpdateAccountHandle +from atproto_client.models.com.atproto.admin import update_account_password as ComAtprotoAdminUpdateAccountPassword from atproto_client.models.com.atproto.admin import ( update_communication_template as ComAtprotoAdminUpdateCommunicationTemplate, ) from atproto_client.models.com.atproto.admin import update_subject_status as ComAtprotoAdminUpdateSubjectStatus +from atproto_client.models.com.atproto.identity import ( + get_recommended_did_credentials as ComAtprotoIdentityGetRecommendedDidCredentials, +) +from atproto_client.models.com.atproto.identity import ( + request_plc_operation_signature as ComAtprotoIdentityRequestPlcOperationSignature, +) from atproto_client.models.com.atproto.identity import resolve_handle as ComAtprotoIdentityResolveHandle +from atproto_client.models.com.atproto.identity import sign_plc_operation as ComAtprotoIdentitySignPlcOperation +from atproto_client.models.com.atproto.identity import submit_plc_operation as ComAtprotoIdentitySubmitPlcOperation from atproto_client.models.com.atproto.identity import update_handle as ComAtprotoIdentityUpdateHandle from atproto_client.models.com.atproto.label import defs as ComAtprotoLabelDefs from atproto_client.models.com.atproto.label import query_labels as ComAtprotoLabelQueryLabels @@ -111,21 +120,27 @@ from atproto_client.models.com.atproto.repo import delete_record as ComAtprotoRepoDeleteRecord from atproto_client.models.com.atproto.repo import describe_repo as ComAtprotoRepoDescribeRepo from atproto_client.models.com.atproto.repo import get_record as ComAtprotoRepoGetRecord +from atproto_client.models.com.atproto.repo import import_repo as ComAtprotoRepoImportRepo +from atproto_client.models.com.atproto.repo import list_missing_blobs as ComAtprotoRepoListMissingBlobs from atproto_client.models.com.atproto.repo import list_records as ComAtprotoRepoListRecords from atproto_client.models.com.atproto.repo import put_record as ComAtprotoRepoPutRecord from atproto_client.models.com.atproto.repo import strong_ref as ComAtprotoRepoStrongRef from atproto_client.models.com.atproto.repo import upload_blob as ComAtprotoRepoUploadBlob +from atproto_client.models.com.atproto.server import activate_account as ComAtprotoServerActivateAccount +from atproto_client.models.com.atproto.server import check_account_status as ComAtprotoServerCheckAccountStatus from atproto_client.models.com.atproto.server import confirm_email as ComAtprotoServerConfirmEmail from atproto_client.models.com.atproto.server import create_account as ComAtprotoServerCreateAccount from atproto_client.models.com.atproto.server import create_app_password as ComAtprotoServerCreateAppPassword from atproto_client.models.com.atproto.server import create_invite_code as ComAtprotoServerCreateInviteCode from atproto_client.models.com.atproto.server import create_invite_codes as ComAtprotoServerCreateInviteCodes from atproto_client.models.com.atproto.server import create_session as ComAtprotoServerCreateSession +from atproto_client.models.com.atproto.server import deactivate_account as ComAtprotoServerDeactivateAccount from atproto_client.models.com.atproto.server import defs as ComAtprotoServerDefs from atproto_client.models.com.atproto.server import delete_account as ComAtprotoServerDeleteAccount from atproto_client.models.com.atproto.server import delete_session as ComAtprotoServerDeleteSession from atproto_client.models.com.atproto.server import describe_server as ComAtprotoServerDescribeServer from atproto_client.models.com.atproto.server import get_account_invite_codes as ComAtprotoServerGetAccountInviteCodes +from atproto_client.models.com.atproto.server import get_service_auth as ComAtprotoServerGetServiceAuth from atproto_client.models.com.atproto.server import get_session as ComAtprotoServerGetSession from atproto_client.models.com.atproto.server import list_app_passwords as ComAtprotoServerListAppPasswords from atproto_client.models.com.atproto.server import refresh_session as ComAtprotoServerRefreshSession @@ -153,10 +168,7 @@ from atproto_client.models.com.atproto.sync import subscribe_repos as ComAtprotoSyncSubscribeRepos from atproto_client.models.com.atproto.temp import check_signup_queue as ComAtprotoTempCheckSignupQueue from atproto_client.models.com.atproto.temp import fetch_labels as ComAtprotoTempFetchLabels -from atproto_client.models.com.atproto.temp import import_repo as ComAtprotoTempImportRepo -from atproto_client.models.com.atproto.temp import push_blob as ComAtprotoTempPushBlob from atproto_client.models.com.atproto.temp import request_phone_verification as ComAtprotoTempRequestPhoneVerification -from atproto_client.models.com.atproto.temp import transfer_account as ComAtprotoTempTransferAccount from atproto_client.models.models_loader import load_models from atproto_client.models.utils import ( create_strong_ref, @@ -255,9 +267,14 @@ class _Ids: ComAtprotoAdminSendEmail: str = 'com.atproto.admin.sendEmail' ComAtprotoAdminUpdateAccountEmail: str = 'com.atproto.admin.updateAccountEmail' ComAtprotoAdminUpdateAccountHandle: str = 'com.atproto.admin.updateAccountHandle' + ComAtprotoAdminUpdateAccountPassword: str = 'com.atproto.admin.updateAccountPassword' ComAtprotoAdminUpdateCommunicationTemplate: str = 'com.atproto.admin.updateCommunicationTemplate' ComAtprotoAdminUpdateSubjectStatus: str = 'com.atproto.admin.updateSubjectStatus' + ComAtprotoIdentityGetRecommendedDidCredentials: str = 'com.atproto.identity.getRecommendedDidCredentials' + ComAtprotoIdentityRequestPlcOperationSignature: str = 'com.atproto.identity.requestPlcOperationSignature' ComAtprotoIdentityResolveHandle: str = 'com.atproto.identity.resolveHandle' + ComAtprotoIdentitySignPlcOperation: str = 'com.atproto.identity.signPlcOperation' + ComAtprotoIdentitySubmitPlcOperation: str = 'com.atproto.identity.submitPlcOperation' ComAtprotoIdentityUpdateHandle: str = 'com.atproto.identity.updateHandle' ComAtprotoLabelDefs: str = 'com.atproto.label.defs' ComAtprotoLabelQueryLabels: str = 'com.atproto.label.queryLabels' @@ -269,21 +286,27 @@ class _Ids: ComAtprotoRepoDeleteRecord: str = 'com.atproto.repo.deleteRecord' ComAtprotoRepoDescribeRepo: str = 'com.atproto.repo.describeRepo' ComAtprotoRepoGetRecord: str = 'com.atproto.repo.getRecord' + ComAtprotoRepoImportRepo: str = 'com.atproto.repo.importRepo' + ComAtprotoRepoListMissingBlobs: str = 'com.atproto.repo.listMissingBlobs' ComAtprotoRepoListRecords: str = 'com.atproto.repo.listRecords' ComAtprotoRepoPutRecord: str = 'com.atproto.repo.putRecord' ComAtprotoRepoStrongRef: str = 'com.atproto.repo.strongRef' ComAtprotoRepoUploadBlob: str = 'com.atproto.repo.uploadBlob' + ComAtprotoServerActivateAccount: str = 'com.atproto.server.activateAccount' + ComAtprotoServerCheckAccountStatus: str = 'com.atproto.server.checkAccountStatus' ComAtprotoServerConfirmEmail: str = 'com.atproto.server.confirmEmail' ComAtprotoServerCreateAccount: str = 'com.atproto.server.createAccount' ComAtprotoServerCreateAppPassword: str = 'com.atproto.server.createAppPassword' ComAtprotoServerCreateInviteCode: str = 'com.atproto.server.createInviteCode' ComAtprotoServerCreateInviteCodes: str = 'com.atproto.server.createInviteCodes' ComAtprotoServerCreateSession: str = 'com.atproto.server.createSession' + ComAtprotoServerDeactivateAccount: str = 'com.atproto.server.deactivateAccount' ComAtprotoServerDefs: str = 'com.atproto.server.defs' ComAtprotoServerDeleteAccount: str = 'com.atproto.server.deleteAccount' ComAtprotoServerDeleteSession: str = 'com.atproto.server.deleteSession' ComAtprotoServerDescribeServer: str = 'com.atproto.server.describeServer' ComAtprotoServerGetAccountInviteCodes: str = 'com.atproto.server.getAccountInviteCodes' + ComAtprotoServerGetServiceAuth: str = 'com.atproto.server.getServiceAuth' ComAtprotoServerGetSession: str = 'com.atproto.server.getSession' ComAtprotoServerListAppPasswords: str = 'com.atproto.server.listAppPasswords' ComAtprotoServerRefreshSession: str = 'com.atproto.server.refreshSession' @@ -309,10 +332,7 @@ class _Ids: ComAtprotoSyncSubscribeRepos: str = 'com.atproto.sync.subscribeRepos' ComAtprotoTempCheckSignupQueue: str = 'com.atproto.temp.checkSignupQueue' ComAtprotoTempFetchLabels: str = 'com.atproto.temp.fetchLabels' - ComAtprotoTempImportRepo: str = 'com.atproto.temp.importRepo' - ComAtprotoTempPushBlob: str = 'com.atproto.temp.pushBlob' ComAtprotoTempRequestPhoneVerification: str = 'com.atproto.temp.requestPhoneVerification' - ComAtprotoTempTransferAccount: str = 'com.atproto.temp.transferAccount' ids = _Ids() diff --git a/packages/atproto_client/models/app/bsky/actor/defs.py b/packages/atproto_client/models/app/bsky/actor/defs.py index 2992853b..20a7cea5 100644 --- a/packages/atproto_client/models/app/bsky/actor/defs.py +++ b/packages/atproto_client/models/app/bsky/actor/defs.py @@ -94,6 +94,8 @@ class ViewerState(base.ModelBase): 'models.AppBskyActorDefs.FeedViewPref', 'models.AppBskyActorDefs.ThreadViewPref', 'models.AppBskyActorDefs.InterestsPref', + 'models.AppBskyActorDefs.MutedWordsPref', + 'models.AppBskyActorDefs.HiddenPostsPref', ], Field(discriminator='py_type'), ] @@ -181,3 +183,37 @@ class InterestsPref(base.ModelBase): py_type: te.Literal['app.bsky.actor.defs#interestsPref'] = Field( default='app.bsky.actor.defs#interestsPref', alias='$type', frozen=True ) + + +MutedWordTarget = t.Union[te.Literal['content'], te.Literal['tag']] #: Muted word target + + +class MutedWord(base.ModelBase): + """Definition model for :obj:`app.bsky.actor.defs`. A word that the account owner has muted.""" + + targets: t.List['models.AppBskyActorDefs.MutedWordTarget'] #: The intended targets of the muted word. + value: str = Field(max_length=10000) #: The muted word itself. + + py_type: te.Literal['app.bsky.actor.defs#mutedWord'] = Field( + default='app.bsky.actor.defs#mutedWord', alias='$type', frozen=True + ) + + +class MutedWordsPref(base.ModelBase): + """Definition model for :obj:`app.bsky.actor.defs`.""" + + items: t.List['models.AppBskyActorDefs.MutedWord'] #: A list of words the account owner has muted. + + py_type: te.Literal['app.bsky.actor.defs#mutedWordsPref'] = Field( + default='app.bsky.actor.defs#mutedWordsPref', alias='$type', frozen=True + ) + + +class HiddenPostsPref(base.ModelBase): + """Definition model for :obj:`app.bsky.actor.defs`.""" + + items: t.List[str] #: A list of URIs of posts the account owner has hidden. + + py_type: te.Literal['app.bsky.actor.defs#hiddenPostsPref'] = Field( + default='app.bsky.actor.defs#hiddenPostsPref', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/com/atproto/admin/defs.py b/packages/atproto_client/models/com/atproto/admin/defs.py index 8b705248..f923f0dc 100644 --- a/packages/atproto_client/models/com/atproto/admin/defs.py +++ b/packages/atproto_client/models/com/atproto/admin/defs.py @@ -143,6 +143,7 @@ class SubjectStatusView(base.ModelBase): subject_blob_cids: t.Optional[t.List[str]] = None #: Subject blob cids. subject_repo_handle: t.Optional[str] = None #: Subject repo handle. suspend_until: t.Optional[str] = None #: Suspend until. + tags: t.Optional[t.List[str]] = None #: Tags. takendown: t.Optional[bool] = None #: Takendown. py_type: te.Literal['com.atproto.admin.defs#subjectStatusView'] = Field( @@ -509,6 +510,18 @@ class ModEventEmail(base.ModelBase): ) +class ModEventTag(base.ModelBase): + """Definition model for :obj:`com.atproto.admin.defs`. Add/Remove a tag on a subject.""" + + add: t.List[str] #: Tags to be added to the subject. If already exists, won't be duplicated. + remove: t.List[str] #: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. + comment: t.Optional[str] = None #: Additional comment about added/removed tags. + + py_type: te.Literal['com.atproto.admin.defs#modEventTag'] = Field( + default='com.atproto.admin.defs#modEventTag', alias='$type', frozen=True + ) + + class CommunicationTemplateView(base.ModelBase): """Definition model for :obj:`com.atproto.admin.defs`.""" diff --git a/packages/atproto_client/models/com/atproto/admin/emit_moderation_event.py b/packages/atproto_client/models/com/atproto/admin/emit_moderation_event.py index 57c80754..e82e9d28 100644 --- a/packages/atproto_client/models/com/atproto/admin/emit_moderation_event.py +++ b/packages/atproto_client/models/com/atproto/admin/emit_moderation_event.py @@ -31,6 +31,7 @@ class Data(base.DataModelBase): 'models.ComAtprotoAdminDefs.ModEventReverseTakedown', 'models.ComAtprotoAdminDefs.ModEventUnmute', 'models.ComAtprotoAdminDefs.ModEventEmail', + 'models.ComAtprotoAdminDefs.ModEventTag', ], Field(discriminator='py_type'), ] #: Event. @@ -55,6 +56,7 @@ class DataDict(te.TypedDict): 'models.ComAtprotoAdminDefs.ModEventReverseTakedown', 'models.ComAtprotoAdminDefs.ModEventUnmute', 'models.ComAtprotoAdminDefs.ModEventEmail', + 'models.ComAtprotoAdminDefs.ModEventTag', ], Field(discriminator='py_type'), ] #: Event. diff --git a/packages/atproto_client/models/com/atproto/admin/query_moderation_events.py b/packages/atproto_client/models/com/atproto/admin/query_moderation_events.py index 19b4e8fe..624ddf0f 100644 --- a/packages/atproto_client/models/com/atproto/admin/query_moderation_events.py +++ b/packages/atproto_client/models/com/atproto/admin/query_moderation_events.py @@ -21,6 +21,9 @@ class Params(base.ParamsModelBase): added_labels: t.Optional[ t.List[str] ] = None #: If specified, only events where all of these labels were added are returned. + added_tags: t.Optional[ + t.List[str] + ] = None #: If specified, only events where all of these tags were added are returned. comment: t.Optional[str] = None #: If specified, only events with comments containing the keyword are returned. created_after: t.Optional[str] = None #: Retrieve events created after a given timestamp. created_before: t.Optional[str] = None #: Retrieve events created before a given timestamp. @@ -34,6 +37,9 @@ class Params(base.ParamsModelBase): removed_labels: t.Optional[ t.List[str] ] = None #: If specified, only events where all of these labels were removed are returned. + removed_tags: t.Optional[ + t.List[str] + ] = None #: If specified, only events where all of these tags were removed are returned. report_types: t.Optional[t.List[str]] = None #: Report types. sort_direction: t.Optional[ str @@ -48,6 +54,9 @@ class ParamsDict(te.TypedDict): added_labels: te.NotRequired[ t.Optional[t.List[str]] ] #: If specified, only events where all of these labels were added are returned. + added_tags: te.NotRequired[ + t.Optional[t.List[str]] + ] #: If specified, only events where all of these tags were added are returned. comment: te.NotRequired[ t.Optional[str] ] #: If specified, only events with comments containing the keyword are returned. @@ -63,6 +72,9 @@ class ParamsDict(te.TypedDict): removed_labels: te.NotRequired[ t.Optional[t.List[str]] ] #: If specified, only events where all of these labels were removed are returned. + removed_tags: te.NotRequired[ + t.Optional[t.List[str]] + ] #: If specified, only events where all of these tags were removed are returned. report_types: te.NotRequired[t.Optional[t.List[str]]] #: Report types. sort_direction: te.NotRequired[ t.Optional[str] diff --git a/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py b/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py index 139e993e..2a0d389e 100644 --- a/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py +++ b/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py @@ -21,6 +21,7 @@ class Params(base.ParamsModelBase): appealed: t.Optional[bool] = None #: Get subjects in unresolved appealed status. comment: t.Optional[str] = None #: Search subjects by keyword from comments. cursor: t.Optional[str] = None #: Cursor. + exclude_tags: t.Optional[t.List[str]] = None #: Exclude tags. ignore_subjects: t.Optional[t.List[str]] = None #: Ignore subjects. include_muted: t.Optional[ bool @@ -35,6 +36,7 @@ class Params(base.ParamsModelBase): sort_direction: t.Optional[str] = None #: Sort direction. sort_field: t.Optional[str] = None #: Sort field. subject: t.Optional[str] = None #: Subject. + tags: t.Optional[t.List[str]] = None #: Tags. takendown: t.Optional[bool] = None #: Get subjects that were taken down. @@ -42,6 +44,7 @@ class ParamsDict(te.TypedDict): appealed: te.NotRequired[t.Optional[bool]] #: Get subjects in unresolved appealed status. comment: te.NotRequired[t.Optional[str]] #: Search subjects by keyword from comments. cursor: te.NotRequired[t.Optional[str]] #: Cursor. + exclude_tags: te.NotRequired[t.Optional[t.List[str]]] #: Exclude tags. ignore_subjects: te.NotRequired[t.Optional[t.List[str]]] #: Ignore subjects. include_muted: te.NotRequired[ t.Optional[bool] @@ -58,6 +61,7 @@ class ParamsDict(te.TypedDict): sort_direction: te.NotRequired[t.Optional[str]] #: Sort direction. sort_field: te.NotRequired[t.Optional[str]] #: Sort field. subject: te.NotRequired[t.Optional[str]] #: Subject. + tags: te.NotRequired[t.Optional[t.List[str]]] #: Tags. takendown: te.NotRequired[t.Optional[bool]] #: Get subjects that were taken down. diff --git a/packages/atproto_client/models/com/atproto/temp/import_repo.py b/packages/atproto_client/models/com/atproto/admin/update_account_password.py similarity index 55% rename from packages/atproto_client/models/com/atproto/temp/import_repo.py rename to packages/atproto_client/models/com/atproto/admin/update_account_password.py index dadaf5ad..600dcd4d 100644 --- a/packages/atproto_client/models/com/atproto/temp/import_repo.py +++ b/packages/atproto_client/models/com/atproto/admin/update_account_password.py @@ -10,19 +10,13 @@ from atproto_client.models import base -class Params(base.ParamsModelBase): - """Parameters model for :obj:`com.atproto.temp.importRepo`.""" +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.admin.updateAccountPassword`.""" - did: str #: The DID of the repo. + did: str #: Did. + password: str #: Password. -class ParamsDict(te.TypedDict): - did: str #: The DID of the repo. - - -#: Data raw data type. -Data: te.TypeAlias = bytes - - -#: Response raw data type. -Response: te.TypeAlias = bytes +class DataDict(te.TypedDict): + did: str #: Did. + password: str #: Password. diff --git a/packages/atproto_client/models/com/atproto/identity/get_recommended_did_credentials.py b/packages/atproto_client/models/com/atproto/identity/get_recommended_did_credentials.py new file mode 100644 index 00000000..cf2fe93a --- /dev/null +++ b/packages/atproto_client/models/com/atproto/identity/get_recommended_did_credentials.py @@ -0,0 +1,23 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing as t + +if t.TYPE_CHECKING: + from atproto_client.models.unknown_type import UnknownType +from atproto_client.models import base + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.identity.getRecommendedDidCredentials`.""" + + also_known_as: t.Optional[t.List[str]] = None #: Also known as. + rotation_keys: t.Optional[ + t.List[str] + ] = None #: Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. + services: t.Optional['UnknownType'] = None #: Services. + verification_methods: t.Optional['UnknownType'] = None #: Verification methods. diff --git a/packages/atproto_client/models/com/atproto/identity/request_plc_operation_signature.py b/packages/atproto_client/models/com/atproto/identity/request_plc_operation_signature.py new file mode 100644 index 00000000..5aa4f2ff --- /dev/null +++ b/packages/atproto_client/models/com/atproto/identity/request_plc_operation_signature.py @@ -0,0 +1,7 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + diff --git a/packages/atproto_client/models/com/atproto/identity/sign_plc_operation.py b/packages/atproto_client/models/com/atproto/identity/sign_plc_operation.py new file mode 100644 index 00000000..c5f356a2 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/identity/sign_plc_operation.py @@ -0,0 +1,40 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing as t + +import typing_extensions as te + +if t.TYPE_CHECKING: + from atproto_client.models.unknown_type import UnknownInputType, UnknownType +from atproto_client.models import base + + +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.identity.signPlcOperation`.""" + + also_known_as: t.Optional[t.List[str]] = None #: Also known as. + rotation_keys: t.Optional[t.List[str]] = None #: Rotation keys. + services: t.Optional['UnknownInputType'] = None #: Services. + token: t.Optional[str] = None #: A token received through com.atproto.identity.requestPlcOperationSignature. + verification_methods: t.Optional['UnknownInputType'] = None #: Verification methods. + + +class DataDict(te.TypedDict): + also_known_as: te.NotRequired[t.Optional[t.List[str]]] #: Also known as. + rotation_keys: te.NotRequired[t.Optional[t.List[str]]] #: Rotation keys. + services: te.NotRequired[t.Optional['UnknownInputType']] #: Services. + token: te.NotRequired[ + t.Optional[str] + ] #: A token received through com.atproto.identity.requestPlcOperationSignature. + verification_methods: te.NotRequired[t.Optional['UnknownInputType']] #: Verification methods. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.identity.signPlcOperation`.""" + + operation: 'UnknownType' #: A signed DID PLC operation. diff --git a/packages/atproto_client/models/com/atproto/temp/transfer_account.py b/packages/atproto_client/models/com/atproto/identity/submit_plc_operation.py similarity index 53% rename from packages/atproto_client/models/com/atproto/temp/transfer_account.py rename to packages/atproto_client/models/com/atproto/identity/submit_plc_operation.py index c44789b7..5887c8e3 100644 --- a/packages/atproto_client/models/com/atproto/temp/transfer_account.py +++ b/packages/atproto_client/models/com/atproto/identity/submit_plc_operation.py @@ -15,23 +15,10 @@ class Data(base.DataModelBase): - """Input data model for :obj:`com.atproto.temp.transferAccount`.""" + """Input data model for :obj:`com.atproto.identity.submitPlcOperation`.""" - did: str #: Did. - handle: str #: Handle. - plc_op: 'UnknownInputType' #: Plc op. + operation: 'UnknownInputType' #: Operation. class DataDict(te.TypedDict): - did: str #: Did. - handle: str #: Handle. - plc_op: 'UnknownInputType' #: Plc op. - - -class Response(base.ResponseModelBase): - """Output data model for :obj:`com.atproto.temp.transferAccount`.""" - - access_jwt: str #: Access jwt. - did: str #: Did. - handle: str #: Handle. - refresh_jwt: str #: Refresh jwt. + operation: 'UnknownInputType' #: Operation. diff --git a/packages/atproto_client/models/com/atproto/temp/push_blob.py b/packages/atproto_client/models/com/atproto/repo/import_repo.py similarity index 61% rename from packages/atproto_client/models/com/atproto/temp/push_blob.py rename to packages/atproto_client/models/com/atproto/repo/import_repo.py index 23ba383a..29e4fb42 100644 --- a/packages/atproto_client/models/com/atproto/temp/push_blob.py +++ b/packages/atproto_client/models/com/atproto/repo/import_repo.py @@ -7,18 +7,5 @@ import typing_extensions as te -from atproto_client.models import base - - -class Params(base.ParamsModelBase): - """Parameters model for :obj:`com.atproto.temp.pushBlob`.""" - - did: str #: The DID of the repo. - - -class ParamsDict(te.TypedDict): - did: str #: The DID of the repo. - - #: Data raw data type. Data: te.TypeAlias = bytes diff --git a/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py b/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py new file mode 100644 index 00000000..be09684a --- /dev/null +++ b/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py @@ -0,0 +1,45 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing as t + +import typing_extensions as te +from pydantic import Field + +if t.TYPE_CHECKING: + from atproto_client import models +from atproto_client.models import base + + +class Params(base.ParamsModelBase): + """Parameters model for :obj:`com.atproto.repo.listMissingBlobs`.""" + + cursor: t.Optional[str] = None #: Cursor. + limit: t.Optional[int] = Field(default=500, ge=1, le=1000) #: Limit. + + +class ParamsDict(te.TypedDict): + cursor: te.NotRequired[t.Optional[str]] #: Cursor. + limit: te.NotRequired[t.Optional[int]] #: Limit. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.repo.listMissingBlobs`.""" + + blobs: t.List['models.ComAtprotoRepoListMissingBlobs.RecordBlob'] #: Blobs. + cursor: t.Optional[str] = None #: Cursor. + + +class RecordBlob(base.ModelBase): + """Definition model for :obj:`com.atproto.repo.listMissingBlobs`.""" + + cid: str #: Cid. + record_uri: str #: Record uri. + + py_type: te.Literal['com.atproto.repo.listMissingBlobs#recordBlob'] = Field( + default='com.atproto.repo.listMissingBlobs#recordBlob', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/com/atproto/server/activate_account.py b/packages/atproto_client/models/com/atproto/server/activate_account.py new file mode 100644 index 00000000..5aa4f2ff --- /dev/null +++ b/packages/atproto_client/models/com/atproto/server/activate_account.py @@ -0,0 +1,7 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + diff --git a/packages/atproto_client/models/com/atproto/server/check_account_status.py b/packages/atproto_client/models/com/atproto/server/check_account_status.py new file mode 100644 index 00000000..ef784707 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/server/check_account_status.py @@ -0,0 +1,22 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +from atproto_client.models import base + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.server.checkAccountStatus`.""" + + activated: bool #: Activated. + expected_blobs: int #: Expected blobs. + imported_blobs: int #: Imported blobs. + indexed_records: int #: Indexed records. + private_state_values: int #: Private state values. + repo_blocks: int #: Repo blocks. + repo_commit: str #: Repo commit. + repo_rev: str #: Repo rev. + valid_did: bool #: Valid did. diff --git a/packages/atproto_client/models/com/atproto/server/deactivate_account.py b/packages/atproto_client/models/com/atproto/server/deactivate_account.py new file mode 100644 index 00000000..230eacbb --- /dev/null +++ b/packages/atproto_client/models/com/atproto/server/deactivate_account.py @@ -0,0 +1,28 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing as t + +import typing_extensions as te + +from atproto_client.models import base + + +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.server.deactivateAccount`.""" + + delete_after: t.Optional[ + str + ] = ( + None + ) #: A recommendation to server as to how long they should hold onto the deactivated account before deleting. + + +class DataDict(te.TypedDict): + delete_after: te.NotRequired[ + t.Optional[str] + ] #: A recommendation to server as to how long they should hold onto the deactivated account before deleting. diff --git a/packages/atproto_client/models/com/atproto/server/describe_server.py b/packages/atproto_client/models/com/atproto/server/describe_server.py index 867adcc9..d9bbf491 100644 --- a/packages/atproto_client/models/com/atproto/server/describe_server.py +++ b/packages/atproto_client/models/com/atproto/server/describe_server.py @@ -19,6 +19,7 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.describeServer`.""" available_user_domains: t.List[str] #: List of domain suffixes that can be used in account handles. + did: str #: Did. invite_code_required: t.Optional[ bool ] = None #: If true, an invite code must be supplied to create an account on this instance. diff --git a/packages/atproto_client/models/com/atproto/server/get_service_auth.py b/packages/atproto_client/models/com/atproto/server/get_service_auth.py new file mode 100644 index 00000000..c3ee2a29 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/server/get_service_auth.py @@ -0,0 +1,26 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing_extensions as te + +from atproto_client.models import base + + +class Params(base.ParamsModelBase): + """Parameters model for :obj:`com.atproto.server.getServiceAuth`.""" + + aud: str #: The DID of the service that the token will be used to authenticate with. + + +class ParamsDict(te.TypedDict): + aud: str #: The DID of the service that the token will be used to authenticate with. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.server.getServiceAuth`.""" + + token: str #: Token. diff --git a/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py b/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py index 1346fd3f..26a85d56 100644 --- a/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py +++ b/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py @@ -52,8 +52,20 @@ class Commit(base.ModelBase): ) +class Identity(base.ModelBase): + """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.""" + + did: str #: Did. + seq: int #: Seq. + time: str #: Time. + + py_type: te.Literal['com.atproto.sync.subscribeRepos#identity'] = Field( + default='com.atproto.sync.subscribeRepos#identity', alias='$type', frozen=True + ) + + class Handle(base.ModelBase): - """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents an update of the account's handle, or transition to/from invalid state.""" + """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.""" did: str #: Did. handle: str #: Handle. @@ -66,7 +78,7 @@ class Handle(base.ModelBase): class Migrate(base.ModelBase): - """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents an account moving from one PDS instance to another. NOTE: not implemented; full account migration may introduce a new message instead.""" + """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead.""" did: str #: Did. seq: int #: Seq. @@ -79,7 +91,7 @@ class Migrate(base.ModelBase): class Tombstone(base.ModelBase): - """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Indicates that an account has been deleted.""" + """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event.""" did: str #: Did. seq: int #: Seq. diff --git a/packages/atproto_client/namespaces/async_ns.py b/packages/atproto_client/namespaces/async_ns.py index 86ab1425..516d58b1 100644 --- a/packages/atproto_client/namespaces/async_ns.py +++ b/packages/atproto_client/namespaces/async_ns.py @@ -3504,6 +3504,34 @@ async def update_account_handle( ) return get_response_model(response, bool) + async def update_account_password( + self, + data: t.Union[ + models.ComAtprotoAdminUpdateAccountPassword.Data, models.ComAtprotoAdminUpdateAccountPassword.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Update the password for a user account as an administrator. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoAdminUpdateAccountPassword.Data', + get_or_create(data, models.ComAtprotoAdminUpdateAccountPassword.Data), + ) + response = await self._client.invoke_procedure( + 'com.atproto.admin.updateAccountPassword', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + async def update_communication_template( self, data: t.Union[ @@ -3571,6 +3599,40 @@ async def update_subject_status( class IdentityNamespace(AsyncNamespaceBase): + async def get_recommended_did_credentials( + self, **kwargs: t.Any + ) -> 'models.ComAtprotoIdentityGetRecommendedDidCredentials.Response': + """Describe the credentials that should be included in the DID doc of an account that is migrating to this service. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoIdentityGetRecommendedDidCredentials.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_query( + 'com.atproto.identity.getRecommendedDidCredentials', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoIdentityGetRecommendedDidCredentials.Response) + + async def request_plc_operation_signature(self, **kwargs: t.Any) -> bool: + """Request an email with a code to in order to request a signed PLC operation. Requires Auth. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_procedure('com.atproto.identity.requestPlcOperationSignature', **kwargs) + return get_response_model(response, bool) + async def resolve_handle( self, params: t.Union[ @@ -3599,6 +3661,66 @@ async def resolve_handle( ) return get_response_model(response, models.ComAtprotoIdentityResolveHandle.Response) + async def sign_plc_operation( + self, + data: t.Optional[ + t.Union[models.ComAtprotoIdentitySignPlcOperation.Data, models.ComAtprotoIdentitySignPlcOperation.DataDict] + ] = None, + **kwargs: t.Any, + ) -> 'models.ComAtprotoIdentitySignPlcOperation.Response': + """Signs a PLC operation to update some value(s) in the requesting DID's document. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoIdentitySignPlcOperation.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoIdentitySignPlcOperation.Data', + get_or_create(data, models.ComAtprotoIdentitySignPlcOperation.Data), + ) + response = await self._client.invoke_procedure( + 'com.atproto.identity.signPlcOperation', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoIdentitySignPlcOperation.Response) + + async def submit_plc_operation( + self, + data: t.Union[ + models.ComAtprotoIdentitySubmitPlcOperation.Data, models.ComAtprotoIdentitySubmitPlcOperation.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoIdentitySubmitPlcOperation.Data', + get_or_create(data, models.ComAtprotoIdentitySubmitPlcOperation.Data), + ) + response = await self._client.invoke_procedure( + 'com.atproto.identity.submitPlcOperation', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + async def update_handle( self, data: t.Union[models.ComAtprotoIdentityUpdateHandle.Data, models.ComAtprotoIdentityUpdateHandle.DataDict], @@ -3815,6 +3937,52 @@ async def get_record( ) return get_response_model(response, models.ComAtprotoRepoGetRecord.Response) + async def import_repo(self, data: 'models.ComAtprotoRepoImportRepo.Data', **kwargs: t.Any) -> bool: + """Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set. + + Args: + data: Input data alias. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_procedure( + 'com.atproto.repo.importRepo', data=data, input_encoding='application/vnd.ipld.car', **kwargs + ) + return get_response_model(response, bool) + + async def list_missing_blobs( + self, + params: t.Optional[ + t.Union[models.ComAtprotoRepoListMissingBlobs.Params, models.ComAtprotoRepoListMissingBlobs.ParamsDict] + ] = None, + **kwargs: t.Any, + ) -> 'models.ComAtprotoRepoListMissingBlobs.Response': + """Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoRepoListMissingBlobs.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.ComAtprotoRepoListMissingBlobs.Params', + get_or_create(params, models.ComAtprotoRepoListMissingBlobs.Params), + ) + response = await self._client.invoke_query( + 'com.atproto.repo.listMissingBlobs', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoRepoListMissingBlobs.Response) + async def list_records( self, params: t.Union[models.ComAtprotoRepoListRecords.Params, models.ComAtprotoRepoListRecords.ParamsDict], @@ -3891,6 +4059,38 @@ async def upload_blob( class ServerNamespace(AsyncNamespaceBase): + async def activate_account(self, **kwargs: t.Any) -> bool: + """Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_procedure('com.atproto.server.activateAccount', **kwargs) + return get_response_model(response, bool) + + async def check_account_status(self, **kwargs: t.Any) -> 'models.ComAtprotoServerCheckAccountStatus.Response': + """Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoServerCheckAccountStatus.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_query( + 'com.atproto.server.checkAccountStatus', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoServerCheckAccountStatus.Response) + async def confirm_email( self, data: t.Union[models.ComAtprotoServerConfirmEmail.Data, models.ComAtprotoServerConfirmEmail.DataDict], @@ -4064,6 +4264,34 @@ async def create_session( ) return get_response_model(response, models.ComAtprotoServerCreateSession.Response) + async def deactivate_account( + self, + data: t.Optional[ + t.Union[models.ComAtprotoServerDeactivateAccount.Data, models.ComAtprotoServerDeactivateAccount.DataDict] + ] = None, + **kwargs: t.Any, + ) -> bool: + """Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoServerDeactivateAccount.Data', + get_or_create(data, models.ComAtprotoServerDeactivateAccount.Data), + ) + response = await self._client.invoke_procedure( + 'com.atproto.server.deactivateAccount', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + async def delete_account( self, data: t.Union[models.ComAtprotoServerDeleteAccount.Data, models.ComAtprotoServerDeleteAccount.DataDict], @@ -4155,6 +4383,32 @@ async def get_account_invite_codes( ) return get_response_model(response, models.ComAtprotoServerGetAccountInviteCodes.Response) + async def get_service_auth( + self, + params: t.Union[models.ComAtprotoServerGetServiceAuth.Params, models.ComAtprotoServerGetServiceAuth.ParamsDict], + **kwargs: t.Any, + ) -> 'models.ComAtprotoServerGetServiceAuth.Response': + """Get a signed token on behalf of the requesting DID for the requested service. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoServerGetServiceAuth.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.ComAtprotoServerGetServiceAuth.Params', + get_or_create(params, models.ComAtprotoServerGetServiceAuth.Params), + ) + response = await self._client.invoke_query( + 'com.atproto.server.getServiceAuth', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoServerGetServiceAuth.Response) + async def get_session(self, **kwargs: t.Any) -> 'models.ComAtprotoServerGetSession.Response': """Get information about the current auth session. Requires auth. @@ -4715,65 +4969,6 @@ async def fetch_labels( ) return get_response_model(response, models.ComAtprotoTempFetchLabels.Response) - async def import_repo( - self, - params: t.Union[models.ComAtprotoTempImportRepo.Params, models.ComAtprotoTempImportRepo.ParamsDict], - data: 'models.ComAtprotoTempImportRepo.Data', - **kwargs: t.Any, - ) -> 'models.ComAtprotoTempImportRepo.Response': - """Gets the did's repo, optionally catching up from a specific revision. - - Args: - params: Parameters. - data: Input data alias. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.ComAtprotoTempImportRepo.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = t.cast( - 'models.ComAtprotoTempImportRepo.Params', get_or_create(params, models.ComAtprotoTempImportRepo.Params) - ) - response = await self._client.invoke_procedure( - 'com.atproto.temp.importRepo', - params=params_model, - data=data, - input_encoding='application/vnd.ipld.car', - output_encoding='text/plain', - **kwargs, - ) - return get_response_model(response, models.ComAtprotoTempImportRepo.Response) - - async def push_blob( - self, - params: t.Union[models.ComAtprotoTempPushBlob.Params, models.ComAtprotoTempPushBlob.ParamsDict], - data: 'models.ComAtprotoTempPushBlob.Data', - **kwargs: t.Any, - ) -> bool: - """Gets the did's repo, optionally catching up from a specific revision. - - Args: - params: Parameters. - data: Input data alias. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`bool`: Success status. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = t.cast( - 'models.ComAtprotoTempPushBlob.Params', get_or_create(params, models.ComAtprotoTempPushBlob.Params) - ) - response = await self._client.invoke_procedure( - 'com.atproto.temp.pushBlob', params=params_model, data=data, input_encoding='*/*', **kwargs - ) - return get_response_model(response, bool) - async def request_phone_verification( self, data: t.Union[ @@ -4801,32 +4996,3 @@ async def request_phone_verification( 'com.atproto.temp.requestPhoneVerification', data=data_model, input_encoding='application/json', **kwargs ) return get_response_model(response, bool) - - async def transfer_account( - self, - data: t.Union[models.ComAtprotoTempTransferAccount.Data, models.ComAtprotoTempTransferAccount.DataDict], - **kwargs: t.Any, - ) -> 'models.ComAtprotoTempTransferAccount.Response': - """Transfer an account. NOTE: temporary method, necessarily how account migration will be implemented. - - Args: - data: Input data. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.ComAtprotoTempTransferAccount.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - data_model = t.cast( - 'models.ComAtprotoTempTransferAccount.Data', get_or_create(data, models.ComAtprotoTempTransferAccount.Data) - ) - response = await self._client.invoke_procedure( - 'com.atproto.temp.transferAccount', - data=data_model, - input_encoding='application/json', - output_encoding='application/json', - **kwargs, - ) - return get_response_model(response, models.ComAtprotoTempTransferAccount.Response) diff --git a/packages/atproto_client/namespaces/sync_ns.py b/packages/atproto_client/namespaces/sync_ns.py index f8b1de35..6b3454e2 100644 --- a/packages/atproto_client/namespaces/sync_ns.py +++ b/packages/atproto_client/namespaces/sync_ns.py @@ -3504,6 +3504,34 @@ def update_account_handle( ) return get_response_model(response, bool) + def update_account_password( + self, + data: t.Union[ + models.ComAtprotoAdminUpdateAccountPassword.Data, models.ComAtprotoAdminUpdateAccountPassword.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Update the password for a user account as an administrator. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoAdminUpdateAccountPassword.Data', + get_or_create(data, models.ComAtprotoAdminUpdateAccountPassword.Data), + ) + response = self._client.invoke_procedure( + 'com.atproto.admin.updateAccountPassword', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + def update_communication_template( self, data: t.Union[ @@ -3571,6 +3599,40 @@ def update_subject_status( class IdentityNamespace(NamespaceBase): + def get_recommended_did_credentials( + self, **kwargs: t.Any + ) -> 'models.ComAtprotoIdentityGetRecommendedDidCredentials.Response': + """Describe the credentials that should be included in the DID doc of an account that is migrating to this service. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoIdentityGetRecommendedDidCredentials.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_query( + 'com.atproto.identity.getRecommendedDidCredentials', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoIdentityGetRecommendedDidCredentials.Response) + + def request_plc_operation_signature(self, **kwargs: t.Any) -> bool: + """Request an email with a code to in order to request a signed PLC operation. Requires Auth. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_procedure('com.atproto.identity.requestPlcOperationSignature', **kwargs) + return get_response_model(response, bool) + def resolve_handle( self, params: t.Union[ @@ -3599,6 +3661,66 @@ def resolve_handle( ) return get_response_model(response, models.ComAtprotoIdentityResolveHandle.Response) + def sign_plc_operation( + self, + data: t.Optional[ + t.Union[models.ComAtprotoIdentitySignPlcOperation.Data, models.ComAtprotoIdentitySignPlcOperation.DataDict] + ] = None, + **kwargs: t.Any, + ) -> 'models.ComAtprotoIdentitySignPlcOperation.Response': + """Signs a PLC operation to update some value(s) in the requesting DID's document. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoIdentitySignPlcOperation.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoIdentitySignPlcOperation.Data', + get_or_create(data, models.ComAtprotoIdentitySignPlcOperation.Data), + ) + response = self._client.invoke_procedure( + 'com.atproto.identity.signPlcOperation', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoIdentitySignPlcOperation.Response) + + def submit_plc_operation( + self, + data: t.Union[ + models.ComAtprotoIdentitySubmitPlcOperation.Data, models.ComAtprotoIdentitySubmitPlcOperation.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoIdentitySubmitPlcOperation.Data', + get_or_create(data, models.ComAtprotoIdentitySubmitPlcOperation.Data), + ) + response = self._client.invoke_procedure( + 'com.atproto.identity.submitPlcOperation', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + def update_handle( self, data: t.Union[models.ComAtprotoIdentityUpdateHandle.Data, models.ComAtprotoIdentityUpdateHandle.DataDict], @@ -3815,6 +3937,52 @@ def get_record( ) return get_response_model(response, models.ComAtprotoRepoGetRecord.Response) + def import_repo(self, data: 'models.ComAtprotoRepoImportRepo.Data', **kwargs: t.Any) -> bool: + """Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set. + + Args: + data: Input data alias. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_procedure( + 'com.atproto.repo.importRepo', data=data, input_encoding='application/vnd.ipld.car', **kwargs + ) + return get_response_model(response, bool) + + def list_missing_blobs( + self, + params: t.Optional[ + t.Union[models.ComAtprotoRepoListMissingBlobs.Params, models.ComAtprotoRepoListMissingBlobs.ParamsDict] + ] = None, + **kwargs: t.Any, + ) -> 'models.ComAtprotoRepoListMissingBlobs.Response': + """Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoRepoListMissingBlobs.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.ComAtprotoRepoListMissingBlobs.Params', + get_or_create(params, models.ComAtprotoRepoListMissingBlobs.Params), + ) + response = self._client.invoke_query( + 'com.atproto.repo.listMissingBlobs', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoRepoListMissingBlobs.Response) + def list_records( self, params: t.Union[models.ComAtprotoRepoListRecords.Params, models.ComAtprotoRepoListRecords.ParamsDict], @@ -3891,6 +4059,38 @@ def upload_blob( class ServerNamespace(NamespaceBase): + def activate_account(self, **kwargs: t.Any) -> bool: + """Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_procedure('com.atproto.server.activateAccount', **kwargs) + return get_response_model(response, bool) + + def check_account_status(self, **kwargs: t.Any) -> 'models.ComAtprotoServerCheckAccountStatus.Response': + """Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoServerCheckAccountStatus.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_query( + 'com.atproto.server.checkAccountStatus', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoServerCheckAccountStatus.Response) + def confirm_email( self, data: t.Union[models.ComAtprotoServerConfirmEmail.Data, models.ComAtprotoServerConfirmEmail.DataDict], @@ -4064,6 +4264,34 @@ def create_session( ) return get_response_model(response, models.ComAtprotoServerCreateSession.Response) + def deactivate_account( + self, + data: t.Optional[ + t.Union[models.ComAtprotoServerDeactivateAccount.Data, models.ComAtprotoServerDeactivateAccount.DataDict] + ] = None, + **kwargs: t.Any, + ) -> bool: + """Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = t.cast( + 'models.ComAtprotoServerDeactivateAccount.Data', + get_or_create(data, models.ComAtprotoServerDeactivateAccount.Data), + ) + response = self._client.invoke_procedure( + 'com.atproto.server.deactivateAccount', data=data_model, input_encoding='application/json', **kwargs + ) + return get_response_model(response, bool) + def delete_account( self, data: t.Union[models.ComAtprotoServerDeleteAccount.Data, models.ComAtprotoServerDeleteAccount.DataDict], @@ -4155,6 +4383,32 @@ def get_account_invite_codes( ) return get_response_model(response, models.ComAtprotoServerGetAccountInviteCodes.Response) + def get_service_auth( + self, + params: t.Union[models.ComAtprotoServerGetServiceAuth.Params, models.ComAtprotoServerGetServiceAuth.ParamsDict], + **kwargs: t.Any, + ) -> 'models.ComAtprotoServerGetServiceAuth.Response': + """Get a signed token on behalf of the requesting DID for the requested service. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoServerGetServiceAuth.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.ComAtprotoServerGetServiceAuth.Params', + get_or_create(params, models.ComAtprotoServerGetServiceAuth.Params), + ) + response = self._client.invoke_query( + 'com.atproto.server.getServiceAuth', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoServerGetServiceAuth.Response) + def get_session(self, **kwargs: t.Any) -> 'models.ComAtprotoServerGetSession.Response': """Get information about the current auth session. Requires auth. @@ -4715,65 +4969,6 @@ def fetch_labels( ) return get_response_model(response, models.ComAtprotoTempFetchLabels.Response) - def import_repo( - self, - params: t.Union[models.ComAtprotoTempImportRepo.Params, models.ComAtprotoTempImportRepo.ParamsDict], - data: 'models.ComAtprotoTempImportRepo.Data', - **kwargs: t.Any, - ) -> 'models.ComAtprotoTempImportRepo.Response': - """Gets the did's repo, optionally catching up from a specific revision. - - Args: - params: Parameters. - data: Input data alias. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.ComAtprotoTempImportRepo.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = t.cast( - 'models.ComAtprotoTempImportRepo.Params', get_or_create(params, models.ComAtprotoTempImportRepo.Params) - ) - response = self._client.invoke_procedure( - 'com.atproto.temp.importRepo', - params=params_model, - data=data, - input_encoding='application/vnd.ipld.car', - output_encoding='text/plain', - **kwargs, - ) - return get_response_model(response, models.ComAtprotoTempImportRepo.Response) - - def push_blob( - self, - params: t.Union[models.ComAtprotoTempPushBlob.Params, models.ComAtprotoTempPushBlob.ParamsDict], - data: 'models.ComAtprotoTempPushBlob.Data', - **kwargs: t.Any, - ) -> bool: - """Gets the did's repo, optionally catching up from a specific revision. - - Args: - params: Parameters. - data: Input data alias. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`bool`: Success status. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = t.cast( - 'models.ComAtprotoTempPushBlob.Params', get_or_create(params, models.ComAtprotoTempPushBlob.Params) - ) - response = self._client.invoke_procedure( - 'com.atproto.temp.pushBlob', params=params_model, data=data, input_encoding='*/*', **kwargs - ) - return get_response_model(response, bool) - def request_phone_verification( self, data: t.Union[ @@ -4801,32 +4996,3 @@ def request_phone_verification( 'com.atproto.temp.requestPhoneVerification', data=data_model, input_encoding='application/json', **kwargs ) return get_response_model(response, bool) - - def transfer_account( - self, - data: t.Union[models.ComAtprotoTempTransferAccount.Data, models.ComAtprotoTempTransferAccount.DataDict], - **kwargs: t.Any, - ) -> 'models.ComAtprotoTempTransferAccount.Response': - """Transfer an account. NOTE: temporary method, necessarily how account migration will be implemented. - - Args: - data: Input data. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.ComAtprotoTempTransferAccount.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - data_model = t.cast( - 'models.ComAtprotoTempTransferAccount.Data', get_or_create(data, models.ComAtprotoTempTransferAccount.Data) - ) - response = self._client.invoke_procedure( - 'com.atproto.temp.transferAccount', - data=data_model, - input_encoding='application/json', - output_encoding='application/json', - **kwargs, - ) - return get_response_model(response, models.ComAtprotoTempTransferAccount.Response)