Skip to content

Commit

Permalink
Update lexicons fetched from 51fcba7 committed 2024-01-09T23:29:07Z (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Jan 12, 2024
1 parent 71d6770 commit 8fbca91
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 139 deletions.
2 changes: 1 addition & 1 deletion docs/source/aliases_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
'models.AppBskyNotificationUpdateSeen': 'atproto_client.models.app.bsky.notification.update_seen',
'models.AppBskyRichtextFacet': 'atproto_client.models.app.bsky.richtext.facet',
'models.AppBskyUnspeccedDefs': 'atproto_client.models.app.bsky.unspecced.defs',
'models.AppBskyUnspeccedGetPopular': 'atproto_client.models.app.bsky.unspecced.get_popular',
'models.AppBskyUnspeccedGetPopularFeedGenerators': 'atproto_client.models.app.bsky.unspecced.get_popular_feed_generators',
'models.AppBskyUnspeccedGetTimelineSkeleton': 'atproto_client.models.app.bsky.unspecced.get_timeline_skeleton',
'models.AppBskyUnspeccedSearchActorsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_actors_skeleton',
Expand All @@ -71,6 +70,7 @@
'models.ComAtprotoAdminEmitModerationEvent': 'atproto_client.models.com.atproto.admin.emit_moderation_event',
'models.ComAtprotoAdminEnableAccountInvites': 'atproto_client.models.com.atproto.admin.enable_account_invites',
'models.ComAtprotoAdminGetAccountInfo': 'atproto_client.models.com.atproto.admin.get_account_info',
'models.ComAtprotoAdminGetAccountInfos': 'atproto_client.models.com.atproto.admin.get_account_infos',
'models.ComAtprotoAdminGetInviteCodes': 'atproto_client.models.com.atproto.admin.get_invite_codes',
'models.ComAtprotoAdminGetModerationEvent': 'atproto_client.models.com.atproto.admin.get_moderation_event',
'models.ComAtprotoAdminGetRecord': 'atproto_client.models.com.atproto.admin.get_record',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Submodules
:maxdepth: 4

atproto_client.models.app.bsky.unspecced.defs
atproto_client.models.app.bsky.unspecced.get_popular
atproto_client.models.app.bsky.unspecced.get_popular_feed_generators
atproto_client.models.app.bsky.unspecced.get_timeline_skeleton
atproto_client.models.app.bsky.unspecced.search_actors_skeleton
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
com.atproto.admin.get\_account\_infos
============================================================

.. automodule:: atproto_client.models.com.atproto.admin.get_account_infos
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Submodules
atproto_client.models.com.atproto.admin.emit_moderation_event
atproto_client.models.com.atproto.admin.enable_account_invites
atproto_client.models.com.atproto.admin.get_account_info
atproto_client.models.com.atproto.admin.get_account_infos
atproto_client.models.com.atproto.admin.get_invite_codes
atproto_client.models.com.atproto.admin.get_moderation_event
atproto_client.models.com.atproto.admin.get_record
Expand Down
40 changes: 0 additions & 40 deletions lexicons/app.bsky.unspecced.getPopular.json

This file was deleted.

23 changes: 22 additions & 1 deletion lexicons/com.atproto.admin.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"#modEventLabel",
"#modEventAcknowledge",
"#modEventEscalate",
"#modEventMute"
"#modEventMute",
"#modEventResolveAppeal"
]
},
"subject": {
Expand Down Expand Up @@ -167,9 +168,18 @@
"type": "string",
"format": "datetime"
},
"lastAppealedAt": {
"type": "string",
"format": "datetime",
"description": "Timestamp referencing when the author of the subject appealed a moderation action"
},
"takendown": {
"type": "boolean"
},
"appealed": {
"type": "boolean",
"description": "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."
},
"suspendUntil": {
"type": "string",
"format": "datetime"
Expand Down Expand Up @@ -284,6 +294,7 @@
"did": { "type": "string", "format": "did" },
"handle": { "type": "string", "format": "handle" },
"email": { "type": "string" },
"relatedRecords": { "type": "array", "items": { "type": "unknown" } },
"indexedAt": { "type": "string", "format": "datetime" },
"invitedBy": {
"type": "ref",
Expand Down Expand Up @@ -469,6 +480,16 @@
}
}
},
"modEventResolveAppeal": {
"type": "object",
"description": "Resolve appeal on a subject",
"properties": {
"comment": {
"type": "string",
"description": "Describe resolution."
}
}
},
"modEventComment": {
"type": "object",
"description": "Add a comment to a subject",
Expand Down
36 changes: 36 additions & 0 deletions lexicons/com.atproto.admin.getAccountInfos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"lexicon": 1,
"id": "com.atproto.admin.getAccountInfos",
"defs": {
"main": {
"type": "query",
"description": "Get details about some accounts.",
"parameters": {
"type": "params",
"required": ["dids"],
"properties": {
"dids": {
"type": "array",
"items": { "type": "string", "format": "did" }
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["infos"],
"properties": {
"infos": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#accountView"
}
}
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions lexicons/com.atproto.admin.queryModerationStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
"type": "boolean",
"description": "Get subjects that were taken down"
},
"appealed": {
"type": "boolean",
"description": "Get subjects in unresolved appealed status"
},
"limit": {
"type": "integer",
"minimum": 1,
Expand Down
7 changes: 6 additions & 1 deletion lexicons/com.atproto.moderation.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"com.atproto.moderation.defs#reasonMisleading",
"com.atproto.moderation.defs#reasonSexual",
"com.atproto.moderation.defs#reasonRude",
"com.atproto.moderation.defs#reasonOther"
"com.atproto.moderation.defs#reasonOther",
"com.atproto.moderation.defs#reasonAppeal"
]
},
"reasonSpam": {
Expand All @@ -36,6 +37,10 @@
"reasonOther": {
"type": "token",
"description": "Other: reports not falling under another report category"
},
"reasonAppeal": {
"type": "token",
"description": "Appeal: appeal a previously taken moderation action"
}
}
}
4 changes: 2 additions & 2 deletions packages/atproto_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
from atproto_client.models.app.bsky.notification import update_seen as AppBskyNotificationUpdateSeen
from atproto_client.models.app.bsky.richtext import facet as AppBskyRichtextFacet
from atproto_client.models.app.bsky.unspecced import defs as AppBskyUnspeccedDefs
from atproto_client.models.app.bsky.unspecced import get_popular as AppBskyUnspeccedGetPopular
from atproto_client.models.app.bsky.unspecced import (
get_popular_feed_generators as AppBskyUnspeccedGetPopularFeedGenerators,
)
Expand All @@ -74,6 +73,7 @@
from atproto_client.models.com.atproto.admin import emit_moderation_event as ComAtprotoAdminEmitModerationEvent
from atproto_client.models.com.atproto.admin import enable_account_invites as ComAtprotoAdminEnableAccountInvites
from atproto_client.models.com.atproto.admin import get_account_info as ComAtprotoAdminGetAccountInfo
from atproto_client.models.com.atproto.admin import get_account_infos as ComAtprotoAdminGetAccountInfos
from atproto_client.models.com.atproto.admin import get_invite_codes as ComAtprotoAdminGetInviteCodes
from atproto_client.models.com.atproto.admin import get_moderation_event as ComAtprotoAdminGetModerationEvent
from atproto_client.models.com.atproto.admin import get_record as ComAtprotoAdminGetRecord
Expand Down Expand Up @@ -213,7 +213,6 @@ class _Ids:
AppBskyNotificationUpdateSeen: str = 'app.bsky.notification.updateSeen'
AppBskyRichtextFacet: str = 'app.bsky.richtext.facet'
AppBskyUnspeccedDefs: str = 'app.bsky.unspecced.defs'
AppBskyUnspeccedGetPopular: str = 'app.bsky.unspecced.getPopular'
AppBskyUnspeccedGetPopularFeedGenerators: str = 'app.bsky.unspecced.getPopularFeedGenerators'
AppBskyUnspeccedGetTimelineSkeleton: str = 'app.bsky.unspecced.getTimelineSkeleton'
AppBskyUnspeccedSearchActorsSkeleton: str = 'app.bsky.unspecced.searchActorsSkeleton'
Expand All @@ -225,6 +224,7 @@ class _Ids:
ComAtprotoAdminEmitModerationEvent: str = 'com.atproto.admin.emitModerationEvent'
ComAtprotoAdminEnableAccountInvites: str = 'com.atproto.admin.enableAccountInvites'
ComAtprotoAdminGetAccountInfo: str = 'com.atproto.admin.getAccountInfo'
ComAtprotoAdminGetAccountInfos: str = 'com.atproto.admin.getAccountInfos'
ComAtprotoAdminGetInviteCodes: str = 'com.atproto.admin.getInviteCodes'
ComAtprotoAdminGetModerationEvent: str = 'com.atproto.admin.getModerationEvent'
ComAtprotoAdminGetRecord: str = 'com.atproto.admin.getRecord'
Expand Down
36 changes: 0 additions & 36 deletions packages/atproto_client/models/app/bsky/unspecced/get_popular.py

This file was deleted.

20 changes: 20 additions & 0 deletions packages/atproto_client/models/com/atproto/admin/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class ModEventViewDetail(base.ModelBase):
'models.ComAtprotoAdminDefs.ModEventAcknowledge',
'models.ComAtprotoAdminDefs.ModEventEscalate',
'models.ComAtprotoAdminDefs.ModEventMute',
'models.ComAtprotoAdminDefs.ModEventResolveAppeal',
],
Field(discriminator='py_type'),
] #: Event.
Expand Down Expand Up @@ -130,7 +131,13 @@ class SubjectStatusView(base.ModelBase):
updated_at: str = Field(
alias='updatedAt'
) #: 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.
comment: t.Optional[str] = None #: Sticky comment on the subject.
last_appealed_at: t.Optional[str] = Field(
default=None, alias='lastAppealedAt'
) #: Timestamp referencing when the author of the subject appealed a moderation action.
last_reported_at: t.Optional[str] = Field(default=None, alias='lastReportedAt') #: Last reported at.
last_reviewed_at: t.Optional[str] = Field(default=None, alias='lastReviewedAt') #: Last reviewed at.
last_reviewed_by: t.Optional[str] = Field(default=None, alias='lastReviewedBy') #: Last reviewed by.
Expand Down Expand Up @@ -231,6 +238,9 @@ class AccountView(base.ModelBase):
) #: Invited by.
invites: t.Optional[t.List['models.ComAtprotoServerDefs.InviteCode']] = None #: Invites.
invites_disabled: t.Optional[bool] = Field(default=None, alias='invitesDisabled') #: Invites disabled.
related_records: t.Optional[t.List['UnknownType']] = Field(
default=None, alias='relatedRecords'
) #: Related records.

