Skip to content

Commit

Permalink
fix at-identifier string format
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed Dec 16, 2024
1 parent 53013ac commit 5e67a04
Show file tree
Hide file tree
Showing 28 changed files with 79 additions and 57 deletions.
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/actor/get_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
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.AtIdentifier #: 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.AtIdentifier #: Handle or DID of account to fetch profile of.
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/actor/get_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
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.AtIdentifier] = Field(max_length=25) #: Actors.


class ParamsDict(t.TypedDict):
actors: t.List[string_formats.Handle] #: Actors.
actors: t.List[string_formats.AtIdentifier] #: Actors.


class Response(base.ResponseModelBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.feed.getActorFeeds`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.feed.getActorLikes`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.feed.getAuthorFeed`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.
cursor: t.Optional[str] = None #: Cursor.
filter: t.Optional[
t.Union[
Expand All @@ -36,7 +36,7 @@ class Params(base.ParamsModelBase):


class ParamsDict(t.TypedDict):
actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
filter: te.NotRequired[
t.Optional[
Expand Down
8 changes: 4 additions & 4 deletions packages/atproto_client/models/app/bsky/feed/search_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,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.AtIdentifier] = (
None #: Filter to posts by the given account. Handles are resolved to DID before query-time.
)
cursor: t.Optional[str] = (
Expand All @@ -34,7 +34,7 @@ class Params(base.ParamsModelBase):
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.AtIdentifier] = (
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] = (
Expand All @@ -57,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.AtIdentifier]
] #: Filter to posts by the given account. Handles are resolved to DID before query-time.
cursor: te.NotRequired[
t.Optional[str]
Expand All @@ -70,7 +70,7 @@ class ParamsDict(t.TypedDict):
] #: 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.AtIdentifier]
] #: 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]
Expand Down
2 changes: 1 addition & 1 deletion packages/atproto_client/models/app/bsky/graph/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,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.AtIdentifier #: Actor.
not_found: bool = Field(frozen=True) #: Not found.

py_type: t.Literal['app.bsky.graph.defs#notFoundActor'] = Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.graph.getActorStarterPacks`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.graph.getFollowers`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/graph/get_follows.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.graph.getFollows`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.graph.getKnownFollowers`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: 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.AtIdentifier #: Actor.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/graph/get_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
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.AtIdentifier #: 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.AtIdentifier #: The account (actor) to enumerate lists from.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
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.AtIdentifier #: Primary account requesting relationships for.
others: t.Optional[t.List[string_formats.AtIdentifier]] = 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.AtIdentifier #: Primary account requesting relationships for.
others: te.NotRequired[
t.Optional[t.List[string_formats.Handle]]
t.Optional[t.List[string_formats.AtIdentifier]]
] #: List of 'other' accounts to be related back to the primary.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.graph.getSuggestedFollowsByActor`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.


class ParamsDict(t.TypedDict):
actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.


class Response(base.ResponseModelBase):
Expand Down
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/graph/mute_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
class Data(base.DataModelBase):
"""Input data model for :obj:`app.bsky.graph.muteActor`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.


class DataDict(t.TypedDict):
actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.
4 changes: 2 additions & 2 deletions packages/atproto_client/models/app/bsky/graph/unmute_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
class Data(base.DataModelBase):
"""Input data model for :obj:`app.bsky.graph.unmuteActor`."""

actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.


class DataDict(t.TypedDict):
actor: string_formats.Handle #: Actor.
actor: string_formats.AtIdentifier #: Actor.
Original file line number Diff line number Diff line change
Expand Up @@ -21,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.AtIdentifier] = (
None #: Filter to posts by the given account. Handles are resolved to DID before query-time.
)
cursor: t.Optional[str] = (
Expand All @@ -34,7 +34,7 @@ class Params(base.ParamsModelBase):
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.AtIdentifier] = (
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] = (
Expand All @@ -60,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.AtIdentifier]
] #: Filter to posts by the given account. Handles are resolved to DID before query-time.
cursor: te.NotRequired[
t.Optional[str]
Expand All @@ -73,7 +73,7 @@ class ParamsDict(t.TypedDict):
] #: 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.AtIdentifier]
] #: 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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
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.AtIdentifier #: 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.AtIdentifier #: The handle or DID of the repo.
email: str #: Email.
Original file line number Diff line number Diff line change
Expand Up @@ -21,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.AtIdentifier #: The handle or DID of the repo (aka, current account).
writes: t.List[
te.Annotated[
t.Union[
Expand All @@ -41,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.AtIdentifier #: The handle or DID of the repo (aka, current account).
writes: t.List[
te.Annotated[
t.Union[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Data(base.DataModelBase):

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.AtIdentifier #: 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.
validate_: t.Optional[bool] = (
Expand All @@ -34,7 +34,7 @@ class Data(base.DataModelBase):
class DataDict(t.TypedDict):
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.AtIdentifier #: 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.
validate: te.NotRequired[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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).
repo: string_formats.AtIdentifier #: 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.


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).
repo: string_formats.AtIdentifier #: 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
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.AtIdentifier #: 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.AtIdentifier #: The handle or DID of the repo.


class Response(base.ResponseModelBase):
Expand Down
4 changes: 2 additions & 2 deletions packages/atproto_client/models/com/atproto/repo/get_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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.
repo: string_formats.AtIdentifier #: The handle or DID of the repo.
rkey: str #: The Record Key.
cid: t.Optional[string_formats.Cid] = (
None #: The CID of the version of the record. If not specified, then return the most recent version.
Expand All @@ -29,7 +29,7 @@ class Params(base.ParamsModelBase):

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.
repo: string_formats.AtIdentifier #: The handle or DID of the repo.
rkey: str #: The Record Key.
cid: te.NotRequired[
t.Optional[string_formats.Cid]
Expand Down
Loading

0 comments on commit 5e67a04

Please sign in to comment.