Skip to content

Commit

Permalink
Update lexicons fetched from 709a85b committed 2025-02-06T20:54:27Z
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed Feb 7, 2025
1 parent b7afaf6 commit 9e02705
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 4 deletions.
27 changes: 25 additions & 2 deletions lexicons/tools.ozone.moderation.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent"
"#recordEvent",
"#modEventPriorityScore"
]
},
"subject": {
Expand Down Expand Up @@ -84,7 +85,8 @@
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent"
"#recordEvent",
"#modEventPriorityScore"
]
},
"subject": {
Expand Down Expand Up @@ -143,6 +145,12 @@
"type": "string",
"description": "Sticky comment on the subject."
},
"priorityScore": {
"type": "integer",
"description": "Numeric value representing the level of priority. Higher score means higher priority.",
"minimum": 0,
"maximum": 100
},
"muteUntil": {
"type": "string",
"format": "datetime"
Expand Down Expand Up @@ -381,6 +389,21 @@
}
}
},
"modEventPriorityScore": {
"type": "object",
"description": "Set priority score of the subject. Higher score means higher priority.",
"required": ["score"],
"properties": {
"comment": {
"type": "string"
},
"score": {
"type": "integer",
"minimum": 0,
"maximum": 100
}
}
},
"modEventAcknowledge": {
"type": "object",
"properties": {
Expand Down
3 changes: 2 additions & 1 deletion lexicons/tools.ozone.moderation.emitEvent.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"tools.ozone.moderation.defs#modEventTag",
"tools.ozone.moderation.defs#accountEvent",
"tools.ozone.moderation.defs#identityEvent",
"tools.ozone.moderation.defs#recordEvent"
"tools.ozone.moderation.defs#recordEvent",
"tools.ozone.moderation.defs#modEventPriorityScore"
]
},
"subject": {
Expand Down
9 changes: 8 additions & 1 deletion lexicons/tools.ozone.moderation.queryStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
"lastReviewedAt",
"lastReportedAt",
"reportedRecordsCount",
"takendownRecordsCount"
"takendownRecordsCount",
"priorityScore"
]
},
"sortDirection": {
Expand Down Expand Up @@ -175,6 +176,12 @@
"minTakendownRecordsCount": {
"type": "integer",
"description": "If specified, only subjects that belong to an account that has at least this many taken down records will be returned."
},
"minPriorityScore": {
"minimum": 0,
"maximum": 100,
"type": "integer",
"description": "If specified, only subjects that have priority score value above the given value will be returned."
}
}
},
Expand Down
16 changes: 16 additions & 0 deletions packages/atproto_client/models/tools/ozone/moderation/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ModEventView(base.ModelBase):
'models.ToolsOzoneModerationDefs.AccountEvent',
'models.ToolsOzoneModerationDefs.IdentityEvent',
'models.ToolsOzoneModerationDefs.RecordEvent',
'models.ToolsOzoneModerationDefs.ModEventPriorityScore',
],
Field(discriminator='py_type'),
] #: Event.
Expand Down Expand Up @@ -89,6 +90,7 @@ class ModEventViewDetail(base.ModelBase):
'models.ToolsOzoneModerationDefs.AccountEvent',
'models.ToolsOzoneModerationDefs.IdentityEvent',
'models.ToolsOzoneModerationDefs.RecordEvent',
'models.ToolsOzoneModerationDefs.ModEventPriorityScore',
],
Field(discriminator='py_type'),
] #: Event.
Expand Down Expand Up @@ -145,6 +147,9 @@ class SubjectStatusView(base.ModelBase):
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.
priority_score: t.Optional[int] = Field(
default=None, ge=0, le=100
) #: Numeric value representing the level of priority. Higher score means higher priority.
records_stats: t.Optional['models.ToolsOzoneModerationDefs.RecordsStats'] = (
None #: Statistics related to the record subjects authored by the subject's account.
)
Expand Down Expand Up @@ -294,6 +299,17 @@ class ModEventLabel(base.ModelBase):
)


class ModEventPriorityScore(base.ModelBase):
"""Definition model for :obj:`tools.ozone.moderation.defs`. Set priority score of the subject. Higher score means higher priority."""

score: int = Field(ge=0, le=100) #: Score.
comment: t.Optional[str] = None #: Comment.

py_type: t.Literal['tools.ozone.moderation.defs#modEventPriorityScore'] = Field(
default='tools.ozone.moderation.defs#modEventPriorityScore', alias='$type', frozen=True
)


class ModEventAcknowledge(base.ModelBase):
"""Definition model for :obj:`tools.ozone.moderation.defs`."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Data(base.DataModelBase):
'models.ToolsOzoneModerationDefs.AccountEvent',
'models.ToolsOzoneModerationDefs.IdentityEvent',
'models.ToolsOzoneModerationDefs.RecordEvent',
'models.ToolsOzoneModerationDefs.ModEventPriorityScore',
],
Field(discriminator='py_type'),
] #: Event.
Expand Down Expand Up @@ -71,6 +72,7 @@ class DataDict(t.TypedDict):
'models.ToolsOzoneModerationDefs.AccountEvent',
'models.ToolsOzoneModerationDefs.IdentityEvent',
'models.ToolsOzoneModerationDefs.RecordEvent',
'models.ToolsOzoneModerationDefs.ModEventPriorityScore',
],
Field(discriminator='py_type'),
] #: Event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class Params(base.ParamsModelBase):
min_account_suspend_count: t.Optional[int] = (
None #: If specified, only subjects that belong to an account that has at least this many suspensions will be returned.
)
min_priority_score: t.Optional[int] = Field(
default=None, ge=0, le=100
) #: If specified, only subjects that have priority score value above the given value will be returned.
min_reported_records_count: t.Optional[int] = (
None #: If specified, only subjects that belong to an account that has at least this many reported records will be returned.
)
Expand All @@ -80,6 +83,7 @@ class Params(base.ParamsModelBase):
t.Literal['lastReportedAt'],
t.Literal['reportedRecordsCount'],
t.Literal['takendownRecordsCount'],
t.Literal['priorityScore'],
]
] = 'lastReportedAt' #: Sort field.
subject: t.Optional[string_formats.Uri] = None #: The subject to get the status for.
Expand Down Expand Up @@ -129,6 +133,9 @@ class ParamsDict(t.TypedDict):
min_account_suspend_count: te.NotRequired[
t.Optional[int]
] #: If specified, only subjects that belong to an account that has at least this many suspensions will be returned.
min_priority_score: te.NotRequired[
t.Optional[int]
] #: If specified, only subjects that have priority score value above the given value will be returned.
min_reported_records_count: te.NotRequired[
t.Optional[int]
] #: If specified, only subjects that belong to an account that has at least this many reported records will be returned.
Expand Down Expand Up @@ -166,6 +173,7 @@ class ParamsDict(t.TypedDict):
t.Literal['lastReportedAt'],
t.Literal['reportedRecordsCount'],
t.Literal['takendownRecordsCount'],
t.Literal['priorityScore'],
]
]
] #: Sort field.
Expand Down

0 comments on commit 9e02705

Please sign in to comment.