Skip to content

Commit

Permalink
Add threat signatures to ozone repo views (bluesky-social#2931)
Browse files Browse the repository at this point in the history
* add threat signatures to ozone repo views

* explicitly add to views
  • Loading branch information
dholms authored Oct 30, 2024
1 parent 2092387 commit 73f40e6
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-cars-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/api": patch
---

Add threatSignatures to ozone repo views
18 changes: 16 additions & 2 deletions lexicons/tools/ozone/moderation/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,14 @@
},
"invitesDisabled": { "type": "boolean" },
"inviteNote": { "type": "string" },
"deactivatedAt": { "type": "string", "format": "datetime" }
"deactivatedAt": { "type": "string", "format": "datetime" },
"threatSignatures": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#threatSignature"
}
}
}
},
"repoViewDetail": {
Expand Down Expand Up @@ -449,7 +456,14 @@
"invitesDisabled": { "type": "boolean" },
"inviteNote": { "type": "string" },
"emailConfirmedAt": { "type": "string", "format": "datetime" },
"deactivatedAt": { "type": "string", "format": "datetime" }
"deactivatedAt": { "type": "string", "format": "datetime" },
"threatSignatures": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#threatSignature"
}
}
}
},
"repoViewNotFound": {
Expand Down
14 changes: 14 additions & 0 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11295,6 +11295,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewDetail: {
Expand Down Expand Up @@ -11364,6 +11371,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewNotFound: {
Expand Down
2 changes: 2 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 @@ -483,6 +483,7 @@ export interface RepoView {
invitesDisabled?: boolean
inviteNote?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down Expand Up @@ -512,6 +513,7 @@ export interface RepoViewDetail {
inviteNote?: string
emailConfirmedAt?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down
3 changes: 3 additions & 0 deletions packages/ozone/src/api/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const addAccountInfoToRepoViewDetail = (
invitedBy,
invites,
invitesDisabled,
threatSignatures,
// pick some duplicate/unwanted details out
did: _did,
handle: _handle,
Expand All @@ -82,6 +83,7 @@ export const addAccountInfoToRepoViewDetail = (
invites,
emailConfirmedAt,
deactivatedAt,
threatSignatures,
}
}

Expand All @@ -98,6 +100,7 @@ export const addAccountInfoToRepoView = (
invitesDisabled: accountInfo.invitesDisabled,
inviteNote: accountInfo.inviteNote,
deactivatedAt: accountInfo.deactivatedAt,
threatSignatures: accountInfo.threatSignatures,
}
}

Expand Down
14 changes: 14 additions & 0 deletions packages/ozone/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11295,6 +11295,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewDetail: {
Expand Down Expand Up @@ -11364,6 +11371,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewNotFound: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ export interface RepoView {
invitesDisabled?: boolean
inviteNote?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down Expand Up @@ -512,6 +513,7 @@ export interface RepoViewDetail {
inviteNote?: string
emailConfirmedAt?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down
14 changes: 14 additions & 0 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11295,6 +11295,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewDetail: {
Expand Down Expand Up @@ -11364,6 +11371,13 @@ export const schemaDict = {
type: 'string',
format: 'datetime',
},
threatSignatures: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:com.atproto.admin.defs#threatSignature',
},
},
},
},
repoViewNotFound: {
Expand Down
2 changes: 2 additions & 0 deletions packages/pds/src/lexicon/types/tools/ozone/moderation/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ export interface RepoView {
invitesDisabled?: boolean
inviteNote?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down Expand Up @@ -512,6 +513,7 @@ export interface RepoViewDetail {
inviteNote?: string
emailConfirmedAt?: string
deactivatedAt?: string
threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[]
[k: string]: unknown
}

Expand Down

0 comments on commit 73f40e6

Please sign in to comment.