Skip to content

Commit

Permalink
Update lexicons fetched from a4b528e committed 2024-11-18T13:36:39Z (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Nov 20, 2024
1 parent b38b194 commit d030829
Show file tree
Hide file tree
Showing 14 changed files with 353 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/aliases_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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:
48 changes: 48 additions & 0 deletions lexicons/app.bsky.graph.searchStarterPacks.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions lexicons/app.bsky.unspecced.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"properties": {
"did": { "type": "string", "format": "did" }
}
},
"skeletonSearchStarterPack": {
"type": "object",
"required": ["uri"],
"properties": {
"uri": { "type": "string", "format": "at-uri" }
}
}
}
}
63 changes: 63 additions & 0 deletions lexicons/app.bsky.unspecced.searchStarterPacksSkeleton.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
6 changes: 6 additions & 0 deletions packages/atproto_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2024 Ilya (Marshal) <https://github.com/MarshalX>.
# 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.
10 changes: 10 additions & 0 deletions packages/atproto_client/models/app/bsky/unspecced/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2024 Ilya (Marshal) <https://github.com/MarshalX>.
# 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.
)
58 changes: 58 additions & 0 deletions packages/atproto_client/namespaces/async_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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(
Expand Down
Loading

0 comments on commit d030829

Please sign in to comment.