Merge branch 'develop' into socket-notifications-refactor

This commit is contained in:
Barış Uşaklı
2026-03-30 11:00:47 -04:00
committed by GitHub
3663 changed files with 96355 additions and 34389 deletions

View File

@@ -8,6 +8,17 @@ CategoryObject:
name:
type: string
description: The category's name/title
nickname:
type: string
description: A nickname for the category.
handle:
type: string
description: |
An URL-safe name/handle used to represent the category over federated networks (e.g. ActivityPub).
This value is separate from the `slug`, which is used specifically in the URL as a human-readable representation.
The handle is unique across-the-board between users/groups/categories.
description:
type: string
description: A variable-length description of the category (usually displayed underneath the category name)

View File

@@ -27,6 +27,10 @@ RoomObject:
description: Timestamp of when room was created
notificationSetting:
type: number
description: The notification setting for the room, 0 = no notifications, 1 = only mentions, 2 = all messages
joinLeaveMessages:
type: number
description: Whether join/leave messages are enabled in the room
MessageObject:
type: object
properties:
@@ -61,6 +65,9 @@ MessageObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -101,6 +108,10 @@ MessageObject:
`icon:text` for the user's
auto-generated icon
example: "#f44336"
banned_until:
type: number
description: A UNIX timestamp representing the moment a ban will be lifted
example: 0
banned_until_readable:
type: string
description: An ISO 8601 formatted date string representing the moment a ban will be lifted, or the words "Not Banned"
@@ -122,6 +133,9 @@ RoomUserList:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account

View File

@@ -0,0 +1,52 @@
CrosspostObject:
anyOf:
- type: object
properties:
id:
type: string
description: The cross-post ID
cid:
type: object
description: The category id that the topic was cross-posted to
additionalProperties:
oneOf:
- type: string
- type: number
tid:
type: object
description: The topic id that was cross-posted
additionalProperties:
oneOf:
- type: string
- type: number
timestamp:
type: number
uid:
type: object
description: The user id that initiated the cross-post
additionalProperties:
oneOf:
- type: string
- type: number
- type: object
properties:
category:
type: object
properties:
cid:
type: number
name:
type: string
icon:
type: string
bgColor:
type: string
color:
type: string
slug:
type: string
CrosspostsArray:
type: array
description: A list of crosspost objects
items:
$ref: '#/CrosspostObject'

View File

@@ -58,6 +58,9 @@ FlagObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
@@ -122,6 +125,9 @@ FlagHistoryObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
@@ -175,6 +181,9 @@ FlagNotesObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
icon:text:
type: string
description: A single-letter representation of a username. This is used in the

View File

@@ -7,8 +7,20 @@ PostObject:
tid:
type: number
description: A topic identifier
toPid:
type: number
description: The post that this post is in reply to
nullable: true
url:
type: string
description: |
A permalink to the post content.
For posts received via ActivityPub, it is the url of the original piece of content.
content:
type: string
sourceContent:
type: string
nullable: true
uid:
type: number
description: A user identifier
@@ -31,6 +43,9 @@ PostObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -69,6 +84,8 @@ PostObject:
description: A topic identifier
title:
type: string
generatedTitle:
type: number
cid:
type: number
description: A category identifier
@@ -105,6 +122,25 @@ PostObject:
type: array
items:
$ref: ../../components/schemas/TagObject.yaml#/TagObject
thumbs:
type: array
items:
type: object
properties:
id:
type: number
description: The topic id
name:
type: string
description: The topic thumbnail filename
path:
type: string
description: Path to topic thumbnail without upload_url prefix
url:
type: string
description: Relative path to the topic thumbnail
teaser:
$ref: ../../components/schemas/TeaserObject.yaml#/TeaserObject
required:
- uid
- tid
@@ -139,4 +175,234 @@ PostObject:
isMainPost:
type: boolean
replies:
type: number
type: number
PostDataObject:
description: The output as returned from `Posts.getPostsData`
allOf:
- type: object
properties:
pid:
type: number
uid:
type: number
description: A user identifier
tid:
type: number
description: A topic identifier
content:
type: string
timestamp:
type: number
votes:
type: number
deleted:
type: number
upvotes:
type: number
downvotes:
type: number
announces:
type: number
bookmarks:
type: number
deleterUid:
type: number
edited:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
editedISO:
type: string
index:
type: number
user:
type: object
properties:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
displayname:
type: string
description: This is either username or fullname depending on forum and user settings
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
reputation:
type: number
postcount:
type: number
topiccount:
type: number
picture:
type: string
nullable: true
signature:
type: string
banned:
type: number
banned:expire:
type: number
status:
type: string
lastonline:
type: number
groupTitle:
nullable: true
type: string
groupTitleArray:
type: array
items:
type: string
muted:
type: boolean
description: Whether or not the user has been muted.
mutedUntil:
type: number
description: A UNIX timestamp representing the moment a muted state will be lifted.
nullable: true
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users without
an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's auto-generated
icon
example: "#f44336"
lastonlineISO:
type: string
banned_until:
type: number
banned_until_readable:
type: string
selectedGroups:
type: array
items:
type: object
properties:
name:
type: string
slug:
type: string
labelColor:
type: string
textColor:
type: string
icon:
type: string
userTitle:
type: string
custom_profile_info:
type: array
items:
type: object
properties:
content:
type: string
description: HTML that is injected into `topic.tpl` of themes that support custom profile info
editor:
nullable: true
bookmarked:
type: boolean
upvoted:
type: boolean
downvoted:
type: boolean
attachments:
type: array
uploads:
type: array
replies:
type: object
properties:
hasMore:
type: boolean
users:
type: array
items:
type: object
properties:
username:
type: string
description: A friendly name for a given user account
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
type: string
uid:
type: number
description: A user identifier
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users without
an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's auto-generated
icon
example: "#f44336"
administrator:
type: boolean
text:
type: string
count:
type: number
hasSingleImmediateReply:
type: boolean
selfPost:
type: boolean
events:
type: array
items:
type: object
properties:
type:
type: string
id:
type: number
timestamp:
type: number
timestampISO:
type: string
topicOwnerPost:
type: boolean
display_edit_tools:
type: boolean
display_delete_tools:
type: boolean
display_moderator_tools:
type: boolean
display_move_tools:
type: boolean
display_post_menu:
type: boolean
flagId:
type: number
description: The flag identifier, if this particular post has been flagged before
- type: object
description: Optional properties that may or may not be present (except for `pid`, which is always present, and is only here as a hack to pass validation)
properties:
pid:
type: number
description: A post identifier
sourceContent:
type: string
description: The markdown equivalent of a remote post content, as received (or fetched) from the remote site.
required:
- pid

