chitose.com.atproto.admin package#
Submodules#
chitose.com.atproto.admin.defs module#
- class chitose.com.atproto.admin.defs.ActionReversal(reason: str, created_by: str, created_at: str)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ActionView(id: int, action: Literal['#takedown', '#flag', '#acknowledge', '#escalate'], subject: RepoRef | StrongRef, subject_blob_cids: list[str], reason: str, created_by: str, created_at: str, resolved_report_ids: list[int], duration_in_hours: int | None = None, create_label_vals: list[str] | None = None, negate_label_vals: list[str] | None = None, reversal: ActionReversal | None = None)#
Bases:
Object- Parameters:
duration_in_hours – Indicates how long this action was meant to be in effect before automatically expiring.
- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ActionViewCurrent(id: int, action: Literal['#takedown', '#flag', '#acknowledge', '#escalate'], duration_in_hours: int | None = None)#
Bases:
Object- Parameters:
duration_in_hours – Indicates how long this action was meant to be in effect before automatically expiring.
- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ActionViewDetail(id: int, action: Literal['#takedown', '#flag', '#acknowledge', '#escalate'], subject: RepoView | RepoViewNotFound | RecordView | RecordViewNotFound, subject_blobs: list[BlobView], reason: str, created_by: str, created_at: str, resolved_reports: list[ReportView], duration_in_hours: int | None = None, create_label_vals: list[str] | None = None, negate_label_vals: list[str] | None = None, reversal: ActionReversal | None = None)#
Bases:
Object- Parameters:
duration_in_hours – Indicates how long this action was meant to be in effect before automatically expiring.
- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.BlobView(cid: str, mime_type: str, size: int, created_at: str, details: ImageDetails | VideoDetails | None = None, moderation: Moderation | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ImageDetails(width: int, height: int)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.Moderation(current_action: ActionViewCurrent | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ModerationDetail(actions: list[ActionView], reports: list[ReportView], current_action: ActionViewCurrent | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RecordView(uri: str, cid: str, value: Any, blob_cids: list[str], indexed_at: str, moderation: Moderation, repo: RepoView)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RecordViewDetail(uri: str, cid: str, value: Any, blobs: list[BlobView], indexed_at: str, moderation: ModerationDetail, repo: RepoView, labels: list[Label] | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RecordViewNotFound(uri: str)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RepoView(did: str, handle: str, related_records: list[Any], indexed_at: str, moderation: Moderation, email: str | None = None, invited_by: InviteCode | None = None, invites_disabled: bool | None = None, invite_note: str | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RepoViewDetail(did: str, handle: str, related_records: list[Any], indexed_at: str, moderation: ModerationDetail, email: str | None = None, labels: list[Label] | None = None, invited_by: InviteCode | None = None, invites: list[InviteCode] | None = None, invites_disabled: bool | None = None, invite_note: str | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.RepoViewNotFound(did: str)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ReportView(id: int, reason_type: Literal['com.atproto.moderation.defs#reasonSpam', 'com.atproto.moderation.defs#reasonViolation', 'com.atproto.moderation.defs#reasonMisleading', 'com.atproto.moderation.defs#reasonSexual', 'com.atproto.moderation.defs#reasonRude', 'com.atproto.moderation.defs#reasonOther'], subject: RepoRef | StrongRef, reported_by: str, created_at: str, resolved_by_action_ids: list[int], reason: str | None = None, subject_repo_handle: str | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
- class chitose.com.atproto.admin.defs.ReportViewDetail(id: int, reason_type: Literal['com.atproto.moderation.defs#reasonSpam', 'com.atproto.moderation.defs#reasonViolation', 'com.atproto.moderation.defs#reasonMisleading', 'com.atproto.moderation.defs#reasonSexual', 'com.atproto.moderation.defs#reasonRude', 'com.atproto.moderation.defs#reasonOther'], subject: RepoView | RepoViewNotFound | RecordView | RecordViewNotFound, reported_by: str, created_at: str, resolved_by_actions: list[ActionView], reason: str | None = None)#
Bases:
Object- to_dict() dict[str, Any]#
chitose.com.atproto.admin.disable_account_invites module#
chitose.com.atproto.admin.disable_invite_codes module#
chitose.com.atproto.admin.enable_account_invites module#
chitose.com.atproto.admin.get_invite_codes module#
chitose.com.atproto.admin.get_moderation_action module#
chitose.com.atproto.admin.get_moderation_actions module#
chitose.com.atproto.admin.get_moderation_report module#
chitose.com.atproto.admin.get_moderation_reports module#
chitose.com.atproto.admin.get_record module#
chitose.com.atproto.admin.get_repo module#
chitose.com.atproto.admin.rebase_repo module#
chitose.com.atproto.admin.resolve_moderation_reports module#
chitose.com.atproto.admin.reverse_moderation_action module#
chitose.com.atproto.admin.search_repos module#
chitose.com.atproto.admin.send_email module#
chitose.com.atproto.admin.take_moderation_action module#
chitose.com.atproto.admin.update_account_email module#
chitose.com.atproto.admin.update_account_handle module#
Module contents#
- class chitose.com.atproto.admin.Admin_(call: Callable[[str, list[tuple[str, str | None | int | list[str]]], bytes | dict | None, dict[str, str]], bytes], subscribe: Callable[[str, list[tuple[str, str | None | int | list[str]]], Callable[[str | bytes], None]], None])#
Bases:
objectWe recommend calling methods in this class via the chitose.BskyAgent class instead of creating instances of this class directly.
- disable_account_invites(account: str, note: str | None = None) bytes#
Disable an account from receiving new invite codes, but does not invalidate existing codes
- Parameters:
note – Additionally add a note describing why the invites were disabled
- disable_invite_codes(codes: list[str] | None = None, accounts: list[str] | None = None) bytes#
Disable some set of codes and/or all codes associated with a set of users
- enable_account_invites(account: str, note: str | None = None) bytes#
Re-enable an accounts ability to receive invite codes
- Parameters:
note – Additionally add a note describing why the invites were enabled
- get_invite_codes(sort: Literal['recent', 'usage'] | None = None, limit: int | None = None, cursor: str | None = None) bytes#
Admin view of invite codes
- get_moderation_action(id: int) bytes#
View details about a moderation action.
- get_moderation_actions(subject: str | None = None, limit: int | None = None, cursor: str | None = None) bytes#
List moderation actions related to a subject.
- get_moderation_report(id: int) bytes#
View details about a moderation report.
- get_moderation_reports(subject: str | None = None, ignore_subjects: list[str] | None = None, actioned_by: str | None = None, reporters: list[str] | None = None, resolved: bool | None = None, action_type: Literal['com.atproto.admin.defs#takedown', 'com.atproto.admin.defs#flag', 'com.atproto.admin.defs#acknowledge', 'com.atproto.admin.defs#escalate'] | None = None, limit: int | None = None, cursor: str | None = None, reverse: bool | None = None) bytes#
List moderation reports related to a subject.
- Parameters:
actioned_by – Get all reports that were actioned by a specific moderator
reporters – Filter reports made by one or more DIDs
reverse – Reverse the order of the returned records? when true, returns reports in chronological order
- get_record(uri: str, cid: str | None = None) bytes#
View details about a record.
- get_repo(did: str) bytes#
View details about a repository.
- resolve_moderation_reports(action_id: int, report_ids: list[int], created_by: str) bytes#
Resolve moderation reports by an action.
- reverse_moderation_action(id: int, reason: str, created_by: str) bytes#
Reverse a moderation action.
- search_repos(term: str | None = None, invited_by: str | None = None, limit: int | None = None, cursor: str | None = None) bytes#
Find repositories based on a search term.
- send_email(recipient_did: str, content: str, subject: str | None = None) bytes#
Send email to a user’s primary email address
- take_moderation_action(action: Literal['com.atproto.admin.defs#takedown', 'com.atproto.admin.defs#flag', 'com.atproto.admin.defs#acknowledge'], subject: RepoRef | StrongRef, reason: str, created_by: str, subject_blob_cids: list[str] | None = None, create_label_vals: list[str] | None = None, negate_label_vals: list[str] | None = None, duration_in_hours: int | None = None) bytes#
Take a moderation action on a repo.
- Parameters:
duration_in_hours – Indicates how long this action was meant to be in effect before automatically expiring.
- update_account_email(account: str, email: str) bytes#
Administrative action to update an account’s email
- Parameters:
account – The handle or DID of the repo.
- update_account_handle(did: str, handle: str) bytes#
Administrative action to update an account’s handle