feat(openapi): refactor into indiv. files to match API & tpl routing

This commit is contained in:
psychobunny
2020-09-29 15:17:09 -04:00
parent c7d27731b3
commit ffbf2d6d63
125 changed files with 8339 additions and 8224 deletions

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Get user by email
description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: email
in: path
required: true
schema:
type: string
example: 'test@example.org'
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../../components/schemas/UserObject.yaml#/UserObject

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Get user by uid
description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: uid
in: path
required: true
schema:
type: string
example: 1
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../../components/schemas/UserObject.yaml#/UserObject

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Export a user's posts (.csv)
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: "A CSV file containing a user's posts"
content:
text/csv:
schema:
type: string
format: binary

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Export a user's profile data (.json)
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: "A JSON file containing the user profile"
content:
text/json:
schema:
type: string
format: binary

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Export a user's uploads (.zip)
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: Successful export of user uploads
content:
application/zip:
schema:
type: string
format: binary

View File

@@ -0,0 +1,19 @@
get:
tags:
- users
summary: Get user by username
description: This route retrieves a user's public profile data. If the calling user is the same as the profile, then it will also return data the user elected to hide (e.g. email/fullname)
parameters:
- name: username
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../../components/schemas/UserObject.yaml#/UserObject

View File

@@ -0,0 +1,86 @@
get:
tags:
- users
summary: Get user profile
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../components/schemas/PostsObject.yaml#/PostsObject
latestPosts:
$ref: ../../components/schemas/PostsObject.yaml#/PostsObject
bestPosts:
$ref: ../../components/schemas/PostsObject.yaml#/PostsObject
hasPrivateChat:
type: number
title:
type: string
allowCoverPicture:
type: boolean
selectedGroup:
type: array
items:
type: object
properties:
name:
type: string
slug:
type: string
createtime:
type: number
userTitle:
type: string
description:
type: string
memberCount:
type: number
deleted:
type: string
hidden:
type: number
system:
type: number
private:
type: number
ownerUid:
type: number
icon:
type: string
labelColor:
type: string
cover:url:
type: string
cover:position:
type: string
userTitleEnabled:
type: number
disableJoinRequests:
type: number
disableLeave:
type: number
nameEncoded:
type: string
displayName:
type: string
textColor:
type: string
createtimeISO:
type: string
cover:thumb:url:
type: string
- $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,45 @@
get:
tags:
- users
summary: Get a user's best performing topics
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,30 @@
get:
tags:
- users
summary: Get user's blocks
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
users:
type: array
items:
$ref: ../../../components/schemas/UserObject.yaml#/UserObjectSlim
title:
type: string
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,45 @@
get:
tags:
- users
summary: Get user's bookmarks
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,61 @@
get:
tags:
- users
summary: Get user's watched categories
description: This route retrieves the list of categories and their watch states
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
categories:
type: array
items:
type: object
properties:
cid:
type: number
description: A category identifier
name:
type: string
level:
type: string
icon:
type: string
parentCid:
type: number
description: The category identifier for the category that is the immediate
ancestor of the current category
color:
type: string
bgColor:
type: string
descriptionParsed:
type: string
depth:
type: number
slug:
type: string
isIgnored:
type: boolean
isWatched:
type: boolean
isNotWatched:
type: boolean
imageClass:
type: string
title:
type: string
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,299 @@
get:
tags:
- users
summary: Get chat room
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
- name: roomid
in: path
required: true
schema:
type: string
example: 1
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
owner:
type: number
roomId:
type: number
roomName:
type: string
messages:
type: array
items:
type: object
properties:
content:
type: string
timestamp:
type: number
fromuid:
type: number
roomId:
type: string
deleted:
type: boolean
system:
type: boolean
edited:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
editedISO:
type: string
messageId:
type: number
fromUser:
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:
type: string
nullable: true
status:
type: string
banned:
type: boolean
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"
banned_until_readable:
type: string
deleted:
type: boolean
self:
type: number
newSet:
type: boolean
index:
type: number
cleanedContent:
type: string
isOwner:
type: boolean
isOwner:
type: boolean
users:
type: array
items:
type: object
properties:
uid:
type: number
description: A user identifier
username:
type: string
description: A friendly name for a given user account
picture:
type: string
nullable: true
status:
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"
isOwner:
type: boolean
canReply:
type: boolean
groupChat:
type: boolean
usernames:
type: string
maximumUsersInChatRoom:
type: number
maximumChatMessageLength:
type: number
showUserInput:
type: boolean
isAdminOrGlobalMod:
type: boolean
rooms:
type: array
items:
type: object
properties:
owner:
oneOf:
- type: number
- type: string
roomId:
type: number
roomName:
type: string
users:
type: array
items:
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
status:
type: string
lastonline:
type: number
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
groupChat:
type: boolean
unread:
type: boolean
teaser:
type: object
properties:
fromuid:
type: number
content:
type: string
timestamp:
type: number
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
status:
type: string
lastonline:
type: number
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
nullable: true
lastUser:
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
status:
type: string
lastonline:
type: number
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
usernames:
type: string
nextStart:
type: number
title:
type: string
uid:
type: number
description: A user identifier
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
canViewInfo:
type: boolean
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,34 @@
get:
tags:
- users
summary: Get user's GDPR consent settings
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
gdpr_consent:
type: boolean
digest:
type: object
properties:
frequency:
type: string
enabled:
type: boolean
title:
type: string
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,51 @@
get:
tags:
- users
summary: Get user's downvoted posts
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
nextStart:
type: number
noItemsFoundKey:
type: string
description: Translation key for message notifying user that there were no posts found
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
required:
- posts
- nextStart
- noItemsFoundKey
- title
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,66 @@
get:
tags:
- users
summary: Get user profile for editing
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
maximumSignatureLength:
type: number
maximumAboutMeLength:
type: number
maximumProfileImageSize:
type: number
allowProfilePicture:
type: boolean
allowCoverPicture:
type: boolean
allowProfileImageUploads:
type: number
allowedProfileImageExtensios:
type: string
allowMultipleBadges:
type: boolean
allowAccountDelete:
type: boolean
allowWebsite:
type: boolean
allowAboutMe:
type: boolean
allowSignature:
type: boolean
profileImageDimension:
type: number
defaultAvatar:
type: string
groupSelectSize:
type: number
title:
type: string
editButtons:
type: array
items:
type: object
properties:
link:
type: string
description: A relative path to the page linked to
text:
type: string
description: Button label
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,27 @@
get:
tags:
- users
summary: Get configs for email editing
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
hasPassword:
type: boolean
title:
type: string
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,31 @@
get:
tags:
- users
summary: Get configs for password editing
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
hasPassword:
type: boolean
minimumPasswordLength:
type: number
minimumPasswordStrength:
type: number
title:
type: string
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,27 @@
get:
tags:
- users
summary: Get configs for username editing
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
hasPassword:
type: boolean
title:
type: string
- $ref: ../../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,91 @@
get:
tags:
- users
summary: Get followers
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
- name: page
in: query
schema:
type: number
example: ''
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
title:
type: string
users:
type: array
items:
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
status:
type: string
postcount:
type: number
reputation:
type: number
email:confirmed:
type: number
description: Whether the user has confirmed their email address or not
lastonline:
type: number
flags:
nullable: true
banned:
type: number
banned:expire:
type: number
joindate:
type: number
description: A UNIX timestamp representing the moment the user's account was
created
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"
joindateISO:
type: string
lastonlineISO:
type: string
banned_until:
type: number
banned_until_readable:
type: string
administrator:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,91 @@
get:
tags:
- users
summary: Get followed users
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
- name: page
in: query
schema:
type: number
example: ''
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
title:
type: string
users:
type: array
items:
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
status:
type: string
postcount:
type: number
reputation:
type: number
email:confirmed:
type: number
description: Whether the user has confirmed their email address or not
lastonline:
type: number
flags:
nullable: true
banned:
type: number
banned:expire:
type: number
joindate:
type: number
description: A UNIX timestamp representing the moment the user's account was
created
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"
joindateISO:
type: string
lastonlineISO:
type: string
banned_until:
type: number
banned_until_readable:
type: string
administrator:
type: boolean
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,32 @@
get:
tags:
- users
summary: Get user's groups
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
title:
type: string
template:
type: object
properties:
name:
type: string
account/groups:
type: boolean
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,47 @@
get:
tags:
- users
summary: Get user's ignored topics
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
topics:
type: array
items:
$ref: ../../../components/schemas/TopicObject.yaml#/TopicObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,181 @@
get:
tags:
- users
summary: Get user moderation info
description: Administrators and Global Moderators get access to the `/info` page, which shows some backend data that is useful from a moderation point-of-view (such as IP addresses, recent bans, moderation history, etc).
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
history:
type: object
properties:
flags:
type: array
items:
type: object
properties:
pid:
type: number
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
timestampReadable:
type: string
additionalProperties:
description: Contextual data is added to this object (such as topic data, etc.)
bans:
type: array
items:
type: object
properties:
uid:
type: number
timestamp:
type: number
expire:
type: number
fromUid:
type: number
user:
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"
until:
type: number
untilReadable:
type: string
timestampReadable:
type: string
timestampISO:
type: string
reason:
type: string
sessions:
type: array
items:
type: object
properties:
ip:
type: string
uuid:
type: string
datetime:
type: number
platform:
type: string
browser:
type: string
version:
type: string
current:
type: boolean
datetimeISO:
type: string
usernames:
type: array
items:
type: object
properties:
value:
type: string
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
emails:
type: array
items:
type: object
properties:
value:
type: string
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
moderationNotes:
type: array
items:
type: object
properties:
uid:
type: number
note:
type: string
timestamp:
type: number
timestampISO:
type: string
user:
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"
title:
type: string
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,45 @@
get:
tags:
- users
summary: Get a user's posts
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,20 @@
delete:
tags:
- users
summary: Revoke a user session
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
- name: uuid
in: path
required: true
schema:
type: string
example: testuuid
responses:
"200":
description: User session revoked