View File

@@ -2,4 +2,15 @@ PostsObject:
description: One of the objects in the array returned from `Posts.getPostSummaryByPids`
type: array
items:
$ref: ./PostObject.yaml#/PostObject
allOf:
- $ref: ./PostObject.yaml#/PostObject
- type: object
description: Optional properties that may or may not be present (except for `pid`, which is always present, and is only here as a hack to pass validation)
properties:
pid:
type: number
description: A post identifier
attachments:
type: array
required:
- pid

View File

@@ -4,6 +4,9 @@ Settings:
showemail:
type: boolean
description: Show user email in profile page
unreadCutoff:
type: number
description: Number of days after which a topic is no longer considered unread
usePagination:
type: boolean
description: Toggles between pagination (when enabled), or infinite scrolling (when disabled)
@@ -31,9 +34,25 @@ Settings:
followTopicsOnReply:
type: boolean
description: Automatically be notified of new posts in a topic, when you reply to that topic
restrictChat:
disableIncomingChats:
type: boolean
description: Do not allow other users to start chats with you (or add you to other chat rooms)
chatAllowList:
type: array
items:
type: string
description: List of uids that can start chats with you
chatDenyList:
type: array
items:
type: string
description: List of uids that are not allowed to start chats with you
chatAllowListUsers:
type: array
description: List of users that can start chats with you
chatDenyListUsers:
type: array
description: List of users that are not allowed to start chats with you
topicSearchEnabled:
type: boolean
description: Enable keyword searching within topics

View File

@@ -0,0 +1,63 @@
TeaserObject:
type: object
nullable: true
properties:
pid:
type: number
url:
type: string
uid:
type: number
description: A user identifier
timestamp:
type: number
tid:
type: number
description: A topic identifier
content:
type: string
sourceContent:
type: string
nullable: true
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
user:
type: object
properties:
uid:
type: number
description: A user identifier
username:
type: string
description: A friendly name for a given user account
displayname:
type: string
isLocal:
type: boolean
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
nullable: true
type: string
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users
without an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's
auto-generated icon
example: "#f44336"
topic:
type: object
additionalProperties: {}
index:
type: number
required:
- pid

View File

@@ -35,6 +35,9 @@ TopicObject:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -57,8 +60,6 @@ TopicObject:
signature:
type: string
nullable: true
banned:
type: number
status:
type: string
icon:text:
@@ -73,6 +74,10 @@ TopicObject:
`icon:text` for the user's auto-generated
icon
example: "#f44336"
banned:
type: number
banned_until:
type: number
banned_until_readable:
type: string
required:
@@ -89,54 +94,7 @@ TopicObject:
- icon:bgColor
- banned_until_readable
teaser:
type: object
properties:
pid:
type: number
uid:
type: number
description: A user identifier
timestamp:
type: number
tid:
type: number
description: A topic identifier
content:
type: string
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
user:
type: object
properties:
uid:
type: number
description: A user identifier
username:
type: string
description: A friendly name for a given user account
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
nullable: true
type: string
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users
without an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's
auto-generated icon
example: "#f44336"
index:
type: number
nullable: true
$ref: './TeaserObject.yaml#/TeaserObject'
tags:
type: array
items:
@@ -156,6 +114,8 @@ TopicObject:
type: boolean
ignored:
type: boolean
followed:
type: boolean
unread:
type: boolean
bookmark:
@@ -202,6 +162,8 @@ TopicObjectSlim:
description: A category identifier
title:
type: string
generatedTitle:
type: number
slug:
type: string
mainPid:
@@ -213,6 +175,8 @@ TopicObjectSlim:
type: number
postercount:
type: number
followercount:
type: number
scheduled:
type: number
deleted:

View File

@@ -5,6 +5,9 @@ UserObject:
type: number
description: A user identifier
example: 1
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -41,19 +44,11 @@ UserObject:
type: string
description: This is either username or fullname depending on forum and user settings
example: Dragon Fruit
location:
type: string
example: 'Toronto, Canada'
nullable: true
birthday:
type: string
description: A birthdate given in an ISO format parseable by the Date object
example: 03/27/2020
nullable: true
website:
type: string
example: 'https://example.org'
nullable: true
aboutme:
type: string
example: |
@@ -172,9 +167,7 @@ UserObject:
- joindate
- lastonline
- picture
- location
- birthday
- website
- aboutme
- signature
- uploadedpicture
@@ -209,6 +202,9 @@ UserObjectFull:
type: number
description: A user identifier
example: 1
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -245,16 +241,10 @@ UserObjectFull:
type: string
description: This is either username or fullname depending on forum and user settings
example: Dragon Fruit
location:
type: string
example: 'Toronto, Canada'
birthday:
type: string
description: A birthdate given in an ISO format parseable by the Date object
example: 03/27/2020
website:
type: string
example: 'https://example.org'
aboutme:
type: string
example: |
@@ -331,6 +321,12 @@ UserObjectFull:
example:
- administrators
- Staff
iconBackgrounds:
type: array
items:
type: string
description: A valid CSS colour code
example: '#fff'
muted:
type: boolean
description: Whether or not the user has been muted.
@@ -381,37 +377,25 @@ UserObjectFull:
counts:
type: object
properties:
best:
type: number
controversial:
type: number
blocks:
type: number
bookmarks:
type: number
categoriesWatched:
type: number
tagsWatched:
type: number
downvoted:
type: number
followers:
type: number
following:
type: number
groups:
type: number
ignored:
type: number
posts:
type: number
topics:
type: number
uploaded:
type: number
upvoted:
type: number
watched:
shares:
type: number
isBlocked:
type: boolean
@@ -443,12 +427,17 @@ UserObjectFull:
type: boolean
canFlag:
type: boolean
flagId:
type: number
nullable: true
canChangePassword:
type: boolean
isSelf:
type: boolean
isFollowing:
type: boolean
isFollowPending:
type: boolean
canChat:
type: boolean
hasPrivateChat:
@@ -461,6 +450,10 @@ UserObjectFull:
type: boolean
allowProfileImageUploads:
type: number
maximumProfileImageSize:
type: number
profileImageDimension:
type: number
allowedProfileImageExtensions:
type: string
groups:
@@ -516,10 +509,6 @@ UserObjectFull:
- name
- visibility
- public
websiteLink:
type: string
websiteName:
type: string
username:disableEdit:
type: number
email:disableEdit:
@@ -531,6 +520,9 @@ UserObjectSlim:
type: number
description: A user identifier
example: 1
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -646,6 +638,9 @@ UserObjectACP:
type: number
description: A user identifier
example: 1
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
@@ -717,6 +712,10 @@ UserObjectACP:
lastonlineISO:
type: string
example: '2020-03-27T20:30:36.590Z'
banned_until:
type: number
description: A UNIX timestamp representing the moment a ban will be lifted
example: 0
banned_until_readable:
type: string
description: An ISO 8601 formatted date string representing the moment a ban will be lifted, or the words "Not Banned"
@@ -745,9 +744,7 @@ BanMuteArray:
$ref: '#/UserObjectTiny'
until:
type: number
untilReadable:
type: string
timestampReadable:
untilISO:
type: string
timestampISO:
type: string

View File

@@ -0,0 +1,14 @@
BlocklistObject:
type: object
properties:
url:
type: string
description: The blocklist URL
example: https://example.org/blocklist
count:
type: number
description: The number of blocked domains on the list
BlocklistArray:
type: array
items:
$ref: '#/BlocklistObject'

View File

@@ -0,0 +1,18 @@
RelayObject:
type: object
properties:
url:
type: string
description: The relay actor endpoint
example: https://example.org/actor
state:
type: number
description: "The established state of the relay(0: pending; 1: one way receive; 2: bidirectional)"
enum: [0, 1, 2]
label:
type: string
description: A language key pertaining to the `state` value
RelaysArray:
type: array
items:
$ref: '#/RelayObject'

View File

@@ -0,0 +1,23 @@
RuleObject:
type: object
properties:
rid:
type: string
description: a valid rule ID
example: 4eb506f8-a173-4693-a41b-e23604bc973a
type:
type: string
description: The auto-categorization rule type
example: hashtag
value:
type: string
description: The value that incoming content will be matched against (used alongside `type`)
example: 'example'
cid:
type: number
description: The category ID of a local category
example: 1
RulesArray:
type: array
items:
$ref: '#/RuleObject'