Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Mar 12, 2024
2 parents 115c0eb + 2802880 commit 86b3ff7
Show file tree
Hide file tree
Showing 21 changed files with 640 additions and 174 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-ozone-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- divert-blobs
env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }}
USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }}
Expand Down
13 changes: 11 additions & 2 deletions lexicons/tools/ozone/moderation/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"#modEventEscalate",
"#modEventMute",
"#modEventEmail",
"#modEventResolveAppeal"
"#modEventResolveAppeal",
"#modEventDivert"
]
},
"subject": {
Expand Down Expand Up @@ -67,7 +68,8 @@
"#modEventEscalate",
"#modEventMute",
"#modEventEmail",
"#modEventResolveAppeal"
"#modEventResolveAppeal",
"#modEventDivert"
]
},
"subject": {
Expand Down Expand Up @@ -317,6 +319,13 @@
}
}
},
"modEventDivert": {
"type": "object",
"description": "Divert a record's blobs to a 3rd party service for further scanning/tagging",
"properties": {
"comment": { "type": "string" }
}
},
"modEventTag": {
"type": "object",
"description": "Add/Remove a tag on a subject",
Expand Down
12 changes: 12 additions & 0 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7976,6 +7976,7 @@ export const schemaDict = {
'lex:tools.ozone.moderation.defs#modEventMute',
'lex:tools.ozone.moderation.defs#modEventEmail',
'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
'lex:tools.ozone.moderation.defs#modEventDivert',
],
},
subject: {
Expand Down Expand Up @@ -8034,6 +8035,7 @@ export const schemaDict = {
'lex:tools.ozone.moderation.defs#modEventMute',
'lex:tools.ozone.moderation.defs#modEventEmail',
'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
'lex:tools.ozone.moderation.defs#modEventDivert',
],
},
subject: {
Expand Down Expand Up @@ -8320,6 +8322,16 @@ export const schemaDict = {
},
},
},
modEventDivert: {
type: 'object',
description:
"Divert a record's blobs to a 3rd party service for further scanning/tagging",
properties: {
comment: {
type: 'string',
},
},
},
modEventTag: {
type: 'object',
description: 'Add/Remove a tag on a subject',
Expand Down
20 changes: 20 additions & 0 deletions packages/api/src/client/types/tools/ozone/moderation/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface ModEventView {
| ModEventMute
| ModEventEmail
| ModEventResolveAppeal
| ModEventDivert
| { $type: string; [k: string]: unknown }
subject:
| ComAtprotoAdminDefs.RepoRef
Expand Down Expand Up @@ -62,6 +63,7 @@ export interface ModEventViewDetail {
| ModEventMute
| ModEventEmail
| ModEventResolveAppeal
| ModEventDivert
| { $type: string; [k: string]: unknown }
subject:
| RepoView
Expand Down Expand Up @@ -367,6 +369,24 @@ export function validateModEventEmail(v: unknown): ValidationResult {
return lexicons.validate('tools.ozone.moderation.defs#modEventEmail', v)
}

/** Divert a record's blobs to a 3rd party service for further scanning/tagging */
export interface ModEventDivert {
comment?: string
[k: string]: unknown
}

export function isModEventDivert(v: unknown): v is ModEventDivert {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'tools.ozone.moderation.defs#modEventDivert'
)
}

export function validateModEventDivert(v: unknown): ValidationResult {
return lexicons.validate('tools.ozone.moderation.defs#modEventDivert', v)
}

/** Add/Remove a tag on a subject */
export interface ModEventTag {
/** Tags to be added to the subject. If already exists, won't be duplicated. */
Expand Down
Loading

0 comments on commit 86b3ff7

Please sign in to comment.