py_type: te.Literal['com.atproto.admin.defs#accountView'] = Field(
default='com.atproto.admin.defs#accountView', alias='$type', frozen=True
Expand Down Expand Up @@ -421,6 +431,16 @@ class ModEventReverseTakedown(base.ModelBase):
)


class ModEventResolveAppeal(base.ModelBase):
"""Definition model for :obj:`com.atproto.admin.defs`. Resolve appeal on a subject."""

comment: t.Optional[str] = None #: Describe resolution.

py_type: te.Literal['com.atproto.admin.defs#modEventResolveAppeal'] = Field(
default='com.atproto.admin.defs#modEventResolveAppeal', alias='$type', frozen=True
)


class ModEventComment(base.ModelBase):
"""Definition model for :obj:`com.atproto.admin.defs`. Add a comment to a subject."""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2023 Ilya (Marshal) <https://github.com/MarshalX>.
# This file is part of Python atproto SDK. Licenced under MIT.
##################################################################


import typing as t

import typing_extensions as te

if t.TYPE_CHECKING:
from atproto_client import models
from atproto_client.models import base


class Params(base.ParamsModelBase):
"""Parameters model for :obj:`com.atproto.admin.getAccountInfos`."""

dids: t.List[str] #: Dids.


class ParamsDict(te.TypedDict):
dids: t.List[str] #: Dids.


