From b2091253683183e3e75ee4cd999a77daf0f3f827 Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Tue, 19 Nov 2024 13:50:35 +0000 Subject: [PATCH] Update lexicons fetched from a4b528e committed 2024-11-18T13:36:39Z --- docs/source/aliases_db.py | 2 + .../atproto_client.models.app.bsky.graph.rst | 1 + ...ls.app.bsky.graph.search_starter_packs.rst | 7 +++ ...proto_client.models.app.bsky.unspecced.rst | 1 + ...nspecced.search_starter_packs_skeleton.rst | 7 +++ .../app.bsky.graph.searchStarterPacks.json | 48 ++++++++++++++ lexicons/app.bsky.unspecced.defs.json | 7 +++ ....unspecced.searchStarterPacksSkeleton.json | 63 +++++++++++++++++++ packages/atproto_client/models/__init__.py | 6 ++ .../app/bsky/graph/search_starter_packs.py | 36 +++++++++++ .../models/app/bsky/unspecced/defs.py | 10 +++ .../search_starter_packs_skeleton.py | 49 +++++++++++++++ .../atproto_client/namespaces/async_ns.py | 58 +++++++++++++++++ packages/atproto_client/namespaces/sync_ns.py | 58 +++++++++++++++++ 14 files changed, 353 insertions(+) create mode 100644 docs/source/atproto/atproto_client.models.app.bsky.graph.search_starter_packs.rst create mode 100644 docs/source/atproto/atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton.rst create mode 100644 lexicons/app.bsky.graph.searchStarterPacks.json create mode 100644 lexicons/app.bsky.unspecced.searchStarterPacksSkeleton.json create mode 100644 packages/atproto_client/models/app/bsky/graph/search_starter_packs.py create mode 100644 packages/atproto_client/models/app/bsky/unspecced/search_starter_packs_skeleton.py diff --git a/docs/source/aliases_db.py b/docs/source/aliases_db.py index 24146e7c..deafeabd 100644 --- a/docs/source/aliases_db.py +++ b/docs/source/aliases_db.py @@ -62,6 +62,7 @@ 'models.AppBskyGraphMuteActor': 'atproto_client.models.app.bsky.graph.mute_actor', 'models.AppBskyGraphMuteActorList': 'atproto_client.models.app.bsky.graph.mute_actor_list', 'models.AppBskyGraphMuteThread': 'atproto_client.models.app.bsky.graph.mute_thread', + 'models.AppBskyGraphSearchStarterPacks': 'atproto_client.models.app.bsky.graph.search_starter_packs', 'models.AppBskyGraphStarterpack': 'atproto_client.models.app.bsky.graph.starterpack', 'models.AppBskyGraphUnmuteActor': 'atproto_client.models.app.bsky.graph.unmute_actor', 'models.AppBskyGraphUnmuteActorList': 'atproto_client.models.app.bsky.graph.unmute_actor_list', @@ -82,6 +83,7 @@ 'models.AppBskyUnspeccedGetTaggedSuggestions': 'atproto_client.models.app.bsky.unspecced.get_tagged_suggestions', 'models.AppBskyUnspeccedSearchActorsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_actors_skeleton', 'models.AppBskyUnspeccedSearchPostsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_posts_skeleton', + 'models.AppBskyUnspeccedSearchStarterPacksSkeleton': 'atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton', 'models.AppBskyVideoDefs': 'atproto_client.models.app.bsky.video.defs', 'models.AppBskyVideoGetJobStatus': 'atproto_client.models.app.bsky.video.get_job_status', 'models.AppBskyVideoGetUploadLimits': 'atproto_client.models.app.bsky.video.get_upload_limits', 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 3f89a112..00227412 100644 --- a/docs/source/atproto/atproto_client.models.app.bsky.graph.rst +++ b/docs/source/atproto/atproto_client.models.app.bsky.graph.rst @@ -35,6 +35,7 @@ Submodules atproto_client.models.app.bsky.graph.mute_actor atproto_client.models.app.bsky.graph.mute_actor_list atproto_client.models.app.bsky.graph.mute_thread + atproto_client.models.app.bsky.graph.search_starter_packs atproto_client.models.app.bsky.graph.starterpack atproto_client.models.app.bsky.graph.unmute_actor atproto_client.models.app.bsky.graph.unmute_actor_list diff --git a/docs/source/atproto/atproto_client.models.app.bsky.graph.search_starter_packs.rst b/docs/source/atproto/atproto_client.models.app.bsky.graph.search_starter_packs.rst new file mode 100644 index 00000000..9712ec23 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.app.bsky.graph.search_starter_packs.rst @@ -0,0 +1,7 @@ +app.bsky.graph.search\_starter\_packs +============================================================ + +.. automodule:: atproto_client.models.app.bsky.graph.search_starter_packs + :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 306c15c9..db94f50b 100644 --- a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst +++ b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst @@ -19,3 +19,4 @@ Submodules atproto_client.models.app.bsky.unspecced.get_tagged_suggestions atproto_client.models.app.bsky.unspecced.search_actors_skeleton atproto_client.models.app.bsky.unspecced.search_posts_skeleton + atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton diff --git a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton.rst b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton.rst new file mode 100644 index 00000000..c1718e12 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton.rst @@ -0,0 +1,7 @@ +app.bsky.unspecced.search\_starter\_packs\_skeleton +========================================================================== + +.. automodule:: atproto_client.models.app.bsky.unspecced.search_starter_packs_skeleton + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/lexicons/app.bsky.graph.searchStarterPacks.json b/lexicons/app.bsky.graph.searchStarterPacks.json new file mode 100644 index 00000000..66a26ec4 --- /dev/null +++ b/lexicons/app.bsky.graph.searchStarterPacks.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.searchStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Find starter packs matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "cursor": { + "type": "string" + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackViewBasic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app.bsky.unspecced.defs.json b/lexicons/app.bsky.unspecced.defs.json index e9925922..2391181d 100644 --- a/lexicons/app.bsky.unspecced.defs.json +++ b/lexicons/app.bsky.unspecced.defs.json @@ -15,6 +15,13 @@ "properties": { "did": { "type": "string", "format": "did" } } + }, + "skeletonSearchStarterPack": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } } } } diff --git a/lexicons/app.bsky.unspecced.searchStarterPacksSkeleton.json b/lexicons/app.bsky.unspecced.searchStarterPacksSkeleton.json new file mode 100644 index 00000000..80c1b881 --- /dev/null +++ b/lexicons/app.bsky.unspecced.searchStarterPacksSkeleton.json @@ -0,0 +1,63 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.searchStarterPacksSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Starter Pack search, returns only skeleton.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "cursor": { + "type": "string" + }, + "hitsTotal": { + "type": "integer", + "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits." + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonSearchStarterPack" + } + } + } + } + }, + "errors": [ + { + "name": "BadQueryString" + } + ] + } + } +} diff --git a/packages/atproto_client/models/__init__.py b/packages/atproto_client/models/__init__.py index 37a14a6e..bdac8de8 100644 --- a/packages/atproto_client/models/__init__.py +++ b/packages/atproto_client/models/__init__.py @@ -63,6 +63,7 @@ from atproto_client.models.app.bsky.graph import mute_actor as AppBskyGraphMuteActor from atproto_client.models.app.bsky.graph import mute_actor_list as AppBskyGraphMuteActorList from atproto_client.models.app.bsky.graph import mute_thread as AppBskyGraphMuteThread +from atproto_client.models.app.bsky.graph import search_starter_packs as AppBskyGraphSearchStarterPacks from atproto_client.models.app.bsky.graph import starterpack as AppBskyGraphStarterpack from atproto_client.models.app.bsky.graph import unmute_actor as AppBskyGraphUnmuteActor from atproto_client.models.app.bsky.graph import unmute_actor_list as AppBskyGraphUnmuteActorList @@ -85,6 +86,9 @@ from atproto_client.models.app.bsky.unspecced import get_tagged_suggestions as AppBskyUnspeccedGetTaggedSuggestions 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.app.bsky.unspecced import ( + search_starter_packs_skeleton as AppBskyUnspeccedSearchStarterPacksSkeleton, +) from atproto_client.models.app.bsky.video import defs as AppBskyVideoDefs from atproto_client.models.app.bsky.video import get_job_status as AppBskyVideoGetJobStatus from atproto_client.models.app.bsky.video import get_upload_limits as AppBskyVideoGetUploadLimits @@ -305,6 +309,7 @@ class _Ids: AppBskyGraphMuteActor: str = 'app.bsky.graph.muteActor' AppBskyGraphMuteActorList: str = 'app.bsky.graph.muteActorList' AppBskyGraphMuteThread: str = 'app.bsky.graph.muteThread' + AppBskyGraphSearchStarterPacks: str = 'app.bsky.graph.searchStarterPacks' AppBskyGraphStarterpack: str = 'app.bsky.graph.starterpack' AppBskyGraphUnmuteActor: str = 'app.bsky.graph.unmuteActor' AppBskyGraphUnmuteActorList: str = 'app.bsky.graph.unmuteActorList' @@ -325,6 +330,7 @@ class _Ids: AppBskyUnspeccedGetTaggedSuggestions: str = 'app.bsky.unspecced.getTaggedSuggestions' AppBskyUnspeccedSearchActorsSkeleton: str = 'app.bsky.unspecced.searchActorsSkeleton' AppBskyUnspeccedSearchPostsSkeleton: str = 'app.bsky.unspecced.searchPostsSkeleton' + AppBskyUnspeccedSearchStarterPacksSkeleton: str = 'app.bsky.unspecced.searchStarterPacksSkeleton' AppBskyVideoDefs: str = 'app.bsky.video.defs' AppBskyVideoGetJobStatus: str = 'app.bsky.video.getJobStatus' AppBskyVideoGetUploadLimits: str = 'app.bsky.video.getUploadLimits' diff --git a/packages/atproto_client/models/app/bsky/graph/search_starter_packs.py b/packages/atproto_client/models/app/bsky/graph/search_starter_packs.py new file mode 100644 index 00000000..7799cf5f --- /dev/null +++ b/packages/atproto_client/models/app/bsky/graph/search_starter_packs.py @@ -0,0 +1,36 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2024 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.searchStarterPacks`.""" + + q: str #: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + cursor: t.Optional[str] = None #: Cursor. + limit: t.Optional[int] = Field(default=25, ge=1, le=100) #: Limit. + + +class ParamsDict(t.TypedDict): + q: str #: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + cursor: te.NotRequired[t.Optional[str]] #: Cursor. + limit: te.NotRequired[t.Optional[int]] #: Limit. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`app.bsky.graph.searchStarterPacks`.""" + + starter_packs: t.List['models.AppBskyGraphDefs.StarterPackViewBasic'] #: Starter packs. + cursor: t.Optional[str] = None #: Cursor. diff --git a/packages/atproto_client/models/app/bsky/unspecced/defs.py b/packages/atproto_client/models/app/bsky/unspecced/defs.py index 5f7612b4..efcc3700 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/defs.py +++ b/packages/atproto_client/models/app/bsky/unspecced/defs.py @@ -30,3 +30,13 @@ class SkeletonSearchActor(base.ModelBase): py_type: t.Literal['app.bsky.unspecced.defs#skeletonSearchActor'] = Field( default='app.bsky.unspecced.defs#skeletonSearchActor', alias='$type', frozen=True ) + + +class SkeletonSearchStarterPack(base.ModelBase): + """Definition model for :obj:`app.bsky.unspecced.defs`.""" + + uri: str #: Uri. + + py_type: t.Literal['app.bsky.unspecced.defs#skeletonSearchStarterPack'] = Field( + default='app.bsky.unspecced.defs#skeletonSearchStarterPack', alias='$type', frozen=True + ) diff --git a/packages/atproto_client/models/app/bsky/unspecced/search_starter_packs_skeleton.py b/packages/atproto_client/models/app/bsky/unspecced/search_starter_packs_skeleton.py new file mode 100644 index 00000000..40a006e4 --- /dev/null +++ b/packages/atproto_client/models/app/bsky/unspecced/search_starter_packs_skeleton.py @@ -0,0 +1,49 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2024 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.searchStarterPacksSkeleton`.""" + + q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + cursor: t.Optional[str] = ( + None #: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + ) + limit: t.Optional[int] = Field(default=25, ge=1, le=100) #: Limit. + viewer: t.Optional[str] = ( + None #: DID of the account making the request (not included for public/unauthenticated queries). + ) + + +class ParamsDict(t.TypedDict): + q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + cursor: te.NotRequired[ + t.Optional[str] + ] #: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + limit: te.NotRequired[t.Optional[int]] #: Limit. + viewer: te.NotRequired[ + t.Optional[str] + ] #: DID of the account making the request (not included for public/unauthenticated queries). + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`app.bsky.unspecced.searchStarterPacksSkeleton`.""" + + starter_packs: t.List['models.AppBskyUnspeccedDefs.SkeletonSearchStarterPack'] #: Starter packs. + cursor: t.Optional[str] = None #: Cursor. + hits_total: t.Optional[int] = ( + None #: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. + ) diff --git a/packages/atproto_client/namespaces/async_ns.py b/packages/atproto_client/namespaces/async_ns.py index 1a92ce01..1f7bc70d 100644 --- a/packages/atproto_client/namespaces/async_ns.py +++ b/packages/atproto_client/namespaces/async_ns.py @@ -3100,6 +3100,32 @@ async def mute_thread( ) return get_response_model(response, bool) + async def search_starter_packs( + self, + params: t.Union[models.AppBskyGraphSearchStarterPacks.Params, models.AppBskyGraphSearchStarterPacks.ParamsDict], + **kwargs: t.Any, + ) -> 'models.AppBskyGraphSearchStarterPacks.Response': + """Find starter packs matching search criteria. Does not require auth. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyGraphSearchStarterPacks.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.AppBskyGraphSearchStarterPacks.Params', + get_or_create(params, models.AppBskyGraphSearchStarterPacks.Params), + ) + response = await self._client.invoke_query( + 'app.bsky.graph.searchStarterPacks', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyGraphSearchStarterPacks.Response) + async def unmute_actor( self, data: t.Union[models.AppBskyGraphUnmuteActor.Data, models.AppBskyGraphUnmuteActor.DataDict], @@ -3672,6 +3698,38 @@ async def search_posts_skeleton( ) return get_response_model(response, models.AppBskyUnspeccedSearchPostsSkeleton.Response) + async def search_starter_packs_skeleton( + self, + params: t.Union[ + models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params, + models.AppBskyUnspeccedSearchStarterPacksSkeleton.ParamsDict, + ], + **kwargs: t.Any, + ) -> 'models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response': + """Backend Starter Pack search, returns only skeleton. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params', + get_or_create(params, models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params), + ) + response = await self._client.invoke_query( + 'app.bsky.unspecced.searchStarterPacksSkeleton', + params=params_model, + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response) + class AppBskyVideoNamespace(AsyncNamespaceBase): async def get_job_status( diff --git a/packages/atproto_client/namespaces/sync_ns.py b/packages/atproto_client/namespaces/sync_ns.py index 2d1ad4ed..436d4374 100644 --- a/packages/atproto_client/namespaces/sync_ns.py +++ b/packages/atproto_client/namespaces/sync_ns.py @@ -3100,6 +3100,32 @@ def mute_thread( ) return get_response_model(response, bool) + def search_starter_packs( + self, + params: t.Union[models.AppBskyGraphSearchStarterPacks.Params, models.AppBskyGraphSearchStarterPacks.ParamsDict], + **kwargs: t.Any, + ) -> 'models.AppBskyGraphSearchStarterPacks.Response': + """Find starter packs matching search criteria. Does not require auth. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyGraphSearchStarterPacks.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.AppBskyGraphSearchStarterPacks.Params', + get_or_create(params, models.AppBskyGraphSearchStarterPacks.Params), + ) + response = self._client.invoke_query( + 'app.bsky.graph.searchStarterPacks', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyGraphSearchStarterPacks.Response) + def unmute_actor( self, data: t.Union[models.AppBskyGraphUnmuteActor.Data, models.AppBskyGraphUnmuteActor.DataDict], @@ -3672,6 +3698,38 @@ def search_posts_skeleton( ) return get_response_model(response, models.AppBskyUnspeccedSearchPostsSkeleton.Response) + def search_starter_packs_skeleton( + self, + params: t.Union[ + models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params, + models.AppBskyUnspeccedSearchStarterPacksSkeleton.ParamsDict, + ], + **kwargs: t.Any, + ) -> 'models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response': + """Backend Starter Pack search, returns only skeleton. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = t.cast( + 'models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params', + get_or_create(params, models.AppBskyUnspeccedSearchStarterPacksSkeleton.Params), + ) + response = self._client.invoke_query( + 'app.bsky.unspecced.searchStarterPacksSkeleton', + params=params_model, + output_encoding='application/json', + **kwargs, + ) + return get_response_model(response, models.AppBskyUnspeccedSearchStarterPacksSkeleton.Response) + class AppBskyVideoNamespace(NamespaceBase): def get_job_status(