diff --git a/docs/source/aliases_db.py b/docs/source/aliases_db.py index ad609ea8..5d96cdcb 100644 --- a/docs/source/aliases_db.py +++ b/docs/source/aliases_db.py @@ -45,6 +45,7 @@ 'models.AppBskyGraphGetListMutes': 'atproto_client.models.app.bsky.graph.get_list_mutes', 'models.AppBskyGraphGetLists': 'atproto_client.models.app.bsky.graph.get_lists', 'models.AppBskyGraphGetMutes': 'atproto_client.models.app.bsky.graph.get_mutes', + 'models.AppBskyGraphGetRelationships': 'atproto_client.models.app.bsky.graph.get_relationships', 'models.AppBskyGraphGetSuggestedFollowsByActor': 'atproto_client.models.app.bsky.graph.get_suggested_follows_by_actor', 'models.AppBskyGraphList': 'atproto_client.models.app.bsky.graph.list', 'models.AppBskyGraphListblock': 'atproto_client.models.app.bsky.graph.listblock', @@ -60,11 +61,14 @@ 'models.AppBskyRichtextFacet': 'atproto_client.models.app.bsky.richtext.facet', 'models.AppBskyUnspeccedDefs': 'atproto_client.models.app.bsky.unspecced.defs', 'models.AppBskyUnspeccedGetPopularFeedGenerators': 'atproto_client.models.app.bsky.unspecced.get_popular_feed_generators', + 'models.AppBskyUnspeccedGetTaggedSuggestions': 'atproto_client.models.app.bsky.unspecced.get_tagged_suggestions', 'models.AppBskyUnspeccedGetTimelineSkeleton': 'atproto_client.models.app.bsky.unspecced.get_timeline_skeleton', 'models.AppBskyUnspeccedSearchActorsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_actors_skeleton', 'models.AppBskyUnspeccedSearchPostsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_posts_skeleton', + 'models.ComAtprotoAdminCreateCommunicationTemplate': 'atproto_client.models.com.atproto.admin.create_communication_template', 'models.ComAtprotoAdminDefs': 'atproto_client.models.com.atproto.admin.defs', 'models.ComAtprotoAdminDeleteAccount': 'atproto_client.models.com.atproto.admin.delete_account', + 'models.ComAtprotoAdminDeleteCommunicationTemplate': 'atproto_client.models.com.atproto.admin.delete_communication_template', 'models.ComAtprotoAdminDisableAccountInvites': 'atproto_client.models.com.atproto.admin.disable_account_invites', 'models.ComAtprotoAdminDisableInviteCodes': 'atproto_client.models.com.atproto.admin.disable_invite_codes', 'models.ComAtprotoAdminEmitModerationEvent': 'atproto_client.models.com.atproto.admin.emit_moderation_event', @@ -76,12 +80,14 @@ 'models.ComAtprotoAdminGetRecord': 'atproto_client.models.com.atproto.admin.get_record', 'models.ComAtprotoAdminGetRepo': 'atproto_client.models.com.atproto.admin.get_repo', 'models.ComAtprotoAdminGetSubjectStatus': 'atproto_client.models.com.atproto.admin.get_subject_status', + 'models.ComAtprotoAdminListCommunicationTemplates': 'atproto_client.models.com.atproto.admin.list_communication_templates', 'models.ComAtprotoAdminQueryModerationEvents': 'atproto_client.models.com.atproto.admin.query_moderation_events', 'models.ComAtprotoAdminQueryModerationStatuses': 'atproto_client.models.com.atproto.admin.query_moderation_statuses', 'models.ComAtprotoAdminSearchRepos': 'atproto_client.models.com.atproto.admin.search_repos', '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.ComAtprotoAdminUpdateCommunicationTemplate': 'atproto_client.models.com.atproto.admin.update_communication_template', 'models.ComAtprotoAdminUpdateSubjectStatus': 'atproto_client.models.com.atproto.admin.update_subject_status', 'models.ComAtprotoIdentityResolveHandle': 'atproto_client.models.com.atproto.identity.resolve_handle', 'models.ComAtprotoIdentityUpdateHandle': 'atproto_client.models.com.atproto.identity.update_handle', @@ -133,8 +139,10 @@ 'models.ComAtprotoSyncNotifyOfUpdate': 'atproto_client.models.com.atproto.sync.notify_of_update', 'models.ComAtprotoSyncRequestCrawl': 'atproto_client.models.com.atproto.sync.request_crawl', '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.app.bsky.graph.get_relationships.rst b/docs/source/atproto/atproto_client.models.app.bsky.graph.get_relationships.rst new file mode 100644 index 00000000..e6832f14 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.app.bsky.graph.get_relationships.rst @@ -0,0 +1,7 @@ +app.bsky.graph.get\_relationships +======================================================== + +.. automodule:: atproto_client.models.app.bsky.graph.get_relationships + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.app.bsky.graph.rst b/docs/source/atproto/atproto_client.models.app.bsky.graph.rst index f5b544bf..d56cff5f 100644 --- a/docs/source/atproto/atproto_client.models.app.bsky.graph.rst +++ b/docs/source/atproto/atproto_client.models.app.bsky.graph.rst @@ -23,6 +23,7 @@ Submodules atproto_client.models.app.bsky.graph.get_list_mutes atproto_client.models.app.bsky.graph.get_lists atproto_client.models.app.bsky.graph.get_mutes + atproto_client.models.app.bsky.graph.get_relationships atproto_client.models.app.bsky.graph.get_suggested_follows_by_actor atproto_client.models.app.bsky.graph.list atproto_client.models.app.bsky.graph.listblock diff --git a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_tagged_suggestions.rst b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_tagged_suggestions.rst new file mode 100644 index 00000000..c02c9a24 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_tagged_suggestions.rst @@ -0,0 +1,7 @@ +app.bsky.unspecced.get\_tagged\_suggestions +================================================================== + +.. automodule:: atproto_client.models.app.bsky.unspecced.get_tagged_suggestions + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst index e870a814..2f3167ad 100644 --- a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst +++ b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst @@ -14,6 +14,7 @@ Submodules atproto_client.models.app.bsky.unspecced.defs atproto_client.models.app.bsky.unspecced.get_popular_feed_generators + atproto_client.models.app.bsky.unspecced.get_tagged_suggestions atproto_client.models.app.bsky.unspecced.get_timeline_skeleton atproto_client.models.app.bsky.unspecced.search_actors_skeleton atproto_client.models.app.bsky.unspecced.search_posts_skeleton diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.create_communication_template.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.create_communication_template.rst new file mode 100644 index 00000000..76910b75 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.create_communication_template.rst @@ -0,0 +1,7 @@ +com.atproto.admin.create\_communication\_template +======================================================================== + +.. automodule:: atproto_client.models.com.atproto.admin.create_communication_template + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.delete_communication_template.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.delete_communication_template.rst new file mode 100644 index 00000000..63a2c724 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.delete_communication_template.rst @@ -0,0 +1,7 @@ +com.atproto.admin.delete\_communication\_template +======================================================================== + +.. automodule:: atproto_client.models.com.atproto.admin.delete_communication_template + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.list_communication_templates.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.list_communication_templates.rst new file mode 100644 index 00000000..3f33a122 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.list_communication_templates.rst @@ -0,0 +1,7 @@ +com.atproto.admin.list\_communication\_templates +======================================================================= + +.. automodule:: atproto_client.models.com.atproto.admin.list_communication_templates + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file 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 77fb99e5..dfdf63a4 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.admin.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.rst @@ -12,8 +12,10 @@ Submodules .. toctree:: :maxdepth: 4 + atproto_client.models.com.atproto.admin.create_communication_template atproto_client.models.com.atproto.admin.defs atproto_client.models.com.atproto.admin.delete_account + atproto_client.models.com.atproto.admin.delete_communication_template atproto_client.models.com.atproto.admin.disable_account_invites atproto_client.models.com.atproto.admin.disable_invite_codes atproto_client.models.com.atproto.admin.emit_moderation_event @@ -25,10 +27,12 @@ Submodules atproto_client.models.com.atproto.admin.get_record atproto_client.models.com.atproto.admin.get_repo atproto_client.models.com.atproto.admin.get_subject_status + atproto_client.models.com.atproto.admin.list_communication_templates atproto_client.models.com.atproto.admin.query_moderation_events atproto_client.models.com.atproto.admin.query_moderation_statuses atproto_client.models.com.atproto.admin.search_repos 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_communication_template atproto_client.models.com.atproto.admin.update_subject_status diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.update_communication_template.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.update_communication_template.rst new file mode 100644 index 00000000..6997ba17 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.update_communication_template.rst @@ -0,0 +1,7 @@ +com.atproto.admin.update\_communication\_template +======================================================================== + +.. automodule:: atproto_client.models.com.atproto.admin.update_communication_template + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.check_signup_queue.rst b/docs/source/atproto/atproto_client.models.com.atproto.temp.check_signup_queue.rst new file mode 100644 index 00000000..f8698feb --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.temp.check_signup_queue.rst @@ -0,0 +1,7 @@ +com.atproto.temp.check\_signup\_queue +============================================================ + +.. automodule:: atproto_client.models.com.atproto.temp.check_signup_queue + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.temp.request_phone_verification.rst b/docs/source/atproto/atproto_client.models.com.atproto.temp.request_phone_verification.rst new file mode 100644 index 00000000..d7e279a1 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.temp.request_phone_verification.rst @@ -0,0 +1,7 @@ +com.atproto.temp.request\_phone\_verification +==================================================================== + +.. automodule:: atproto_client.models.com.atproto.temp.request_phone_verification + :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 01e5c1e7..84bcb1e5 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.temp.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.temp.rst @@ -12,7 +12,9 @@ Submodules .. toctree:: :maxdepth: 4 + 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/lexicons/app.bsky.actor.defs.json b/lexicons/app.bsky.actor.defs.json index 913957f1..9f8e2ea9 100644 --- a/lexicons/app.bsky.actor.defs.json +++ b/lexicons/app.bsky.actor.defs.json @@ -104,7 +104,8 @@ "#savedFeedsPref", "#personalDetailsPref", "#feedViewPref", - "#threadViewPref" + "#threadViewPref", + "#interestsPref" ] } }, @@ -199,6 +200,18 @@ "description": "Show followed users at the top of all replies." } } + }, + "interestsPref": { + "type": "object", + "required": ["tags"], + "properties": { + "tags": { + "type": "array", + "maxLength": 100, + "items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }, + "description": "A list of tags which describe the account owner's interests gathered during onboarding." + } + } } } } diff --git a/lexicons/app.bsky.graph.defs.json b/lexicons/app.bsky.graph.defs.json index 219c4a6d..737d984d 100644 --- a/lexicons/app.bsky.graph.defs.json +++ b/lexicons/app.bsky.graph.defs.json @@ -67,6 +67,33 @@ "muted": { "type": "boolean" }, "blocked": { "type": "string", "format": "at-uri" } } + }, + "notFoundActor": { + "type": "object", + "description": "indicates that a handle or DID could not be resolved", + "required": ["actor", "notFound"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "notFound": { "type": "boolean", "const": true } + } + }, + "relationship": { + "type": "object", + "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" }, + "following": { + "type": "string", + "format": "at-uri", + "description": "if the actor follows this DID, this is the AT-URI of the follow record" + }, + "followedBy": { + "type": "string", + "format": "at-uri", + "description": "if the actor is followed by this DID, contains the AT-URI of the follow record" + } + } } } } diff --git a/lexicons/app.bsky.graph.getRelationships.json b/lexicons/app.bsky.graph.getRelationships.json new file mode 100644 index 00000000..ccd495de --- /dev/null +++ b/lexicons/app.bsky.graph.getRelationships.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getRelationships", + "defs": { + "main": { + "type": "query", + "description": "Enumerates public relationships between one account, and a list of other accounts", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "others": { + "type": "array", + "maxLength": 30, + "items": { + "type": "string", + "format": "at-identifier" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["relationships"], + "properties": { + "actor": { "type": "string", "format": "did" }, + "relationships": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.bsky.graph.defs#relationship", + "app.bsky.graph.defs#notFoundActor" + ] + } + } + } + } + }, + "errors": [ + { + "name": "ActorNotFound", + "description": "the primary actor at-identifier could not be resolved" + } + ] + } + } +} diff --git a/lexicons/app.bsky.unspecced.getTaggedSuggestions.json b/lexicons/app.bsky.unspecced.getTaggedSuggestions.json new file mode 100644 index 00000000..9fd98ffe --- /dev/null +++ b/lexicons/app.bsky.unspecced.getTaggedSuggestions.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTaggedSuggestions", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggestions (feeds and users) tagged with categories", + "parameters": { + "type": "params", + "properties": {} + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["suggestions"], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": "#suggestion" + } + } + } + } + } + }, + "suggestion": { + "type": "object", + "required": ["tag", "subjectType", "subject"], + "properties": { + "tag": { "type": "string" }, + "subjectType": { + "type": "string", + "knownValues": ["actor", "feed"] + }, + "subject": { "type": "string", "format": "uri" } + } + } + } +} diff --git a/lexicons/com.atproto.admin.createCommunicationTemplate.json b/lexicons/com.atproto.admin.createCommunicationTemplate.json new file mode 100644 index 00000000..d4546a0e --- /dev/null +++ b/lexicons/com.atproto.admin.createCommunicationTemplate.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.createCommunicationTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to create a new, re-usable communication (email for now) template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject", "contentMarkdown", "name"], + "properties": { + "name": { + "type": "string", + "description": "Name of the template." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "createdBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is creating the template." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "com.atproto.admin.defs#communicationTemplateView" + } + } + } + } +} diff --git a/lexicons/com.atproto.admin.defs.json b/lexicons/com.atproto.admin.defs.json index 55a8b32b..5a65ae31 100644 --- a/lexicons/com.atproto.admin.defs.json +++ b/lexicons/com.atproto.admin.defs.json @@ -584,6 +584,38 @@ "description": "Additional comment about the outgoing comm." } } + }, + "communicationTemplateView": { + "type": "object", + "required": [ + "id", + "name", + "contentMarkdown", + "disabled", + "lastUpdatedBy", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { "type": "string" }, + "name": { "type": "string", "description": "Name of the template." }, + "subject": { + "type": "string", + "description": "Content of the template, can contain markdown and variable placeholders." + }, + "contentMarkdown": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "disabled": { "type": "boolean" }, + "lastUpdatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who last updated the template." + }, + "createdAt": { "type": "string", "format": "datetime" }, + "updatedAt": { "type": "string", "format": "datetime" } + } } } } diff --git a/lexicons/com.atproto.admin.deleteCommunicationTemplate.json b/lexicons/com.atproto.admin.deleteCommunicationTemplate.json new file mode 100644 index 00000000..58861757 --- /dev/null +++ b/lexicons/com.atproto.admin.deleteCommunicationTemplate.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.deleteCommunicationTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a communication template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.admin.listCommunicationTemplates.json b/lexicons/com.atproto.admin.listCommunicationTemplates.json new file mode 100644 index 00000000..74d5a399 --- /dev/null +++ b/lexicons/com.atproto.admin.listCommunicationTemplates.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.listCommunicationTemplates", + "defs": { + "main": { + "type": "query", + "description": "Get list of all communication templates.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["communicationTemplates"], + "properties": { + "communicationTemplates": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#communicationTemplateView" + } + } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.admin.updateCommunicationTemplate.json b/lexicons/com.atproto.admin.updateCommunicationTemplate.json new file mode 100644 index 00000000..0f7f3612 --- /dev/null +++ b/lexicons/com.atproto.admin.updateCommunicationTemplate.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateCommunicationTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "string", + "description": "ID of the template to be updated." + }, + "name": { + "type": "string", + "description": "Name of the template." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "updatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is updating the template." + }, + "disabled": { + "type": "boolean" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "com.atproto.admin.defs#communicationTemplateView" + } + } + } + } +} diff --git a/lexicons/com.atproto.server.createAccount.json b/lexicons/com.atproto.server.createAccount.json index 8d927163..d1456e09 100644 --- a/lexicons/com.atproto.server.createAccount.json +++ b/lexicons/com.atproto.server.createAccount.json @@ -15,6 +15,8 @@ "handle": { "type": "string", "format": "handle" }, "did": { "type": "string", "format": "did" }, "inviteCode": { "type": "string" }, + "verificationCode": { "type": "string" }, + "verificationPhone": { "type": "string" }, "password": { "type": "string" }, "recoveryKey": { "type": "string" }, "plcOp": { "type": "unknown" } diff --git a/lexicons/com.atproto.server.describeServer.json b/lexicons/com.atproto.server.describeServer.json index b19b1504..3c60a58e 100644 --- a/lexicons/com.atproto.server.describeServer.json +++ b/lexicons/com.atproto.server.describeServer.json @@ -12,6 +12,7 @@ "required": ["availableUserDomains"], "properties": { "inviteCodeRequired": { "type": "boolean" }, + "phoneVerificationRequired": { "type": "boolean" }, "availableUserDomains": { "type": "array", "items": { "type": "string" } diff --git a/lexicons/com.atproto.temp.checkSignupQueue.json b/lexicons/com.atproto.temp.checkSignupQueue.json new file mode 100644 index 00000000..b7d9e65d --- /dev/null +++ b/lexicons/com.atproto.temp.checkSignupQueue.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.checkSignupQueue", + "defs": { + "main": { + "type": "query", + "description": "Check accounts location in signup queue.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["activated"], + "properties": { + "activated": { "type": "boolean" }, + "placeInQueue": { "type": "integer" }, + "estimatedTimeMs": { "type": "integer" } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.temp.requestPhoneVerification.json b/lexicons/com.atproto.temp.requestPhoneVerification.json new file mode 100644 index 00000000..56beeb81 --- /dev/null +++ b/lexicons/com.atproto.temp.requestPhoneVerification.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.requestPhoneVerification", + "defs": { + "main": { + "type": "procedure", + "description": "Request a verification code to be sent to the supplied phone number", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["phoneNumber"], + "properties": { + "phoneNumber": { "type": "string" } + } + } + } + } + } +} diff --git a/packages/atproto_client/models/__init__.py b/packages/atproto_client/models/__init__.py index c6ebdbe6..b5333dd9 100644 --- a/packages/atproto_client/models/__init__.py +++ b/packages/atproto_client/models/__init__.py @@ -44,6 +44,7 @@ from atproto_client.models.app.bsky.graph import get_list_mutes as AppBskyGraphGetListMutes from atproto_client.models.app.bsky.graph import get_lists as AppBskyGraphGetLists from atproto_client.models.app.bsky.graph import get_mutes as AppBskyGraphGetMutes +from atproto_client.models.app.bsky.graph import get_relationships as AppBskyGraphGetRelationships from atproto_client.models.app.bsky.graph import ( get_suggested_follows_by_actor as AppBskyGraphGetSuggestedFollowsByActor, ) @@ -63,11 +64,18 @@ from atproto_client.models.app.bsky.unspecced import ( get_popular_feed_generators as AppBskyUnspeccedGetPopularFeedGenerators, ) +from atproto_client.models.app.bsky.unspecced import get_tagged_suggestions as AppBskyUnspeccedGetTaggedSuggestions from atproto_client.models.app.bsky.unspecced import get_timeline_skeleton as AppBskyUnspeccedGetTimelineSkeleton from atproto_client.models.app.bsky.unspecced import search_actors_skeleton as AppBskyUnspeccedSearchActorsSkeleton from atproto_client.models.app.bsky.unspecced import search_posts_skeleton as AppBskyUnspeccedSearchPostsSkeleton +from atproto_client.models.com.atproto.admin import ( + create_communication_template as ComAtprotoAdminCreateCommunicationTemplate, +) from atproto_client.models.com.atproto.admin import defs as ComAtprotoAdminDefs from atproto_client.models.com.atproto.admin import delete_account as ComAtprotoAdminDeleteAccount +from atproto_client.models.com.atproto.admin import ( + delete_communication_template as ComAtprotoAdminDeleteCommunicationTemplate, +) from atproto_client.models.com.atproto.admin import disable_account_invites as ComAtprotoAdminDisableAccountInvites from atproto_client.models.com.atproto.admin import disable_invite_codes as ComAtprotoAdminDisableInviteCodes from atproto_client.models.com.atproto.admin import emit_moderation_event as ComAtprotoAdminEmitModerationEvent @@ -79,12 +87,18 @@ from atproto_client.models.com.atproto.admin import get_record as ComAtprotoAdminGetRecord from atproto_client.models.com.atproto.admin import get_repo as ComAtprotoAdminGetRepo from atproto_client.models.com.atproto.admin import get_subject_status as ComAtprotoAdminGetSubjectStatus +from atproto_client.models.com.atproto.admin import ( + list_communication_templates as ComAtprotoAdminListCommunicationTemplates, +) from atproto_client.models.com.atproto.admin import query_moderation_events as ComAtprotoAdminQueryModerationEvents from atproto_client.models.com.atproto.admin import query_moderation_statuses as ComAtprotoAdminQueryModerationStatuses from atproto_client.models.com.atproto.admin import search_repos as ComAtprotoAdminSearchRepos 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_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 resolve_handle as ComAtprotoIdentityResolveHandle from atproto_client.models.com.atproto.identity import update_handle as ComAtprotoIdentityUpdateHandle @@ -138,9 +152,11 @@ from atproto_client.models.com.atproto.sync import notify_of_update as ComAtprotoSyncNotifyOfUpdate from atproto_client.models.com.atproto.sync import request_crawl as ComAtprotoSyncRequestCrawl 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 ( @@ -199,6 +215,7 @@ class _Ids: AppBskyGraphGetListMutes: str = 'app.bsky.graph.getListMutes' AppBskyGraphGetLists: str = 'app.bsky.graph.getLists' AppBskyGraphGetMutes: str = 'app.bsky.graph.getMutes' + AppBskyGraphGetRelationships: str = 'app.bsky.graph.getRelationships' AppBskyGraphGetSuggestedFollowsByActor: str = 'app.bsky.graph.getSuggestedFollowsByActor' AppBskyGraphList: str = 'app.bsky.graph.list' AppBskyGraphListblock: str = 'app.bsky.graph.listblock' @@ -214,11 +231,14 @@ class _Ids: AppBskyRichtextFacet: str = 'app.bsky.richtext.facet' AppBskyUnspeccedDefs: str = 'app.bsky.unspecced.defs' AppBskyUnspeccedGetPopularFeedGenerators: str = 'app.bsky.unspecced.getPopularFeedGenerators' + AppBskyUnspeccedGetTaggedSuggestions: str = 'app.bsky.unspecced.getTaggedSuggestions' AppBskyUnspeccedGetTimelineSkeleton: str = 'app.bsky.unspecced.getTimelineSkeleton' AppBskyUnspeccedSearchActorsSkeleton: str = 'app.bsky.unspecced.searchActorsSkeleton' AppBskyUnspeccedSearchPostsSkeleton: str = 'app.bsky.unspecced.searchPostsSkeleton' + ComAtprotoAdminCreateCommunicationTemplate: str = 'com.atproto.admin.createCommunicationTemplate' ComAtprotoAdminDefs: str = 'com.atproto.admin.defs' ComAtprotoAdminDeleteAccount: str = 'com.atproto.admin.deleteAccount' + ComAtprotoAdminDeleteCommunicationTemplate: str = 'com.atproto.admin.deleteCommunicationTemplate' ComAtprotoAdminDisableAccountInvites: str = 'com.atproto.admin.disableAccountInvites' ComAtprotoAdminDisableInviteCodes: str = 'com.atproto.admin.disableInviteCodes' ComAtprotoAdminEmitModerationEvent: str = 'com.atproto.admin.emitModerationEvent' @@ -230,12 +250,14 @@ class _Ids: ComAtprotoAdminGetRecord: str = 'com.atproto.admin.getRecord' ComAtprotoAdminGetRepo: str = 'com.atproto.admin.getRepo' ComAtprotoAdminGetSubjectStatus: str = 'com.atproto.admin.getSubjectStatus' + ComAtprotoAdminListCommunicationTemplates: str = 'com.atproto.admin.listCommunicationTemplates' ComAtprotoAdminQueryModerationEvents: str = 'com.atproto.admin.queryModerationEvents' ComAtprotoAdminQueryModerationStatuses: str = 'com.atproto.admin.queryModerationStatuses' ComAtprotoAdminSearchRepos: str = 'com.atproto.admin.searchRepos' ComAtprotoAdminSendEmail: str = 'com.atproto.admin.sendEmail' ComAtprotoAdminUpdateAccountEmail: str = 'com.atproto.admin.updateAccountEmail' ComAtprotoAdminUpdateAccountHandle: str = 'com.atproto.admin.updateAccountHandle' + ComAtprotoAdminUpdateCommunicationTemplate: str = 'com.atproto.admin.updateCommunicationTemplate' ComAtprotoAdminUpdateSubjectStatus: str = 'com.atproto.admin.updateSubjectStatus' ComAtprotoIdentityResolveHandle: str = 'com.atproto.identity.resolveHandle' ComAtprotoIdentityUpdateHandle: str = 'com.atproto.identity.updateHandle' @@ -287,9 +309,11 @@ class _Ids: ComAtprotoSyncNotifyOfUpdate: str = 'com.atproto.sync.notifyOfUpdate' ComAtprotoSyncRequestCrawl: str = 'com.atproto.sync.requestCrawl' 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' diff --git a/packages/atproto_client/models/app/bsky/actor/defs.py b/packages/atproto_client/models/app/bsky/actor/defs.py index 49046b25..98af9a5f 100644 --- a/packages/atproto_client/models/app/bsky/actor/defs.py +++ b/packages/atproto_client/models/app/bsky/actor/defs.py @@ -97,6 +97,7 @@ class ViewerState(base.ModelBase): 'models.AppBskyActorDefs.PersonalDetailsPref', 'models.AppBskyActorDefs.FeedViewPref', 'models.AppBskyActorDefs.ThreadViewPref', + 'models.AppBskyActorDefs.InterestsPref', ], Field(discriminator='py_type'), ] @@ -175,3 +176,15 @@ class ThreadViewPref(base.ModelBase): py_type: te.Literal['app.bsky.actor.defs#threadViewPref'] = Field( default='app.bsky.actor.defs#threadViewPref', alias='$type', frozen=True ) + + +class InterestsPref(base.ModelBase): + """Definition model for :obj:`app.bsky.actor.defs`.""" + + tags: t.List[str] = Field( + max_length=100 + ) #: A list of tags which describe the account owner's interests gathered during onboarding. + + py_type: te.Literal['app.bsky.actor.defs#interestsPref'] = Field( + default='app.bsky.actor.defs#interestsPref', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/app/bsky/graph/defs.py b/packages/atproto_client/models/app/bsky/graph/defs.py index 6f2f09fc..2a47e47a 100644 --- a/packages/atproto_client/models/app/bsky/graph/defs.py +++ b/packages/atproto_client/models/app/bsky/graph/defs.py @@ -83,3 +83,28 @@ class ListViewerState(base.ModelBase): py_type: te.Literal['app.bsky.graph.defs#listViewerState'] = Field( default='app.bsky.graph.defs#listViewerState', alias='$type', frozen=True ) + + +class NotFoundActor(base.ModelBase): + """Definition model for :obj:`app.bsky.graph.defs`. indicates that a handle or DID could not be resolved.""" + + actor: str #: Actor. + not_found: bool = Field(alias='notFound', frozen=True) #: Not found. + + py_type: te.Literal['app.bsky.graph.defs#notFoundActor'] = Field( + default='app.bsky.graph.defs#notFoundActor', alias='$type', frozen=True + ) + + +class Relationship(base.ModelBase): + """Definition model for :obj:`app.bsky.graph.defs`. lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object).""" + + did: str #: Did. + followed_by: t.Optional[str] = Field( + default=None, alias='followedBy' + ) #: if the actor is followed by this DID, contains the AT-URI of the follow record. + following: t.Optional[str] = None #: if the actor follows this DID, this is the AT-URI of the follow record. + + py_type: te.Literal['app.bsky.graph.defs#relationship'] = Field( + default='app.bsky.graph.defs#relationship', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/app/bsky/graph/get_relationships.py b/packages/atproto_client/models/app/bsky/graph/get_relationships.py new file mode 100644 index 00000000..54646035 --- /dev/null +++ b/packages/atproto_client/models/app/bsky/graph/get_relationships.py @@ -0,0 +1,39 @@ +################################################################## +# 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:`app.bsky.graph.getRelationships`.""" + + actor: str #: Actor. + others: t.Optional[t.List[str]] = Field(default=None, max_length=30) #: Others. + + +class ParamsDict(te.TypedDict): + actor: str #: Actor. + others: te.NotRequired[t.Optional[t.List[str]]] #: Others. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`app.bsky.graph.getRelationships`.""" + + relationships: t.List[ + te.Annotated[ + t.Union['models.AppBskyGraphDefs.Relationship', 'models.AppBskyGraphDefs.NotFoundActor'], + Field(discriminator='py_type'), + ] + ] #: Relationships. + actor: t.Optional[str] = None #: Actor. diff --git a/packages/atproto_client/models/app/bsky/unspecced/get_tagged_suggestions.py b/packages/atproto_client/models/app/bsky/unspecced/get_tagged_suggestions.py new file mode 100644 index 00000000..9069c540 --- /dev/null +++ b/packages/atproto_client/models/app/bsky/unspecced/get_tagged_suggestions.py @@ -0,0 +1,41 @@ +################################################################## +# 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:`app.bsky.unspecced.getTaggedSuggestions`.""" + + +class ParamsDict(te.TypedDict): + pass + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`app.bsky.unspecced.getTaggedSuggestions`.""" + + suggestions: t.List['models.AppBskyUnspeccedGetTaggedSuggestions.Suggestion'] #: Suggestions. + + +class Suggestion(base.ModelBase): + """Definition model for :obj:`app.bsky.unspecced.getTaggedSuggestions`.""" + + subject: str #: Subject. + subject_type: str = Field(alias='subjectType') #: Subject type. + tag: str #: Tag. + + py_type: te.Literal['app.bsky.unspecced.getTaggedSuggestions#suggestion'] = Field( + default='app.bsky.unspecced.getTaggedSuggestions#suggestion', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/com/atproto/admin/create_communication_template.py b/packages/atproto_client/models/com/atproto/admin/create_communication_template.py new file mode 100644 index 00000000..c9a77e68 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/admin/create_communication_template.py @@ -0,0 +1,33 @@ +################################################################## +# 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 + +from atproto_client.models import base + + +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.admin.createCommunicationTemplate`.""" + + content_markdown: str = Field( + alias='contentMarkdown' + ) #: Content of the template, markdown supported, can contain variable placeholders. + name: str #: Name of the template. + subject: str #: Subject of the message, used in emails. + created_by: t.Optional[str] = Field( + default=None, alias='createdBy' + ) #: DID of the user who is creating the template. + + +class DataDict(te.TypedDict): + content_markdown: str #: Content of the template, markdown supported, can contain variable placeholders. + name: str #: Name of the template. + subject: str #: Subject of the message, used in emails. + created_by: te.NotRequired[t.Optional[str]] #: DID of the user who is creating the template. diff --git a/packages/atproto_client/models/com/atproto/admin/defs.py b/packages/atproto_client/models/com/atproto/admin/defs.py index 1f098476..3171d9ad 100644 --- a/packages/atproto_client/models/com/atproto/admin/defs.py +++ b/packages/atproto_client/models/com/atproto/admin/defs.py @@ -525,3 +525,20 @@ class ModEventEmail(base.ModelBase): py_type: te.Literal['com.atproto.admin.defs#modEventEmail'] = Field( default='com.atproto.admin.defs#modEventEmail', alias='$type', frozen=True ) + + +class CommunicationTemplateView(base.ModelBase): + """Definition model for :obj:`com.atproto.admin.defs`.""" + + content_markdown: str = Field(alias='contentMarkdown') #: Subject of the message, used in emails. + created_at: str = Field(alias='createdAt') #: Created at. + disabled: bool #: Disabled. + id: str #: Id. + last_updated_by: str = Field(alias='lastUpdatedBy') #: DID of the user who last updated the template. + name: str #: Name of the template. + updated_at: str = Field(alias='updatedAt') #: Updated at. + subject: t.Optional[str] = None #: Content of the template, can contain markdown and variable placeholders. + + py_type: te.Literal['com.atproto.admin.defs#communicationTemplateView'] = Field( + default='com.atproto.admin.defs#communicationTemplateView', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/com/atproto/admin/delete_communication_template.py b/packages/atproto_client/models/com/atproto/admin/delete_communication_template.py new file mode 100644 index 00000000..540851be --- /dev/null +++ b/packages/atproto_client/models/com/atproto/admin/delete_communication_template.py @@ -0,0 +1,20 @@ +################################################################## +# 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 Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.admin.deleteCommunicationTemplate`.""" + + id: str #: Id. + + +class DataDict(te.TypedDict): + id: str #: Id. diff --git a/packages/atproto_client/models/com/atproto/admin/list_communication_templates.py b/packages/atproto_client/models/com/atproto/admin/list_communication_templates.py new file mode 100644 index 00000000..420771bc --- /dev/null +++ b/packages/atproto_client/models/com/atproto/admin/list_communication_templates.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. +################################################################## + + +import typing as t + +from pydantic import Field + +if t.TYPE_CHECKING: + from atproto_client import models +from atproto_client.models import base + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.admin.listCommunicationTemplates`.""" + + communication_templates: t.List['models.ComAtprotoAdminDefs.CommunicationTemplateView'] = Field( + alias='communicationTemplates' + ) #: Communication templates. diff --git a/packages/atproto_client/models/com/atproto/admin/update_communication_template.py b/packages/atproto_client/models/com/atproto/admin/update_communication_template.py new file mode 100644 index 00000000..cf9a9f78 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/admin/update_communication_template.py @@ -0,0 +1,39 @@ +################################################################## +# 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 + +from atproto_client.models import base + + +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.admin.updateCommunicationTemplate`.""" + + id: str #: ID of the template to be updated. + content_markdown: t.Optional[str] = Field( + default=None, alias='contentMarkdown' + ) #: Content of the template, markdown supported, can contain variable placeholders. + disabled: t.Optional[bool] = None #: Disabled. + name: t.Optional[str] = None #: Name of the template. + subject: t.Optional[str] = None #: Subject of the message, used in emails. + updated_by: t.Optional[str] = Field( + default=None, alias='updatedBy' + ) #: DID of the user who is updating the template. + + +class DataDict(te.TypedDict): + id: str #: ID of the template to be updated. + content_markdown: te.NotRequired[ + t.Optional[str] + ] #: Content of the template, markdown supported, can contain variable placeholders. + disabled: te.NotRequired[t.Optional[bool]] #: Disabled. + name: te.NotRequired[t.Optional[str]] #: Name of the template. + subject: te.NotRequired[t.Optional[str]] #: Subject of the message, used in emails. + updated_by: te.NotRequired[t.Optional[str]] #: DID of the user who is updating the template. diff --git a/packages/atproto_client/models/com/atproto/server/create_account.py b/packages/atproto_client/models/com/atproto/server/create_account.py index 3ef80310..e773b705 100644 --- a/packages/atproto_client/models/com/atproto/server/create_account.py +++ b/packages/atproto_client/models/com/atproto/server/create_account.py @@ -25,6 +25,8 @@ class Data(base.DataModelBase): password: t.Optional[str] = None #: Password. plc_op: t.Optional['UnknownInputType'] = Field(default=None, alias='plcOp') #: Plc op. recovery_key: t.Optional[str] = Field(default=None, alias='recoveryKey') #: Recovery key. + verification_code: t.Optional[str] = Field(default=None, alias='verificationCode') #: Verification code. + verification_phone: t.Optional[str] = Field(default=None, alias='verificationPhone') #: Verification phone. class DataDict(te.TypedDict): @@ -35,6 +37,8 @@ class DataDict(te.TypedDict): password: te.NotRequired[t.Optional[str]] #: Password. plc_op: te.NotRequired[t.Optional['UnknownInputType']] #: Plc op. recovery_key: te.NotRequired[t.Optional[str]] #: Recovery key. + verification_code: te.NotRequired[t.Optional[str]] #: Verification code. + verification_phone: te.NotRequired[t.Optional[str]] #: Verification phone. class Response(base.ResponseModelBase): 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 90e0456b..e1dc019e 100644 --- a/packages/atproto_client/models/com/atproto/server/describe_server.py +++ b/packages/atproto_client/models/com/atproto/server/describe_server.py @@ -21,6 +21,9 @@ class Response(base.ResponseModelBase): available_user_domains: t.List[str] = Field(alias='availableUserDomains') #: Available user domains. invite_code_required: t.Optional[bool] = Field(default=None, alias='inviteCodeRequired') #: Invite code required. links: t.Optional['models.ComAtprotoServerDescribeServer.Links'] = None #: Links. + phone_verification_required: t.Optional[bool] = Field( + default=None, alias='phoneVerificationRequired' + ) #: Phone verification required. class Links(base.ModelBase): diff --git a/packages/atproto_client/models/com/atproto/temp/check_signup_queue.py b/packages/atproto_client/models/com/atproto/temp/check_signup_queue.py new file mode 100644 index 00000000..4d3c50e2 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/temp/check_signup_queue.py @@ -0,0 +1,20 @@ +################################################################## +# 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 + +from pydantic import Field + +from atproto_client.models import base + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.temp.checkSignupQueue`.""" + + activated: bool #: Activated. + estimated_time_ms: t.Optional[int] = Field(default=None, alias='estimatedTimeMs') #: Estimated time ms. + place_in_queue: t.Optional[int] = Field(default=None, alias='placeInQueue') #: Place in queue. diff --git a/packages/atproto_client/models/com/atproto/temp/request_phone_verification.py b/packages/atproto_client/models/com/atproto/temp/request_phone_verification.py new file mode 100644 index 00000000..c6ba824a --- /dev/null +++ b/packages/atproto_client/models/com/atproto/temp/request_phone_verification.py @@ -0,0 +1,21 @@ +################################################################## +# 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 pydantic import Field + +from atproto_client.models import base + + +class Data(base.DataModelBase): + """Input data model for :obj:`com.atproto.temp.requestPhoneVerification`.""" + + phone_number: str = Field(alias='phoneNumber') #: Phone number. + + +class DataDict(te.TypedDict): + phone_number: str #: Phone number. diff --git a/packages/atproto_client/namespaces/async_ns.py b/packages/atproto_client/namespaces/async_ns.py index 0d4ac0a0..976445bc 100644 --- a/packages/atproto_client/namespaces/async_ns.py +++ b/packages/atproto_client/namespaces/async_ns.py @@ -755,6 +755,29 @@ async def get_mutes( ) return get_response_model(response, models.AppBskyGraphGetMutes.Response) + async def get_relationships( + self, + params: t.Union[models.AppBskyGraphGetRelationships.Params, models.AppBskyGraphGetRelationships.ParamsDict], + **kwargs: t.Any, + ) -> 'models.AppBskyGraphGetRelationships.Response': + """Enumerates public relationships between one account, and a list of other accounts. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyGraphGetRelationships.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.AppBskyGraphGetRelationships.Params) + response = await self._client.invoke_query( + 'app.bsky.graph.getRelationships', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyGraphGetRelationships.Response) + async def get_suggested_follows_by_actor( self, params: t.Union[ @@ -1010,6 +1033,34 @@ async def get_popular_feed_generators( ) return get_response_model(response, models.AppBskyUnspeccedGetPopularFeedGenerators.Response) + async def get_tagged_suggestions( + self, + params: t.Optional[ + t.Union[ + models.AppBskyUnspeccedGetTaggedSuggestions.Params, + models.AppBskyUnspeccedGetTaggedSuggestions.ParamsDict, + ] + ] = None, + **kwargs: t.Any, + ) -> 'models.AppBskyUnspeccedGetTaggedSuggestions.Response': + """Get a list of suggestions (feeds and users) tagged with categories. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedGetTaggedSuggestions.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.AppBskyUnspeccedGetTaggedSuggestions.Params) + response = await self._client.invoke_query( + 'app.bsky.unspecced.getTaggedSuggestions', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyUnspeccedGetTaggedSuggestions.Response) + async def get_timeline_skeleton( self, params: t.Optional[ @@ -1108,6 +1159,36 @@ def __init__(self, client: 'AsyncClientRaw') -> None: class AdminNamespace(AsyncNamespaceBase): + async def create_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminCreateCommunicationTemplate.Data, + models.ComAtprotoAdminCreateCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminDefs.CommunicationTemplateView': + """Administrative action to create a new, re-usable communication (email for now) template. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminDefs.CommunicationTemplateView`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminCreateCommunicationTemplate.Data) + response = await self._client.invoke_procedure( + 'com.atproto.admin.createCommunicationTemplate', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoAdminDefs.CommunicationTemplateView) + async def delete_account( self, data: t.Union[models.ComAtprotoAdminDeleteAccount.Data, models.ComAtprotoAdminDeleteAccount.DataDict], @@ -1131,6 +1212,35 @@ async def delete_account( ) return get_response_model(response, bool) + async def delete_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminDeleteCommunicationTemplate.Data, + models.ComAtprotoAdminDeleteCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> bool: + """Delete a communication template. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminDeleteCommunicationTemplate.Data) + response = await self._client.invoke_procedure( + 'com.atproto.admin.deleteCommunicationTemplate', + data=data_model, + input_encoding='application/json', + **kwargs, + ) + return get_response_model(response, bool) + async def disable_account_invites( self, data: t.Union[ @@ -1402,6 +1512,25 @@ async def get_subject_status( ) return get_response_model(response, models.ComAtprotoAdminGetSubjectStatus.Response) + async def list_communication_templates( + self, **kwargs: t.Any + ) -> 'models.ComAtprotoAdminListCommunicationTemplates.Response': + """Get list of all communication templates. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminListCommunicationTemplates.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_query( + 'com.atproto.admin.listCommunicationTemplates', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoAdminListCommunicationTemplates.Response) + async def query_moderation_events( self, params: t.Optional[ @@ -1561,6 +1690,36 @@ async def update_account_handle( ) return get_response_model(response, bool) + async def update_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminUpdateCommunicationTemplate.Data, + models.ComAtprotoAdminUpdateCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminDefs.CommunicationTemplateView': + """Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminDefs.CommunicationTemplateView`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminUpdateCommunicationTemplate.Data) + response = await self._client.invoke_procedure( + 'com.atproto.admin.updateCommunicationTemplate', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoAdminDefs.CommunicationTemplateView) + async def update_subject_status( self, data: t.Union[ @@ -2611,6 +2770,23 @@ async def request_crawl( class TempNamespace(AsyncNamespaceBase): + async def check_signup_queue(self, **kwargs: t.Any) -> 'models.ComAtprotoTempCheckSignupQueue.Response': + """Check accounts location in signup queue. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoTempCheckSignupQueue.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = await self._client.invoke_query( + 'com.atproto.temp.checkSignupQueue', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoTempCheckSignupQueue.Response) + async def fetch_labels( self, params: t.Optional[ @@ -2691,6 +2867,31 @@ async def push_blob( ) return get_response_model(response, bool) + async def request_phone_verification( + self, + data: t.Union[ + models.ComAtprotoTempRequestPhoneVerification.Data, models.ComAtprotoTempRequestPhoneVerification.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Request a verification code to be sent to the supplied phone number. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoTempRequestPhoneVerification.Data) + response = await self._client.invoke_procedure( + '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], diff --git a/packages/atproto_client/namespaces/sync_ns.py b/packages/atproto_client/namespaces/sync_ns.py index 4e8a1d60..e3048086 100644 --- a/packages/atproto_client/namespaces/sync_ns.py +++ b/packages/atproto_client/namespaces/sync_ns.py @@ -755,6 +755,29 @@ def get_mutes( ) return get_response_model(response, models.AppBskyGraphGetMutes.Response) + def get_relationships( + self, + params: t.Union[models.AppBskyGraphGetRelationships.Params, models.AppBskyGraphGetRelationships.ParamsDict], + **kwargs: t.Any, + ) -> 'models.AppBskyGraphGetRelationships.Response': + """Enumerates public relationships between one account, and a list of other accounts. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyGraphGetRelationships.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.AppBskyGraphGetRelationships.Params) + response = self._client.invoke_query( + 'app.bsky.graph.getRelationships', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyGraphGetRelationships.Response) + def get_suggested_follows_by_actor( self, params: t.Union[ @@ -1010,6 +1033,34 @@ def get_popular_feed_generators( ) return get_response_model(response, models.AppBskyUnspeccedGetPopularFeedGenerators.Response) + def get_tagged_suggestions( + self, + params: t.Optional[ + t.Union[ + models.AppBskyUnspeccedGetTaggedSuggestions.Params, + models.AppBskyUnspeccedGetTaggedSuggestions.ParamsDict, + ] + ] = None, + **kwargs: t.Any, + ) -> 'models.AppBskyUnspeccedGetTaggedSuggestions.Response': + """Get a list of suggestions (feeds and users) tagged with categories. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedGetTaggedSuggestions.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.AppBskyUnspeccedGetTaggedSuggestions.Params) + response = self._client.invoke_query( + 'app.bsky.unspecced.getTaggedSuggestions', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyUnspeccedGetTaggedSuggestions.Response) + def get_timeline_skeleton( self, params: t.Optional[ @@ -1108,6 +1159,36 @@ def __init__(self, client: 'ClientRaw') -> None: class AdminNamespace(NamespaceBase): + def create_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminCreateCommunicationTemplate.Data, + models.ComAtprotoAdminCreateCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminDefs.CommunicationTemplateView': + """Administrative action to create a new, re-usable communication (email for now) template. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminDefs.CommunicationTemplateView`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminCreateCommunicationTemplate.Data) + response = self._client.invoke_procedure( + 'com.atproto.admin.createCommunicationTemplate', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoAdminDefs.CommunicationTemplateView) + def delete_account( self, data: t.Union[models.ComAtprotoAdminDeleteAccount.Data, models.ComAtprotoAdminDeleteAccount.DataDict], @@ -1131,6 +1212,35 @@ def delete_account( ) return get_response_model(response, bool) + def delete_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminDeleteCommunicationTemplate.Data, + models.ComAtprotoAdminDeleteCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> bool: + """Delete a communication template. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminDeleteCommunicationTemplate.Data) + response = self._client.invoke_procedure( + 'com.atproto.admin.deleteCommunicationTemplate', + data=data_model, + input_encoding='application/json', + **kwargs, + ) + return get_response_model(response, bool) + def disable_account_invites( self, data: t.Union[ @@ -1402,6 +1512,25 @@ def get_subject_status( ) return get_response_model(response, models.ComAtprotoAdminGetSubjectStatus.Response) + def list_communication_templates( + self, **kwargs: t.Any + ) -> 'models.ComAtprotoAdminListCommunicationTemplates.Response': + """Get list of all communication templates. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminListCommunicationTemplates.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_query( + 'com.atproto.admin.listCommunicationTemplates', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoAdminListCommunicationTemplates.Response) + def query_moderation_events( self, params: t.Optional[ @@ -1561,6 +1690,36 @@ def update_account_handle( ) return get_response_model(response, bool) + def update_communication_template( + self, + data: t.Union[ + models.ComAtprotoAdminUpdateCommunicationTemplate.Data, + models.ComAtprotoAdminUpdateCommunicationTemplate.DataDict, + ], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminDefs.CommunicationTemplateView': + """Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminDefs.CommunicationTemplateView`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoAdminUpdateCommunicationTemplate.Data) + response = self._client.invoke_procedure( + 'com.atproto.admin.updateCommunicationTemplate', + data=data_model, + input_encoding='application/json', + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.ComAtprotoAdminDefs.CommunicationTemplateView) + def update_subject_status( self, data: t.Union[ @@ -2611,6 +2770,23 @@ def request_crawl( class TempNamespace(NamespaceBase): + def check_signup_queue(self, **kwargs: t.Any) -> 'models.ComAtprotoTempCheckSignupQueue.Response': + """Check accounts location in signup queue. + + Args: + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoTempCheckSignupQueue.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + response = self._client.invoke_query( + 'com.atproto.temp.checkSignupQueue', output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoTempCheckSignupQueue.Response) + def fetch_labels( self, params: t.Optional[ @@ -2691,6 +2867,31 @@ def push_blob( ) return get_response_model(response, bool) + def request_phone_verification( + self, + data: t.Union[ + models.ComAtprotoTempRequestPhoneVerification.Data, models.ComAtprotoTempRequestPhoneVerification.DataDict + ], + **kwargs: t.Any, + ) -> bool: + """Request a verification code to be sent to the supplied phone number. + + Args: + data: Input data. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`bool`: Success status. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + data_model = get_or_create(data, models.ComAtprotoTempRequestPhoneVerification.Data) + response = self._client.invoke_procedure( + '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],