mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 18:26:37 +02:00
Merge branch 'develop' into socket-notifications-refactor
This commit is contained in:
28
public/openapi/write/admin/activitypub/blocklists.yaml
Normal file
28
public/openapi/write/admin/activitypub/blocklists.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
summary: add blocklist
|
||||
description: This operation add a new blocklist
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: The blocklist url
|
||||
example: https://example.org/blocklist
|
||||
responses:
|
||||
'200':
|
||||
description: blocklist successfully added
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../components/schemas/admin/blocklists.yaml#/BlocklistArray
|
||||
55
public/openapi/write/admin/activitypub/blocklists/url.yaml
Normal file
55
public/openapi/write/admin/activitypub/blocklists/url.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
get:
|
||||
tags:
|
||||
- admin
|
||||
summary: view blocklist
|
||||
description: This operation retrieves the domains in a specific blocklist
|
||||
parameters:
|
||||
- name: url
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: https%3A%2F%2Fexample.org%2Fblocklist
|
||||
responses:
|
||||
'200':
|
||||
description: blocklist successfully retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
domains:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
count:
|
||||
type: number
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: delete blocklist
|
||||
description: This operation removes a previously-added blocklist
|
||||
parameters:
|
||||
- in: path
|
||||
name: url
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
example: https%3A%2F%2Fexample.org%2Fblocklist
|
||||
responses:
|
||||
'200':
|
||||
description: blocklist successfully deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../../components/schemas/admin/blocklists.yaml#/BlocklistArray
|
||||
@@ -0,0 +1,30 @@
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
summary: refresh blocklist
|
||||
description: This operation refreshes the blocklist domains
|
||||
parameters:
|
||||
- name: url
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: https%3A%2F%2Fexample.org%2Fblocklist
|
||||
responses:
|
||||
'200':
|
||||
description: blocklist successfully refreshed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
blocklists:
|
||||
$ref: ../../../../../components/schemas/admin/blocklists.yaml#/BlocklistArray
|
||||
count:
|
||||
type: number
|
||||
description: The number of domains managed by this blocklist
|
||||
28
public/openapi/write/admin/activitypub/relays.yaml
Normal file
28
public/openapi/write/admin/activitypub/relays.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
summary: add relay
|
||||
description: This operation establishes a connection to a remote relay for content discovery purposes
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: The relay actor endpoint
|
||||
example: https://example.org/actor
|
||||
responses:
|
||||
'200':
|
||||
description: rule successfully created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../components/schemas/admin/relays.yaml#/RelaysArray
|
||||
25
public/openapi/write/admin/activitypub/relays/url.yaml
Normal file
25
public/openapi/write/admin/activitypub/relays/url.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: remove relay
|
||||
description: This operation removes a pre-established relay connection
|
||||
parameters:
|
||||
- in: path
|
||||
name: url
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The relay actor endpoint, URL encoded.
|
||||
example: https%3A%2F%2Fexample.org%2Factor
|
||||
responses:
|
||||
'200':
|
||||
description: rule successfully deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../../components/schemas/admin/relays.yaml#/RelaysArray
|
||||
36
public/openapi/write/admin/activitypub/rules.yaml
Normal file
36
public/openapi/write/admin/activitypub/rules.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
post:
|
||||
tags:
|
||||
- admin
|
||||
summary: create auto-categorization rule
|
||||
description: This operation creates a new auto-categorization rule that is applied to new remote content received via ActivityPub.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
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
|
||||
responses:
|
||||
'200':
|
||||
description: rule successfully created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../components/schemas/admin/rules.yaml#/RulesArray
|
||||
30
public/openapi/write/admin/activitypub/rules/order.yaml
Normal file
30
public/openapi/write/admin/activitypub/rules/order.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
put:
|
||||
tags:
|
||||
- admin
|
||||
summary: re-order auto-categorization rules
|
||||
description: This operation updates the order of some or all auto-categorization rules.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
rids:
|
||||
type: array
|
||||
description: A list of rule IDs in the preferred order. Any omitted IDs will remain in the last-known order, which may conflict with the new ordering.
|
||||
items:
|
||||
type: string
|
||||
example: ["be1aee05-2d56-484e-9d83-6212d0f8a033", "81b20d59-85af-44e7-9e52-dadf6ff3c7fb"]
|
||||
responses:
|
||||
'200':
|
||||
description: rules successfully re-ordered
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../../components/schemas/admin/rules.yaml#/RulesArray
|
||||
25
public/openapi/write/admin/activitypub/rules/rid.yaml
Normal file
25
public/openapi/write/admin/activitypub/rules/rid.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
delete:
|
||||
tags:
|
||||
- admin
|
||||
summary: delete auto-categorization rule
|
||||
description: This operation deletes a previously set-up auto-categorization rule
|
||||
parameters:
|
||||
- in: path
|
||||
name: rid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid rule ID
|
||||
example: 4eb506f8-a173-4693-a41b-e23604bc973a
|
||||
responses:
|
||||
'200':
|
||||
description: rule successfully deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../../../components/schemas/admin/rules.yaml#/RulesArray
|
||||
85
public/openapi/write/categories/cid/follow.yaml
Normal file
85
public/openapi/write/categories/cid/follow.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
put:
|
||||
tags:
|
||||
- categories
|
||||
summary: synchronize category
|
||||
description: |
|
||||
**This operation requires an enabled activitypub integration**
|
||||
|
||||
Establishes a "follow" relationship between another activitypub-enabled actor.
|
||||
Until an "accept" response is received, the synchronization will stay in a pending state.
|
||||
Upon acceptance, a one-way sync is achieved; the other actor will need to follow the same category in order to achieve full two-way synchronization.
|
||||
parameters:
|
||||
- in: path
|
||||
name: cid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid category id
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
actor:
|
||||
type: string
|
||||
description: A valid actor uri or webfinger handle
|
||||
example: 'https://example.org/foobar'
|
||||
responses:
|
||||
'200':
|
||||
description: successfully sent category synchronization request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties: {}
|
||||
delete:
|
||||
tags:
|
||||
- categories
|
||||
summary: unsynchronize category
|
||||
description: |
|
||||
**This operation requires an enabled activitypub integration**
|
||||
|
||||
Removes a "follow" relationship between another activitypub-enabled actor.
|
||||
Unlike the synchronization request, this does not require an acceptance from the remote end.
|
||||
|
||||
N.B. This method only severs the link for incoming content.
|
||||
parameters:
|
||||
- in: path
|
||||
name: cid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid category id
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
actor:
|
||||
type: string
|
||||
description: A valid actor uri or webfinger handle
|
||||
example: 'https://example.org/foobar'
|
||||
responses:
|
||||
'200':
|
||||
description: successfully unsynchronized category
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties: {}
|
||||
@@ -31,19 +31,6 @@ put:
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: object
|
||||
properties:
|
||||
users:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
groups:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
labelData:
|
||||
type: array
|
||||
items:
|
||||
@@ -64,6 +51,9 @@ put:
|
||||
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
|
||||
@@ -89,6 +79,10 @@ put:
|
||||
type: number
|
||||
description: A Boolean representing whether a user is banned or not
|
||||
example: 0
|
||||
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"
|
||||
@@ -96,7 +90,6 @@ put:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
types:
|
||||
type: object
|
||||
@@ -113,7 +106,6 @@ put:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
types:
|
||||
type: object
|
||||
|
||||
@@ -24,19 +24,6 @@ get:
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: object
|
||||
properties:
|
||||
users:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
groups:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
labelData:
|
||||
type: array
|
||||
items:
|
||||
@@ -60,7 +47,6 @@ get:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
isPrivate:
|
||||
type: boolean
|
||||
@@ -78,7 +64,6 @@ get:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
types:
|
||||
type: object
|
||||
|
||||
@@ -41,19 +41,6 @@ put:
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: object
|
||||
properties:
|
||||
users:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
groups:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
labelData:
|
||||
type: array
|
||||
items:
|
||||
@@ -106,7 +93,6 @@ put:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
groups:
|
||||
type: array
|
||||
@@ -120,7 +106,6 @@ put:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
types:
|
||||
type: object
|
||||
@@ -191,19 +176,6 @@ delete:
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: object
|
||||
properties:
|
||||
users:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
groups:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Language key of the privilege name's user-friendly name
|
||||
labelData:
|
||||
type: array
|
||||
items:
|
||||
@@ -256,7 +228,6 @@ delete:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
groups:
|
||||
type: array
|
||||
@@ -270,7 +241,6 @@ delete:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
types:
|
||||
type: object
|
||||
|
||||
@@ -71,5 +71,4 @@ get:
|
||||
privileges:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
description: A set of privileges with either true or false
|
||||
@@ -55,7 +55,7 @@ put:
|
||||
type: array
|
||||
description: A list of cids that have had their watch states modified.
|
||||
items:
|
||||
type: number
|
||||
type: string
|
||||
delete:
|
||||
tags:
|
||||
- categories
|
||||
@@ -99,4 +99,4 @@ delete:
|
||||
type: array
|
||||
description: A list of cids that have had their watch states modified.
|
||||
items:
|
||||
type: number
|
||||
type: string
|
||||
@@ -49,7 +49,7 @@ put:
|
||||
type: number
|
||||
required: true
|
||||
description: a valid message id
|
||||
example: 5
|
||||
example: 2
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -92,7 +92,7 @@ delete:
|
||||
type: number
|
||||
required: true
|
||||
description: a valid message id
|
||||
example: 5
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Message successfully deleted
|
||||
@@ -125,7 +125,7 @@ post:
|
||||
type: number
|
||||
required: true
|
||||
description: a valid message id
|
||||
example: 5
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: message successfully restored
|
||||
|
||||
@@ -17,7 +17,7 @@ get:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid chat message id
|
||||
example: 5
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Chat message ip address retrieved
|
||||
|
||||
@@ -2,15 +2,15 @@ get:
|
||||
tags:
|
||||
- groups
|
||||
summary: list groups
|
||||
description: This operation returns a list of user groups. The number of groups returned is hardcoded to 10.
|
||||
description: This operation returns a list of user groups. The number of groups returned is hardcoded to 15 per page.
|
||||
parameters:
|
||||
- in: query
|
||||
name: 'after'
|
||||
name: 'page'
|
||||
schema:
|
||||
type: number
|
||||
required: false
|
||||
description: An offset used to display a different subset of groups.
|
||||
example: '0'
|
||||
description: Used for pagination
|
||||
example: '1'
|
||||
- in: query
|
||||
name: 'sort'
|
||||
schema:
|
||||
|
||||
39
public/openapi/write/posts/owner.yaml
Normal file
39
public/openapi/write/posts/owner.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
post:
|
||||
tags:
|
||||
- posts
|
||||
summary: Change owner of one or more posts
|
||||
description: Change the owner of the posts identified by pids to the user uid.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- pids
|
||||
- uid
|
||||
properties:
|
||||
pids:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
description: Array of post IDs to change owner for
|
||||
example: [2]
|
||||
uid:
|
||||
type: integer
|
||||
description: Target user id
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Owner changed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
'404':
|
||||
description: Post not found
|
||||
@@ -22,48 +22,65 @@ get:
|
||||
status:
|
||||
$ref: ../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
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
|
||||
flagId:
|
||||
type: number
|
||||
deleted:
|
||||
type: number
|
||||
upvotes:
|
||||
type: number
|
||||
downvotes:
|
||||
type: number
|
||||
deleterUid:
|
||||
type: number
|
||||
edited:
|
||||
type: number
|
||||
replies:
|
||||
type: number
|
||||
bookmarks:
|
||||
type: number
|
||||
votes:
|
||||
type: number
|
||||
timestampISO:
|
||||
type: string
|
||||
description: An ISO 8601 formatted date string (complementing `timestamp`)
|
||||
editedISO:
|
||||
type: string
|
||||
description: An ISO 8601 formatted date string (complementing `timestamp`)
|
||||
upvoted:
|
||||
type: boolean
|
||||
downvoted:
|
||||
type: boolean
|
||||
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
|
||||
flagId:
|
||||
type: number
|
||||
deleted:
|
||||
type: number
|
||||
upvotes:
|
||||
type: number
|
||||
downvotes:
|
||||
type: number
|
||||
deleterUid:
|
||||
type: number
|
||||
edited:
|
||||
type: number
|
||||
replies:
|
||||
type: number
|
||||
bookmarks:
|
||||
type: number
|
||||
votes:
|
||||
type: number
|
||||
timestampISO:
|
||||
type: string
|
||||
description: An ISO 8601 formatted date string (complementing `timestamp`)
|
||||
editedISO:
|
||||
type: string
|
||||
description: An ISO 8601 formatted date string (complementing `timestamp`)
|
||||
upvoted:
|
||||
type: boolean
|
||||
downvoted:
|
||||
type: boolean
|
||||
attachments:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A sha256 hash of the attachment (tied to the corresponding entry in the database)
|
||||
- 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
|
||||
put:
|
||||
tags:
|
||||
- posts
|
||||
|
||||
33
public/openapi/write/posts/pid/announcers-tooltip.yaml
Normal file
33
public/openapi/write/posts/pid/announcers-tooltip.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
get:
|
||||
tags:
|
||||
- posts
|
||||
summary: get announcers of a post
|
||||
description: This is used for getting a list of usernames for the announcers tooltip
|
||||
parameters:
|
||||
- in: path
|
||||
name: pid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid post id
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Usernames of announcers of post
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
otherCount:
|
||||
type: number
|
||||
usernames:
|
||||
type: array
|
||||
cutoff:
|
||||
type: number
|
||||
|
||||
32
public/openapi/write/posts/pid/announcers.yaml
Normal file
32
public/openapi/write/posts/pid/announcers.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
get:
|
||||
tags:
|
||||
- posts
|
||||
summary: get announcers of a post
|
||||
description: This returns the announcers of a post if the user has permission to view them
|
||||
parameters:
|
||||
- in: path
|
||||
name: pid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid post id
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Data about announcers of this post
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
announceCount:
|
||||
type: number
|
||||
announcers:
|
||||
type: array
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ get:
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
uid:
|
||||
type: number
|
||||
pid:
|
||||
type: number
|
||||
timestamps:
|
||||
type: array
|
||||
items:
|
||||
@@ -37,6 +41,8 @@ get:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
uid:
|
||||
type: number
|
||||
editable:
|
||||
type: boolean
|
||||
deletable:
|
||||
|
||||
39
public/openapi/write/posts/pid/owner.yaml
Normal file
39
public/openapi/write/posts/pid/owner.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
put:
|
||||
summary: Change owner of a post
|
||||
description: Change the owner (uid) of a post identified by pid.
|
||||
tags:
|
||||
- posts
|
||||
parameters:
|
||||
- name: pid
|
||||
in: path
|
||||
description: Post id
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
example: 2
|
||||
requestBody:
|
||||
description: New owner payload
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- uid
|
||||
properties:
|
||||
uid:
|
||||
type: integer
|
||||
description: User id of the new owner
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Owner changed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
@@ -31,40 +31,4 @@ get:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
pid:
|
||||
type: number
|
||||
tid:
|
||||
type: number
|
||||
description: A topic identifier
|
||||
content:
|
||||
type: string
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
timestamp:
|
||||
type: number
|
||||
deleted:
|
||||
type: number
|
||||
upvotes:
|
||||
type: number
|
||||
downvotes:
|
||||
type: number
|
||||
replies:
|
||||
type: number
|
||||
votes:
|
||||
type: number
|
||||
timestampISO:
|
||||
type: string
|
||||
user:
|
||||
type: object
|
||||
additionalProperties: {}
|
||||
topic:
|
||||
type: object
|
||||
additionalProperties: {}
|
||||
category:
|
||||
type: object
|
||||
additionalProperties: {}
|
||||
isMainPost:
|
||||
type: boolean
|
||||
$ref: ../../../components/schemas/PostObject.yaml#/PostObject
|
||||
|
||||
33
public/openapi/write/posts/pid/upvoters.yaml
Normal file
33
public/openapi/write/posts/pid/upvoters.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
get:
|
||||
tags:
|
||||
- posts
|
||||
summary: get upvoter usernames of a post
|
||||
description: This is used for getting a list of upvoter usernames for the vote tooltip
|
||||
parameters:
|
||||
- in: path
|
||||
name: pid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid post id
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Usernames of upvoters of post
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
otherCount:
|
||||
type: number
|
||||
usernames:
|
||||
type: array
|
||||
cutoff:
|
||||
type: number
|
||||
|
||||
39
public/openapi/write/posts/pid/voters.yaml
Normal file
39
public/openapi/write/posts/pid/voters.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
get:
|
||||
tags:
|
||||
- posts
|
||||
summary: get voters of a post
|
||||
description: This returns the upvoters and downvoters of a post if the user has permission to view them
|
||||
parameters:
|
||||
- in: path
|
||||
name: pid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid post id
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Data about upvoters and downvoters of the post
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
upvoteCount:
|
||||
type: number
|
||||
downvoteCount:
|
||||
type: number
|
||||
showUpvotes:
|
||||
type: boolean
|
||||
showDownvotes:
|
||||
type: boolean
|
||||
upvoters:
|
||||
type: array
|
||||
downvoters:
|
||||
type: array
|
||||
|
||||
92
public/openapi/write/posts/queue/id.yaml
Normal file
92
public/openapi/write/posts/queue/id.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
post:
|
||||
summary: Accept a queued post
|
||||
tags:
|
||||
- QueuedPosts
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid queued post id
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: post successfully accepted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
pid:
|
||||
type: number
|
||||
tid:
|
||||
type: number
|
||||
'400':
|
||||
description: Bad request, invalid post id
|
||||
delete:
|
||||
summary: Remove a queued post
|
||||
tags:
|
||||
- QueuedPosts
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 'topic-12345'
|
||||
responses:
|
||||
'200':
|
||||
description: Post removed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
'400':
|
||||
description: Bad request, invalid post id
|
||||
put:
|
||||
summary: Edit a queued post
|
||||
tags:
|
||||
- QueuedPosts
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 'topic-12345'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
example: This is a test reply
|
||||
cid:
|
||||
type: number
|
||||
description: Category ID to which the post belongs
|
||||
title:
|
||||
type: string
|
||||
description: Updated Post Title
|
||||
responses:
|
||||
'200':
|
||||
description: Post edited successfully
|
||||
'400':
|
||||
description: Bad request, invalid post id
|
||||
|
||||
|
||||
36
public/openapi/write/posts/queue/notify.yaml
Normal file
36
public/openapi/write/posts/queue/notify.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
post:
|
||||
summary: Notify the owner of a queued post
|
||||
tags:
|
||||
- QueuedPosts
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid queued post id
|
||||
example: 2
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
example: body of the notification message
|
||||
responses:
|
||||
'200':
|
||||
description: post successfully accepted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
'400':
|
||||
description: Bad request, invalid post id
|
||||
@@ -61,7 +61,12 @@ post:
|
||||
status:
|
||||
$ref: ../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
$ref: ../../components/schemas/PostObject.yaml#/PostObject
|
||||
allOf:
|
||||
- $ref: ../../components/schemas/PostObject.yaml#/PostObject
|
||||
- type: object
|
||||
properties:
|
||||
index:
|
||||
type: number
|
||||
delete:
|
||||
tags:
|
||||
- topics
|
||||
|
||||
104
public/openapi/write/topics/tid/crossposts.yaml
Normal file
104
public/openapi/write/topics/tid/crossposts.yaml
Normal file
@@ -0,0 +1,104 @@
|
||||
get:
|
||||
tags:
|
||||
- topics
|
||||
summary: get topic crossposts
|
||||
description: This operation retrieves a list of crossposts for the requested topic
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Topic crossposts retrieved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
crossposts:
|
||||
$ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
|
||||
post:
|
||||
tags:
|
||||
- topics
|
||||
summary: crosspost a topic
|
||||
description: This operation crossposts a topic to another category.
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
cid:
|
||||
type: number
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Topic successfully crossposted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
crossposts:
|
||||
$ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
|
||||
delete:
|
||||
tags:
|
||||
- topics
|
||||
summary: uncrossposts a topic
|
||||
description: This operation uncrossposts a topic from a category.
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
cid:
|
||||
type: number
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Topic successfully uncrossposted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
crossposts:
|
||||
$ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
|
||||
39
public/openapi/write/topics/tid/move.yaml
Normal file
39
public/openapi/write/topics/tid/move.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
put:
|
||||
tags:
|
||||
- topics
|
||||
summary: move topic to another category
|
||||
description: |
|
||||
This operation moves a topic from one category to another.
|
||||
|
||||
**Note**: This is a privileged call and can only be executed by administrators, global moderators, or the moderator for the category of the passed-in topic.
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
cid:
|
||||
type: number
|
||||
example: -1
|
||||
responses:
|
||||
'200':
|
||||
description: Topic successfully moved
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties: {}
|
||||
@@ -11,6 +11,13 @@ get:
|
||||
required: true
|
||||
description: a valid topic id
|
||||
example: 1
|
||||
- in: query
|
||||
name: thumbsOnly
|
||||
schema:
|
||||
type: boolean
|
||||
required: false
|
||||
description: "(default: false) exclude post attachments, uploaded media, and those added by plugins"
|
||||
example: 0
|
||||
responses:
|
||||
'200':
|
||||
description: Thumbnails successfully retrieved
|
||||
@@ -76,55 +83,6 @@ post:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
put:
|
||||
tags:
|
||||
- topics
|
||||
summary: migrate topic thumbnail
|
||||
description: This operation migrates a thumbnails from a topic or draft, to another tid or draft.
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id or draft uuid
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
tid:
|
||||
type: string
|
||||
description: a valid topic id or draft uuid
|
||||
example: '1'
|
||||
responses:
|
||||
'200':
|
||||
description: Topic thumbnails migrated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: array
|
||||
description: A list of the topic thumbnails in the destination topic
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
description: Path to a topic thumbnail
|
||||
delete:
|
||||
tags:
|
||||
- topics
|
||||
|
||||
@@ -2,14 +2,14 @@ put:
|
||||
tags:
|
||||
- topics
|
||||
summary: reorder topic thumbnail
|
||||
description: This operation sets the order for a topic thumbnail. It can handle either topics (if a valid `tid` is passed in), or drafts. A 404 is returned if the topic or draft does not actually contain that thumbnail path. Paths passed in should **not** contain the path to the uploads folder (`config.upload_url` on client side)
|
||||
description: This operation sets the order for a topic thumbnail. A 404 is returned if the topic does not contain path. Paths passed in should **not** contain the path to the uploads folder (`config.upload_url` on client side)
|
||||
parameters:
|
||||
- in: path
|
||||
name: tid
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: a valid topic id or draft uuid
|
||||
description: a valid topic id
|
||||
example: 2
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
@@ -23,7 +23,7 @@ put:
|
||||
example: '123456'
|
||||
newPassword:
|
||||
type: string
|
||||
example: '123456'
|
||||
example: '654321'
|
||||
required:
|
||||
- newPassword
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user