class Response(base.ResponseModelBase):
"""Output data model for :obj:`com.atproto.admin.getAccountInfos`."""

infos: t.List['models.ComAtprotoAdminDefs.AccountView'] #: Infos.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class Params(base.ParamsModelBase):
"""Parameters model for :obj:`com.atproto.admin.queryModerationStatuses`."""

appealed: t.Optional[bool] = None #: Get subjects in unresolved appealed status.
comment: t.Optional[str] = None #: Search subjects by keyword from comments.
cursor: t.Optional[str] = None #: Cursor.
ignore_subjects: t.Optional[t.List[str]] = Field(default=None, alias='ignoreSubjects') #: Ignore subjects.
Expand Down Expand Up @@ -50,6 +51,7 @@ class Params(base.ParamsModelBase):


class ParamsDict(te.TypedDict):
appealed: te.NotRequired[t.Optional[bool]] #: Get subjects in unresolved appealed status.
comment: te.NotRequired[t.Optional[str]] #: Search subjects by keyword from comments.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
ignore_subjects: te.NotRequired[t.Optional[t.List[str]]] #: Ignore subjects.
Expand Down
5 changes: 5 additions & 0 deletions packages/atproto_client/models/com/atproto/moderation/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'models.ComAtprotoModerationDefs.ReasonSexual',
'models.ComAtprotoModerationDefs.ReasonRude',
'models.ComAtprotoModerationDefs.ReasonOther',
'models.ComAtprotoModerationDefs.ReasonAppeal',
] #: Reason type

ReasonSpam = te.Literal[
Expand All @@ -42,3 +43,7 @@
ReasonOther = te.Literal[
'com.atproto.moderation.defs#reasonOther'
] #: Other: reports not falling under another report category

ReasonAppeal = te.Literal[
'com.atproto.moderation.defs#reasonAppeal'
] #: Appeal: appeal a previously taken moderation action
Loading

0 comments on commit 8fbca91

Please sign in to comment.