Skip to content

Commit

Permalink
spec/api.json updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmurphy authored and github-actions[bot] committed Oct 30, 2024
1 parent d535a28 commit 82d3376
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 14 deletions.
49 changes: 40 additions & 9 deletions lexicons/tools/ozone/moderation/queryEvents.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"properties": {
"types": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"description": "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."
},
"createdBy": {
Expand All @@ -33,11 +35,28 @@
"format": "datetime",
"description": "Retrieve events created before a given timestamp"
},
"subject": { "type": "string", "format": "uri" },
"subject": {
"type": "string",
"format": "uri"
},
"collections": {
"type": "array",
"maxLength": 20,
"description": "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
"items": {
"type": "string",
"format": "nsid"
}
},
"subjectType": {
"type": "string",
"description": "If specified, only events where the subject is 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.",
"knownValues": ["account", "record"]
},
"includeAllUserRecords": {
"type": "boolean",
"default": false,
"description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned"
"description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."
},
"limit": {
"type": "integer",
Expand All @@ -55,22 +74,30 @@
},
"addedLabels": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"description": "If specified, only events where all of these labels were added are returned"
},
"removedLabels": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"description": "If specified, only events where all of these labels were removed are returned"
},
"addedTags": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"description": "If specified, only events where all of these tags were added are returned"
},
"removedTags": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"description": "If specified, only events where all of these tags were removed are returned"
},
"reportTypes": {
Expand All @@ -79,7 +106,9 @@
"type": "string"
}
},
"cursor": { "type": "string" }
"cursor": {
"type": "string"
}
}
},
"output": {
Expand All @@ -88,7 +117,9 @@
"type": "object",
"required": ["events"],
"properties": {
"cursor": { "type": "string" },
"cursor": {
"type": "string"
},
"events": {
"type": "array",
"items": {
Expand Down
16 changes: 15 additions & 1 deletion lexicons/tools/ozone/moderation/queryStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"properties": {
"includeAllUserRecords": {
"type": "boolean",
"description": "All subjects belonging to the account specified in the 'subject' param will be returned."
"description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."
},
"subject": {
"type": "string",
Expand Down Expand Up @@ -103,6 +103,20 @@
},
"cursor": {
"type": "string"
},
"collections": {
"type": "array",
"maxLength": 20,
"description": "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
"items": {
"type": "string",
"format": "nsid"
}
},
"subjectType": {
"type": "string",
"description": "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.",
"knownValues": ["account", "record"]
}
}
},
Expand Down
64 changes: 60 additions & 4 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -21287,14 +21287,42 @@
"format": "uri"
}
},
{
"name": "collections",
"in": "query",
"description": "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "nsid"
},
"maxItems": 20
}
},
{
"name": "subjectType",
"in": "query",
"description": "If specified, only events where the subject is 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.",
"required": false,
"schema": {
"type": "string",
"description": "If specified, only events where the subject is 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.",
"enum": [
"account",
"record"
]
}
},
{
"name": "includeAllUserRecords",
"in": "query",
"description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned",
"description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.",
"required": false,
"schema": {
"type": "boolean",
"description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned"
"description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."
}
},
{
Expand Down Expand Up @@ -21495,11 +21523,11 @@
{
"name": "includeAllUserRecords",
"in": "query",
"description": "All subjects belonging to the account specified in the 'subject' param will be returned.",
"description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.",
"required": false,
"schema": {
"type": "boolean",
"description": "All subjects belonging to the account specified in the 'subject' param will be returned."
"description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."
}
},
{
Expand Down Expand Up @@ -21698,6 +21726,34 @@
"schema": {
"type": "string"
}
},
{
"name": "collections",
"in": "query",
"description": "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "nsid"
},
"maxItems": 20
}
},
{
"name": "subjectType",
"in": "query",
"description": "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.",
"required": false,
"schema": {
"type": "string",
"description": "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.",
"enum": [
"account",
"record"
]
}
}
],
"responses": {
Expand Down

0 comments on commit 82d3376

Please sign in to comment.