View File

@@ -0,0 +1,46 @@
get:
tags:
- users
summary: Get user's active sessions
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
sessions:
type: array
items:
type: object
properties:
ip:
type: string
uuid:
type: string
datetime:
type: number
platform:
type: string
browser:
type: string
version:
type: string
current:
type: boolean
datetimeISO:
type: string
title:
type: string
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,246 @@
get:
tags:
- users
summary: Get user's settings
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
settings:
type: object
properties:
showemail:
type: boolean
usePagination:
type: boolean
topicsPerPage:
type: number
postsPerPage:
type: number
topicPostSort:
type: string
openOutgoingLinksInNewTab:
type: boolean
dailyDigestFreq:
type: string
showfullname:
type: boolean
followTopicsOnCreate:
type: boolean
followTopicsOnReply:
type: boolean
restrictChat:
type: boolean
topicSearchEnabled:
type: boolean
categoryTopicSort:
type: string
userLang:
type: string
bootswatchSkin:
type: string
homePageRoute:
type: string
scrollToMyPost:
type: boolean
notificationType_new-chat:
type: string
notificationType_new-reply:
type: string
notificationType_post-edit:
type: string
sendChatNotifications:
nullable: true
sendPostNotifications:
nullable: true
notificationType_upvote:
type: string
notificationType_new-topic:
type: string
notificationType_follow:
type: string
notificationType_group-invite:
type: string
upvoteNotifFreq:
type: string
notificationType_mention:
type: string
acpLang:
type: string
notificationType_new-register:
type: string
notificationType_post-queue:
type: string
notificationType_new-post-flag:
type: string
notificationType_new-user-flag:
type: string
categoryWatchState:
type: string
notificationType_group-request-membership:
type: string
uid:
type: number
description: A user identifier
required:
- showemail
- usePagination
- topicsPerPage
- postsPerPage
- topicPostSort
- openOutgoingLinksInNewTab
- dailyDigestFreq
- showfullname
- followTopicsOnCreate
- followTopicsOnReply
- restrictChat
- topicSearchEnabled
- categoryTopicSort
- userLang
- bootswatchSkin
- homePageRoute
- scrollToMyPost
- notificationType_new-chat
- notificationType_new-reply
- notificationType_upvote
- notificationType_new-topic
- notificationType_follow
- notificationType_group-invite
- upvoteNotifFreq
- acpLang
- notificationType_new-register
- notificationType_post-queue
- notificationType_new-post-flag
- notificationType_new-user-flag
- categoryWatchState
- notificationType_group-request-membership
- uid
languages:
type: array
items:
type: object
properties:
name:
type: string
code:
type: string
dir:
type: string
selected:
type: boolean
acpLanguages:
type: array
items:
type: object
properties:
name:
type: string
code:
type: string
dir:
type: string
selected:
type: boolean
customSettings:
type: array
items:
type: object
properties: {}
additionalProperties: {}
homePageRoutes:
type: array
items:
type: object
properties:
route:
type: string
name:
type: string
selected:
type: boolean
notificationSettings:
type: array
items:
type: object
properties:
name:
type: string
label:
type: string
none:
type: boolean
notification:
type: boolean
email:
type: boolean
notificationemail:
type: boolean
disableEmailSubscriptions:
type: number
dailyDigestFreqOptions:
type: array
items:
type: object
properties:
value:
type: string
name:
type: string
selected:
type: boolean
bootswatchSkinOptions:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
selected:
type: boolean
upvoteNotifFreq:
type: array
items:
type: object
properties:
name:
type: string
selected:
type: boolean
categoryWatchState:
type: object
properties:
watching:
type: boolean
disableCustomUserSkins:
type: number
allowUserHomePage:
type: number
hideFullname:
type: number
hideEmail:
type: number
inTopicSearchAvailable:
type: boolean
maxTopicsPerPage:
type: number
maxPostsPerPage:
type: number
title:
type: string
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,47 @@
get:
tags:
- users
summary: Get a user's topics
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
topics:
type: array
items:
$ref: ../../../components/schemas/TopicObject.yaml#/TopicObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,37 @@
get:
tags:
- users
summary: Get user's uploads
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
uploads:
type: array
items:
type: object
properties:
name:
type: string
url:
type: string
privateUploads:
type: boolean
title:
type: string
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,51 @@
get:
tags:
- users
summary: Get user's upvoted posts
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObjectFull
- type: object
properties:
posts:
$ref: ../../../components/schemas/PostsObject.yaml#/PostsObject
nextStart:
type: number
noItemsFoundKey:
type: string
description: Translation key for message notifying user that there were no posts found
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
required:
- posts
- nextStart
- noItemsFoundKey
- title
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,207 @@
get:
tags:
- users
summary: Get user's watched topics
parameters:
- name: userslug
in: path
required: true
schema:
type: string
example: admin
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- $ref: ../../../components/schemas/UserObject.yaml#/UserObject
- type: object
properties:
aboutmeParsed:
type: string
age:
type: number
emailClass:
type: string
ips:
type: array
items:
type: string
isBlocked:
type: boolean
blocksCount:
type: number
yourid:
type: number
theirid:
type: number
isTargetAdmin:
type: boolean
isAdmin:
type: boolean
isGlobalModerator:
type: boolean
isModerator:
type: boolean
isAdminOrGlobalModerator:
type: boolean
isAdminOrGlobalModeratorOrModerator:
type: boolean
isSelfOrAdminOrGlobalModerator:
type: boolean
canEdit:
type: boolean
canBan:
type: boolean
canChangePassword:
type: boolean
isSelf:
type: boolean
isFollowing:
type: boolean
hasPrivateChat:
type: number
showHidden:
type: boolean
groups:
type: array
items:
type: object
properties:
name:
type: string
slug:
type: string
createtime:
type: number
userTitle:
type: string
description:
type: string
memberCount:
type: number
deleted:
oneOf:
- type: string
- type: number
hidden:
type: number
system:
type: number
private:
type: number
ownerUid:
type: number
icon:
type: string
labelColor:
type: string
userTitleEnabled:
type: number
disableJoinRequests:
type: number
disableLeave:
type: number
nameEncoded:
type: string
displayName:
type: string
textColor:
type: string
createtimeISO:
type: string
cover:thumb:url:
type: string
cover:url:
type: string
cover:position:
type: string
disableSignatures:
type: boolean
reputation:disabled:
type: boolean
downvote:disabled:
type: boolean
profile_links:
type: array
items:
type: object
properties:
id:
type: string
route:
type: string
name:
type: string
visibility:
type: object
properties:
self:
type: boolean
other:
type: boolean
moderator:
type: boolean
globalMod:
type: boolean
admin:
type: boolean
canViewInfo:
type: boolean
public:
type: boolean
icon:
type: string
sso:
type: array
items:
type: object
properties:
associated:
type: boolean
url:
type: string
deauthUrl:
type: string
name:
type: string
icon:
type: string
websiteLink:
type: string
websiteName:
type: string
moderationNote:
type: string
username:disableEdit:
type: boolean
email:disableEdit:
type: boolean
topics:
type: array
items:
$ref: ../../../components/schemas/TopicObject.yaml#/TopicObject
nextStart:
type: number
noItemsFoundKey:
type: string
title:
type: string
showSort:
type: boolean
sortOptions:
type: array
items:
type: object
properties:
url:
type: string
name:
type: string
selected:
type: boolean
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- $ref: ../../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps