From 9eda83c4b09fa9f3027ada4f3f935927e0be9f2d Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Fri, 3 Jan 2025 12:02:19 +0000 Subject: [PATCH] Update lexicons fetched from 53621f8 committed 2025-01-03T01:46:53Z --- lexicons/com.atproto.server.createSession.json | 6 +++++- lexicons/tools.ozone.moderation.defs.json | 6 ++++++ lexicons/tools.ozone.moderation.queryEvents.json | 7 +++++++ .../tools.ozone.moderation.queryStatuses.json | 14 +++++++++++++- .../models/com/atproto/server/create_session.py | 6 ++++++ .../models/tools/ozone/moderation/defs.py | 3 +++ .../tools/ozone/moderation/query_events.py | 2 ++ .../tools/ozone/moderation/query_statuses.py | 16 +++++++++++++++- 8 files changed, 57 insertions(+), 3 deletions(-) diff --git a/lexicons/com.atproto.server.createSession.json b/lexicons/com.atproto.server.createSession.json index fd0fae38..8cde0863 100644 --- a/lexicons/com.atproto.server.createSession.json +++ b/lexicons/com.atproto.server.createSession.json @@ -16,7 +16,11 @@ "description": "Handle or other identifier supported by the server for the authenticating user." }, "password": { "type": "string" }, - "authFactorToken": { "type": "string" } + "authFactorToken": { "type": "string" }, + "allowTakendown": { + "type": "boolean", + "description": "When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned" + } } } }, diff --git a/lexicons/tools.ozone.moderation.defs.json b/lexicons/tools.ozone.moderation.defs.json index c9fa7115..7c590cdd 100644 --- a/lexicons/tools.ozone.moderation.defs.json +++ b/lexicons/tools.ozone.moderation.defs.json @@ -224,6 +224,12 @@ "acknowledgeAccountSubjects": { "type": "boolean", "description": "If true, all other reports on content authored by this account will be resolved (acknowledged)." + }, + "policies": { + "type": "array", + "maxLength": 5, + "items": { "type": "string" }, + "description": "Names/Keywords of the policies that drove the decision." } } }, diff --git a/lexicons/tools.ozone.moderation.queryEvents.json b/lexicons/tools.ozone.moderation.queryEvents.json index 9e89a948..e33e18c6 100644 --- a/lexicons/tools.ozone.moderation.queryEvents.json +++ b/lexicons/tools.ozone.moderation.queryEvents.json @@ -106,6 +106,13 @@ "type": "string" } }, + "policies": { + "type": "array", + "items": { + "type": "string", + "description": "If specified, only events where the action policies match any of the given policies are returned" + } + }, "cursor": { "type": "string" } diff --git a/lexicons/tools.ozone.moderation.queryStatuses.json b/lexicons/tools.ozone.moderation.queryStatuses.json index 13d2a28f..a8ff110d 100644 --- a/lexicons/tools.ozone.moderation.queryStatuses.json +++ b/lexicons/tools.ozone.moderation.queryStatuses.json @@ -8,6 +8,18 @@ "parameters": { "type": "params", "properties": { + "queueCount": { + "type": "integer", + "description": "Number of queues being used by moderators. Subjects will be split among all queues." + }, + "queueIndex": { + "type": "integer", + "description": "Index of the queue to fetch subjects from. Works only when queueCount value is specified." + }, + "queueSeed": { + "type": "string", + "description": "A seeder to shuffle/balance the queue items." + }, "includeAllUserRecords": { "type": "boolean", "description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned." @@ -118,9 +130,9 @@ }, "tags": { "type": "array", + "maxLength": 25, "items": { "type": "string", - "maxLength": 25, "description": "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters" } }, 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 cb72c190..620fcc67 100644 --- a/packages/atproto_client/models/com/atproto/server/create_session.py +++ b/packages/atproto_client/models/com/atproto/server/create_session.py @@ -21,12 +21,18 @@ class Data(base.DataModelBase): identifier: str #: Handle or other identifier supported by the server for the authenticating user. password: str #: Password. + allow_takendown: t.Optional[bool] = ( + None #: When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned. + ) auth_factor_token: t.Optional[str] = None #: Auth factor token. class DataDict(t.TypedDict): identifier: str #: Handle or other identifier supported by the server for the authenticating user. password: str #: Password. + allow_takendown: te.NotRequired[ + t.Optional[bool] + ] #: When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned. auth_factor_token: te.NotRequired[t.Optional[str]] #: Auth factor token. diff --git a/packages/atproto_client/models/tools/ozone/moderation/defs.py b/packages/atproto_client/models/tools/ozone/moderation/defs.py index 6bc3c3b3..dbd5f32a 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/defs.py +++ b/packages/atproto_client/models/tools/ozone/moderation/defs.py @@ -188,6 +188,9 @@ class ModEventTakedown(base.ModelBase): duration_in_hours: t.Optional[int] = ( None #: Indicates how long the takedown should be in effect before automatically expiring. ) + policies: t.Optional[t.List[str]] = Field( + default=None, max_length=5 + ) #: Names/Keywords of the policies that drove the decision. py_type: t.Literal['tools.ozone.moderation.defs#modEventTakedown'] = Field( default='tools.ozone.moderation.defs#modEventTakedown', alias='$type', frozen=True 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 c3c5e030..c18b709f 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/query_events.py +++ b/packages/atproto_client/models/tools/ozone/moderation/query_events.py @@ -41,6 +41,7 @@ class Params(base.ParamsModelBase): False #: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. ) limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. + policies: t.Optional[t.List[str]] = None #: Policies. removed_labels: t.Optional[t.List[str]] = ( None #: If specified, only events where all of these labels were removed are returned. ) @@ -86,6 +87,7 @@ class ParamsDict(t.TypedDict): t.Optional[bool] ] #: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. limit: te.NotRequired[t.Optional[int]] #: Limit. + policies: te.NotRequired[t.Optional[t.List[str]]] #: Policies. removed_labels: te.NotRequired[ t.Optional[t.List[str]] ] #: If specified, only events where all of these labels were removed are returned. 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 171bf16f..b468d25f 100644 --- a/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py +++ b/packages/atproto_client/models/tools/ozone/moderation/query_statuses.py @@ -52,6 +52,13 @@ class Params(base.ParamsModelBase): ) 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. + queue_count: t.Optional[int] = ( + None #: Number of queues being used by moderators. Subjects will be split among all queues. + ) + queue_index: t.Optional[int] = ( + None #: Index of the queue to fetch subjects from. Works only when queueCount value is specified. + ) + queue_seed: t.Optional[str] = None #: A seeder to shuffle/balance the queue items. 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. @@ -65,7 +72,7 @@ class Params(base.ParamsModelBase): 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. ) - tags: t.Optional[t.List[str]] = None #: Tags. + tags: t.Optional[t.List[str]] = Field(default=None, max_length=25) #: Tags. takendown: t.Optional[bool] = None #: Get subjects that were taken down. @@ -106,6 +113,13 @@ class ParamsDict(t.TypedDict): only_muted: te.NotRequired[ t.Optional[bool] ] #: When set to true, only muted subjects and reporters will be returned. + queue_count: te.NotRequired[ + t.Optional[int] + ] #: Number of queues being used by moderators. Subjects will be split among all queues. + queue_index: te.NotRequired[ + t.Optional[int] + ] #: Index of the queue to fetch subjects from. Works only when queueCount value is specified. + queue_seed: te.NotRequired[t.Optional[str]] #: A seeder to shuffle/balance the queue items. reported_after: te.NotRequired[ t.Optional[string_formats.DateTime] ] #: Search subjects reported after a given timestamp.