diff --git a/packages/atproto_client/models/app/bsky/actor/defs.py b/packages/atproto_client/models/app/bsky/actor/defs.py index 84eb0433..882aa59a 100644 --- a/packages/atproto_client/models/app/bsky/actor/defs.py +++ b/packages/atproto_client/models/app/bsky/actor/defs.py @@ -10,20 +10,21 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class ProfileViewBasic(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. associated: t.Optional['models.AppBskyActorDefs.ProfileAssociated'] = None #: Associated. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. display_name: t.Optional[str] = Field(default=None, max_length=640) #: Display name. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. viewer: t.Optional['models.AppBskyActorDefs.ViewerState'] = None #: Viewer. @@ -36,14 +37,14 @@ class ProfileViewBasic(base.ModelBase): class ProfileView(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. associated: t.Optional['models.AppBskyActorDefs.ProfileAssociated'] = None #: Associated. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. description: t.Optional[str] = Field(default=None, max_length=2560) #: Description. display_name: t.Optional[str] = Field(default=None, max_length=640) #: Display name. - indexed_at: t.Optional['string_formats.DateTime'] = None #: Indexed at. + indexed_at: t.Optional[string_formats.DateTime] = None #: Indexed at. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. viewer: t.Optional['models.AppBskyActorDefs.ViewerState'] = None #: Viewer. @@ -55,17 +56,17 @@ class ProfileView(base.ModelBase): class ProfileViewDetailed(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. associated: t.Optional['models.AppBskyActorDefs.ProfileAssociated'] = None #: Associated. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. - banner: t.Optional['string_formats.Uri'] = None #: Banner. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. + banner: t.Optional[string_formats.Uri] = None #: Banner. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. description: t.Optional[str] = Field(default=None, max_length=2560) #: Description. display_name: t.Optional[str] = Field(default=None, max_length=640) #: Display name. followers_count: t.Optional[int] = None #: Followers count. follows_count: t.Optional[int] = None #: Follows count. - indexed_at: t.Optional['string_formats.DateTime'] = None #: Indexed at. + indexed_at: t.Optional[string_formats.DateTime] = None #: Indexed at. joined_via_starter_pack: t.Optional['models.AppBskyGraphDefs.StarterPackViewBasic'] = ( None #: Joined via starter pack. ) @@ -107,10 +108,10 @@ class ViewerState(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`. Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.""" blocked_by: t.Optional[bool] = None #: Blocked by. - blocking: t.Optional['string_formats.AtUri'] = None #: Blocking. + blocking: t.Optional[string_formats.AtUri] = None #: Blocking. blocking_by_list: t.Optional['models.AppBskyGraphDefs.ListViewBasic'] = None #: Blocking by list. - followed_by: t.Optional['string_formats.AtUri'] = None #: Followed by. - following: t.Optional['string_formats.AtUri'] = None #: Following. + followed_by: t.Optional[string_formats.AtUri] = None #: Followed by. + following: t.Optional[string_formats.AtUri] = None #: Following. known_followers: t.Optional['models.AppBskyActorDefs.KnownFollowers'] = None #: Known followers. muted: t.Optional[bool] = None #: Muted. muted_by_list: t.Optional['models.AppBskyGraphDefs.ListViewBasic'] = None #: Muted by list. @@ -169,7 +170,7 @@ class ContentLabelPref(base.ModelBase): visibility: t.Union[ t.Literal['ignore'], t.Literal['show'], t.Literal['warn'], t.Literal['hide'], str ] #: Visibility. - labeler_did: t.Optional['string_formats.Did'] = ( + labeler_did: t.Optional[string_formats.Did] = ( None #: Which labeler does this preference apply to? If undefined, applies globally. ) @@ -204,8 +205,8 @@ class SavedFeedsPrefV2(base.ModelBase): class SavedFeedsPref(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - pinned: t.List['string_formats.AtUri'] #: Pinned. - saved: t.List['string_formats.AtUri'] #: Saved. + pinned: t.List[string_formats.AtUri] #: Pinned. + saved: t.List[string_formats.AtUri] #: Saved. timeline_index: t.Optional[int] = None #: Timeline index. py_type: t.Literal['app.bsky.actor.defs#savedFeedsPref'] = Field( @@ -216,7 +217,7 @@ class SavedFeedsPref(base.ModelBase): class PersonalDetailsPref(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - birth_date: t.Optional['string_formats.DateTime'] = None #: The birth date of account owner. + birth_date: t.Optional[string_formats.DateTime] = None #: The birth date of account owner. py_type: t.Literal['app.bsky.actor.defs#personalDetailsPref'] = Field( default='app.bsky.actor.defs#personalDetailsPref', alias='$type', frozen=True @@ -276,7 +277,7 @@ class MutedWord(base.ModelBase): actor_target: t.Optional[t.Union[t.Literal['all'], t.Literal['exclude-following'], str]] = ( 'all' #: Groups of users to apply the muted word to. If undefined, applies to all users. ) - expires_at: t.Optional['string_formats.DateTime'] = ( + expires_at: t.Optional[string_formats.DateTime] = ( None #: The date and time at which the muted word will expire and no longer be applied. ) id: t.Optional[str] = None #: Id. @@ -299,7 +300,7 @@ class MutedWordsPref(base.ModelBase): class HiddenPostsPref(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - items: t.List['string_formats.AtUri'] #: A list of URIs of posts the account owner has hidden. + items: t.List[string_formats.AtUri] #: A list of URIs of posts the account owner has hidden. py_type: t.Literal['app.bsky.actor.defs#hiddenPostsPref'] = Field( default='app.bsky.actor.defs#hiddenPostsPref', alias='$type', frozen=True @@ -319,7 +320,7 @@ class LabelersPref(base.ModelBase): class LabelerPrefItem(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['app.bsky.actor.defs#labelerPrefItem'] = Field( default='app.bsky.actor.defs#labelerPrefItem', alias='$type', frozen=True @@ -360,7 +361,7 @@ class Nux(base.ModelBase): data: t.Optional[str] = Field( default=None, max_length=3000 ) #: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. - expires_at: t.Optional['string_formats.DateTime'] = ( + expires_at: t.Optional[string_formats.DateTime] = ( None #: The date and time at which the NUX will expire and should be considered completed. ) diff --git a/packages/atproto_client/models/app/bsky/actor/get_profile.py b/packages/atproto_client/models/app/bsky/actor/get_profile.py index 70d5056f..83327070 100644 --- a/packages/atproto_client/models/app/bsky/actor/get_profile.py +++ b/packages/atproto_client/models/app/bsky/actor/get_profile.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.actor.getProfile`.""" - actor: 'string_formats.Handle' #: Handle or DID of account to fetch profile of. + actor: string_formats.Handle #: Handle or DID of account to fetch profile of. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Handle or DID of account to fetch profile of. + actor: string_formats.Handle #: Handle or DID of account to fetch profile of. diff --git a/packages/atproto_client/models/app/bsky/actor/get_profiles.py b/packages/atproto_client/models/app/bsky/actor/get_profiles.py index 6850b156..dbb58f79 100644 --- a/packages/atproto_client/models/app/bsky/actor/get_profiles.py +++ b/packages/atproto_client/models/app/bsky/actor/get_profiles.py @@ -9,20 +9,21 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.actor.getProfiles`.""" - actors: t.List['string_formats.Handle'] = Field(max_length=25) #: Actors. + actors: t.List[string_formats.Handle] = Field(max_length=25) #: Actors. class ParamsDict(t.TypedDict): - actors: t.List['string_formats.Handle'] #: Actors. + actors: t.List[string_formats.Handle] #: Actors. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/actor/profile.py b/packages/atproto_client/models/app/bsky/actor/profile.py index d9fbee8e..d9dab15b 100644 --- a/packages/atproto_client/models/app/bsky/actor/profile.py +++ b/packages/atproto_client/models/app/bsky/actor/profile.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -24,7 +25,7 @@ class Record(base.RecordModelBase): None #: Small image to be displayed next to posts from account. AKA, 'profile picture'. ) banner: t.Optional['BlobRef'] = None #: Larger horizontal image to display behind profile view. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. description: t.Optional[str] = Field(default=None, max_length=2560) #: Free-form profile description text. display_name: t.Optional[str] = Field(default=None, max_length=640) #: Display name. joined_via_starter_pack: t.Optional['models.ComAtprotoRepoStrongRef.Main'] = None #: Joined via starter pack. diff --git a/packages/atproto_client/models/app/bsky/embed/external.py b/packages/atproto_client/models/app/bsky/embed/external.py index 749b90e7..227b7611 100644 --- a/packages/atproto_client/models/app/bsky/embed/external.py +++ b/packages/atproto_client/models/app/bsky/embed/external.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -29,7 +30,7 @@ class External(base.ModelBase): description: str #: Description. title: str #: Title. - uri: 'string_formats.Uri' #: Uri. + uri: string_formats.Uri #: Uri. thumb: t.Optional['BlobRef'] = None #: Thumb. py_type: t.Literal['app.bsky.embed.external#external'] = Field( @@ -52,8 +53,8 @@ class ViewExternal(base.ModelBase): description: str #: Description. title: str #: Title. - uri: 'string_formats.Uri' #: Uri. - thumb: t.Optional['string_formats.Uri'] = None #: Thumb. + uri: string_formats.Uri #: Uri. + thumb: t.Optional[string_formats.Uri] = None #: Thumb. py_type: t.Literal['app.bsky.embed.external#viewExternal'] = Field( default='app.bsky.embed.external#viewExternal', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/embed/images.py b/packages/atproto_client/models/app/bsky/embed/images.py index 81b58538..8b4f105a 100644 --- a/packages/atproto_client/models/app/bsky/embed/images.py +++ b/packages/atproto_client/models/app/bsky/embed/images.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -50,8 +51,8 @@ class ViewImage(base.ModelBase): """Definition model for :obj:`app.bsky.embed.images`.""" alt: str #: Alt text description of the image, for accessibility. - fullsize: 'string_formats.Uri' #: Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. - thumb: 'string_formats.Uri' #: Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. + fullsize: string_formats.Uri #: Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. + thumb: string_formats.Uri #: Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. aspect_ratio: t.Optional['models.AppBskyEmbedDefs.AspectRatio'] = None #: Aspect ratio. py_type: t.Literal['app.bsky.embed.images#viewImage'] = Field( diff --git a/packages/atproto_client/models/app/bsky/embed/record.py b/packages/atproto_client/models/app/bsky/embed/record.py index dd50b421..52ab5250 100644 --- a/packages/atproto_client/models/app/bsky/embed/record.py +++ b/packages/atproto_client/models/app/bsky/embed/record.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -51,9 +52,9 @@ class ViewRecord(base.ModelBase): """Definition model for :obj:`app.bsky.embed.record`.""" author: 'models.AppBskyActorDefs.ProfileViewBasic' #: Author. - cid: 'string_formats.Cid' #: Cid. - indexed_at: 'string_formats.DateTime' #: Indexed at. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + indexed_at: string_formats.DateTime #: Indexed at. + uri: string_formats.AtUri #: Uri. value: 'UnknownType' #: The record data itself. embeds: t.Optional[ t.List[ @@ -84,7 +85,7 @@ class ViewNotFound(base.ModelBase): """Definition model for :obj:`app.bsky.embed.record`.""" not_found: bool = Field(frozen=True) #: Not found. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.embed.record#viewNotFound'] = Field( default='app.bsky.embed.record#viewNotFound', alias='$type', frozen=True @@ -96,7 +97,7 @@ class ViewBlocked(base.ModelBase): author: 'models.AppBskyFeedDefs.BlockedAuthor' #: Author. blocked: bool = Field(frozen=True) #: Blocked. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.embed.record#viewBlocked'] = Field( default='app.bsky.embed.record#viewBlocked', alias='$type', frozen=True @@ -107,7 +108,7 @@ class ViewDetached(base.ModelBase): """Definition model for :obj:`app.bsky.embed.record`.""" detached: bool = Field(frozen=True) #: Detached. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.embed.record#viewDetached'] = Field( default='app.bsky.embed.record#viewDetached', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/embed/video.py b/packages/atproto_client/models/app/bsky/embed/video.py index 525b9d41..9e04629c 100644 --- a/packages/atproto_client/models/app/bsky/embed/video.py +++ b/packages/atproto_client/models/app/bsky/embed/video.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -33,7 +34,7 @@ class Caption(base.ModelBase): """Definition model for :obj:`app.bsky.embed.video`.""" file: 'BlobRef' #: File. - lang: 'string_formats.Language' #: Lang. + lang: string_formats.Language #: Lang. py_type: t.Literal['app.bsky.embed.video#caption'] = Field( default='app.bsky.embed.video#caption', alias='$type', frozen=True @@ -43,11 +44,11 @@ class Caption(base.ModelBase): class View(base.ModelBase): """Definition model for :obj:`app.bsky.embed.video`.""" - cid: 'string_formats.Cid' #: Cid. - playlist: 'string_formats.Uri' #: Playlist. + cid: string_formats.Cid #: Cid. + playlist: string_formats.Uri #: Playlist. alt: t.Optional[str] = Field(default=None, max_length=10000) #: Alt. aspect_ratio: t.Optional['models.AppBskyEmbedDefs.AspectRatio'] = None #: Aspect ratio. - thumbnail: t.Optional['string_formats.Uri'] = None #: Thumbnail. + thumbnail: t.Optional[string_formats.Uri] = None #: Thumbnail. py_type: t.Literal['app.bsky.embed.video#view'] = Field( default='app.bsky.embed.video#view', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/feed/defs.py b/packages/atproto_client/models/app/bsky/feed/defs.py index 11bc0e27..402f392a 100644 --- a/packages/atproto_client/models/app/bsky/feed/defs.py +++ b/packages/atproto_client/models/app/bsky/feed/defs.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -21,10 +22,10 @@ class PostView(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" author: 'models.AppBskyActorDefs.ProfileViewBasic' #: Author. - cid: 'string_formats.Cid' #: Cid. - indexed_at: 'string_formats.DateTime' #: Indexed at. + cid: string_formats.Cid #: Cid. + indexed_at: string_formats.DateTime #: Indexed at. record: 'UnknownType' #: Record. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. embed: t.Optional[ te.Annotated[ t.Union[ @@ -54,10 +55,10 @@ class ViewerState(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`. Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.""" embedding_disabled: t.Optional[bool] = None #: Embedding disabled. - like: t.Optional['string_formats.AtUri'] = None #: Like. + like: t.Optional[string_formats.AtUri] = None #: Like. pinned: t.Optional[bool] = None #: Pinned. reply_disabled: t.Optional[bool] = None #: Reply disabled. - repost: t.Optional['string_formats.AtUri'] = None #: Repost. + repost: t.Optional[string_formats.AtUri] = None #: Repost. thread_muted: t.Optional[bool] = None #: Thread muted. py_type: t.Literal['app.bsky.feed.defs#viewerState'] = Field( @@ -117,7 +118,7 @@ class ReasonRepost(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" by: 'models.AppBskyActorDefs.ProfileViewBasic' #: By. - indexed_at: 'string_formats.DateTime' #: Indexed at. + indexed_at: string_formats.DateTime #: Indexed at. py_type: t.Literal['app.bsky.feed.defs#reasonRepost'] = Field( default='app.bsky.feed.defs#reasonRepost', alias='$type', frozen=True @@ -168,7 +169,7 @@ class NotFoundPost(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" not_found: bool = Field(frozen=True) #: Not found. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.feed.defs#notFoundPost'] = Field( default='app.bsky.feed.defs#notFoundPost', alias='$type', frozen=True @@ -180,7 +181,7 @@ class BlockedPost(base.ModelBase): author: 'models.AppBskyFeedDefs.BlockedAuthor' #: Author. blocked: bool = Field(frozen=True) #: Blocked. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.feed.defs#blockedPost'] = Field( default='app.bsky.feed.defs#blockedPost', alias='$type', frozen=True @@ -190,7 +191,7 @@ class BlockedPost(base.ModelBase): class BlockedAuthor(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. viewer: t.Optional['models.AppBskyActorDefs.ViewerState'] = None #: Viewer. py_type: t.Literal['app.bsky.feed.defs#blockedAuthor'] = Field( @@ -201,14 +202,14 @@ class BlockedAuthor(base.ModelBase): class GeneratorView(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileView' #: Creator. - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. display_name: str #: Display name. - indexed_at: 'string_formats.DateTime' #: Indexed at. - uri: 'string_formats.AtUri' #: Uri. + indexed_at: string_formats.DateTime #: Indexed at. + uri: string_formats.AtUri #: Uri. accepts_interactions: t.Optional[bool] = None #: Accepts interactions. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. description: t.Optional[str] = Field(default=None, max_length=3000) #: Description. description_facets: t.Optional[t.List['models.AppBskyRichtextFacet.Main']] = None #: Description facets. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. @@ -223,7 +224,7 @@ class GeneratorView(base.ModelBase): class GeneratorViewerState(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - like: t.Optional['string_formats.AtUri'] = None #: Like. + like: t.Optional[string_formats.AtUri] = None #: Like. py_type: t.Literal['app.bsky.feed.defs#generatorViewerState'] = Field( default='app.bsky.feed.defs#generatorViewerState', alias='$type', frozen=True @@ -233,7 +234,7 @@ class GeneratorViewerState(base.ModelBase): class SkeletonFeedPost(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - post: 'string_formats.AtUri' #: Post. + post: string_formats.AtUri #: Post. feed_context: t.Optional[str] = Field( default=None, max_length=2000 ) #: Context that will be passed through to client and may be passed to feed generator back alongside interactions. @@ -252,7 +253,7 @@ class SkeletonFeedPost(base.ModelBase): class SkeletonReasonRepost(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - repost: 'string_formats.AtUri' #: Repost. + repost: string_formats.AtUri #: Repost. py_type: t.Literal['app.bsky.feed.defs#skeletonReasonRepost'] = Field( default='app.bsky.feed.defs#skeletonReasonRepost', alias='$type', frozen=True @@ -270,10 +271,10 @@ class SkeletonReasonPin(base.ModelBase): class ThreadgateView(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" - cid: t.Optional['string_formats.Cid'] = None #: Cid. + cid: t.Optional[string_formats.Cid] = None #: Cid. lists: t.Optional[t.List['models.AppBskyGraphDefs.ListViewBasic']] = None #: Lists. record: t.Optional['UnknownType'] = None #: Record. - uri: t.Optional['string_formats.AtUri'] = None #: Uri. + uri: t.Optional[string_formats.AtUri] = None #: Uri. py_type: t.Literal['app.bsky.feed.defs#threadgateView'] = Field( default='app.bsky.feed.defs#threadgateView', alias='$type', frozen=True @@ -303,7 +304,7 @@ class Interaction(base.ModelBase): feed_context: t.Optional[str] = Field( default=None, max_length=2000 ) #: Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. - item: t.Optional['string_formats.AtUri'] = None #: Item. + item: t.Optional[string_formats.AtUri] = None #: Item. py_type: t.Literal['app.bsky.feed.defs#interaction'] = Field( default='app.bsky.feed.defs#interaction', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/feed/describe_feed_generator.py b/packages/atproto_client/models/app/bsky/feed/describe_feed_generator.py index ba3b284a..331c55d5 100644 --- a/packages/atproto_client/models/app/bsky/feed/describe_feed_generator.py +++ b/packages/atproto_client/models/app/bsky/feed/describe_feed_generator.py @@ -9,16 +9,17 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Response(base.ResponseModelBase): """Output data model for :obj:`app.bsky.feed.describeFeedGenerator`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. feeds: t.List['models.AppBskyFeedDescribeFeedGenerator.Feed'] #: Feeds. links: t.Optional['models.AppBskyFeedDescribeFeedGenerator.Links'] = None #: Links. @@ -26,7 +27,7 @@ class Response(base.ResponseModelBase): class Feed(base.ModelBase): """Definition model for :obj:`app.bsky.feed.describeFeedGenerator`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.feed.describeFeedGenerator#feed'] = Field( default='app.bsky.feed.describeFeedGenerator#feed', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/feed/generator.py b/packages/atproto_client/models/app/bsky/feed/generator.py index 84d58c2b..8dd900f1 100644 --- a/packages/atproto_client/models/app/bsky/feed/generator.py +++ b/packages/atproto_client/models/app/bsky/feed/generator.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -20,8 +21,8 @@ class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.generator`.""" - created_at: 'string_formats.DateTime' #: Created at. - did: 'string_formats.Did' #: Did. + created_at: string_formats.DateTime #: Created at. + did: string_formats.Did #: Did. display_name: str = Field(max_length=240) #: Display name. accepts_interactions: t.Optional[bool] = ( None #: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions. diff --git a/packages/atproto_client/models/app/bsky/feed/get_actor_feeds.py b/packages/atproto_client/models/app/bsky/feed/get_actor_feeds.py index 421e8872..4dcebb43 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_actor_feeds.py +++ b/packages/atproto_client/models/app/bsky/feed/get_actor_feeds.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getActorFeeds`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/feed/get_actor_likes.py b/packages/atproto_client/models/app/bsky/feed/get_actor_likes.py index a61e4a55..77ac3a4d 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_actor_likes.py +++ b/packages/atproto_client/models/app/bsky/feed/get_actor_likes.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getActorLikes`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/feed/get_author_feed.py b/packages/atproto_client/models/app/bsky/feed/get_author_feed.py index 9a6c196d..14033c04 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_author_feed.py +++ b/packages/atproto_client/models/app/bsky/feed/get_author_feed.py @@ -10,16 +10,17 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getAuthorFeed`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. filter: t.Optional[ t.Union[ @@ -35,7 +36,7 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. filter: te.NotRequired[ t.Optional[ diff --git a/packages/atproto_client/models/app/bsky/feed/get_feed.py b/packages/atproto_client/models/app/bsky/feed/get_feed.py index 39bbc431..35968bcf 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_feed.py +++ b/packages/atproto_client/models/app/bsky/feed/get_feed.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getFeed`.""" - feed: 'string_formats.AtUri' #: Feed. + feed: string_formats.AtUri #: Feed. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - feed: 'string_formats.AtUri' #: Feed. + feed: string_formats.AtUri #: Feed. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/feed/get_feed_generator.py b/packages/atproto_client/models/app/bsky/feed/get_feed_generator.py index 57c9d200..499c8677 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_feed_generator.py +++ b/packages/atproto_client/models/app/bsky/feed/get_feed_generator.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getFeedGenerator`.""" - feed: 'string_formats.AtUri' #: AT-URI of the feed generator record. + feed: string_formats.AtUri #: AT-URI of the feed generator record. class ParamsDict(t.TypedDict): - feed: 'string_formats.AtUri' #: AT-URI of the feed generator record. + feed: string_formats.AtUri #: AT-URI of the feed generator record. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/feed/get_feed_generators.py b/packages/atproto_client/models/app/bsky/feed/get_feed_generators.py index b1b876b9..ff549f58 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_feed_generators.py +++ b/packages/atproto_client/models/app/bsky/feed/get_feed_generators.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getFeedGenerators`.""" - feeds: t.List['string_formats.AtUri'] #: Feeds. + feeds: t.List[string_formats.AtUri] #: Feeds. class ParamsDict(t.TypedDict): - feeds: t.List['string_formats.AtUri'] #: Feeds. + feeds: t.List[string_formats.AtUri] #: Feeds. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/feed/get_feed_skeleton.py b/packages/atproto_client/models/app/bsky/feed/get_feed_skeleton.py index 862e603d..59770f5e 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_feed_skeleton.py +++ b/packages/atproto_client/models/app/bsky/feed/get_feed_skeleton.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getFeedSkeleton`.""" - feed: 'string_formats.AtUri' #: Reference to feed generator record describing the specific feed being requested. + feed: string_formats.AtUri #: Reference to feed generator record describing the specific feed being requested. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - feed: 'string_formats.AtUri' #: Reference to feed generator record describing the specific feed being requested. + feed: string_formats.AtUri #: Reference to feed generator record describing the specific feed being requested. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/feed/get_likes.py b/packages/atproto_client/models/app/bsky/feed/get_likes.py index 858c716a..a815650f 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_likes.py +++ b/packages/atproto_client/models/app/bsky/feed/get_likes.py @@ -10,17 +10,18 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getLikes`.""" - uri: 'string_formats.AtUri' #: AT-URI of the subject (eg, a post record). - cid: t.Optional['string_formats.Cid'] = ( + uri: string_formats.AtUri #: AT-URI of the subject (eg, a post record). + cid: t.Optional[string_formats.Cid] = ( None #: CID of the subject record (aka, specific version of record), to filter likes. ) cursor: t.Optional[str] = None #: Cursor. @@ -28,9 +29,9 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - uri: 'string_formats.AtUri' #: AT-URI of the subject (eg, a post record). + uri: string_formats.AtUri #: AT-URI of the subject (eg, a post record). cid: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: CID of the subject record (aka, specific version of record), to filter likes. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. @@ -40,8 +41,8 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`app.bsky.feed.getLikes`.""" likes: t.List['models.AppBskyFeedGetLikes.Like'] #: Likes. - uri: 'string_formats.AtUri' #: Uri. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + uri: string_formats.AtUri #: Uri. + cid: t.Optional[string_formats.Cid] = None #: Cid. cursor: t.Optional[str] = None #: Cursor. @@ -49,8 +50,8 @@ class Like(base.ModelBase): """Definition model for :obj:`app.bsky.feed.getLikes`.""" actor: 'models.AppBskyActorDefs.ProfileView' #: Actor. - created_at: 'string_formats.DateTime' #: Created at. - indexed_at: 'string_formats.DateTime' #: Indexed at. + created_at: string_formats.DateTime #: Created at. + indexed_at: string_formats.DateTime #: Indexed at. py_type: t.Literal['app.bsky.feed.getLikes#like'] = Field( default='app.bsky.feed.getLikes#like', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/feed/get_list_feed.py b/packages/atproto_client/models/app/bsky/feed/get_list_feed.py index 24bb143b..1ae01ff4 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_list_feed.py +++ b/packages/atproto_client/models/app/bsky/feed/get_list_feed.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getListFeed`.""" - list: 'string_formats.AtUri' #: Reference (AT-URI) to the list record. + list: string_formats.AtUri #: Reference (AT-URI) to the list record. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - list: 'string_formats.AtUri' #: Reference (AT-URI) to the list record. + list: string_formats.AtUri #: Reference (AT-URI) to the list record. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/feed/get_post_thread.py b/packages/atproto_client/models/app/bsky/feed/get_post_thread.py index e983c3a1..6663c527 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_post_thread.py +++ b/packages/atproto_client/models/app/bsky/feed/get_post_thread.py @@ -10,16 +10,17 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getPostThread`.""" - uri: 'string_formats.AtUri' #: Reference (AT-URI) to post record. + uri: string_formats.AtUri #: Reference (AT-URI) to post record. depth: t.Optional[int] = Field( default=6, ge=0, le=1000 ) #: How many levels of reply depth should be included in response. @@ -29,7 +30,7 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - uri: 'string_formats.AtUri' #: Reference (AT-URI) to post record. + uri: string_formats.AtUri #: Reference (AT-URI) to post record. depth: te.NotRequired[t.Optional[int]] #: How many levels of reply depth should be included in response. parent_height: te.NotRequired[t.Optional[int]] #: How many levels of parent (and grandparent, etc) post to include. diff --git a/packages/atproto_client/models/app/bsky/feed/get_posts.py b/packages/atproto_client/models/app/bsky/feed/get_posts.py index 12131dcf..daee350d 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_posts.py +++ b/packages/atproto_client/models/app/bsky/feed/get_posts.py @@ -9,20 +9,21 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getPosts`.""" - uris: t.List['string_formats.AtUri'] = Field(max_length=25) #: List of post AT-URIs to return hydrated views for. + uris: t.List[string_formats.AtUri] = Field(max_length=25) #: List of post AT-URIs to return hydrated views for. class ParamsDict(t.TypedDict): - uris: t.List['string_formats.AtUri'] #: List of post AT-URIs to return hydrated views for. + uris: t.List[string_formats.AtUri] #: List of post AT-URIs to return hydrated views for. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/feed/get_quotes.py b/packages/atproto_client/models/app/bsky/feed/get_quotes.py index db2eefa2..fad47d65 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_quotes.py +++ b/packages/atproto_client/models/app/bsky/feed/get_quotes.py @@ -10,17 +10,18 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getQuotes`.""" - uri: 'string_formats.AtUri' #: Reference (AT-URI) of post record. - cid: t.Optional['string_formats.Cid'] = ( + uri: string_formats.AtUri #: Reference (AT-URI) of post record. + cid: t.Optional[string_formats.Cid] = ( None #: If supplied, filters to quotes of specific version (by CID) of the post record. ) cursor: t.Optional[str] = None #: Cursor. @@ -28,9 +29,9 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - uri: 'string_formats.AtUri' #: Reference (AT-URI) of post record. + uri: string_formats.AtUri #: Reference (AT-URI) of post record. cid: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: If supplied, filters to quotes of specific version (by CID) of the post record. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. @@ -40,6 +41,6 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`app.bsky.feed.getQuotes`.""" posts: t.List['models.AppBskyFeedDefs.PostView'] #: Posts. - uri: 'string_formats.AtUri' #: Uri. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + uri: string_formats.AtUri #: Uri. + cid: t.Optional[string_formats.Cid] = None #: Cid. cursor: t.Optional[str] = None #: Cursor. diff --git a/packages/atproto_client/models/app/bsky/feed/get_reposted_by.py b/packages/atproto_client/models/app/bsky/feed/get_reposted_by.py index 96b3ef62..5402c168 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_reposted_by.py +++ b/packages/atproto_client/models/app/bsky/feed/get_reposted_by.py @@ -10,17 +10,18 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.getRepostedBy`.""" - uri: 'string_formats.AtUri' #: Reference (AT-URI) of post record. - cid: t.Optional['string_formats.Cid'] = ( + uri: string_formats.AtUri #: Reference (AT-URI) of post record. + cid: t.Optional[string_formats.Cid] = ( None #: If supplied, filters to reposts of specific version (by CID) of the post record. ) cursor: t.Optional[str] = None #: Cursor. @@ -28,9 +29,9 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - uri: 'string_formats.AtUri' #: Reference (AT-URI) of post record. + uri: string_formats.AtUri #: Reference (AT-URI) of post record. cid: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: If supplied, filters to reposts of specific version (by CID) of the post record. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. @@ -40,6 +41,6 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`app.bsky.feed.getRepostedBy`.""" reposted_by: t.List['models.AppBskyActorDefs.ProfileView'] #: Reposted by. - uri: 'string_formats.AtUri' #: Uri. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + uri: string_formats.AtUri #: Uri. + cid: t.Optional[string_formats.Cid] = None #: Cid. cursor: t.Optional[str] = None #: Cursor. diff --git a/packages/atproto_client/models/app/bsky/feed/like.py b/packages/atproto_client/models/app/bsky/feed/like.py index 9c056a73..63ad1b72 100644 --- a/packages/atproto_client/models/app/bsky/feed/like.py +++ b/packages/atproto_client/models/app/bsky/feed/like.py @@ -9,16 +9,17 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.like`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. subject: 'models.ComAtprotoRepoStrongRef.Main' #: Subject. py_type: t.Literal['app.bsky.feed.like'] = Field(default='app.bsky.feed.like', alias='$type', frozen=True) diff --git a/packages/atproto_client/models/app/bsky/feed/post.py b/packages/atproto_client/models/app/bsky/feed/post.py index f133b076..278b6ec1 100644 --- a/packages/atproto_client/models/app/bsky/feed/post.py +++ b/packages/atproto_client/models/app/bsky/feed/post.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -53,7 +54,7 @@ class TextSlice(base.ModelBase): class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.post`.""" - created_at: 'string_formats.DateTime' #: Client-declared timestamp when this post was originally created. + created_at: string_formats.DateTime #: Client-declared timestamp when this post was originally created. text: str = Field(max_length=3000) #: The primary post content. May be an empty string, if there are embeds. embed: t.Optional[ te.Annotated[ @@ -76,7 +77,7 @@ class Record(base.RecordModelBase): labels: t.Optional[ te.Annotated[t.Union['models.ComAtprotoLabelDefs.SelfLabels'], Field(default=None, discriminator='py_type')] ] = None #: Self-label values for this post. Effectively content warnings. - langs: t.Optional[t.List['string_formats.Language']] = Field( + langs: t.Optional[t.List[string_formats.Language]] = Field( default=None, max_length=3 ) #: Indicates human language of post primary text content. reply: t.Optional['models.AppBskyFeedPost.ReplyRef'] = None #: Reply. diff --git a/packages/atproto_client/models/app/bsky/feed/postgate.py b/packages/atproto_client/models/app/bsky/feed/postgate.py index bd6cb679..f6367ff6 100644 --- a/packages/atproto_client/models/app/bsky/feed/postgate.py +++ b/packages/atproto_client/models/app/bsky/feed/postgate.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -27,9 +28,9 @@ class DisableRule(base.ModelBase): class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.postgate`.""" - created_at: 'string_formats.DateTime' #: Created at. - post: 'string_formats.AtUri' #: Reference (AT-URI) to the post record. - detached_embedding_uris: t.Optional[t.List['string_formats.AtUri']] = Field( + created_at: string_formats.DateTime #: Created at. + post: string_formats.AtUri #: Reference (AT-URI) to the post record. + detached_embedding_uris: t.Optional[t.List[string_formats.AtUri]] = Field( default=None, max_length=50 ) #: List of AT-URIs embedding this post that the author has detached from. embedding_rules: t.Optional[ diff --git a/packages/atproto_client/models/app/bsky/feed/repost.py b/packages/atproto_client/models/app/bsky/feed/repost.py index 74ecd70b..f20ce983 100644 --- a/packages/atproto_client/models/app/bsky/feed/repost.py +++ b/packages/atproto_client/models/app/bsky/feed/repost.py @@ -9,16 +9,17 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.repost`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. subject: 'models.ComAtprotoRepoStrongRef.Main' #: Subject. py_type: t.Literal['app.bsky.feed.repost'] = Field(default='app.bsky.feed.repost', alias='$type', frozen=True) diff --git a/packages/atproto_client/models/app/bsky/feed/search_posts.py b/packages/atproto_client/models/app/bsky/feed/search_posts.py index 2036dbbe..8bce0f7e 100644 --- a/packages/atproto_client/models/app/bsky/feed/search_posts.py +++ b/packages/atproto_client/models/app/bsky/feed/search_posts.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,7 +21,7 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.feed.searchPosts`.""" q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. - author: t.Optional['string_formats.Handle'] = ( + author: t.Optional[string_formats.Handle] = ( None #: Filter to posts by the given account. Handles are resolved to DID before query-time. ) cursor: t.Optional[str] = ( @@ -29,11 +30,11 @@ class Params(base.ParamsModelBase): domain: t.Optional[str] = ( None #: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. ) - lang: t.Optional['string_formats.Language'] = ( + lang: t.Optional[string_formats.Language] = ( None #: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. ) limit: t.Optional[int] = Field(default=25, ge=1, le=100) #: Limit. - mentions: t.Optional['string_formats.Handle'] = ( + mentions: t.Optional[string_formats.Handle] = ( None #: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. ) since: t.Optional[str] = ( @@ -48,7 +49,7 @@ class Params(base.ParamsModelBase): until: t.Optional[str] = ( None #: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). ) - url: t.Optional['string_formats.Uri'] = ( + url: t.Optional[string_formats.Uri] = ( None #: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. ) @@ -56,7 +57,7 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. author: te.NotRequired[ - t.Optional['string_formats.Handle'] + t.Optional[string_formats.Handle] ] #: Filter to posts by the given account. Handles are resolved to DID before query-time. cursor: te.NotRequired[ t.Optional[str] @@ -65,11 +66,11 @@ class ParamsDict(t.TypedDict): t.Optional[str] ] #: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. lang: te.NotRequired[ - t.Optional['string_formats.Language'] + t.Optional[string_formats.Language] ] #: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. limit: te.NotRequired[t.Optional[int]] #: Limit. mentions: te.NotRequired[ - t.Optional['string_formats.Handle'] + t.Optional[string_formats.Handle] ] #: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. since: te.NotRequired[ t.Optional[str] @@ -84,7 +85,7 @@ class ParamsDict(t.TypedDict): t.Optional[str] ] #: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). url: te.NotRequired[ - t.Optional['string_formats.Uri'] + t.Optional[string_formats.Uri] ] #: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. diff --git a/packages/atproto_client/models/app/bsky/feed/threadgate.py b/packages/atproto_client/models/app/bsky/feed/threadgate.py index 72d6138e..9f9055a5 100644 --- a/packages/atproto_client/models/app/bsky/feed/threadgate.py +++ b/packages/atproto_client/models/app/bsky/feed/threadgate.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -35,7 +36,7 @@ class FollowingRule(base.ModelBase): class ListRule(base.ModelBase): """Definition model for :obj:`app.bsky.feed.threadgate`. Allow replies from actors on a list.""" - list: 'string_formats.AtUri' #: List. + list: string_formats.AtUri #: List. py_type: t.Literal['app.bsky.feed.threadgate#listRule'] = Field( default='app.bsky.feed.threadgate#listRule', alias='$type', frozen=True @@ -45,8 +46,8 @@ class ListRule(base.ModelBase): class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.feed.threadgate`.""" - created_at: 'string_formats.DateTime' #: Created at. - post: 'string_formats.AtUri' #: Reference (AT-URI) to the post record. + created_at: string_formats.DateTime #: Created at. + post: string_formats.AtUri #: Reference (AT-URI) to the post record. allow: t.Optional[ t.List[ te.Annotated[ @@ -59,7 +60,7 @@ class Record(base.RecordModelBase): ] ] ] = Field(default=None, max_length=5) #: Allow. - hidden_replies: t.Optional[t.List['string_formats.AtUri']] = Field( + hidden_replies: t.Optional[t.List[string_formats.AtUri]] = Field( default=None, max_length=50 ) #: List of hidden reply URIs. diff --git a/packages/atproto_client/models/app/bsky/graph/block.py b/packages/atproto_client/models/app/bsky/graph/block.py index 1505bc99..cce95d96 100644 --- a/packages/atproto_client/models/app/bsky/graph/block.py +++ b/packages/atproto_client/models/app/bsky/graph/block.py @@ -9,17 +9,18 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.block`.""" - created_at: 'string_formats.DateTime' #: Created at. - subject: 'string_formats.Did' #: DID of the account to be blocked. + created_at: string_formats.DateTime #: Created at. + subject: string_formats.Did #: DID of the account to be blocked. py_type: t.Literal['app.bsky.graph.block'] = Field(default='app.bsky.graph.block', 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 eb929212..4390cf71 100644 --- a/packages/atproto_client/models/app/bsky/graph/defs.py +++ b/packages/atproto_client/models/app/bsky/graph/defs.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -19,12 +20,12 @@ class ListViewBasic(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. name: str = Field(min_length=1, max_length=64) #: Name. purpose: 'models.AppBskyGraphDefs.ListPurpose' #: Purpose. - uri: 'string_formats.AtUri' #: Uri. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. - indexed_at: t.Optional['string_formats.DateTime'] = None #: Indexed at. + uri: string_formats.AtUri #: Uri. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. + indexed_at: t.Optional[string_formats.DateTime] = None #: Indexed at. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. list_item_count: t.Optional[int] = Field(default=None, ge=0) #: List item count. viewer: t.Optional['models.AppBskyGraphDefs.ListViewerState'] = None #: Viewer. @@ -37,13 +38,13 @@ class ListViewBasic(base.ModelBase): class ListView(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileView' #: Creator. - indexed_at: 'string_formats.DateTime' #: Indexed at. + indexed_at: string_formats.DateTime #: Indexed at. name: str = Field(min_length=1, max_length=64) #: Name. purpose: 'models.AppBskyGraphDefs.ListPurpose' #: Purpose. - uri: 'string_formats.AtUri' #: Uri. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. + uri: string_formats.AtUri #: Uri. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. description: t.Optional[str] = Field(default=None, max_length=3000) #: Description. description_facets: t.Optional[t.List['models.AppBskyRichtextFacet.Main']] = None #: Description facets. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. @@ -59,7 +60,7 @@ class ListItemView(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" subject: 'models.AppBskyActorDefs.ProfileView' #: Subject. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.graph.defs#listItemView'] = Field( default='app.bsky.graph.defs#listItemView', alias='$type', frozen=True @@ -69,11 +70,11 @@ class ListItemView(base.ModelBase): class StarterPackView(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileViewBasic' #: Creator. - indexed_at: 'string_formats.DateTime' #: Indexed at. + indexed_at: string_formats.DateTime #: Indexed at. record: 'UnknownType' #: Record. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. feeds: t.Optional[t.List['models.AppBskyFeedDefs.GeneratorView']] = Field(default=None, max_length=3) #: Feeds. joined_all_time_count: t.Optional[int] = Field(default=None, ge=0) #: Joined all time count. joined_week_count: t.Optional[int] = Field(default=None, ge=0) #: Joined week count. @@ -91,11 +92,11 @@ class StarterPackView(base.ModelBase): class StarterPackViewBasic(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileViewBasic' #: Creator. - indexed_at: 'string_formats.DateTime' #: Indexed at. + indexed_at: string_formats.DateTime #: Indexed at. record: 'UnknownType' #: Record. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. joined_all_time_count: t.Optional[int] = Field(default=None, ge=0) #: Joined all time count. joined_week_count: t.Optional[int] = Field(default=None, ge=0) #: Joined week count. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. @@ -129,7 +130,7 @@ class StarterPackViewBasic(base.ModelBase): class ListViewerState(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`.""" - blocked: t.Optional['string_formats.AtUri'] = None #: Blocked. + blocked: t.Optional[string_formats.AtUri] = None #: Blocked. muted: t.Optional[bool] = None #: Muted. py_type: t.Literal['app.bsky.graph.defs#listViewerState'] = Field( @@ -140,7 +141,7 @@ class ListViewerState(base.ModelBase): class NotFoundActor(base.ModelBase): """Definition model for :obj:`app.bsky.graph.defs`. indicates that a handle or DID could not be resolved.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. not_found: bool = Field(frozen=True) #: Not found. py_type: t.Literal['app.bsky.graph.defs#notFoundActor'] = Field( @@ -151,11 +152,11 @@ class NotFoundActor(base.ModelBase): 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: 'string_formats.Did' #: Did. - followed_by: t.Optional['string_formats.AtUri'] = ( + did: string_formats.Did #: Did. + followed_by: t.Optional[string_formats.AtUri] = ( None #: if the actor is followed by this DID, contains the AT-URI of the follow record. ) - following: t.Optional['string_formats.AtUri'] = ( + following: t.Optional[string_formats.AtUri] = ( None #: if the actor follows this DID, this is the AT-URI of the follow record. ) diff --git a/packages/atproto_client/models/app/bsky/graph/follow.py b/packages/atproto_client/models/app/bsky/graph/follow.py index 5c72d895..c84c9dba 100644 --- a/packages/atproto_client/models/app/bsky/graph/follow.py +++ b/packages/atproto_client/models/app/bsky/graph/follow.py @@ -9,17 +9,18 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.follow`.""" - created_at: 'string_formats.DateTime' #: Created at. - subject: 'string_formats.Did' #: Subject. + created_at: string_formats.DateTime #: Created at. + subject: string_formats.Did #: Subject. py_type: t.Literal['app.bsky.graph.follow'] = Field(default='app.bsky.graph.follow', alias='$type', frozen=True) diff --git a/packages/atproto_client/models/app/bsky/graph/get_actor_starter_packs.py b/packages/atproto_client/models/app/bsky/graph/get_actor_starter_packs.py index 3c39d9f8..567e54f4 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_actor_starter_packs.py +++ b/packages/atproto_client/models/app/bsky/graph/get_actor_starter_packs.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getActorStarterPacks`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_followers.py b/packages/atproto_client/models/app/bsky/graph/get_followers.py index 1b92ea64..550c4702 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_followers.py +++ b/packages/atproto_client/models/app/bsky/graph/get_followers.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getFollowers`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_follows.py b/packages/atproto_client/models/app/bsky/graph/get_follows.py index 699dc7ca..794174c2 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_follows.py +++ b/packages/atproto_client/models/app/bsky/graph/get_follows.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getFollows`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_known_followers.py b/packages/atproto_client/models/app/bsky/graph/get_known_followers.py index a8eb9c2f..ddb75a55 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_known_followers.py +++ b/packages/atproto_client/models/app/bsky/graph/get_known_followers.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getKnownFollowers`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_list.py b/packages/atproto_client/models/app/bsky/graph/get_list.py index 88ca6ec2..4d43a0ff 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_list.py +++ b/packages/atproto_client/models/app/bsky/graph/get_list.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getList`.""" - list: 'string_formats.AtUri' #: Reference (AT-URI) of the list record to hydrate. + list: string_formats.AtUri #: Reference (AT-URI) of the list record to hydrate. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - list: 'string_formats.AtUri' #: Reference (AT-URI) of the list record to hydrate. + list: string_formats.AtUri #: Reference (AT-URI) of the list record to hydrate. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_lists.py b/packages/atproto_client/models/app/bsky/graph/get_lists.py index ca94cefa..ad09db12 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_lists.py +++ b/packages/atproto_client/models/app/bsky/graph/get_lists.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getLists`.""" - actor: 'string_formats.Handle' #: The account (actor) to enumerate lists from. + actor: string_formats.Handle #: The account (actor) to enumerate lists from. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: The account (actor) to enumerate lists from. + actor: string_formats.Handle #: The account (actor) to enumerate lists from. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/app/bsky/graph/get_relationships.py b/packages/atproto_client/models/app/bsky/graph/get_relationships.py index 7d4bfa21..48ce0a80 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_relationships.py +++ b/packages/atproto_client/models/app/bsky/graph/get_relationships.py @@ -10,25 +10,26 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getRelationships`.""" - actor: 'string_formats.Handle' #: Primary account requesting relationships for. - others: t.Optional[t.List['string_formats.Handle']] = Field( + actor: string_formats.Handle #: Primary account requesting relationships for. + others: t.Optional[t.List[string_formats.Handle]] = Field( default=None, max_length=30 ) #: List of 'other' accounts to be related back to the primary. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Primary account requesting relationships for. + actor: string_formats.Handle #: Primary account requesting relationships for. others: te.NotRequired[ - t.Optional[t.List['string_formats.Handle']] + t.Optional[t.List[string_formats.Handle]] ] #: List of 'other' accounts to be related back to the primary. @@ -41,4 +42,4 @@ class Response(base.ResponseModelBase): Field(discriminator='py_type'), ] ] #: Relationships. - actor: t.Optional['string_formats.Did'] = None #: Actor. + actor: t.Optional[string_formats.Did] = None #: Actor. diff --git a/packages/atproto_client/models/app/bsky/graph/get_starter_pack.py b/packages/atproto_client/models/app/bsky/graph/get_starter_pack.py index 7ceb5d5c..34f2c4b1 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_starter_pack.py +++ b/packages/atproto_client/models/app/bsky/graph/get_starter_pack.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getStarterPack`.""" - starter_pack: 'string_formats.AtUri' #: Reference (AT-URI) of the starter pack record. + starter_pack: string_formats.AtUri #: Reference (AT-URI) of the starter pack record. class ParamsDict(t.TypedDict): - starter_pack: 'string_formats.AtUri' #: Reference (AT-URI) of the starter pack record. + starter_pack: string_formats.AtUri #: Reference (AT-URI) of the starter pack record. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/graph/get_starter_packs.py b/packages/atproto_client/models/app/bsky/graph/get_starter_packs.py index 89881379..3d705d6c 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_starter_packs.py +++ b/packages/atproto_client/models/app/bsky/graph/get_starter_packs.py @@ -9,20 +9,21 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getStarterPacks`.""" - uris: t.List['string_formats.AtUri'] = Field(max_length=25) #: Uris. + uris: t.List[string_formats.AtUri] = Field(max_length=25) #: Uris. class ParamsDict(t.TypedDict): - uris: t.List['string_formats.AtUri'] #: Uris. + uris: t.List[string_formats.AtUri] #: Uris. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/graph/get_suggested_follows_by_actor.py b/packages/atproto_client/models/app/bsky/graph/get_suggested_follows_by_actor.py index 15b415aa..ff4e53df 100644 --- a/packages/atproto_client/models/app/bsky/graph/get_suggested_follows_by_actor.py +++ b/packages/atproto_client/models/app/bsky/graph/get_suggested_follows_by_actor.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.graph.getSuggestedFollowsByActor`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. class ParamsDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/graph/list.py b/packages/atproto_client/models/app/bsky/graph/list.py index c49be225..808b29a5 100644 --- a/packages/atproto_client/models/app/bsky/graph/list.py +++ b/packages/atproto_client/models/app/bsky/graph/list.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -20,7 +21,7 @@ class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.list`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. name: str = Field(min_length=1, max_length=64) #: Display name for list; can not be empty. purpose: 'models.AppBskyGraphDefs.ListPurpose' #: Defines the purpose of the list (aka, moderation-oriented or curration-oriented). avatar: t.Optional['BlobRef'] = None #: Avatar. diff --git a/packages/atproto_client/models/app/bsky/graph/listblock.py b/packages/atproto_client/models/app/bsky/graph/listblock.py index 43fe8c1c..116d6e98 100644 --- a/packages/atproto_client/models/app/bsky/graph/listblock.py +++ b/packages/atproto_client/models/app/bsky/graph/listblock.py @@ -9,17 +9,18 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.listblock`.""" - created_at: 'string_formats.DateTime' #: Created at. - subject: 'string_formats.AtUri' #: Reference (AT-URI) to the mod list record. + created_at: string_formats.DateTime #: Created at. + subject: string_formats.AtUri #: Reference (AT-URI) to the mod list record. py_type: t.Literal['app.bsky.graph.listblock'] = Field( default='app.bsky.graph.listblock', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/graph/listitem.py b/packages/atproto_client/models/app/bsky/graph/listitem.py index 4d69073b..8b446ba1 100644 --- a/packages/atproto_client/models/app/bsky/graph/listitem.py +++ b/packages/atproto_client/models/app/bsky/graph/listitem.py @@ -9,18 +9,19 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.listitem`.""" - created_at: 'string_formats.DateTime' #: Created at. - list: 'string_formats.AtUri' #: Reference (AT-URI) to the list record (app.bsky.graph.list). - subject: 'string_formats.Did' #: The account which is included on the list. + created_at: string_formats.DateTime #: Created at. + list: string_formats.AtUri #: Reference (AT-URI) to the list record (app.bsky.graph.list). + subject: string_formats.Did #: The account which is included on the list. py_type: t.Literal['app.bsky.graph.listitem'] = Field(default='app.bsky.graph.listitem', alias='$type', frozen=True) diff --git a/packages/atproto_client/models/app/bsky/graph/mute_actor.py b/packages/atproto_client/models/app/bsky/graph/mute_actor.py index 022c23e0..a602496e 100644 --- a/packages/atproto_client/models/app/bsky/graph/mute_actor.py +++ b/packages/atproto_client/models/app/bsky/graph/mute_actor.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.muteActor`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. class DataDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. diff --git a/packages/atproto_client/models/app/bsky/graph/mute_actor_list.py b/packages/atproto_client/models/app/bsky/graph/mute_actor_list.py index 1494ba30..ab213a3f 100644 --- a/packages/atproto_client/models/app/bsky/graph/mute_actor_list.py +++ b/packages/atproto_client/models/app/bsky/graph/mute_actor_list.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.muteActorList`.""" - list: 'string_formats.AtUri' #: List. + list: string_formats.AtUri #: List. class DataDict(t.TypedDict): - list: 'string_formats.AtUri' #: List. + list: string_formats.AtUri #: List. diff --git a/packages/atproto_client/models/app/bsky/graph/mute_thread.py b/packages/atproto_client/models/app/bsky/graph/mute_thread.py index dd22e1d0..f432f9d1 100644 --- a/packages/atproto_client/models/app/bsky/graph/mute_thread.py +++ b/packages/atproto_client/models/app/bsky/graph/mute_thread.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.muteThread`.""" - root: 'string_formats.AtUri' #: Root. + root: string_formats.AtUri #: Root. class DataDict(t.TypedDict): - root: 'string_formats.AtUri' #: Root. + root: string_formats.AtUri #: Root. diff --git a/packages/atproto_client/models/app/bsky/graph/starterpack.py b/packages/atproto_client/models/app/bsky/graph/starterpack.py index 4d7296f2..338e1a3c 100644 --- a/packages/atproto_client/models/app/bsky/graph/starterpack.py +++ b/packages/atproto_client/models/app/bsky/graph/starterpack.py @@ -9,16 +9,17 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class FeedItem(base.ModelBase): """Definition model for :obj:`app.bsky.graph.starterpack`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.graph.starterpack#feedItem'] = Field( default='app.bsky.graph.starterpack#feedItem', alias='$type', frozen=True @@ -28,8 +29,8 @@ class FeedItem(base.ModelBase): class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.graph.starterpack`.""" - created_at: 'string_formats.DateTime' #: Created at. - list: 'string_formats.AtUri' #: Reference (AT-URI) to the list record. + created_at: string_formats.DateTime #: Created at. + list: string_formats.AtUri #: Reference (AT-URI) to the list record. name: str = Field(min_length=1, max_length=500) #: Display name for starter pack; can not be empty. description: t.Optional[str] = Field(default=None, max_length=3000) #: Description. description_facets: t.Optional[t.List['models.AppBskyRichtextFacet.Main']] = None #: Description facets. diff --git a/packages/atproto_client/models/app/bsky/graph/unmute_actor.py b/packages/atproto_client/models/app/bsky/graph/unmute_actor.py index 3362c984..c752ee9d 100644 --- a/packages/atproto_client/models/app/bsky/graph/unmute_actor.py +++ b/packages/atproto_client/models/app/bsky/graph/unmute_actor.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.unmuteActor`.""" - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. class DataDict(t.TypedDict): - actor: 'string_formats.Handle' #: Actor. + actor: string_formats.Handle #: Actor. diff --git a/packages/atproto_client/models/app/bsky/graph/unmute_actor_list.py b/packages/atproto_client/models/app/bsky/graph/unmute_actor_list.py index 2e1023b3..a8058e82 100644 --- a/packages/atproto_client/models/app/bsky/graph/unmute_actor_list.py +++ b/packages/atproto_client/models/app/bsky/graph/unmute_actor_list.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.unmuteActorList`.""" - list: 'string_formats.AtUri' #: List. + list: string_formats.AtUri #: List. class DataDict(t.TypedDict): - list: 'string_formats.AtUri' #: List. + list: string_formats.AtUri #: List. diff --git a/packages/atproto_client/models/app/bsky/graph/unmute_thread.py b/packages/atproto_client/models/app/bsky/graph/unmute_thread.py index 555233ae..4115b3ad 100644 --- a/packages/atproto_client/models/app/bsky/graph/unmute_thread.py +++ b/packages/atproto_client/models/app/bsky/graph/unmute_thread.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.graph.unmuteThread`.""" - root: 'string_formats.AtUri' #: Root. + root: string_formats.AtUri #: Root. class DataDict(t.TypedDict): - root: 'string_formats.AtUri' #: Root. + root: string_formats.AtUri #: Root. diff --git a/packages/atproto_client/models/app/bsky/labeler/defs.py b/packages/atproto_client/models/app/bsky/labeler/defs.py index f915c8a8..ec15588e 100644 --- a/packages/atproto_client/models/app/bsky/labeler/defs.py +++ b/packages/atproto_client/models/app/bsky/labeler/defs.py @@ -9,19 +9,20 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class LabelerView(base.ModelBase): """Definition model for :obj:`app.bsky.labeler.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileView' #: Creator. - indexed_at: 'string_formats.DateTime' #: Indexed at. - uri: 'string_formats.AtUri' #: Uri. + indexed_at: string_formats.DateTime #: Indexed at. + uri: string_formats.AtUri #: Uri. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. like_count: t.Optional[int] = Field(default=None, ge=0) #: Like count. viewer: t.Optional['models.AppBskyLabelerDefs.LabelerViewerState'] = None #: Viewer. @@ -34,11 +35,11 @@ class LabelerView(base.ModelBase): class LabelerViewDetailed(base.ModelBase): """Definition model for :obj:`app.bsky.labeler.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. creator: 'models.AppBskyActorDefs.ProfileView' #: Creator. - indexed_at: 'string_formats.DateTime' #: Indexed at. + indexed_at: string_formats.DateTime #: Indexed at. policies: 'models.AppBskyLabelerDefs.LabelerPolicies' #: Policies. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. like_count: t.Optional[int] = Field(default=None, ge=0) #: Like count. viewer: t.Optional['models.AppBskyLabelerDefs.LabelerViewerState'] = None #: Viewer. @@ -51,7 +52,7 @@ class LabelerViewDetailed(base.ModelBase): class LabelerViewerState(base.ModelBase): """Definition model for :obj:`app.bsky.labeler.defs`.""" - like: t.Optional['string_formats.AtUri'] = None #: Like. + like: t.Optional[string_formats.AtUri] = None #: Like. py_type: t.Literal['app.bsky.labeler.defs#labelerViewerState'] = Field( default='app.bsky.labeler.defs#labelerViewerState', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/labeler/get_services.py b/packages/atproto_client/models/app/bsky/labeler/get_services.py index 50fdfcf6..279f4edc 100644 --- a/packages/atproto_client/models/app/bsky/labeler/get_services.py +++ b/packages/atproto_client/models/app/bsky/labeler/get_services.py @@ -10,21 +10,22 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.labeler.getServices`.""" - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. detailed: t.Optional[bool] = False #: Detailed. class ParamsDict(t.TypedDict): - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. detailed: te.NotRequired[t.Optional[bool]] #: Detailed. diff --git a/packages/atproto_client/models/app/bsky/labeler/service.py b/packages/atproto_client/models/app/bsky/labeler/service.py index 05245785..c5798e78 100644 --- a/packages/atproto_client/models/app/bsky/labeler/service.py +++ b/packages/atproto_client/models/app/bsky/labeler/service.py @@ -10,16 +10,17 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Record(base.RecordModelBase): """Record model for :obj:`app.bsky.labeler.service`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. policies: 'models.AppBskyLabelerDefs.LabelerPolicies' #: Policies. labels: t.Optional[ te.Annotated[t.Union['models.ComAtprotoLabelDefs.SelfLabels'], Field(default=None, discriminator='py_type')] diff --git a/packages/atproto_client/models/app/bsky/notification/get_unread_count.py b/packages/atproto_client/models/app/bsky/notification/get_unread_count.py index 1541d953..b8f82098 100644 --- a/packages/atproto_client/models/app/bsky/notification/get_unread_count.py +++ b/packages/atproto_client/models/app/bsky/notification/get_unread_count.py @@ -9,21 +9,19 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.notification.getUnreadCount`.""" priority: t.Optional[bool] = None #: Priority. - seen_at: t.Optional['string_formats.DateTime'] = None #: Seen at. + seen_at: t.Optional[string_formats.DateTime] = None #: Seen at. class ParamsDict(t.TypedDict): priority: te.NotRequired[t.Optional[bool]] #: Priority. - seen_at: te.NotRequired[t.Optional['string_formats.DateTime']] #: Seen at. + seen_at: te.NotRequired[t.Optional[string_formats.DateTime]] #: Seen at. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/app/bsky/notification/list_notifications.py b/packages/atproto_client/models/app/bsky/notification/list_notifications.py index 7b12258f..b0878efc 100644 --- a/packages/atproto_client/models/app/bsky/notification/list_notifications.py +++ b/packages/atproto_client/models/app/bsky/notification/list_notifications.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -23,14 +24,14 @@ class Params(base.ParamsModelBase): cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. priority: t.Optional[bool] = None #: Priority. - seen_at: t.Optional['string_formats.DateTime'] = None #: Seen at. + seen_at: t.Optional[string_formats.DateTime] = None #: Seen at. class ParamsDict(t.TypedDict): cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. priority: te.NotRequired[t.Optional[bool]] #: Priority. - seen_at: te.NotRequired[t.Optional['string_formats.DateTime']] #: Seen at. + seen_at: te.NotRequired[t.Optional[string_formats.DateTime]] #: Seen at. class Response(base.ResponseModelBase): @@ -39,15 +40,15 @@ class Response(base.ResponseModelBase): notifications: t.List['models.AppBskyNotificationListNotifications.Notification'] #: Notifications. cursor: t.Optional[str] = None #: Cursor. priority: t.Optional[bool] = None #: Priority. - seen_at: t.Optional['string_formats.DateTime'] = None #: Seen at. + seen_at: t.Optional[string_formats.DateTime] = None #: Seen at. class Notification(base.ModelBase): """Definition model for :obj:`app.bsky.notification.listNotifications`.""" author: 'models.AppBskyActorDefs.ProfileView' #: Author. - cid: 'string_formats.Cid' #: Cid. - indexed_at: 'string_formats.DateTime' #: Indexed at. + cid: string_formats.Cid #: Cid. + indexed_at: string_formats.DateTime #: Indexed at. is_read: bool #: Is read. reason: t.Union[ t.Literal['like'], @@ -60,9 +61,9 @@ class Notification(base.ModelBase): str, ] #: Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. record: 'UnknownType' #: Record. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. - reason_subject: t.Optional['string_formats.AtUri'] = None #: Reason subject. + reason_subject: t.Optional[string_formats.AtUri] = None #: Reason subject. py_type: t.Literal['app.bsky.notification.listNotifications#notification'] = Field( default='app.bsky.notification.listNotifications#notification', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/notification/register_push.py b/packages/atproto_client/models/app/bsky/notification/register_push.py index 69535740..856f64ac 100644 --- a/packages/atproto_client/models/app/bsky/notification/register_push.py +++ b/packages/atproto_client/models/app/bsky/notification/register_push.py @@ -7,9 +7,7 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): @@ -17,12 +15,12 @@ class Data(base.DataModelBase): app_id: str #: App id. platform: t.Union[t.Literal['ios'], t.Literal['android'], t.Literal['web'], str] #: Platform. - service_did: 'string_formats.Did' #: Service did. + service_did: string_formats.Did #: Service did. token: str #: Token. class DataDict(t.TypedDict): app_id: str #: App id. platform: t.Union[t.Literal['ios'], t.Literal['android'], t.Literal['web'], str] #: Platform. - service_did: 'string_formats.Did' #: Service did. + service_did: string_formats.Did #: Service did. token: str #: Token. diff --git a/packages/atproto_client/models/app/bsky/notification/update_seen.py b/packages/atproto_client/models/app/bsky/notification/update_seen.py index c8445624..04f7c211 100644 --- a/packages/atproto_client/models/app/bsky/notification/update_seen.py +++ b/packages/atproto_client/models/app/bsky/notification/update_seen.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`app.bsky.notification.updateSeen`.""" - seen_at: 'string_formats.DateTime' #: Seen at. + seen_at: string_formats.DateTime #: Seen at. class DataDict(t.TypedDict): - seen_at: 'string_formats.DateTime' #: Seen at. + seen_at: string_formats.DateTime #: Seen at. diff --git a/packages/atproto_client/models/app/bsky/richtext/facet.py b/packages/atproto_client/models/app/bsky/richtext/facet.py index 67e0cc48..10cf957d 100644 --- a/packages/atproto_client/models/app/bsky/richtext/facet.py +++ b/packages/atproto_client/models/app/bsky/richtext/facet.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -37,7 +38,7 @@ class Main(base.ModelBase): class Mention(base.ModelBase): """Definition model for :obj:`app.bsky.richtext.facet`. Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['app.bsky.richtext.facet#mention'] = Field( default='app.bsky.richtext.facet#mention', alias='$type', frozen=True @@ -47,7 +48,7 @@ class Mention(base.ModelBase): class Link(base.ModelBase): """Definition model for :obj:`app.bsky.richtext.facet`. Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.""" - uri: 'string_formats.Uri' #: Uri. + uri: string_formats.Uri #: Uri. py_type: t.Literal['app.bsky.richtext.facet#link'] = Field( default='app.bsky.richtext.facet#link', alias='$type', frozen=True diff --git a/packages/atproto_client/models/app/bsky/unspecced/defs.py b/packages/atproto_client/models/app/bsky/unspecced/defs.py index cc854a42..8f6e4efc 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/defs.py +++ b/packages/atproto_client/models/app/bsky/unspecced/defs.py @@ -9,15 +9,13 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class SkeletonSearchPost(base.ModelBase): """Definition model for :obj:`app.bsky.unspecced.defs`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['app.bsky.unspecced.defs#skeletonSearchPost'] = Field( default='app.bsky.unspecced.defs#skeletonSearchPost', alias='$type', frozen=True @@ -27,7 +25,7 @@ class SkeletonSearchPost(base.ModelBase): class SkeletonSearchActor(base.ModelBase): """Definition model for :obj:`app.bsky.unspecced.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['app.bsky.unspecced.defs#skeletonSearchActor'] = Field( default='app.bsky.unspecced.defs#skeletonSearchActor', alias='$type', frozen=True @@ -37,7 +35,7 @@ class SkeletonSearchActor(base.ModelBase): class SkeletonSearchStarterPack(base.ModelBase): """Definition model for :obj:`app.bsky.unspecced.defs`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: 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/get_suggestions_skeleton.py b/packages/atproto_client/models/app/bsky/unspecced/get_suggestions_skeleton.py index 20f32eda..4d8979a4 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/get_suggestions_skeleton.py +++ b/packages/atproto_client/models/app/bsky/unspecced/get_suggestions_skeleton.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -21,10 +22,10 @@ class Params(base.ParamsModelBase): cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. - relative_to_did: t.Optional['string_formats.Did'] = ( + relative_to_did: t.Optional[string_formats.Did] = ( None #: DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. ) - viewer: t.Optional['string_formats.Did'] = ( + viewer: t.Optional[string_formats.Did] = ( None #: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. ) @@ -33,10 +34,10 @@ class ParamsDict(t.TypedDict): cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. relative_to_did: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. viewer: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. @@ -45,6 +46,6 @@ class Response(base.ResponseModelBase): actors: t.List['models.AppBskyUnspeccedDefs.SkeletonSearchActor'] #: Actors. cursor: t.Optional[str] = None #: Cursor. - relative_to_did: t.Optional['string_formats.Did'] = ( + relative_to_did: t.Optional[string_formats.Did] = ( None #: DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. ) 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 index e8b9d7d5..31d8da14 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/get_tagged_suggestions.py +++ b/packages/atproto_client/models/app/bsky/unspecced/get_tagged_suggestions.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -32,7 +33,7 @@ class Response(base.ResponseModelBase): class Suggestion(base.ModelBase): """Definition model for :obj:`app.bsky.unspecced.getTaggedSuggestions`.""" - subject: 'string_formats.Uri' #: Subject. + subject: string_formats.Uri #: Subject. subject_type: t.Union[t.Literal['actor'], t.Literal['feed'], str] #: Subject type. tag: str #: Tag. diff --git a/packages/atproto_client/models/app/bsky/unspecced/search_actors_skeleton.py b/packages/atproto_client/models/app/bsky/unspecced/search_actors_skeleton.py index 8321a729..4df524b3 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/search_actors_skeleton.py +++ b/packages/atproto_client/models/app/bsky/unspecced/search_actors_skeleton.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -25,7 +26,7 @@ class Params(base.ParamsModelBase): ) limit: t.Optional[int] = Field(default=25, ge=1, le=100) #: Limit. typeahead: t.Optional[bool] = None #: If true, acts as fast/simple 'typeahead' query. - viewer: t.Optional['string_formats.Did'] = ( + viewer: t.Optional[string_formats.Did] = ( None #: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. ) @@ -38,7 +39,7 @@ class ParamsDict(t.TypedDict): limit: te.NotRequired[t.Optional[int]] #: Limit. typeahead: te.NotRequired[t.Optional[bool]] #: If true, acts as fast/simple 'typeahead' query. viewer: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. diff --git a/packages/atproto_client/models/app/bsky/unspecced/search_posts_skeleton.py b/packages/atproto_client/models/app/bsky/unspecced/search_posts_skeleton.py index 2ceb091a..de233a09 100644 --- a/packages/atproto_client/models/app/bsky/unspecced/search_posts_skeleton.py +++ b/packages/atproto_client/models/app/bsky/unspecced/search_posts_skeleton.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,7 +21,7 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`app.bsky.unspecced.searchPostsSkeleton`.""" q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. - author: t.Optional['string_formats.Handle'] = ( + author: t.Optional[string_formats.Handle] = ( None #: Filter to posts by the given account. Handles are resolved to DID before query-time. ) cursor: t.Optional[str] = ( @@ -29,11 +30,11 @@ class Params(base.ParamsModelBase): domain: t.Optional[str] = ( None #: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. ) - lang: t.Optional['string_formats.Language'] = ( + lang: t.Optional[string_formats.Language] = ( None #: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. ) limit: t.Optional[int] = Field(default=25, ge=1, le=100) #: Limit. - mentions: t.Optional['string_formats.Handle'] = ( + mentions: t.Optional[string_formats.Handle] = ( None #: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. ) since: t.Optional[str] = ( @@ -48,10 +49,10 @@ class Params(base.ParamsModelBase): until: t.Optional[str] = ( None #: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). ) - url: t.Optional['string_formats.Uri'] = ( + url: t.Optional[string_formats.Uri] = ( None #: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. ) - viewer: t.Optional['string_formats.Did'] = ( + viewer: t.Optional[string_formats.Did] = ( None #: DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. ) @@ -59,7 +60,7 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): q: str #: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. author: te.NotRequired[ - t.Optional['string_formats.Handle'] + t.Optional[string_formats.Handle] ] #: Filter to posts by the given account. Handles are resolved to DID before query-time. cursor: te.NotRequired[ t.Optional[str] @@ -68,11 +69,11 @@ class ParamsDict(t.TypedDict): t.Optional[str] ] #: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. lang: te.NotRequired[ - t.Optional['string_formats.Language'] + t.Optional[string_formats.Language] ] #: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. limit: te.NotRequired[t.Optional[int]] #: Limit. mentions: te.NotRequired[ - t.Optional['string_formats.Handle'] + t.Optional[string_formats.Handle] ] #: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. since: te.NotRequired[ t.Optional[str] @@ -87,10 +88,10 @@ class ParamsDict(t.TypedDict): t.Optional[str] ] #: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). url: te.NotRequired[ - t.Optional['string_formats.Uri'] + t.Optional[string_formats.Uri] ] #: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. viewer: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. 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 index c3a18bab..edb20383 100644 --- 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 @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -24,7 +25,7 @@ class Params(base.ParamsModelBase): 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['string_formats.Did'] = ( + viewer: t.Optional[string_formats.Did] = ( None #: DID of the account making the request (not included for public/unauthenticated queries). ) @@ -36,7 +37,7 @@ class ParamsDict(t.TypedDict): ] #: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. limit: te.NotRequired[t.Optional[int]] #: Limit. viewer: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: DID of the account making the request (not included for public/unauthenticated queries). diff --git a/packages/atproto_client/models/app/bsky/video/defs.py b/packages/atproto_client/models/app/bsky/video/defs.py index 833f18ca..2194ef63 100644 --- a/packages/atproto_client/models/app/bsky/video/defs.py +++ b/packages/atproto_client/models/app/bsky/video/defs.py @@ -9,8 +9,9 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.blob_ref import BlobRef from atproto_client.models import base @@ -18,7 +19,7 @@ class JobStatus(base.ModelBase): """Definition model for :obj:`app.bsky.video.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. job_id: str #: Job id. state: t.Union[ t.Literal['JOB_STATE_COMPLETED'], t.Literal['JOB_STATE_FAILED'], str diff --git a/packages/atproto_client/models/chat/bsky/actor/defs.py b/packages/atproto_client/models/chat/bsky/actor/defs.py index 0cf18f40..24a0e37e 100644 --- a/packages/atproto_client/models/chat/bsky/actor/defs.py +++ b/packages/atproto_client/models/chat/bsky/actor/defs.py @@ -9,19 +9,20 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class ProfileViewBasic(base.ModelBase): """Definition model for :obj:`chat.bsky.actor.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. associated: t.Optional['models.AppBskyActorDefs.ProfileAssociated'] = None #: Associated. - avatar: t.Optional['string_formats.Uri'] = None #: Avatar. + avatar: t.Optional[string_formats.Uri] = None #: Avatar. chat_disabled: t.Optional[bool] = None #: Set to true when the actor cannot actively participate in converations. display_name: t.Optional[str] = Field(default=None, max_length=640) #: Display name. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. diff --git a/packages/atproto_client/models/chat/bsky/convo/defs.py b/packages/atproto_client/models/chat/bsky/convo/defs.py index 673d439e..74a16bc2 100644 --- a/packages/atproto_client/models/chat/bsky/convo/defs.py +++ b/packages/atproto_client/models/chat/bsky/convo/defs.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,7 +21,7 @@ class MessageRef(base.ModelBase): """Definition model for :obj:`chat.bsky.convo.defs`.""" convo_id: str #: Convo id. - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. message_id: str #: Message id. py_type: t.Literal['chat.bsky.convo.defs#messageRef'] = Field( @@ -50,7 +51,7 @@ class MessageView(base.ModelBase): id: str #: Id. rev: str #: Rev. sender: 'models.ChatBskyConvoDefs.MessageViewSender' #: Sender. - sent_at: 'string_formats.DateTime' #: Sent at. + sent_at: string_formats.DateTime #: Sent at. text: str = Field(max_length=10000) #: Text. embed: t.Optional[ te.Annotated[t.Union['models.AppBskyEmbedRecord.View'], Field(default=None, discriminator='py_type')] @@ -70,7 +71,7 @@ class DeletedMessageView(base.ModelBase): id: str #: Id. rev: str #: Rev. sender: 'models.ChatBskyConvoDefs.MessageViewSender' #: Sender. - sent_at: 'string_formats.DateTime' #: Sent at. + sent_at: string_formats.DateTime #: Sent at. py_type: t.Literal['chat.bsky.convo.defs#deletedMessageView'] = Field( default='chat.bsky.convo.defs#deletedMessageView', alias='$type', frozen=True @@ -80,7 +81,7 @@ class DeletedMessageView(base.ModelBase): class MessageViewSender(base.ModelBase): """Definition model for :obj:`chat.bsky.convo.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['chat.bsky.convo.defs#messageViewSender'] = Field( default='chat.bsky.convo.defs#messageViewSender', alias='$type', frozen=True diff --git a/packages/atproto_client/models/chat/bsky/convo/get_convo_for_members.py b/packages/atproto_client/models/chat/bsky/convo/get_convo_for_members.py index f03bdfe9..8d1bb08f 100644 --- a/packages/atproto_client/models/chat/bsky/convo/get_convo_for_members.py +++ b/packages/atproto_client/models/chat/bsky/convo/get_convo_for_members.py @@ -9,20 +9,21 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`chat.bsky.convo.getConvoForMembers`.""" - members: t.List['string_formats.Did'] = Field(min_length=1, max_length=10) #: Members. + members: t.List[string_formats.Did] = Field(min_length=1, max_length=10) #: Members. class ParamsDict(t.TypedDict): - members: t.List['string_formats.Did'] #: Members. + members: t.List[string_formats.Did] #: Members. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/chat/bsky/moderation/get_actor_metadata.py b/packages/atproto_client/models/chat/bsky/moderation/get_actor_metadata.py index 11d95dbc..824295e8 100644 --- a/packages/atproto_client/models/chat/bsky/moderation/get_actor_metadata.py +++ b/packages/atproto_client/models/chat/bsky/moderation/get_actor_metadata.py @@ -9,20 +9,21 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`chat.bsky.moderation.getActorMetadata`.""" - actor: 'string_formats.Did' #: Actor. + actor: string_formats.Did #: Actor. class ParamsDict(t.TypedDict): - actor: 'string_formats.Did' #: Actor. + actor: string_formats.Did #: Actor. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/chat/bsky/moderation/update_actor_access.py b/packages/atproto_client/models/chat/bsky/moderation/update_actor_access.py index c1c28b5e..cb15acb0 100644 --- a/packages/atproto_client/models/chat/bsky/moderation/update_actor_access.py +++ b/packages/atproto_client/models/chat/bsky/moderation/update_actor_access.py @@ -9,20 +9,18 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`chat.bsky.moderation.updateActorAccess`.""" - actor: 'string_formats.Did' #: Actor. + actor: string_formats.Did #: Actor. allow_access: bool #: Allow access. ref: t.Optional[str] = None #: Ref. class DataDict(t.TypedDict): - actor: 'string_formats.Did' #: Actor. + actor: string_formats.Did #: Actor. allow_access: bool #: Allow access. ref: te.NotRequired[t.Optional[str]] #: Ref. diff --git a/packages/atproto_client/models/com/atproto/admin/defs.py b/packages/atproto_client/models/com/atproto/admin/defs.py index 0cc02401..fa1c0918 100644 --- a/packages/atproto_client/models/com/atproto/admin/defs.py +++ b/packages/atproto_client/models/com/atproto/admin/defs.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -30,12 +31,12 @@ class StatusAttr(base.ModelBase): class AccountView(base.ModelBase): """Definition model for :obj:`com.atproto.admin.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. - indexed_at: 'string_formats.DateTime' #: Indexed at. - deactivated_at: t.Optional['string_formats.DateTime'] = None #: Deactivated at. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. + indexed_at: string_formats.DateTime #: Indexed at. + deactivated_at: t.Optional[string_formats.DateTime] = None #: Deactivated at. email: t.Optional[str] = None #: Email. - email_confirmed_at: t.Optional['string_formats.DateTime'] = None #: Email confirmed at. + email_confirmed_at: t.Optional[string_formats.DateTime] = None #: Email confirmed at. invite_note: t.Optional[str] = None #: Invite note. invited_by: t.Optional['models.ComAtprotoServerDefs.InviteCode'] = None #: Invited by. invites: t.Optional[t.List['models.ComAtprotoServerDefs.InviteCode']] = None #: Invites. @@ -51,7 +52,7 @@ class AccountView(base.ModelBase): class RepoRef(base.ModelBase): """Definition model for :obj:`com.atproto.admin.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['com.atproto.admin.defs#repoRef'] = Field( default='com.atproto.admin.defs#repoRef', alias='$type', frozen=True @@ -61,9 +62,9 @@ class RepoRef(base.ModelBase): class RepoBlobRef(base.ModelBase): """Definition model for :obj:`com.atproto.admin.defs`.""" - cid: 'string_formats.Cid' #: Cid. - did: 'string_formats.Did' #: Did. - record_uri: t.Optional['string_formats.AtUri'] = None #: Record uri. + cid: string_formats.Cid #: Cid. + did: string_formats.Did #: Did. + record_uri: t.Optional[string_formats.AtUri] = None #: Record uri. py_type: t.Literal['com.atproto.admin.defs#repoBlobRef'] = Field( default='com.atproto.admin.defs#repoBlobRef', alias='$type', frozen=True diff --git a/packages/atproto_client/models/com/atproto/admin/delete_account.py b/packages/atproto_client/models/com/atproto/admin/delete_account.py index bb0dd25b..373134a8 100644 --- a/packages/atproto_client/models/com/atproto/admin/delete_account.py +++ b/packages/atproto_client/models/com/atproto/admin/delete_account.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.deleteAccount`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. diff --git a/packages/atproto_client/models/com/atproto/admin/disable_account_invites.py b/packages/atproto_client/models/com/atproto/admin/disable_account_invites.py index 5343bb04..cf99022b 100644 --- a/packages/atproto_client/models/com/atproto/admin/disable_account_invites.py +++ b/packages/atproto_client/models/com/atproto/admin/disable_account_invites.py @@ -9,18 +9,16 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.disableAccountInvites`.""" - account: 'string_formats.Did' #: Account. + account: string_formats.Did #: Account. note: t.Optional[str] = None #: Optional reason for disabled invites. class DataDict(t.TypedDict): - account: 'string_formats.Did' #: Account. + account: string_formats.Did #: Account. note: te.NotRequired[t.Optional[str]] #: Optional reason for disabled invites. diff --git a/packages/atproto_client/models/com/atproto/admin/enable_account_invites.py b/packages/atproto_client/models/com/atproto/admin/enable_account_invites.py index aa74c066..ecb31828 100644 --- a/packages/atproto_client/models/com/atproto/admin/enable_account_invites.py +++ b/packages/atproto_client/models/com/atproto/admin/enable_account_invites.py @@ -9,18 +9,16 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.enableAccountInvites`.""" - account: 'string_formats.Did' #: Account. + account: string_formats.Did #: Account. note: t.Optional[str] = None #: Optional reason for enabled invites. class DataDict(t.TypedDict): - account: 'string_formats.Did' #: Account. + account: string_formats.Did #: Account. note: te.NotRequired[t.Optional[str]] #: Optional reason for enabled invites. diff --git a/packages/atproto_client/models/com/atproto/admin/get_account_info.py b/packages/atproto_client/models/com/atproto/admin/get_account_info.py index 5529ff2b..9ec48519 100644 --- a/packages/atproto_client/models/com/atproto/admin/get_account_info.py +++ b/packages/atproto_client/models/com/atproto/admin/get_account_info.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.admin.getAccountInfo`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. diff --git a/packages/atproto_client/models/com/atproto/admin/get_account_infos.py b/packages/atproto_client/models/com/atproto/admin/get_account_infos.py index ff6d1d75..941b7016 100644 --- a/packages/atproto_client/models/com/atproto/admin/get_account_infos.py +++ b/packages/atproto_client/models/com/atproto/admin/get_account_infos.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.admin.getAccountInfos`.""" - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. class ParamsDict(t.TypedDict): - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/admin/get_subject_status.py b/packages/atproto_client/models/com/atproto/admin/get_subject_status.py index 0de7f472..2f40e043 100644 --- a/packages/atproto_client/models/com/atproto/admin/get_subject_status.py +++ b/packages/atproto_client/models/com/atproto/admin/get_subject_status.py @@ -10,24 +10,25 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.admin.getSubjectStatus`.""" - blob: t.Optional['string_formats.Cid'] = None #: Blob. - did: t.Optional['string_formats.Did'] = None #: Did. - uri: t.Optional['string_formats.AtUri'] = None #: Uri. + blob: t.Optional[string_formats.Cid] = None #: Blob. + did: t.Optional[string_formats.Did] = None #: Did. + uri: t.Optional[string_formats.AtUri] = None #: Uri. class ParamsDict(t.TypedDict): - blob: te.NotRequired[t.Optional['string_formats.Cid']] #: Blob. - did: te.NotRequired[t.Optional['string_formats.Did']] #: Did. - uri: te.NotRequired[t.Optional['string_formats.AtUri']] #: Uri. + blob: te.NotRequired[t.Optional[string_formats.Cid]] #: Blob. + did: te.NotRequired[t.Optional[string_formats.Did]] #: Did. + uri: te.NotRequired[t.Optional[string_formats.AtUri]] #: Uri. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/admin/send_email.py b/packages/atproto_client/models/com/atproto/admin/send_email.py index 3fc64167..3ab724fa 100644 --- a/packages/atproto_client/models/com/atproto/admin/send_email.py +++ b/packages/atproto_client/models/com/atproto/admin/send_email.py @@ -9,17 +9,15 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.sendEmail`.""" content: str #: Content. - recipient_did: 'string_formats.Did' #: Recipient did. - sender_did: 'string_formats.Did' #: Sender did. + recipient_did: string_formats.Did #: Recipient did. + sender_did: string_formats.Did #: Sender did. comment: t.Optional[str] = ( None #: Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers. ) @@ -28,8 +26,8 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): content: str #: Content. - recipient_did: 'string_formats.Did' #: Recipient did. - sender_did: 'string_formats.Did' #: Sender did. + recipient_did: string_formats.Did #: Recipient did. + sender_did: string_formats.Did #: Sender did. comment: te.NotRequired[ t.Optional[str] ] #: Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers. diff --git a/packages/atproto_client/models/com/atproto/admin/update_account_email.py b/packages/atproto_client/models/com/atproto/admin/update_account_email.py index be2d184d..5ef4fa86 100644 --- a/packages/atproto_client/models/com/atproto/admin/update_account_email.py +++ b/packages/atproto_client/models/com/atproto/admin/update_account_email.py @@ -7,18 +7,16 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.updateAccountEmail`.""" - account: 'string_formats.Handle' #: The handle or DID of the repo. + account: string_formats.Handle #: The handle or DID of the repo. email: str #: Email. class DataDict(t.TypedDict): - account: 'string_formats.Handle' #: The handle or DID of the repo. + account: string_formats.Handle #: The handle or DID of the repo. email: str #: Email. diff --git a/packages/atproto_client/models/com/atproto/admin/update_account_handle.py b/packages/atproto_client/models/com/atproto/admin/update_account_handle.py index 9cf97b5d..37ab179d 100644 --- a/packages/atproto_client/models/com/atproto/admin/update_account_handle.py +++ b/packages/atproto_client/models/com/atproto/admin/update_account_handle.py @@ -7,18 +7,16 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.updateAccountHandle`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. diff --git a/packages/atproto_client/models/com/atproto/admin/update_account_password.py b/packages/atproto_client/models/com/atproto/admin/update_account_password.py index 20e14041..aa09c008 100644 --- a/packages/atproto_client/models/com/atproto/admin/update_account_password.py +++ b/packages/atproto_client/models/com/atproto/admin/update_account_password.py @@ -7,18 +7,16 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.admin.updateAccountPassword`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. password: str #: Password. class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. password: str #: Password. diff --git a/packages/atproto_client/models/com/atproto/identity/resolve_handle.py b/packages/atproto_client/models/com/atproto/identity/resolve_handle.py index 5426855c..dc4f24e7 100644 --- a/packages/atproto_client/models/com/atproto/identity/resolve_handle.py +++ b/packages/atproto_client/models/com/atproto/identity/resolve_handle.py @@ -7,22 +7,20 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.identity.resolveHandle`.""" - handle: 'string_formats.Handle' #: The handle to resolve. + handle: string_formats.Handle #: The handle to resolve. class ParamsDict(t.TypedDict): - handle: 'string_formats.Handle' #: The handle to resolve. + handle: string_formats.Handle #: The handle to resolve. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.identity.resolveHandle`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. diff --git a/packages/atproto_client/models/com/atproto/identity/update_handle.py b/packages/atproto_client/models/com/atproto/identity/update_handle.py index 0535cbac..32725afc 100644 --- a/packages/atproto_client/models/com/atproto/identity/update_handle.py +++ b/packages/atproto_client/models/com/atproto/identity/update_handle.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.identity.updateHandle`.""" - handle: 'string_formats.Handle' #: The new handle. + handle: string_formats.Handle #: The new handle. class DataDict(t.TypedDict): - handle: 'string_formats.Handle' #: The new handle. + handle: string_formats.Handle #: The new handle. diff --git a/packages/atproto_client/models/com/atproto/label/defs.py b/packages/atproto_client/models/com/atproto/label/defs.py index b61454ef..90a4f512 100644 --- a/packages/atproto_client/models/com/atproto/label/defs.py +++ b/packages/atproto_client/models/com/atproto/label/defs.py @@ -9,23 +9,26 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Label(base.ModelBase): """Definition model for :obj:`com.atproto.label.defs`. Metadata tag on an atproto resource (eg, repo or record).""" - cts: 'string_formats.DateTime' #: Timestamp when this label was created. - src: 'string_formats.Did' #: DID of the actor who created this label. - uri: 'string_formats.Uri' #: AT URI of the record, repository (account), or other resource that this label applies to. + cts: string_formats.DateTime #: Timestamp when this label was created. + src: string_formats.Did #: DID of the actor who created this label. + uri: ( + string_formats.Uri + ) #: AT URI of the record, repository (account), or other resource that this label applies to. val: str = Field(max_length=128) #: The short string name of the value or type of this label. - cid: t.Optional['string_formats.Cid'] = ( + cid: t.Optional[string_formats.Cid] = ( None #: Optionally, CID specifying the specific version of 'uri' resource this label applies to. ) - exp: t.Optional['string_formats.DateTime'] = None #: Timestamp at which this label expires (no longer applies). + exp: t.Optional[string_formats.DateTime] = None #: Timestamp at which this label expires (no longer applies). neg: t.Optional[bool] = None #: If true, this is a negation label, overwriting a previous label. sig: t.Optional[t.Union[str, bytes]] = None #: Signature of dag-cbor encoded label. ver: t.Optional[int] = None #: The AT Protocol version of the label object. @@ -86,7 +89,7 @@ class LabelValueDefinitionStrings(base.ModelBase): description: str = Field( max_length=100000 ) #: A longer description of what the label means and why it might be applied. - lang: 'string_formats.Language' #: The code of the language these strings are written in. + lang: string_formats.Language #: The code of the language these strings are written in. name: str = Field(max_length=640) #: A short human-readable name for the label. py_type: t.Literal['com.atproto.label.defs#labelValueDefinitionStrings'] = Field( diff --git a/packages/atproto_client/models/com/atproto/label/query_labels.py b/packages/atproto_client/models/com/atproto/label/query_labels.py index eab587a2..3a9c547b 100644 --- a/packages/atproto_client/models/com/atproto/label/query_labels.py +++ b/packages/atproto_client/models/com/atproto/label/query_labels.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -24,7 +25,7 @@ class Params(base.ParamsModelBase): ] #: List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=250) #: Limit. - sources: t.Optional[t.List['string_formats.Did']] = None #: Optional list of label sources (DIDs) to filter on. + sources: t.Optional[t.List[string_formats.Did]] = None #: Optional list of label sources (DIDs) to filter on. class ParamsDict(t.TypedDict): @@ -34,7 +35,7 @@ class ParamsDict(t.TypedDict): cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. sources: te.NotRequired[ - t.Optional[t.List['string_formats.Did']] + t.Optional[t.List[string_formats.Did]] ] #: Optional list of label sources (DIDs) to filter on. diff --git a/packages/atproto_client/models/com/atproto/moderation/create_report.py b/packages/atproto_client/models/com/atproto/moderation/create_report.py index b732461a..1cd4d56c 100644 --- a/packages/atproto_client/models/com/atproto/moderation/create_report.py +++ b/packages/atproto_client/models/com/atproto/moderation/create_report.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -45,10 +46,10 @@ class DataDict(t.TypedDict): class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.moderation.createReport`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. id: int #: Id. reason_type: 'models.ComAtprotoModerationDefs.ReasonType' #: Reason type. - reported_by: 'string_formats.Did' #: Reported by. + reported_by: string_formats.Did #: Reported by. subject: te.Annotated[ t.Union['models.ComAtprotoAdminDefs.RepoRef', 'models.ComAtprotoRepoStrongRef.Main'], Field(discriminator='py_type'), diff --git a/packages/atproto_client/models/com/atproto/repo/apply_writes.py b/packages/atproto_client/models/com/atproto/repo/apply_writes.py index 38ea945c..fa04c1af 100644 --- a/packages/atproto_client/models/com/atproto/repo/apply_writes.py +++ b/packages/atproto_client/models/com/atproto/repo/apply_writes.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -20,7 +21,7 @@ class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.repo.applyWrites`.""" - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). writes: t.List[ te.Annotated[ t.Union[ @@ -31,7 +32,7 @@ class Data(base.DataModelBase): Field(discriminator='py_type'), ] ] #: Writes. - swap_commit: t.Optional['string_formats.Cid'] = ( + swap_commit: t.Optional[string_formats.Cid] = ( None #: If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. ) validate_: t.Optional[bool] = ( @@ -40,7 +41,7 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). writes: t.List[ te.Annotated[ t.Union[ @@ -52,7 +53,7 @@ class DataDict(t.TypedDict): ] ] #: Writes. swap_commit: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. validate: te.NotRequired[ t.Optional[bool] @@ -80,7 +81,7 @@ class Response(base.ResponseModelBase): class Create(base.ModelBase): """Definition model for :obj:`com.atproto.repo.applyWrites`. Operation which creates a new record.""" - collection: 'string_formats.Nsid' #: Collection. + collection: string_formats.Nsid #: Collection. value: 'UnknownType' #: Value. rkey: t.Optional[str] = Field(default=None, max_length=512) #: Rkey. @@ -92,7 +93,7 @@ class Create(base.ModelBase): class Update(base.ModelBase): """Definition model for :obj:`com.atproto.repo.applyWrites`. Operation which updates an existing record.""" - collection: 'string_formats.Nsid' #: Collection. + collection: string_formats.Nsid #: Collection. rkey: str #: Rkey. value: 'UnknownType' #: Value. @@ -104,7 +105,7 @@ class Update(base.ModelBase): class Delete(base.ModelBase): """Definition model for :obj:`com.atproto.repo.applyWrites`. Operation which deletes an existing record.""" - collection: 'string_formats.Nsid' #: Collection. + collection: string_formats.Nsid #: Collection. rkey: str #: Rkey. py_type: t.Literal['com.atproto.repo.applyWrites#delete'] = Field( @@ -115,8 +116,8 @@ class Delete(base.ModelBase): class CreateResult(base.ModelBase): """Definition model for :obj:`com.atproto.repo.applyWrites`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. validation_status: t.Optional[t.Union[t.Literal['valid'], t.Literal['unknown'], str]] = None #: Validation status. py_type: t.Literal['com.atproto.repo.applyWrites#createResult'] = Field( @@ -127,8 +128,8 @@ class CreateResult(base.ModelBase): class UpdateResult(base.ModelBase): """Definition model for :obj:`com.atproto.repo.applyWrites`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. validation_status: t.Optional[t.Union[t.Literal['valid'], t.Literal['unknown'], str]] = None #: Validation status. py_type: t.Literal['com.atproto.repo.applyWrites#updateResult'] = Field( diff --git a/packages/atproto_client/models/com/atproto/repo/create_record.py b/packages/atproto_client/models/com/atproto/repo/create_record.py index 127a9b6b..ff51b7f3 100644 --- a/packages/atproto_client/models/com/atproto/repo/create_record.py +++ b/packages/atproto_client/models/com/atproto/repo/create_record.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownInputType from atproto_client.models import base @@ -20,22 +21,22 @@ class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.repo.createRecord`.""" - collection: 'string_formats.Nsid' #: The NSID of the record collection. + collection: string_formats.Nsid #: The NSID of the record collection. record: 'UnknownInputType' #: The record itself. Must contain a $type field. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: t.Optional[str] = Field(default=None, max_length=512) #: The Record Key. - swap_commit: t.Optional['string_formats.Cid'] = None #: Compare and swap with the previous commit by CID. + swap_commit: t.Optional[string_formats.Cid] = None #: Compare and swap with the previous commit by CID. validate_: t.Optional[bool] = ( None #: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. ) class DataDict(t.TypedDict): - collection: 'string_formats.Nsid' #: The NSID of the record collection. + collection: string_formats.Nsid #: The NSID of the record collection. record: 'UnknownInputType' #: The record itself. Must contain a $type field. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: te.NotRequired[t.Optional[str]] #: The Record Key. - swap_commit: te.NotRequired[t.Optional['string_formats.Cid']] #: Compare and swap with the previous commit by CID. + swap_commit: te.NotRequired[t.Optional[string_formats.Cid]] #: Compare and swap with the previous commit by CID. validate: te.NotRequired[ t.Optional[bool] ] #: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. @@ -44,7 +45,7 @@ class DataDict(t.TypedDict): class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.repo.createRecord`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. commit: t.Optional['models.ComAtprotoRepoDefs.CommitMeta'] = None #: Commit. validation_status: t.Optional[t.Union[t.Literal['valid'], t.Literal['unknown'], str]] = None #: Validation status. diff --git a/packages/atproto_client/models/com/atproto/repo/defs.py b/packages/atproto_client/models/com/atproto/repo/defs.py index b7f36680..0477aa76 100644 --- a/packages/atproto_client/models/com/atproto/repo/defs.py +++ b/packages/atproto_client/models/com/atproto/repo/defs.py @@ -9,15 +9,13 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class CommitMeta(base.ModelBase): """Definition model for :obj:`com.atproto.repo.defs`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. rev: str #: Rev. py_type: t.Literal['com.atproto.repo.defs#commitMeta'] = Field( diff --git a/packages/atproto_client/models/com/atproto/repo/delete_record.py b/packages/atproto_client/models/com/atproto/repo/delete_record.py index 223c3cee..26f6bcb4 100644 --- a/packages/atproto_client/models/com/atproto/repo/delete_record.py +++ b/packages/atproto_client/models/com/atproto/repo/delete_record.py @@ -9,28 +9,29 @@ import typing_extensions as te +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.repo.deleteRecord`.""" - collection: 'string_formats.Nsid' #: The NSID of the record collection. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + collection: string_formats.Nsid #: The NSID of the record collection. + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: str #: The Record Key. - swap_commit: t.Optional['string_formats.Cid'] = None #: Compare and swap with the previous commit by CID. - swap_record: t.Optional['string_formats.Cid'] = None #: Compare and swap with the previous record by CID. + swap_commit: t.Optional[string_formats.Cid] = None #: Compare and swap with the previous commit by CID. + swap_record: t.Optional[string_formats.Cid] = None #: Compare and swap with the previous record by CID. class DataDict(t.TypedDict): - collection: 'string_formats.Nsid' #: The NSID of the record collection. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + collection: string_formats.Nsid #: The NSID of the record collection. + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: str #: The Record Key. - swap_commit: te.NotRequired[t.Optional['string_formats.Cid']] #: Compare and swap with the previous commit by CID. - swap_record: te.NotRequired[t.Optional['string_formats.Cid']] #: Compare and swap with the previous record by CID. + swap_commit: te.NotRequired[t.Optional[string_formats.Cid]] #: Compare and swap with the previous commit by CID. + swap_record: te.NotRequired[t.Optional[string_formats.Cid]] #: Compare and swap with the previous record by CID. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/repo/describe_repo.py b/packages/atproto_client/models/com/atproto/repo/describe_repo.py index b8b0ea75..46512bb2 100644 --- a/packages/atproto_client/models/com/atproto/repo/describe_repo.py +++ b/packages/atproto_client/models/com/atproto/repo/describe_repo.py @@ -7,8 +7,9 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -16,20 +17,20 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.repo.describeRepo`.""" - repo: 'string_formats.Handle' #: The handle or DID of the repo. + repo: string_formats.Handle #: The handle or DID of the repo. class ParamsDict(t.TypedDict): - repo: 'string_formats.Handle' #: The handle or DID of the repo. + repo: string_formats.Handle #: The handle or DID of the repo. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.repo.describeRepo`.""" collections: t.List[ - 'string_formats.Nsid' + string_formats.Nsid ] #: List of all the collections (NSIDs) for which this repo contains at least one record. - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. did_doc: 'UnknownType' #: The complete DID document for this account. - handle: 'string_formats.Handle' #: Handle. + handle: string_formats.Handle #: Handle. handle_is_correct: bool #: Indicates if handle is currently valid (resolves bi-directionally). diff --git a/packages/atproto_client/models/com/atproto/repo/get_record.py b/packages/atproto_client/models/com/atproto/repo/get_record.py index 2b533770..f6b25f21 100644 --- a/packages/atproto_client/models/com/atproto/repo/get_record.py +++ b/packages/atproto_client/models/com/atproto/repo/get_record.py @@ -9,8 +9,9 @@ import typing_extensions as te +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -18,26 +19,26 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.repo.getRecord`.""" - collection: 'string_formats.Nsid' #: The NSID of the record collection. - repo: 'string_formats.Handle' #: The handle or DID of the repo. + collection: string_formats.Nsid #: The NSID of the record collection. + repo: string_formats.Handle #: The handle or DID of the repo. rkey: str #: The Record Key. - cid: t.Optional['string_formats.Cid'] = ( + cid: t.Optional[string_formats.Cid] = ( None #: The CID of the version of the record. If not specified, then return the most recent version. ) class ParamsDict(t.TypedDict): - collection: 'string_formats.Nsid' #: The NSID of the record collection. - repo: 'string_formats.Handle' #: The handle or DID of the repo. + collection: string_formats.Nsid #: The NSID of the record collection. + repo: string_formats.Handle #: The handle or DID of the repo. rkey: str #: The Record Key. cid: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: The CID of the version of the record. If not specified, then return the most recent version. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.repo.getRecord`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. value: 'UnknownType' #: Value. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + cid: t.Optional[string_formats.Cid] = None #: Cid. diff --git a/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py b/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py index aa48c322..4ad7615c 100644 --- a/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py +++ b/packages/atproto_client/models/com/atproto/repo/list_missing_blobs.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -38,8 +39,8 @@ class Response(base.ResponseModelBase): class RecordBlob(base.ModelBase): """Definition model for :obj:`com.atproto.repo.listMissingBlobs`.""" - cid: 'string_formats.Cid' #: Cid. - record_uri: 'string_formats.AtUri' #: Record uri. + cid: string_formats.Cid #: Cid. + record_uri: string_formats.AtUri #: Record uri. py_type: t.Literal['com.atproto.repo.listMissingBlobs#recordBlob'] = Field( default='com.atproto.repo.listMissingBlobs#recordBlob', alias='$type', frozen=True diff --git a/packages/atproto_client/models/com/atproto/repo/list_records.py b/packages/atproto_client/models/com/atproto/repo/list_records.py index 1d1f1942..cb268dbe 100644 --- a/packages/atproto_client/models/com/atproto/repo/list_records.py +++ b/packages/atproto_client/models/com/atproto/repo/list_records.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -20,8 +21,8 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.repo.listRecords`.""" - collection: 'string_formats.Nsid' #: The NSID of the record type. - repo: 'string_formats.Handle' #: The handle or DID of the repo. + collection: string_formats.Nsid #: The NSID of the record type. + repo: string_formats.Handle #: The handle or DID of the repo. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: The number of records to return. reverse: t.Optional[bool] = None #: Flag to reverse the order of the returned records. @@ -30,8 +31,8 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): - collection: 'string_formats.Nsid' #: The NSID of the record type. - repo: 'string_formats.Handle' #: The handle or DID of the repo. + collection: string_formats.Nsid #: The NSID of the record type. + repo: string_formats.Handle #: The handle or DID of the repo. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: The number of records to return. reverse: te.NotRequired[t.Optional[bool]] #: Flag to reverse the order of the returned records. @@ -49,8 +50,8 @@ class Response(base.ResponseModelBase): class Record(base.ModelBase): """Definition model for :obj:`com.atproto.repo.listRecords`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. value: 'UnknownType' #: Value. py_type: t.Literal['com.atproto.repo.listRecords#record'] = Field( diff --git a/packages/atproto_client/models/com/atproto/repo/put_record.py b/packages/atproto_client/models/com/atproto/repo/put_record.py index b6cb0a59..15b69ff6 100644 --- a/packages/atproto_client/models/com/atproto/repo/put_record.py +++ b/packages/atproto_client/models/com/atproto/repo/put_record.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownInputType from atproto_client.models import base @@ -20,12 +21,12 @@ class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.repo.putRecord`.""" - collection: 'string_formats.Nsid' #: The NSID of the record collection. + collection: string_formats.Nsid #: The NSID of the record collection. record: 'UnknownInputType' #: The record to write. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: str = Field(max_length=512) #: The Record Key. - swap_commit: t.Optional['string_formats.Cid'] = None #: Compare and swap with the previous commit by CID. - swap_record: t.Optional['string_formats.Cid'] = ( + swap_commit: t.Optional[string_formats.Cid] = None #: Compare and swap with the previous commit by CID. + swap_record: t.Optional[string_formats.Cid] = ( None #: Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation. ) validate_: t.Optional[bool] = ( @@ -34,13 +35,13 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - collection: 'string_formats.Nsid' #: The NSID of the record collection. + collection: string_formats.Nsid #: The NSID of the record collection. record: 'UnknownInputType' #: The record to write. - repo: 'string_formats.Handle' #: The handle or DID of the repo (aka, current account). + repo: string_formats.Handle #: The handle or DID of the repo (aka, current account). rkey: str #: The Record Key. - swap_commit: te.NotRequired[t.Optional['string_formats.Cid']] #: Compare and swap with the previous commit by CID. + swap_commit: te.NotRequired[t.Optional[string_formats.Cid]] #: Compare and swap with the previous commit by CID. swap_record: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation. validate: te.NotRequired[ t.Optional[bool] @@ -50,7 +51,7 @@ class DataDict(t.TypedDict): class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.repo.putRecord`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. commit: t.Optional['models.ComAtprotoRepoDefs.CommitMeta'] = None #: Commit. validation_status: t.Optional[t.Union[t.Literal['valid'], t.Literal['unknown'], str]] = None #: Validation status. diff --git a/packages/atproto_client/models/com/atproto/repo/strong_ref.py b/packages/atproto_client/models/com/atproto/repo/strong_ref.py index b214dd3f..8d8f0bd0 100644 --- a/packages/atproto_client/models/com/atproto/repo/strong_ref.py +++ b/packages/atproto_client/models/com/atproto/repo/strong_ref.py @@ -9,16 +9,14 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Main(base.ModelBase): """Definition model for :obj:`com.atproto.repo.strongRef`.""" - cid: 'string_formats.Cid' #: Cid. - uri: 'string_formats.AtUri' #: Uri. + cid: string_formats.Cid #: Cid. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['com.atproto.repo.strongRef'] = Field( default='com.atproto.repo.strongRef', alias='$type', frozen=True diff --git a/packages/atproto_client/models/com/atproto/server/check_account_status.py b/packages/atproto_client/models/com/atproto/server/check_account_status.py index 39a48d71..bd251fd9 100644 --- a/packages/atproto_client/models/com/atproto/server/check_account_status.py +++ b/packages/atproto_client/models/com/atproto/server/check_account_status.py @@ -5,11 +5,7 @@ ################################################################## -import typing as t - -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Response(base.ResponseModelBase): @@ -21,6 +17,6 @@ class Response(base.ResponseModelBase): indexed_records: int #: Indexed records. private_state_values: int #: Private state values. repo_blocks: int #: Repo blocks. - repo_commit: 'string_formats.Cid' #: Repo commit. + repo_commit: string_formats.Cid #: Repo commit. repo_rev: str #: Repo rev. valid_did: bool #: Valid did. 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 de391130..ffdb72ff 100644 --- a/packages/atproto_client/models/com/atproto/server/create_account.py +++ b/packages/atproto_client/models/com/atproto/server/create_account.py @@ -9,8 +9,9 @@ import typing_extensions as te +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownInputType, UnknownType from atproto_client.models import base @@ -18,8 +19,8 @@ class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.server.createAccount`.""" - handle: 'string_formats.Handle' #: Requested handle for the account. - did: t.Optional['string_formats.Did'] = None #: Pre-existing atproto DID, being imported to a new account. + handle: string_formats.Handle #: Requested handle for the account. + did: t.Optional[string_formats.Did] = None #: Pre-existing atproto DID, being imported to a new account. email: t.Optional[str] = None #: Email. invite_code: t.Optional[str] = None #: Invite code. password: t.Optional[str] = ( @@ -36,8 +37,8 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - handle: 'string_formats.Handle' #: Requested handle for the account. - did: te.NotRequired[t.Optional['string_formats.Did']] #: Pre-existing atproto DID, being imported to a new account. + handle: string_formats.Handle #: Requested handle for the account. + did: te.NotRequired[t.Optional[string_formats.Did]] #: Pre-existing atproto DID, being imported to a new account. email: te.NotRequired[t.Optional[str]] #: Email. invite_code: te.NotRequired[t.Optional[str]] #: Invite code. password: te.NotRequired[ @@ -57,7 +58,7 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.createAccount`. Account login session returned on successful account creation.""" access_jwt: str #: Access jwt. - did: 'string_formats.Did' #: The DID of the new account. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: The DID of the new account. + handle: string_formats.Handle #: Handle. refresh_jwt: str #: Refresh jwt. did_doc: t.Optional['UnknownType'] = None #: Complete DID document. diff --git a/packages/atproto_client/models/com/atproto/server/create_app_password.py b/packages/atproto_client/models/com/atproto/server/create_app_password.py index 5525c0c9..954fc67d 100644 --- a/packages/atproto_client/models/com/atproto/server/create_app_password.py +++ b/packages/atproto_client/models/com/atproto/server/create_app_password.py @@ -10,9 +10,7 @@ import typing_extensions as te from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): @@ -34,7 +32,7 @@ class DataDict(t.TypedDict): class AppPassword(base.ModelBase): """Definition model for :obj:`com.atproto.server.createAppPassword`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. name: str #: Name. password: str #: Password. privileged: t.Optional[bool] = None #: Privileged. diff --git a/packages/atproto_client/models/com/atproto/server/create_invite_code.py b/packages/atproto_client/models/com/atproto/server/create_invite_code.py index 2e3056ac..c766da78 100644 --- a/packages/atproto_client/models/com/atproto/server/create_invite_code.py +++ b/packages/atproto_client/models/com/atproto/server/create_invite_code.py @@ -9,21 +9,19 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.server.createInviteCode`.""" use_count: int #: Use count. - for_account: t.Optional['string_formats.Did'] = None #: For account. + for_account: t.Optional[string_formats.Did] = None #: For account. class DataDict(t.TypedDict): use_count: int #: Use count. - for_account: te.NotRequired[t.Optional['string_formats.Did']] #: For account. + for_account: te.NotRequired[t.Optional[string_formats.Did]] #: For account. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/server/create_invite_codes.py b/packages/atproto_client/models/com/atproto/server/create_invite_codes.py index cc0d63db..9109e3c3 100644 --- a/packages/atproto_client/models/com/atproto/server/create_invite_codes.py +++ b/packages/atproto_client/models/com/atproto/server/create_invite_codes.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -21,13 +22,13 @@ class Data(base.DataModelBase): code_count: int = 1 #: Code count. use_count: int #: Use count. - for_accounts: t.Optional[t.List['string_formats.Did']] = None #: For accounts. + for_accounts: t.Optional[t.List[string_formats.Did]] = None #: For accounts. class DataDict(t.TypedDict): code_count: int #: Code count. use_count: int #: Use count. - for_accounts: te.NotRequired[t.Optional[t.List['string_formats.Did']]] #: For accounts. + for_accounts: te.NotRequired[t.Optional[t.List[string_formats.Did]]] #: For accounts. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/server/create_session.py b/packages/atproto_client/models/com/atproto/server/create_session.py index 11024503..cb72c190 100644 --- a/packages/atproto_client/models/com/atproto/server/create_session.py +++ b/packages/atproto_client/models/com/atproto/server/create_session.py @@ -9,8 +9,9 @@ import typing_extensions as te +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -33,8 +34,8 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.createSession`.""" access_jwt: str #: Access jwt. - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. refresh_jwt: str #: Refresh jwt. active: t.Optional[bool] = None #: Active. did_doc: t.Optional['UnknownType'] = None #: Did doc. diff --git a/packages/atproto_client/models/com/atproto/server/deactivate_account.py b/packages/atproto_client/models/com/atproto/server/deactivate_account.py index 30204ad5..e29ad387 100644 --- a/packages/atproto_client/models/com/atproto/server/deactivate_account.py +++ b/packages/atproto_client/models/com/atproto/server/deactivate_account.py @@ -9,20 +9,18 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.server.deactivateAccount`.""" - delete_after: t.Optional['string_formats.DateTime'] = ( + delete_after: t.Optional[string_formats.DateTime] = ( None #: A recommendation to server as to how long they should hold onto the deactivated account before deleting. ) class DataDict(t.TypedDict): delete_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: A recommendation to server as to how long they should hold onto the deactivated account before deleting. diff --git a/packages/atproto_client/models/com/atproto/server/defs.py b/packages/atproto_client/models/com/atproto/server/defs.py index fe7ba74f..0701b48e 100644 --- a/packages/atproto_client/models/com/atproto/server/defs.py +++ b/packages/atproto_client/models/com/atproto/server/defs.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,7 +21,7 @@ class InviteCode(base.ModelBase): available: int #: Available. code: str #: Code. - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. created_by: str #: Created by. disabled: bool #: Disabled. for_account: str #: For account. @@ -34,8 +35,8 @@ class InviteCode(base.ModelBase): class InviteCodeUse(base.ModelBase): """Definition model for :obj:`com.atproto.server.defs`.""" - used_at: 'string_formats.DateTime' #: Used at. - used_by: 'string_formats.Did' #: Used by. + used_at: string_formats.DateTime #: Used at. + used_by: string_formats.Did #: Used by. py_type: t.Literal['com.atproto.server.defs#inviteCodeUse'] = Field( default='com.atproto.server.defs#inviteCodeUse', alias='$type', frozen=True diff --git a/packages/atproto_client/models/com/atproto/server/delete_account.py b/packages/atproto_client/models/com/atproto/server/delete_account.py index 88a43b83..cb416fd1 100644 --- a/packages/atproto_client/models/com/atproto/server/delete_account.py +++ b/packages/atproto_client/models/com/atproto/server/delete_account.py @@ -7,20 +7,18 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.server.deleteAccount`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. password: str #: Password. token: str #: Token. class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. password: str #: Password. token: str #: Token. 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 dd27afa7..6627e41f 100644 --- a/packages/atproto_client/models/com/atproto/server/describe_server.py +++ b/packages/atproto_client/models/com/atproto/server/describe_server.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -19,7 +20,7 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.describeServer`.""" available_user_domains: t.List[str] #: List of domain suffixes that can be used in account handles. - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. contact: t.Optional['models.ComAtprotoServerDescribeServer.Contact'] = None #: Contact information. invite_code_required: t.Optional[bool] = ( None #: If true, an invite code must be supplied to create an account on this instance. @@ -33,8 +34,8 @@ class Response(base.ResponseModelBase): class Links(base.ModelBase): """Definition model for :obj:`com.atproto.server.describeServer`.""" - privacy_policy: t.Optional['string_formats.Uri'] = None #: Privacy policy. - terms_of_service: t.Optional['string_formats.Uri'] = None #: Terms of service. + privacy_policy: t.Optional[string_formats.Uri] = None #: Privacy policy. + terms_of_service: t.Optional[string_formats.Uri] = None #: Terms of service. py_type: t.Literal['com.atproto.server.describeServer#links'] = Field( default='com.atproto.server.describeServer#links', alias='$type', frozen=True diff --git a/packages/atproto_client/models/com/atproto/server/get_service_auth.py b/packages/atproto_client/models/com/atproto/server/get_service_auth.py index 85c01712..e0105dd4 100644 --- a/packages/atproto_client/models/com/atproto/server/get_service_auth.py +++ b/packages/atproto_client/models/com/atproto/server/get_service_auth.py @@ -9,27 +9,25 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.server.getServiceAuth`.""" - aud: 'string_formats.Did' #: The DID of the service that the token will be used to authenticate with. + aud: string_formats.Did #: The DID of the service that the token will be used to authenticate with. exp: t.Optional[int] = ( None #: The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. ) - lxm: t.Optional['string_formats.Nsid'] = None #: Lexicon (XRPC) method to bind the requested token to. + lxm: t.Optional[string_formats.Nsid] = None #: Lexicon (XRPC) method to bind the requested token to. class ParamsDict(t.TypedDict): - aud: 'string_formats.Did' #: The DID of the service that the token will be used to authenticate with. + aud: string_formats.Did #: The DID of the service that the token will be used to authenticate with. exp: te.NotRequired[ t.Optional[int] ] #: The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. - lxm: te.NotRequired[t.Optional['string_formats.Nsid']] #: Lexicon (XRPC) method to bind the requested token to. + lxm: te.NotRequired[t.Optional[string_formats.Nsid]] #: Lexicon (XRPC) method to bind the requested token to. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/server/get_session.py b/packages/atproto_client/models/com/atproto/server/get_session.py index 71aea99e..1764cd0d 100644 --- a/packages/atproto_client/models/com/atproto/server/get_session.py +++ b/packages/atproto_client/models/com/atproto/server/get_session.py @@ -7,8 +7,9 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -16,8 +17,8 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.getSession`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. active: t.Optional[bool] = None #: Active. did_doc: t.Optional['UnknownType'] = None #: Did doc. email: t.Optional[str] = None #: Email. diff --git a/packages/atproto_client/models/com/atproto/server/list_app_passwords.py b/packages/atproto_client/models/com/atproto/server/list_app_passwords.py index a29e8fd9..b8fd19ad 100644 --- a/packages/atproto_client/models/com/atproto/server/list_app_passwords.py +++ b/packages/atproto_client/models/com/atproto/server/list_app_passwords.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -24,7 +25,7 @@ class Response(base.ResponseModelBase): class AppPassword(base.ModelBase): """Definition model for :obj:`com.atproto.server.listAppPasswords`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. name: str #: Name. privileged: t.Optional[bool] = None #: Privileged. diff --git a/packages/atproto_client/models/com/atproto/server/refresh_session.py b/packages/atproto_client/models/com/atproto/server/refresh_session.py index a168d0f4..ae70bf1f 100644 --- a/packages/atproto_client/models/com/atproto/server/refresh_session.py +++ b/packages/atproto_client/models/com/atproto/server/refresh_session.py @@ -7,8 +7,9 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -17,8 +18,8 @@ class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.server.refreshSession`.""" access_jwt: str #: Access jwt. - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. refresh_jwt: str #: Refresh jwt. active: t.Optional[bool] = None #: Active. did_doc: t.Optional['UnknownType'] = None #: Did doc. diff --git a/packages/atproto_client/models/com/atproto/server/reserve_signing_key.py b/packages/atproto_client/models/com/atproto/server/reserve_signing_key.py index ba8e3a7b..6a325c51 100644 --- a/packages/atproto_client/models/com/atproto/server/reserve_signing_key.py +++ b/packages/atproto_client/models/com/atproto/server/reserve_signing_key.py @@ -9,19 +9,17 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`com.atproto.server.reserveSigningKey`.""" - did: t.Optional['string_formats.Did'] = None #: The DID to reserve a key for. + did: t.Optional[string_formats.Did] = None #: The DID to reserve a key for. class DataDict(t.TypedDict): - did: te.NotRequired[t.Optional['string_formats.Did']] #: The DID to reserve a key for. + did: te.NotRequired[t.Optional[string_formats.Did]] #: The DID to reserve a key for. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/com/atproto/sync/get_blob.py b/packages/atproto_client/models/com/atproto/sync/get_blob.py index 8234425a..3009a01b 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_blob.py +++ b/packages/atproto_client/models/com/atproto/sync/get_blob.py @@ -9,21 +9,19 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getBlob`.""" - cid: 'string_formats.Cid' #: The CID of the blob to fetch. - did: 'string_formats.Did' #: The DID of the account. + cid: string_formats.Cid #: The CID of the blob to fetch. + did: string_formats.Did #: The DID of the account. class ParamsDict(t.TypedDict): - cid: 'string_formats.Cid' #: The CID of the blob to fetch. - did: 'string_formats.Did' #: The DID of the account. + cid: string_formats.Cid #: The CID of the blob to fetch. + did: string_formats.Did #: The DID of the account. #: Response raw data type. diff --git a/packages/atproto_client/models/com/atproto/sync/get_blocks.py b/packages/atproto_client/models/com/atproto/sync/get_blocks.py index 45fae5a1..c0abe958 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_blocks.py +++ b/packages/atproto_client/models/com/atproto/sync/get_blocks.py @@ -9,21 +9,19 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getBlocks`.""" - cids: t.List['string_formats.Cid'] #: Cids. - did: 'string_formats.Did' #: The DID of the repo. + cids: t.List[string_formats.Cid] #: Cids. + did: string_formats.Did #: The DID of the repo. class ParamsDict(t.TypedDict): - cids: t.List['string_formats.Cid'] #: Cids. - did: 'string_formats.Did' #: The DID of the repo. + cids: t.List[string_formats.Cid] #: Cids. + did: string_formats.Did #: The DID of the repo. #: Response raw data type. diff --git a/packages/atproto_client/models/com/atproto/sync/get_checkout.py b/packages/atproto_client/models/com/atproto/sync/get_checkout.py index f27cc0ce..4c40c37b 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_checkout.py +++ b/packages/atproto_client/models/com/atproto/sync/get_checkout.py @@ -9,19 +9,17 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getCheckout`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. #: Response raw data type. diff --git a/packages/atproto_client/models/com/atproto/sync/get_head.py b/packages/atproto_client/models/com/atproto/sync/get_head.py index fb6d919d..266f26d5 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_head.py +++ b/packages/atproto_client/models/com/atproto/sync/get_head.py @@ -7,22 +7,20 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getHead`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.sync.getHead`.""" - root: 'string_formats.Cid' #: Root. + root: string_formats.Cid #: Root. diff --git a/packages/atproto_client/models/com/atproto/sync/get_latest_commit.py b/packages/atproto_client/models/com/atproto/sync/get_latest_commit.py index 110d0e62..f25f623c 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_latest_commit.py +++ b/packages/atproto_client/models/com/atproto/sync/get_latest_commit.py @@ -7,23 +7,21 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getLatestCommit`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.sync.getLatestCommit`.""" - cid: 'string_formats.Cid' #: Cid. + cid: string_formats.Cid #: Cid. rev: str #: Rev. diff --git a/packages/atproto_client/models/com/atproto/sync/get_record.py b/packages/atproto_client/models/com/atproto/sync/get_record.py index 657950e4..464c2ed8 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_record.py +++ b/packages/atproto_client/models/com/atproto/sync/get_record.py @@ -9,28 +9,26 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getRecord`.""" - collection: 'string_formats.Nsid' #: Collection. - did: 'string_formats.Did' #: The DID of the repo. + collection: string_formats.Nsid #: Collection. + did: string_formats.Did #: The DID of the repo. rkey: str #: Record Key. - commit: t.Optional['string_formats.Cid'] = ( + commit: t.Optional[string_formats.Cid] = ( None #: DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit. ) class ParamsDict(t.TypedDict): - collection: 'string_formats.Nsid' #: Collection. - did: 'string_formats.Did' #: The DID of the repo. + collection: string_formats.Nsid #: Collection. + did: string_formats.Did #: The DID of the repo. rkey: str #: Record Key. commit: te.NotRequired[ - t.Optional['string_formats.Cid'] + t.Optional[string_formats.Cid] ] #: DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit. diff --git a/packages/atproto_client/models/com/atproto/sync/get_repo.py b/packages/atproto_client/models/com/atproto/sync/get_repo.py index bdfe4287..e29a3966 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_repo.py +++ b/packages/atproto_client/models/com/atproto/sync/get_repo.py @@ -9,20 +9,18 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getRepo`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. since: t.Optional[str] = None #: The revision ('rev') of the repo to create a diff from. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. since: te.NotRequired[t.Optional[str]] #: The revision ('rev') of the repo to create a diff from. diff --git a/packages/atproto_client/models/com/atproto/sync/get_repo_status.py b/packages/atproto_client/models/com/atproto/sync/get_repo_status.py index 5188f523..5e734b2a 100644 --- a/packages/atproto_client/models/com/atproto/sync/get_repo_status.py +++ b/packages/atproto_client/models/com/atproto/sync/get_repo_status.py @@ -7,26 +7,24 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.getRepoStatus`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.sync.getRepoStatus`.""" active: bool #: Active. - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. rev: t.Optional[str] = None #: Optional field, the current rev of the repo, if active=true. status: t.Optional[t.Union[t.Literal['takendown'], t.Literal['suspended'], t.Literal['deactivated'], str]] = ( None #: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. diff --git a/packages/atproto_client/models/com/atproto/sync/list_blobs.py b/packages/atproto_client/models/com/atproto/sync/list_blobs.py index 79094b86..036d77c8 100644 --- a/packages/atproto_client/models/com/atproto/sync/list_blobs.py +++ b/packages/atproto_client/models/com/atproto/sync/list_blobs.py @@ -10,22 +10,20 @@ import typing_extensions as te from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.sync.listBlobs`.""" - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=500, ge=1, le=1000) #: Limit. since: t.Optional[str] = None #: Optional revision of the repo to list blobs since. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: The DID of the repo. + did: string_formats.Did #: The DID of the repo. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. since: te.NotRequired[t.Optional[str]] #: Optional revision of the repo to list blobs since. @@ -34,5 +32,5 @@ class ParamsDict(t.TypedDict): class Response(base.ResponseModelBase): """Output data model for :obj:`com.atproto.sync.listBlobs`.""" - cids: t.List['string_formats.Cid'] #: Cids. + cids: t.List[string_formats.Cid] #: Cids. cursor: t.Optional[str] = None #: Cursor. diff --git a/packages/atproto_client/models/com/atproto/sync/list_repos.py b/packages/atproto_client/models/com/atproto/sync/list_repos.py index d75e62df..9cd5fb89 100644 --- a/packages/atproto_client/models/com/atproto/sync/list_repos.py +++ b/packages/atproto_client/models/com/atproto/sync/list_repos.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -38,8 +39,8 @@ class Response(base.ResponseModelBase): class Repo(base.ModelBase): """Definition model for :obj:`com.atproto.sync.listRepos`.""" - did: 'string_formats.Did' #: Did. - head: 'string_formats.Cid' #: Current repo commit CID. + did: string_formats.Did #: Did. + head: string_formats.Cid #: Current repo commit CID. rev: str #: Rev. active: t.Optional[bool] = None #: Active. status: t.Optional[t.Union[t.Literal['takendown'], t.Literal['suspended'], t.Literal['deactivated'], str]] = ( diff --git a/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py b/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py index ed1b6658..862fbb69 100644 --- a/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py +++ b/packages/atproto_client/models/com/atproto/sync/subscribe_repos.py @@ -10,11 +10,12 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_core.cid import CIDType from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -36,10 +37,10 @@ class Commit(base.ModelBase): commit: 'CIDType' #: Repo commit object CID. ops: t.List['models.ComAtprotoSyncSubscribeRepos.RepoOp'] = Field(max_length=200) #: Ops. rebase: bool #: DEPRECATED -- unused. - repo: 'string_formats.Did' #: The repo this event comes from. + repo: string_formats.Did #: The repo this event comes from. rev: str #: The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. seq: int #: The stream sequence number of this message. - time: 'string_formats.DateTime' #: Timestamp of when this message was originally broadcast. + time: string_formats.DateTime #: Timestamp of when this message was originally broadcast. too_big: bool #: Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. prev: t.Optional['CIDType'] = ( None #: DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. @@ -54,10 +55,10 @@ class Commit(base.ModelBase): class Identity(base.ModelBase): """Definition model for :obj:`com.atproto.sync.subscribeRepos`. Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. seq: int #: Seq. - time: 'string_formats.DateTime' #: Time. - handle: t.Optional['string_formats.Handle'] = ( + time: string_formats.DateTime #: Time. + handle: t.Optional[string_formats.Handle] = ( None #: The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. ) @@ -72,9 +73,9 @@ class Account(base.ModelBase): active: ( bool #: Indicates that the account has a repository which can be fetched from the host that emitted this event. ) - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. seq: int #: Seq. - time: 'string_formats.DateTime' #: Time. + time: string_formats.DateTime #: Time. status: t.Optional[ t.Union[t.Literal['takendown'], t.Literal['suspended'], t.Literal['deleted'], t.Literal['deactivated'], str] ] = None #: If active=false, this optional field indicates a reason for why the account is not active. @@ -87,10 +88,10 @@ class Account(base.ModelBase): class Handle(base.ModelBase): """Definition model for :obj:`com.atproto.sync.subscribeRepos`. DEPRECATED -- Use #identity event instead.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. seq: int #: Seq. - time: 'string_formats.DateTime' #: Time. + time: string_formats.DateTime #: Time. py_type: t.Literal['com.atproto.sync.subscribeRepos#handle'] = Field( default='com.atproto.sync.subscribeRepos#handle', alias='$type', frozen=True @@ -100,9 +101,9 @@ class Handle(base.ModelBase): class Migrate(base.ModelBase): """Definition model for :obj:`com.atproto.sync.subscribeRepos`. DEPRECATED -- Use #account event instead.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. seq: int #: Seq. - time: 'string_formats.DateTime' #: Time. + time: string_formats.DateTime #: Time. migrate_to: t.Optional[str] = None #: Migrate to. py_type: t.Literal['com.atproto.sync.subscribeRepos#migrate'] = Field( @@ -113,9 +114,9 @@ class Migrate(base.ModelBase): class Tombstone(base.ModelBase): """Definition model for :obj:`com.atproto.sync.subscribeRepos`. DEPRECATED -- Use #account event instead.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. seq: int #: Seq. - time: 'string_formats.DateTime' #: Time. + time: string_formats.DateTime #: Time. py_type: t.Literal['com.atproto.sync.subscribeRepos#tombstone'] = Field( default='com.atproto.sync.subscribeRepos#tombstone', alias='$type', frozen=True diff --git a/packages/atproto_client/models/string_formats.py b/packages/atproto_client/models/string_formats.py index 8d6bb42b..62eaa66f 100644 --- a/packages/atproto_client/models/string_formats.py +++ b/packages/atproto_client/models/string_formats.py @@ -1,7 +1,7 @@ import re import string from datetime import datetime -from typing import Callable, Optional, Set, Union +from typing import Callable, Mapping, Set, Union from urllib.parse import urlparse from pydantic import BeforeValidator, Field, ValidationInfo @@ -33,8 +33,8 @@ def only_validate_if_strict(validate_fn: core_schema.WithInfoValidatorFunction) -> Callable: """Skip validation if not opting into strict validation.""" - def wrapper(v: str, info: Optional[ValidationInfo] = None) -> str: - if not (info and isinstance(info.context, dict) and info.context.get(_OPT_IN_KEY, False)): + def wrapper(v: str, info: ValidationInfo) -> str: + if not (info and isinstance(info.context, Mapping) and info.context.get(_OPT_IN_KEY, False)): return v return validate_fn(v, info) diff --git a/packages/atproto_client/models/tools/ozone/communication/create_template.py b/packages/atproto_client/models/tools/ozone/communication/create_template.py index 73100c6f..f5e6c9a7 100644 --- a/packages/atproto_client/models/tools/ozone/communication/create_template.py +++ b/packages/atproto_client/models/tools/ozone/communication/create_template.py @@ -9,9 +9,7 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): @@ -20,13 +18,13 @@ class Data(base.DataModelBase): 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: t.Optional['string_formats.Did'] = None #: DID of the user who is creating the template. - lang: t.Optional['string_formats.Language'] = None #: Message language. + created_by: t.Optional[string_formats.Did] = None #: DID of the user who is creating the template. + lang: t.Optional[string_formats.Language] = None #: Message language. class DataDict(t.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['string_formats.Did']] #: DID of the user who is creating the template. - lang: te.NotRequired[t.Optional['string_formats.Language']] #: Message language. + created_by: te.NotRequired[t.Optional[string_formats.Did]] #: DID of the user who is creating the template. + lang: te.NotRequired[t.Optional[string_formats.Language]] #: Message language. diff --git a/packages/atproto_client/models/tools/ozone/communication/defs.py b/packages/atproto_client/models/tools/ozone/communication/defs.py index 047b9bcb..d36e33e1 100644 --- a/packages/atproto_client/models/tools/ozone/communication/defs.py +++ b/packages/atproto_client/models/tools/ozone/communication/defs.py @@ -9,22 +9,20 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class TemplateView(base.ModelBase): """Definition model for :obj:`tools.ozone.communication.defs`.""" content_markdown: str #: Subject of the message, used in emails. - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. disabled: bool #: Disabled. id: str #: Id. - last_updated_by: 'string_formats.Did' #: DID of the user who last updated the template. + last_updated_by: string_formats.Did #: DID of the user who last updated the template. name: str #: Name of the template. - updated_at: 'string_formats.DateTime' #: Updated at. - lang: t.Optional['string_formats.Language'] = None #: Message language. + updated_at: string_formats.DateTime #: Updated at. + lang: t.Optional[string_formats.Language] = None #: Message language. subject: t.Optional[str] = None #: Content of the template, can contain markdown and variable placeholders. py_type: t.Literal['tools.ozone.communication.defs#templateView'] = Field( diff --git a/packages/atproto_client/models/tools/ozone/communication/update_template.py b/packages/atproto_client/models/tools/ozone/communication/update_template.py index 748f6210..43226db7 100644 --- a/packages/atproto_client/models/tools/ozone/communication/update_template.py +++ b/packages/atproto_client/models/tools/ozone/communication/update_template.py @@ -9,9 +9,7 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): @@ -22,10 +20,10 @@ class Data(base.DataModelBase): None #: Content of the template, markdown supported, can contain variable placeholders. ) disabled: t.Optional[bool] = None #: Disabled. - lang: t.Optional['string_formats.Language'] = None #: Message language. + lang: t.Optional[string_formats.Language] = None #: Message language. 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['string_formats.Did'] = None #: DID of the user who is updating the template. + updated_by: t.Optional[string_formats.Did] = None #: DID of the user who is updating the template. class DataDict(t.TypedDict): @@ -34,7 +32,7 @@ class DataDict(t.TypedDict): t.Optional[str] ] #: Content of the template, markdown supported, can contain variable placeholders. disabled: te.NotRequired[t.Optional[bool]] #: Disabled. - lang: te.NotRequired[t.Optional['string_formats.Language']] #: Message language. + lang: te.NotRequired[t.Optional[string_formats.Language]] #: Message language. 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['string_formats.Did']] #: DID of the user who is updating the template. + updated_by: te.NotRequired[t.Optional[string_formats.Did]] #: DID of the user who is updating the template. diff --git a/packages/atproto_client/models/tools/ozone/moderation/defs.py b/packages/atproto_client/models/tools/ozone/moderation/defs.py index 50d2d0fe..b8f67d63 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/defs.py +++ b/packages/atproto_client/models/tools/ozone/moderation/defs.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -20,8 +21,8 @@ class ModEventView(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - created_at: 'string_formats.DateTime' #: Created at. - created_by: 'string_formats.Did' #: Created by. + created_at: string_formats.DateTime #: Created at. + created_by: string_formats.Did #: Created by. event: te.Annotated[ t.Union[ 'models.ToolsOzoneModerationDefs.ModEventTakedown', @@ -66,8 +67,8 @@ class ModEventView(base.ModelBase): class ModEventViewDetail(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - created_at: 'string_formats.DateTime' #: Created at. - created_by: 'string_formats.Did' #: Created by. + created_at: string_formats.DateTime #: Created at. + created_by: string_formats.Did #: Created by. event: te.Annotated[ t.Union[ 'models.ToolsOzoneModerationDefs.ModEventTakedown', @@ -111,14 +112,18 @@ class ModEventViewDetail(base.ModelBase): class SubjectStatusView(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - created_at: 'string_formats.DateTime' #: Timestamp referencing the first moderation status impacting event was emitted on the subject. + created_at: ( + string_formats.DateTime + ) #: Timestamp referencing the first moderation status impacting event was emitted on the subject. id: int #: Id. review_state: 'models.ToolsOzoneModerationDefs.SubjectReviewState' #: Review state. subject: te.Annotated[ t.Union['models.ComAtprotoAdminDefs.RepoRef', 'models.ComAtprotoRepoStrongRef.Main'], Field(discriminator='py_type'), ] #: Subject. - updated_at: 'string_formats.DateTime' #: Timestamp referencing when the last update was made to the moderation status of the subject. + updated_at: ( + string_formats.DateTime + ) #: Timestamp referencing when the last update was made to the moderation status of the subject. appealed: t.Optional[bool] = ( None #: True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. ) @@ -129,17 +134,17 @@ class SubjectStatusView(base.ModelBase): Field(default=None, discriminator='py_type'), ] ] = None #: Hosting. - last_appealed_at: t.Optional['string_formats.DateTime'] = ( + last_appealed_at: t.Optional[string_formats.DateTime] = ( None #: Timestamp referencing when the author of the subject appealed a moderation action. ) - last_reported_at: t.Optional['string_formats.DateTime'] = None #: Last reported at. - last_reviewed_at: t.Optional['string_formats.DateTime'] = None #: Last reviewed at. - last_reviewed_by: t.Optional['string_formats.Did'] = None #: Last reviewed by. - mute_reporting_until: t.Optional['string_formats.DateTime'] = None #: Mute reporting until. - mute_until: t.Optional['string_formats.DateTime'] = None #: Mute until. - subject_blob_cids: t.Optional[t.List['string_formats.Cid']] = None #: Subject blob cids. + last_reported_at: t.Optional[string_formats.DateTime] = None #: Last reported at. + last_reviewed_at: t.Optional[string_formats.DateTime] = None #: Last reviewed at. + last_reviewed_by: t.Optional[string_formats.Did] = None #: Last reviewed by. + mute_reporting_until: t.Optional[string_formats.DateTime] = None #: Mute reporting until. + mute_until: t.Optional[string_formats.DateTime] = None #: Mute until. + subject_blob_cids: t.Optional[t.List[string_formats.Cid]] = None #: Subject blob cids. subject_repo_handle: t.Optional[str] = None #: Subject repo handle. - suspend_until: t.Optional['string_formats.DateTime'] = None #: Suspend until. + suspend_until: t.Optional[string_formats.DateTime] = None #: Suspend until. tags: t.Optional[t.List[str]] = None #: Tags. takendown: t.Optional[bool] = None #: Takendown. @@ -350,7 +355,7 @@ class AccountEvent(base.ModelBase): active: ( bool #: Indicates that the account has a repository which can be fetched from the host that emitted this event. ) - timestamp: 'string_formats.DateTime' #: Timestamp. + timestamp: string_formats.DateTime #: Timestamp. comment: t.Optional[str] = None #: Comment. status: t.Optional[ t.Union[ @@ -372,10 +377,10 @@ class AccountEvent(base.ModelBase): class IdentityEvent(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`. Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.""" - timestamp: 'string_formats.DateTime' #: Timestamp. + timestamp: string_formats.DateTime #: Timestamp. comment: t.Optional[str] = None #: Comment. - handle: t.Optional['string_formats.Handle'] = None #: Handle. - pds_host: t.Optional['string_formats.Uri'] = None #: Pds host. + handle: t.Optional[string_formats.Handle] = None #: Handle. + pds_host: t.Optional[string_formats.Uri] = None #: Pds host. tombstone: t.Optional[bool] = None #: Tombstone. py_type: t.Literal['tools.ozone.moderation.defs#identityEvent'] = Field( @@ -387,8 +392,8 @@ class RecordEvent(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`. Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.""" op: t.Union[t.Literal['create'], t.Literal['update'], t.Literal['delete'], str] #: Op. - timestamp: 'string_formats.DateTime' #: Timestamp. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + timestamp: string_formats.DateTime #: Timestamp. + cid: t.Optional[string_formats.Cid] = None #: Cid. comment: t.Optional[str] = None #: Comment. py_type: t.Literal['tools.ozone.moderation.defs#recordEvent'] = Field( @@ -399,12 +404,12 @@ class RecordEvent(base.ModelBase): class RepoView(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. - indexed_at: 'string_formats.DateTime' #: Indexed at. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. + indexed_at: string_formats.DateTime #: Indexed at. moderation: 'models.ToolsOzoneModerationDefs.Moderation' #: Moderation. related_records: t.List['UnknownType'] #: Related records. - deactivated_at: t.Optional['string_formats.DateTime'] = None #: Deactivated at. + deactivated_at: t.Optional[string_formats.DateTime] = None #: Deactivated at. email: t.Optional[str] = None #: Email. invite_note: t.Optional[str] = None #: Invite note. invited_by: t.Optional['models.ComAtprotoServerDefs.InviteCode'] = None #: Invited by. @@ -419,14 +424,14 @@ class RepoView(base.ModelBase): class RepoViewDetail(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - did: 'string_formats.Did' #: Did. - handle: 'string_formats.Handle' #: Handle. - indexed_at: 'string_formats.DateTime' #: Indexed at. + did: string_formats.Did #: Did. + handle: string_formats.Handle #: Handle. + indexed_at: string_formats.DateTime #: Indexed at. moderation: 'models.ToolsOzoneModerationDefs.ModerationDetail' #: Moderation. related_records: t.List['UnknownType'] #: Related records. - deactivated_at: t.Optional['string_formats.DateTime'] = None #: Deactivated at. + deactivated_at: t.Optional[string_formats.DateTime] = None #: Deactivated at. email: t.Optional[str] = None #: Email. - email_confirmed_at: t.Optional['string_formats.DateTime'] = None #: Email confirmed at. + email_confirmed_at: t.Optional[string_formats.DateTime] = None #: Email confirmed at. invite_note: t.Optional[str] = None #: Invite note. invited_by: t.Optional['models.ComAtprotoServerDefs.InviteCode'] = None #: Invited by. invites: t.Optional[t.List['models.ComAtprotoServerDefs.InviteCode']] = None #: Invites. @@ -442,7 +447,7 @@ class RepoViewDetail(base.ModelBase): class RepoViewNotFound(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. py_type: t.Literal['tools.ozone.moderation.defs#repoViewNotFound'] = Field( default='tools.ozone.moderation.defs#repoViewNotFound', alias='$type', frozen=True @@ -452,12 +457,12 @@ class RepoViewNotFound(base.ModelBase): class RecordView(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - blob_cids: t.List['string_formats.Cid'] #: Blob cids. - cid: 'string_formats.Cid' #: Cid. - indexed_at: 'string_formats.DateTime' #: Indexed at. + blob_cids: t.List[string_formats.Cid] #: Blob cids. + cid: string_formats.Cid #: Cid. + indexed_at: string_formats.DateTime #: Indexed at. moderation: 'models.ToolsOzoneModerationDefs.Moderation' #: Moderation. repo: 'models.ToolsOzoneModerationDefs.RepoView' #: Repo. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. value: 'UnknownType' #: Value. py_type: t.Literal['tools.ozone.moderation.defs#recordView'] = Field( @@ -469,11 +474,11 @@ class RecordViewDetail(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" blobs: t.List['models.ToolsOzoneModerationDefs.BlobView'] #: Blobs. - cid: 'string_formats.Cid' #: Cid. - indexed_at: 'string_formats.DateTime' #: Indexed at. + cid: string_formats.Cid #: Cid. + indexed_at: string_formats.DateTime #: Indexed at. moderation: 'models.ToolsOzoneModerationDefs.ModerationDetail' #: Moderation. repo: 'models.ToolsOzoneModerationDefs.RepoView' #: Repo. - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. value: 'UnknownType' #: Value. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. @@ -485,7 +490,7 @@ class RecordViewDetail(base.ModelBase): class RecordViewNotFound(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - uri: 'string_formats.AtUri' #: Uri. + uri: string_formats.AtUri #: Uri. py_type: t.Literal['tools.ozone.moderation.defs#recordViewNotFound'] = Field( default='tools.ozone.moderation.defs#recordViewNotFound', alias='$type', frozen=True @@ -515,8 +520,8 @@ class ModerationDetail(base.ModelBase): class BlobView(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" - cid: 'string_formats.Cid' #: Cid. - created_at: 'string_formats.DateTime' #: Created at. + cid: string_formats.Cid #: Cid. + created_at: string_formats.DateTime #: Created at. mime_type: str #: Mime type. size: int #: Size. details: t.Optional[ @@ -566,11 +571,11 @@ class AccountHosting(base.ModelBase): t.Literal['unknown'], str, ] #: Status. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. - deactivated_at: t.Optional['string_formats.DateTime'] = None #: Deactivated at. - deleted_at: t.Optional['string_formats.DateTime'] = None #: Deleted at. - reactivated_at: t.Optional['string_formats.DateTime'] = None #: Reactivated at. - updated_at: t.Optional['string_formats.DateTime'] = None #: Updated at. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. + deactivated_at: t.Optional[string_formats.DateTime] = None #: Deactivated at. + deleted_at: t.Optional[string_formats.DateTime] = None #: Deleted at. + reactivated_at: t.Optional[string_formats.DateTime] = None #: Reactivated at. + updated_at: t.Optional[string_formats.DateTime] = None #: Updated at. py_type: t.Literal['tools.ozone.moderation.defs#accountHosting'] = Field( default='tools.ozone.moderation.defs#accountHosting', alias='$type', frozen=True @@ -581,9 +586,9 @@ class RecordHosting(base.ModelBase): """Definition model for :obj:`tools.ozone.moderation.defs`.""" status: t.Union[t.Literal['deleted'], t.Literal['unknown'], str] #: Status. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. - deleted_at: t.Optional['string_formats.DateTime'] = None #: Deleted at. - updated_at: t.Optional['string_formats.DateTime'] = None #: Updated at. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. + deleted_at: t.Optional[string_formats.DateTime] = None #: Deleted at. + updated_at: t.Optional[string_formats.DateTime] = None #: Updated at. py_type: t.Literal['tools.ozone.moderation.defs#recordHosting'] = Field( default='tools.ozone.moderation.defs#recordHosting', alias='$type', frozen=True diff --git a/packages/atproto_client/models/tools/ozone/moderation/emit_event.py b/packages/atproto_client/models/tools/ozone/moderation/emit_event.py index 8853ab09..4b9efc04 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/emit_event.py +++ b/packages/atproto_client/models/tools/ozone/moderation/emit_event.py @@ -10,16 +10,17 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.moderation.emitEvent`.""" - created_by: 'string_formats.Did' #: Created by. + created_by: string_formats.Did #: Created by. event: te.Annotated[ t.Union[ 'models.ToolsOzoneModerationDefs.ModEventTakedown', @@ -46,11 +47,11 @@ class Data(base.DataModelBase): t.Union['models.ComAtprotoAdminDefs.RepoRef', 'models.ComAtprotoRepoStrongRef.Main'], Field(discriminator='py_type'), ] #: Subject. - subject_blob_cids: t.Optional[t.List['string_formats.Cid']] = None #: Subject blob cids. + subject_blob_cids: t.Optional[t.List[string_formats.Cid]] = None #: Subject blob cids. class DataDict(t.TypedDict): - created_by: 'string_formats.Did' #: Created by. + created_by: string_formats.Did #: Created by. event: te.Annotated[ t.Union[ 'models.ToolsOzoneModerationDefs.ModEventTakedown', @@ -77,4 +78,4 @@ class DataDict(t.TypedDict): t.Union['models.ComAtprotoAdminDefs.RepoRef', 'models.ComAtprotoRepoStrongRef.Main'], Field(discriminator='py_type'), ] #: Subject. - subject_blob_cids: te.NotRequired[t.Optional[t.List['string_formats.Cid']]] #: Subject blob cids. + subject_blob_cids: te.NotRequired[t.Optional[t.List[string_formats.Cid]]] #: Subject blob cids. diff --git a/packages/atproto_client/models/tools/ozone/moderation/get_record.py b/packages/atproto_client/models/tools/ozone/moderation/get_record.py index b649a104..dfdb4734 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/get_record.py +++ b/packages/atproto_client/models/tools/ozone/moderation/get_record.py @@ -9,18 +9,16 @@ import typing_extensions as te -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.moderation.getRecord`.""" - uri: 'string_formats.AtUri' #: Uri. - cid: t.Optional['string_formats.Cid'] = None #: Cid. + uri: string_formats.AtUri #: Uri. + cid: t.Optional[string_formats.Cid] = None #: Cid. class ParamsDict(t.TypedDict): - uri: 'string_formats.AtUri' #: Uri. - cid: te.NotRequired[t.Optional['string_formats.Cid']] #: Cid. + uri: string_formats.AtUri #: Uri. + cid: te.NotRequired[t.Optional[string_formats.Cid]] #: Cid. diff --git a/packages/atproto_client/models/tools/ozone/moderation/get_records.py b/packages/atproto_client/models/tools/ozone/moderation/get_records.py index 1f1d0501..28e12d18 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/get_records.py +++ b/packages/atproto_client/models/tools/ozone/moderation/get_records.py @@ -10,20 +10,21 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.moderation.getRecords`.""" - uris: t.List['string_formats.AtUri'] = Field(max_length=100) #: Uris. + uris: t.List[string_formats.AtUri] = Field(max_length=100) #: Uris. class ParamsDict(t.TypedDict): - uris: t.List['string_formats.AtUri'] #: Uris. + uris: t.List[string_formats.AtUri] #: Uris. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/tools/ozone/moderation/get_repo.py b/packages/atproto_client/models/tools/ozone/moderation/get_repo.py index c383bb9d..3c8014b5 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/get_repo.py +++ b/packages/atproto_client/models/tools/ozone/moderation/get_repo.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.moderation.getRepo`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. diff --git a/packages/atproto_client/models/tools/ozone/moderation/get_repos.py b/packages/atproto_client/models/tools/ozone/moderation/get_repos.py index ecaddb56..c27e888a 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/get_repos.py +++ b/packages/atproto_client/models/tools/ozone/moderation/get_repos.py @@ -10,20 +10,21 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.moderation.getRepos`.""" - dids: t.List['string_formats.Did'] = Field(max_length=100) #: Dids. + dids: t.List[string_formats.Did] = Field(max_length=100) #: Dids. class ParamsDict(t.TypedDict): - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/tools/ozone/moderation/query_events.py b/packages/atproto_client/models/tools/ozone/moderation/query_events.py index fcf4f22f..4e618042 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/query_events.py +++ b/packages/atproto_client/models/tools/ozone/moderation/query_events.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -25,13 +26,13 @@ class Params(base.ParamsModelBase): added_tags: t.Optional[t.List[str]] = ( None #: If specified, only events where all of these tags were added are returned. ) - collections: t.Optional[t.List['string_formats.Nsid']] = Field( + collections: t.Optional[t.List[string_formats.Nsid]] = Field( default=None, max_length=20 ) #: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. comment: t.Optional[str] = None #: If specified, only events with comments containing the keyword are returned. - created_after: t.Optional['string_formats.DateTime'] = None #: Retrieve events created after a given timestamp. - created_before: t.Optional['string_formats.DateTime'] = None #: Retrieve events created before a given timestamp. - created_by: t.Optional['string_formats.Did'] = None #: Created by. + created_after: t.Optional[string_formats.DateTime] = None #: Retrieve events created after a given timestamp. + created_before: t.Optional[string_formats.DateTime] = None #: Retrieve events created before a given timestamp. + created_by: t.Optional[string_formats.Did] = None #: Created by. cursor: t.Optional[str] = None #: Cursor. has_comment: t.Optional[bool] = None #: If true, only events with comments are returned. include_all_user_records: t.Optional[bool] = ( @@ -48,7 +49,7 @@ class Params(base.ParamsModelBase): sort_direction: t.Optional[t.Union[t.Literal['asc'], t.Literal['desc']]] = ( 'desc' #: Sort direction for the events. Defaults to descending order of created at timestamp. ) - subject: t.Optional['string_formats.Uri'] = None #: Subject. + subject: t.Optional[string_formats.Uri] = None #: Subject. subject_type: t.Optional[t.Union[t.Literal['account'], t.Literal['record'], str]] = ( None #: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. ) @@ -65,18 +66,18 @@ class ParamsDict(t.TypedDict): t.Optional[t.List[str]] ] #: If specified, only events where all of these tags were added are returned. collections: te.NotRequired[ - t.Optional[t.List['string_formats.Nsid']] + t.Optional[t.List[string_formats.Nsid]] ] #: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. comment: te.NotRequired[ t.Optional[str] ] #: If specified, only events with comments containing the keyword are returned. created_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Retrieve events created after a given timestamp. created_before: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Retrieve events created before a given timestamp. - created_by: te.NotRequired[t.Optional['string_formats.Did']] #: Created by. + created_by: te.NotRequired[t.Optional[string_formats.Did]] #: Created by. cursor: te.NotRequired[t.Optional[str]] #: Cursor. has_comment: te.NotRequired[t.Optional[bool]] #: If true, only events with comments are returned. include_all_user_records: te.NotRequired[ @@ -93,7 +94,7 @@ class ParamsDict(t.TypedDict): sort_direction: te.NotRequired[ t.Optional[t.Union[t.Literal['asc'], t.Literal['desc']]] ] #: Sort direction for the events. Defaults to descending order of created at timestamp. - subject: te.NotRequired[t.Optional['string_formats.Uri']] #: Subject. + subject: te.NotRequired[t.Optional[string_formats.Uri]] #: Subject. subject_type: te.NotRequired[ t.Optional[t.Union[t.Literal['account'], t.Literal['record'], str]] ] #: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. diff --git a/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py b/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py index b7746910..171bf16f 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py +++ b/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,47 +21,47 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.moderation.queryStatuses`.""" appealed: t.Optional[bool] = None #: Get subjects in unresolved appealed status. - collections: t.Optional[t.List['string_formats.Nsid']] = Field( + collections: t.Optional[t.List[string_formats.Nsid]] = Field( default=None, max_length=20 ) #: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. comment: t.Optional[str] = None #: Search subjects by keyword from comments. cursor: t.Optional[str] = None #: Cursor. exclude_tags: t.Optional[t.List[str]] = None #: Exclude tags. - hosting_deleted_after: t.Optional['string_formats.DateTime'] = ( + hosting_deleted_after: t.Optional[string_formats.DateTime] = ( None #: Search subjects where the associated record/account was deleted after a given timestamp. ) - hosting_deleted_before: t.Optional['string_formats.DateTime'] = ( + hosting_deleted_before: t.Optional[string_formats.DateTime] = ( None #: Search subjects where the associated record/account was deleted before a given timestamp. ) hosting_statuses: t.Optional[t.List[str]] = None #: Search subjects by the status of the associated record/account. - hosting_updated_after: t.Optional['string_formats.DateTime'] = ( + hosting_updated_after: t.Optional[string_formats.DateTime] = ( None #: Search subjects where the associated record/account was updated after a given timestamp. ) - hosting_updated_before: t.Optional['string_formats.DateTime'] = ( + hosting_updated_before: t.Optional[string_formats.DateTime] = ( None #: Search subjects where the associated record/account was updated before a given timestamp. ) - ignore_subjects: t.Optional[t.List['string_formats.Uri']] = None #: Ignore subjects. + ignore_subjects: t.Optional[t.List[string_formats.Uri]] = None #: Ignore subjects. include_all_user_records: t.Optional[bool] = ( None #: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. ) include_muted: t.Optional[bool] = ( None #: By default, we don't include muted subjects in the results. Set this to true to include them. ) - last_reviewed_by: t.Optional['string_formats.Did'] = ( + last_reviewed_by: t.Optional[string_formats.Did] = ( None #: Get all subject statuses that were reviewed by a specific moderator. ) limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. only_muted: t.Optional[bool] = None #: When set to true, only muted subjects and reporters will be returned. - reported_after: t.Optional['string_formats.DateTime'] = None #: Search subjects reported after a given timestamp. - reported_before: t.Optional['string_formats.DateTime'] = None #: Search subjects reported before a given timestamp. + reported_after: t.Optional[string_formats.DateTime] = None #: Search subjects reported after a given timestamp. + reported_before: t.Optional[string_formats.DateTime] = None #: Search subjects reported before a given timestamp. review_state: t.Optional[str] = None #: Specify when fetching subjects in a certain state. - reviewed_after: t.Optional['string_formats.DateTime'] = None #: Search subjects reviewed after a given timestamp. - reviewed_before: t.Optional['string_formats.DateTime'] = None #: Search subjects reviewed before a given timestamp. + reviewed_after: t.Optional[string_formats.DateTime] = None #: Search subjects reviewed after a given timestamp. + reviewed_before: t.Optional[string_formats.DateTime] = None #: Search subjects reviewed before a given timestamp. sort_direction: t.Optional[t.Union[t.Literal['asc'], t.Literal['desc']]] = 'desc' #: Sort direction. sort_field: t.Optional[t.Union[t.Literal['lastReviewedAt'], t.Literal['lastReportedAt']]] = ( 'lastReportedAt' #: Sort field. ) - subject: t.Optional['string_formats.Uri'] = None #: The subject to get the status for. + subject: t.Optional[string_formats.Uri] = None #: The subject to get the status for. subject_type: t.Optional[t.Union[t.Literal['account'], t.Literal['record'], str]] = ( None #: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. ) @@ -71,27 +72,27 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): appealed: te.NotRequired[t.Optional[bool]] #: Get subjects in unresolved appealed status. collections: te.NotRequired[ - t.Optional[t.List['string_formats.Nsid']] + t.Optional[t.List[string_formats.Nsid]] ] #: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. comment: te.NotRequired[t.Optional[str]] #: Search subjects by keyword from comments. cursor: te.NotRequired[t.Optional[str]] #: Cursor. exclude_tags: te.NotRequired[t.Optional[t.List[str]]] #: Exclude tags. hosting_deleted_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects where the associated record/account was deleted after a given timestamp. hosting_deleted_before: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects where the associated record/account was deleted before a given timestamp. hosting_statuses: te.NotRequired[ t.Optional[t.List[str]] ] #: Search subjects by the status of the associated record/account. hosting_updated_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects where the associated record/account was updated after a given timestamp. hosting_updated_before: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects where the associated record/account was updated before a given timestamp. - ignore_subjects: te.NotRequired[t.Optional[t.List['string_formats.Uri']]] #: Ignore subjects. + ignore_subjects: te.NotRequired[t.Optional[t.List[string_formats.Uri]]] #: Ignore subjects. include_all_user_records: te.NotRequired[ t.Optional[bool] ] #: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. @@ -99,30 +100,30 @@ class ParamsDict(t.TypedDict): t.Optional[bool] ] #: By default, we don't include muted subjects in the results. Set this to true to include them. last_reviewed_by: te.NotRequired[ - t.Optional['string_formats.Did'] + t.Optional[string_formats.Did] ] #: Get all subject statuses that were reviewed by a specific moderator. limit: te.NotRequired[t.Optional[int]] #: Limit. only_muted: te.NotRequired[ t.Optional[bool] ] #: When set to true, only muted subjects and reporters will be returned. reported_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects reported after a given timestamp. reported_before: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects reported before a given timestamp. review_state: te.NotRequired[t.Optional[str]] #: Specify when fetching subjects in a certain state. reviewed_after: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects reviewed after a given timestamp. reviewed_before: te.NotRequired[ - t.Optional['string_formats.DateTime'] + t.Optional[string_formats.DateTime] ] #: Search subjects reviewed before a given timestamp. sort_direction: te.NotRequired[t.Optional[t.Union[t.Literal['asc'], t.Literal['desc']]]] #: Sort direction. sort_field: te.NotRequired[ t.Optional[t.Union[t.Literal['lastReviewedAt'], t.Literal['lastReportedAt']]] ] #: Sort field. - subject: te.NotRequired[t.Optional['string_formats.Uri']] #: The subject to get the status for. + subject: te.NotRequired[t.Optional[string_formats.Uri]] #: The subject to get the status for. subject_type: te.NotRequired[ t.Optional[t.Union[t.Literal['account'], t.Literal['record'], str]] ] #: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. diff --git a/packages/atproto_client/models/tools/ozone/server/get_config.py b/packages/atproto_client/models/tools/ozone/server/get_config.py index 3e43dd98..60b4dc5a 100644 --- a/packages/atproto_client/models/tools/ozone/server/get_config.py +++ b/packages/atproto_client/models/tools/ozone/server/get_config.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -28,7 +29,7 @@ class Response(base.ResponseModelBase): class ServiceConfig(base.ModelBase): """Definition model for :obj:`tools.ozone.server.getConfig`.""" - url: t.Optional['string_formats.Uri'] = None #: Url. + url: t.Optional[string_formats.Uri] = None #: Url. py_type: t.Literal['tools.ozone.server.getConfig#serviceConfig'] = Field( default='tools.ozone.server.getConfig#serviceConfig', alias='$type', frozen=True diff --git a/packages/atproto_client/models/tools/ozone/set/defs.py b/packages/atproto_client/models/tools/ozone/set/defs.py index 7d36fdca..d76a6697 100644 --- a/packages/atproto_client/models/tools/ozone/set/defs.py +++ b/packages/atproto_client/models/tools/ozone/set/defs.py @@ -9,9 +9,7 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Set(base.ModelBase): @@ -28,10 +26,10 @@ class Set(base.ModelBase): class SetView(base.ModelBase): """Definition model for :obj:`tools.ozone.set.defs`.""" - created_at: 'string_formats.DateTime' #: Created at. + created_at: string_formats.DateTime #: Created at. name: str = Field(min_length=3, max_length=128) #: Name. set_size: int #: Set size. - updated_at: 'string_formats.DateTime' #: Updated at. + updated_at: string_formats.DateTime #: Updated at. description: t.Optional[str] = Field(default=None, max_length=10240) #: Description. py_type: t.Literal['tools.ozone.set.defs#setView'] = Field( diff --git a/packages/atproto_client/models/tools/ozone/setting/defs.py b/packages/atproto_client/models/tools/ozone/setting/defs.py index a193afe4..406f668d 100644 --- a/packages/atproto_client/models/tools/ozone/setting/defs.py +++ b/packages/atproto_client/models/tools/ozone/setting/defs.py @@ -9,9 +9,10 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownType from atproto_client.models import base @@ -19,13 +20,13 @@ class Option(base.ModelBase): """Definition model for :obj:`tools.ozone.setting.defs`.""" - created_by: 'string_formats.Did' #: Created by. - did: 'string_formats.Did' #: Did. - key: 'string_formats.Nsid' #: Key. - last_updated_by: 'string_formats.Did' #: Last updated by. + created_by: string_formats.Did #: Created by. + did: string_formats.Did #: Did. + key: string_formats.Nsid #: Key. + last_updated_by: string_formats.Did #: Last updated by. scope: t.Union[t.Literal['instance'], t.Literal['personal'], str] #: Scope. value: 'UnknownType' #: Value. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. description: t.Optional[str] = Field(default=None, max_length=10240) #: Description. manager_role: t.Optional[ t.Union[ @@ -35,7 +36,7 @@ class Option(base.ModelBase): str, ] ] = None #: Manager role. - updated_at: t.Optional['string_formats.DateTime'] = None #: Updated at. + updated_at: t.Optional[string_formats.DateTime] = None #: Updated at. py_type: t.Literal['tools.ozone.setting.defs#option'] = Field( default='tools.ozone.setting.defs#option', alias='$type', frozen=True diff --git a/packages/atproto_client/models/tools/ozone/setting/list_options.py b/packages/atproto_client/models/tools/ozone/setting/list_options.py index b276925a..d94f37b4 100644 --- a/packages/atproto_client/models/tools/ozone/setting/list_options.py +++ b/packages/atproto_client/models/tools/ozone/setting/list_options.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base @@ -20,7 +21,7 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.setting.listOptions`.""" cursor: t.Optional[str] = None #: Cursor. - keys: t.Optional[t.List['string_formats.Nsid']] = Field( + keys: t.Optional[t.List[string_formats.Nsid]] = Field( default=None, max_length=100 ) #: Filter for only the specified keys. Ignored if prefix is provided. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. @@ -31,7 +32,7 @@ class Params(base.ParamsModelBase): class ParamsDict(t.TypedDict): cursor: te.NotRequired[t.Optional[str]] #: Cursor. keys: te.NotRequired[ - t.Optional[t.List['string_formats.Nsid']] + t.Optional[t.List[string_formats.Nsid]] ] #: Filter for only the specified keys. Ignored if prefix is provided. limit: te.NotRequired[t.Optional[int]] #: Limit. prefix: te.NotRequired[t.Optional[str]] #: Filter keys by prefix. diff --git a/packages/atproto_client/models/tools/ozone/setting/remove_options.py b/packages/atproto_client/models/tools/ozone/setting/remove_options.py index 27ff0e5b..5959a3c1 100644 --- a/packages/atproto_client/models/tools/ozone/setting/remove_options.py +++ b/packages/atproto_client/models/tools/ozone/setting/remove_options.py @@ -9,20 +9,18 @@ from pydantic import Field -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.setting.removeOptions`.""" - keys: t.List['string_formats.Nsid'] = Field(min_length=1, max_length=200) #: Keys. + keys: t.List[string_formats.Nsid] = Field(min_length=1, max_length=200) #: Keys. scope: t.Union[t.Literal['instance'], t.Literal['personal'], str] #: Scope. class DataDict(t.TypedDict): - keys: t.List['string_formats.Nsid'] #: Keys. + keys: t.List[string_formats.Nsid] #: Keys. scope: t.Union[t.Literal['instance'], t.Literal['personal'], str] #: Scope. diff --git a/packages/atproto_client/models/tools/ozone/setting/upsert_option.py b/packages/atproto_client/models/tools/ozone/setting/upsert_option.py index ac1fac15..52362d3f 100644 --- a/packages/atproto_client/models/tools/ozone/setting/upsert_option.py +++ b/packages/atproto_client/models/tools/ozone/setting/upsert_option.py @@ -10,9 +10,10 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models.unknown_type import UnknownInputType from atproto_client.models import base @@ -20,7 +21,7 @@ class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.setting.upsertOption`.""" - key: 'string_formats.Nsid' #: Key. + key: string_formats.Nsid #: Key. scope: t.Union[t.Literal['instance'], t.Literal['personal'], str] #: Scope. value: 'UnknownInputType' #: Value. description: t.Optional[str] = Field(default=None, max_length=2000) #: Description. @@ -35,7 +36,7 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - key: 'string_formats.Nsid' #: Key. + key: string_formats.Nsid #: Key. scope: t.Union[t.Literal['instance'], t.Literal['personal'], str] #: Scope. value: 'UnknownInputType' #: Value. description: te.NotRequired[t.Optional[str]] #: Description. diff --git a/packages/atproto_client/models/tools/ozone/signature/find_correlation.py b/packages/atproto_client/models/tools/ozone/signature/find_correlation.py index d669582e..efcf8ae9 100644 --- a/packages/atproto_client/models/tools/ozone/signature/find_correlation.py +++ b/packages/atproto_client/models/tools/ozone/signature/find_correlation.py @@ -7,20 +7,21 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.signature.findCorrelation`.""" - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. class ParamsDict(t.TypedDict): - dids: t.List['string_formats.Did'] #: Dids. + dids: t.List[string_formats.Did] #: Dids. class Response(base.ResponseModelBase): diff --git a/packages/atproto_client/models/tools/ozone/signature/find_related_accounts.py b/packages/atproto_client/models/tools/ozone/signature/find_related_accounts.py index e0a162d0..1a18ce7e 100644 --- a/packages/atproto_client/models/tools/ozone/signature/find_related_accounts.py +++ b/packages/atproto_client/models/tools/ozone/signature/find_related_accounts.py @@ -10,22 +10,23 @@ import typing_extensions as te from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Params(base.ParamsModelBase): """Parameters model for :obj:`tools.ozone.signature.findRelatedAccounts`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. cursor: t.Optional[str] = None #: Cursor. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. class ParamsDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. cursor: te.NotRequired[t.Optional[str]] #: Cursor. limit: te.NotRequired[t.Optional[int]] #: Limit. diff --git a/packages/atproto_client/models/tools/ozone/team/add_member.py b/packages/atproto_client/models/tools/ozone/team/add_member.py index c72cef2f..6a506c0b 100644 --- a/packages/atproto_client/models/tools/ozone/team/add_member.py +++ b/packages/atproto_client/models/tools/ozone/team/add_member.py @@ -7,16 +7,17 @@ import typing as t +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.team.addMember`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. role: t.Union[ 'models.ToolsOzoneTeamDefs.RoleAdmin', 'models.ToolsOzoneTeamDefs.RoleModerator', @@ -26,7 +27,7 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. role: t.Union[ 'models.ToolsOzoneTeamDefs.RoleAdmin', 'models.ToolsOzoneTeamDefs.RoleModerator', diff --git a/packages/atproto_client/models/tools/ozone/team/defs.py b/packages/atproto_client/models/tools/ozone/team/defs.py index e3bbd19e..935cecce 100644 --- a/packages/atproto_client/models/tools/ozone/team/defs.py +++ b/packages/atproto_client/models/tools/ozone/team/defs.py @@ -9,27 +9,28 @@ from pydantic import Field +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Member(base.ModelBase): """Definition model for :obj:`tools.ozone.team.defs`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. role: t.Union[ 'models.ToolsOzoneTeamDefs.RoleAdmin', 'models.ToolsOzoneTeamDefs.RoleModerator', 'models.ToolsOzoneTeamDefs.RoleTriage', str, ] #: Role. - created_at: t.Optional['string_formats.DateTime'] = None #: Created at. + created_at: t.Optional[string_formats.DateTime] = None #: Created at. disabled: t.Optional[bool] = None #: Disabled. last_updated_by: t.Optional[str] = None #: Last updated by. profile: t.Optional['models.AppBskyActorDefs.ProfileViewDetailed'] = None #: Profile. - updated_at: t.Optional['string_formats.DateTime'] = None #: Updated at. + updated_at: t.Optional[string_formats.DateTime] = None #: Updated at. py_type: t.Literal['tools.ozone.team.defs#member'] = Field( default='tools.ozone.team.defs#member', alias='$type', frozen=True diff --git a/packages/atproto_client/models/tools/ozone/team/delete_member.py b/packages/atproto_client/models/tools/ozone/team/delete_member.py index 6724025a..41dd28c4 100644 --- a/packages/atproto_client/models/tools/ozone/team/delete_member.py +++ b/packages/atproto_client/models/tools/ozone/team/delete_member.py @@ -7,16 +7,14 @@ import typing as t -if t.TYPE_CHECKING: - from atproto_client.models import string_formats -from atproto_client.models import base +from atproto_client.models import base, string_formats class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.team.deleteMember`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. diff --git a/packages/atproto_client/models/tools/ozone/team/update_member.py b/packages/atproto_client/models/tools/ozone/team/update_member.py index 029072db..976e8b1c 100644 --- a/packages/atproto_client/models/tools/ozone/team/update_member.py +++ b/packages/atproto_client/models/tools/ozone/team/update_member.py @@ -9,16 +9,17 @@ import typing_extensions as te +from atproto_client.models import string_formats + if t.TYPE_CHECKING: from atproto_client import models - from atproto_client.models import string_formats from atproto_client.models import base class Data(base.DataModelBase): """Input data model for :obj:`tools.ozone.team.updateMember`.""" - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. disabled: t.Optional[bool] = None #: Disabled. role: t.Optional[ t.Union[ @@ -31,7 +32,7 @@ class Data(base.DataModelBase): class DataDict(t.TypedDict): - did: 'string_formats.Did' #: Did. + did: string_formats.Did #: Did. disabled: te.NotRequired[t.Optional[bool]] #: Disabled. role: te.NotRequired[ t.Optional[ diff --git a/packages/atproto_codegen/models/generator.py b/packages/atproto_codegen/models/generator.py index a60efe1c..c5771787 100644 --- a/packages/atproto_codegen/models/generator.py +++ b/packages/atproto_codegen/models/generator.py @@ -63,16 +63,16 @@ def save_code_part(nsid: NSID, code: str) -> None: def _get_model_imports() -> str: - # we are using ruff with F401 autofix to delete unused imports lines = [ 'import typing as t', '', 'import typing_extensions as te', 'from pydantic import Field', '', + 'from atproto_client.models import string_formats', + '', 'if t.TYPE_CHECKING:', f'{_(1)}from atproto_client import models', - f'{_(1)}from atproto_client.models import string_formats', f'{_(1)}from atproto_client.models.unknown_type import UnknownType', f'{_(1)}from atproto_client.models.unknown_type import UnknownInputType', f'{_(1)}from atproto_client.models.blob_ref import BlobRef', @@ -166,17 +166,17 @@ def _get_str_typehint(nsid: NSID, field_type_def: models.LexString, *, optional: if hasattr(field_type_def, 'format') and (format_type := field_type_def.format): # Map format types to our string_formats types format_map = { - 'at-identifier': "'string_formats.Handle'", # or Did - needs logic to determine - 'at-uri': "'string_formats.AtUri'", - 'cid': "'string_formats.Cid'", - 'datetime': "'string_formats.DateTime'", - 'did': "'string_formats.Did'", - 'handle': "'string_formats.Handle'", - 'nsid': "'string_formats.Nsid'", - 'tid': "'string_formats.Tid'", - 'record-key': "'string_formats.RecordKey'", - 'uri': "'string_formats.Uri'", - 'language': "'string_formats.Language'", + 'at-identifier': 'string_formats.Handle', + 'at-uri': 'string_formats.AtUri', + 'cid': 'string_formats.Cid', + 'datetime': 'string_formats.DateTime', + 'did': 'string_formats.Did', + 'handle': 'string_formats.Handle', + 'nsid': 'string_formats.Nsid', + 'tid': 'string_formats.Tid', + 'record-key': 'string_formats.RecordKey', + 'uri': 'string_formats.Uri', + 'language': 'string_formats.Language', } str_typehint = format_map.get(format_type, 'str') diff --git a/pyproject.toml b/pyproject.toml index 284a4ab6..3e0d87de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,26 @@ authors = ["Ilya (Marshal) "] license = "MIT" repository = "https://github.com/MarshalX/atproto" readme = "README.md" -keywords = ["library", "sdk", "codegen", "xrpc", "xrpc-client", "atprotocol", "atproto", "lexicon", "parser", "schema", "bluesky", "bluesky-api", "at", "uri", "atp", "nsid", "did", "cid"] +keywords = [ + "library", + "sdk", + "codegen", + "xrpc", + "xrpc-client", + "atprotocol", + "atproto", + "lexicon", + "parser", + "schema", + "bluesky", + "bluesky-api", + "at", + "uri", + "atp", + "nsid", + "did", + "cid", +] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", @@ -65,10 +84,10 @@ mypy = "1.9" pyright = "1.1.362" [tool.poetry.group.docs.dependencies] -sphinx = "7.1.2" # they dropped Python 3.8 support in 7.2.0 +sphinx = "7.1.2" # they dropped Python 3.8 support in 7.2.0 myst-parser = "3.0.1" furo = "2024.8.6" -autodoc-pydantic = "2.1.0" # for some reason 2.2.0 requirs Python > 3.8.1 +autodoc-pydantic = "2.1.0" # for some reason 2.2.0 requirs Python > 3.8.1 sphinx-copybutton = "0.5.2" sphinx-favicon = "1.0.1" sphinxext-opengraph = "0.9.1" @@ -108,17 +127,17 @@ quote-style = "single" [tool.ruff.lint] extend-select = [ - "E", # pycodestyle errors - "W", # pycodestyle warnings - "F", # Pyflakes - "I", # isort - "D", # pydocstyle - "C90", # flake8-comprehensions - "B", # flake8-bugbear - "Q", # flake8-quotes - "S", # flake8-bandit + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # Pyflakes + "I", # isort + "D", # pydocstyle + "C90", # flake8-comprehensions + "B", # flake8-bugbear + "Q", # flake8-quotes + "S", # flake8-bandit "ASYNC", # flake8-async - "ANN", # flake8-annotations + "ANN", # flake8-annotations "C", "BLE", "ERA", @@ -143,17 +162,25 @@ ignore = [ "ANN002", # Missing type annotation for `*args` "ANN101", # Missing type annotation for `self` in method "ANN102", # Missing type annotation for `cls` in classmethod - "D203", "D413", # we are not using too many blank lines - "D213", # we are using the first line for summary - "D406", "D407", # we are using google style docstring + "D203", + "D413", # we are not using too many blank lines + "D213", # we are using the first line for summary + "D406", + "D407", # we are using google style docstring ] [tool.ruff.lint.per-file-ignores] "packages/*.py" = [ - "D105", "D104", "D100", "D107", "D103", "D415", # missing docstring - "D101", "D102", # missing docstring in public class and method + "D105", + "D104", + "D100", + "D107", + "D103", + "D415", # missing docstring + "D101", + "D102", # missing docstring in public class and method ] -"tests/*.py" = ["S101", "D"] +"tests/**.py" = ["S101", "D", "ANN201"] "docs/*.py" = ["T201", "INP001", "ERA001", "E501", "D"] "examples/*.py" = ["T201", "INP001", "ERA001", "D"] "packages/atproto/exceptions.py" = ["F403"] @@ -167,3 +194,6 @@ ignore = [ docstring-quotes = "double" multiline-quotes = "double" inline-quotes = "single" + +[tool.pytest.ini_options] +asyncio_default_fixture_loop_scope = "session" diff --git a/tests/test_atproto_client/models/tests/test_string_formats.py b/tests/test_atproto_client/models/tests/test_string_formats.py new file mode 100644 index 00000000..69564493 --- /dev/null +++ b/tests/test_atproto_client/models/tests/test_string_formats.py @@ -0,0 +1,76 @@ +import pytest +from atproto_client.models import string_formats +from atproto_client.models.string_formats import _OPT_IN_KEY +from pydantic import TypeAdapter, ValidationError + + +@pytest.fixture +def invalid_data(): + # TODO: retrieve believable examples of invalid data + return { + 'handle': 'invalid@ @handle', + 'did': 'not-a-did', + 'nsid': 'invalid-nsid', + 'at_uri': 'not-an-at-uri', + 'cid': 'short', + 'datetime': '2023-01-01', + 'tid': 'invalid-tid', + 'record_key': '..', + 'uri': ' invalid uri ', + 'language': 'invalid!', + } + + +@pytest.fixture +def valid_data(): + # TODO: retrieve real examples of test data + return { + 'handle': 'test.bsky.social', + 'did': 'did:plc:1234abcd', + 'nsid': 'app.bsky.feed.post', + 'at_uri': 'at://user.bsky.social/posts/123', + 'cid': 'bafyreidfayvfuwqa2beehqn7axeeeaej5aqvaowxgwcdt2rw', + 'datetime': '2023-01-01T12:00:00Z', + 'tid': '3jqvenncqkgbm', + 'record_key': 'valid-key', + 'uri': 'https://example.com', + 'language': 'en-US', + } + + +@pytest.mark.parametrize( + 'type_name,field_name,expected_error', + [ + ('Handle', 'handle', 'Invalid handle'), + ('Did', 'did', 'Invalid DID'), + ('Nsid', 'nsid', 'Invalid NSID'), + ('AtUri', 'at_uri', 'Invalid AT-URI'), + ('Cid', 'cid', 'Invalid CID'), + ('DateTime', 'datetime', 'Invalid datetime format'), + ('Tid', 'tid', 'Invalid TID format'), + ('RecordKey', 'record_key', 'Invalid record key'), + ('Uri', 'uri', 'Invalid URI'), + ('Language', 'language', 'Invalid language code'), + ], +) +def test_string_format_validation( + type_name: str, field_name: str, expected_error: str, valid_data: dict, invalid_data: dict +): + """Test validation for each string format type.""" + validator_type = getattr(string_formats, type_name) + SomeTypeAdapter = TypeAdapter(validator_type) + + # Test that validation is skipped by default + assert SomeTypeAdapter.validate_python(invalid_data[field_name]) == invalid_data[field_name] + + # Test that valid data passes strict validation + validated_value = SomeTypeAdapter.validate_python(valid_data[field_name], context={_OPT_IN_KEY: True}) + assert validated_value == valid_data[field_name] + + # Test that invalid data fails strict validation + try: + SomeTypeAdapter.validate_python(invalid_data[field_name], context={_OPT_IN_KEY: True}) + pytest.fail(f'{type_name} validation should have failed') + except ValidationError as e: + error = e.errors()[0] + assert expected_error in error['msg']