Merge pull request #9 from LemmyNet/split_user_table_2

Split user table 2
This commit is contained in:
Dessalines 2021-03-25 11:42:10 -04:00 committed by GitHub
commit fb8aecdc01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 155 additions and 155 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "lemmy-js-client", "name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy", "description": "A javascript / typescript client for Lemmy",
"version": "0.10.0-rc.1", "version": "0.10.0-rc.10",
"author": "Dessalines <tyhou13@gmx.com>", "author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/index.js", "main": "./dist/index.js",

View file

@ -63,8 +63,8 @@ import {
import { import {
AddAdmin, AddAdmin,
AddAdminResponse, AddAdminResponse,
BanUser, BanPerson,
BanUserResponse, BanPersonResponse,
CreatePrivateMessage, CreatePrivateMessage,
DeleteAccount, DeleteAccount,
DeletePrivateMessage, DeletePrivateMessage,
@ -73,15 +73,15 @@ import {
GetPrivateMessages, GetPrivateMessages,
GetReplies, GetReplies,
GetRepliesResponse, GetRepliesResponse,
GetUserDetails, GetPersonDetails,
GetUserDetailsResponse, GetPersonDetailsResponse,
GetUserMentions, GetPersonMentions,
GetUserMentionsResponse, GetPersonMentionsResponse,
Login, Login,
LoginResponse, LoginResponse,
MarkAllAsRead, MarkAllAsRead,
MarkPrivateMessageAsRead, MarkPrivateMessageAsRead,
MarkUserMentionAsRead, MarkPersonMentionAsRead,
PasswordChange, PasswordChange,
PasswordReset, PasswordReset,
PasswordResetResponse, PasswordResetResponse,
@ -89,8 +89,8 @@ import {
PrivateMessagesResponse, PrivateMessagesResponse,
Register, Register,
SaveUserSettings, SaveUserSettings,
UserMentionResponse, PersonMentionResponse,
} from './interfaces/api/user'; } from './interfaces/api/person';
enum HttpType { enum HttpType {
Get = 'GET', Get = 'GET',
@ -305,19 +305,21 @@ export class LemmyHttp {
return this.wrapper(HttpType.Post, '/user/login', form); return this.wrapper(HttpType.Post, '/user/login', form);
} }
async getUserDetails(form: GetUserDetails): Promise<GetUserDetailsResponse> { async getPersonDetails(
form: GetPersonDetails
): Promise<GetPersonDetailsResponse> {
return this.wrapper(HttpType.Get, '/user', form); return this.wrapper(HttpType.Get, '/user', form);
} }
async getUserMentions( async getPersonMentions(
form: GetUserMentions form: GetPersonMentions
): Promise<GetUserMentionsResponse> { ): Promise<GetPersonMentionsResponse> {
return this.wrapper(HttpType.Get, '/user/mention', form); return this.wrapper(HttpType.Get, '/user/mention', form);
} }
async markUserMentionAsRead( async markPersonMentionAsRead(
form: MarkUserMentionAsRead form: MarkPersonMentionAsRead
): Promise<UserMentionResponse> { ): Promise<PersonMentionResponse> {
return this.wrapper(HttpType.Post, '/user/mention/mark_as_read', form); return this.wrapper(HttpType.Post, '/user/mention/mark_as_read', form);
} }
@ -331,7 +333,7 @@ export class LemmyHttp {
return this.wrapper(HttpType.Get, '/user/followed_communities', form); return this.wrapper(HttpType.Get, '/user/followed_communities', form);
} }
async banUser(form: BanUser): Promise<BanUserResponse> { async banPerson(form: BanPerson): Promise<BanPersonResponse> {
return this.wrapper(HttpType.Post, '/user/ban', form); return this.wrapper(HttpType.Post, '/user/ban', form);
} }

View file

@ -1,6 +1,6 @@
export interface UserAggregates { export interface PersonAggregates {
id: number; id: number;
user_id: number; person_id: number;
post_count: number; post_count: number;
post_score: number; post_score: number;
comment_count: number; comment_count: number;

View file

@ -73,6 +73,7 @@ export interface GetComments {
limit?: number; limit?: number;
community_id?: number; community_id?: number;
community_name?: string; community_name?: string;
saved_only: boolean;
auth?: string; auth?: string;
} }

View file

@ -2,7 +2,7 @@ import {
CommunityFollowerView, CommunityFollowerView,
CommunityModeratorView, CommunityModeratorView,
CommunityView, CommunityView,
UserViewSafe, PersonViewSafe,
} from '../views'; } from '../views';
export interface GetCommunity { export interface GetCommunity {
@ -23,7 +23,7 @@ export interface CreateCommunity {
description?: string; description?: string;
icon?: string; icon?: string;
banner?: string; banner?: string;
nsfw: boolean; nsfw?: boolean;
auth: string; auth: string;
} }
@ -45,7 +45,7 @@ export interface ListCommunitiesResponse {
export interface BanFromCommunity { export interface BanFromCommunity {
community_id: number; community_id: number;
user_id: number; person_id: number;
ban: boolean; ban: boolean;
remove_data: boolean; // Removes/Restores their comments and posts for that community remove_data: boolean; // Removes/Restores their comments and posts for that community
reason?: string; reason?: string;
@ -54,13 +54,13 @@ export interface BanFromCommunity {
} }
export interface BanFromCommunityResponse { export interface BanFromCommunityResponse {
user_view: UserViewSafe; person_view: PersonViewSafe;
banned: boolean; banned: boolean;
} }
export interface AddModToCommunity { export interface AddModToCommunity {
community_id: number; community_id: number;
user_id: number; person_id: number;
added: boolean; added: boolean;
auth: string; auth: string;
} }
@ -78,7 +78,7 @@ export interface EditCommunity {
description?: string; description?: string;
icon?: string; icon?: string;
banner?: string; banner?: string;
nsfw: boolean; nsfw?: boolean;
auth: string; auth: string;
} }
@ -115,6 +115,6 @@ export interface GetFollowedCommunitiesResponse {
export interface TransferCommunity { export interface TransferCommunity {
community_id: number; community_id: number;
user_id: number; person_id: number;
auth: string; auth: string;
} }

View file

@ -2,5 +2,5 @@ export * from './comment';
export * from './community'; export * from './community';
export * from './post'; export * from './post';
export * from './site'; export * from './site';
export * from './user'; export * from './person';
export * from './websocket'; export * from './websocket';

View file

@ -4,8 +4,8 @@ import {
CommunityModeratorView, CommunityModeratorView,
PostView, PostView,
PrivateMessageView, PrivateMessageView,
UserMentionView, PersonMentionView,
UserViewSafe, PersonViewSafe,
} from '../views'; } from '../views';
export interface Login { export interface Login {
@ -68,8 +68,8 @@ export interface LoginResponse {
/** /**
* `username` can only be used for local users. To get details for a federated user, pass `user_id` instead. * `username` can only be used for local users. To get details for a federated user, pass `user_id` instead.
*/ */
export interface GetUserDetails { export interface GetPersonDetails {
user_id?: number; person_id?: number;
username?: string; username?: string;
sort: string; sort: string;
page?: number; page?: number;
@ -79,8 +79,8 @@ export interface GetUserDetails {
auth?: string; auth?: string;
} }
export interface GetUserDetailsResponse { export interface GetPersonDetailsResponse {
user_view: UserViewSafe; person_view: PersonViewSafe;
follows: CommunityFollowerView[]; follows: CommunityFollowerView[];
moderates: CommunityModeratorView[]; moderates: CommunityModeratorView[];
comments: CommentView[]; comments: CommentView[];
@ -91,8 +91,8 @@ export interface GetRepliesResponse {
replies: CommentView[]; replies: CommentView[];
} }
export interface GetUserMentionsResponse { export interface GetPersonMentionsResponse {
mentions: UserMentionView[]; mentions: PersonMentionView[];
} }
export interface MarkAllAsRead { export interface MarkAllAsRead {
@ -100,17 +100,17 @@ export interface MarkAllAsRead {
} }
export interface AddAdmin { export interface AddAdmin {
user_id: number; person_id: number;
added: boolean; added: boolean;
auth: string; auth: string;
} }
export interface AddAdminResponse { export interface AddAdminResponse {
admins: UserViewSafe[]; admins: PersonViewSafe[];
} }
export interface BanUser { export interface BanPerson {
user_id: number; person_id: number;
ban: boolean; ban: boolean;
remove_data: boolean; // Removes/Restores their comments, posts, and communities remove_data: boolean; // Removes/Restores their comments, posts, and communities
reason?: string; reason?: string;
@ -118,8 +118,8 @@ export interface BanUser {
auth: string; auth: string;
} }
export interface BanUserResponse { export interface BanPersonResponse {
user_view: UserViewSafe; person_view: PersonViewSafe;
banned: boolean; banned: boolean;
} }
@ -131,7 +131,7 @@ export interface GetReplies {
auth: string; auth: string;
} }
export interface GetUserMentions { export interface GetPersonMentions {
sort: string; sort: string;
page?: number; page?: number;
limit?: number; limit?: number;
@ -139,14 +139,14 @@ export interface GetUserMentions {
auth: string; auth: string;
} }
export interface MarkUserMentionAsRead { export interface MarkPersonMentionAsRead {
user_mention_id: number; person_mention_id: number;
read: boolean; read: boolean;
auth: string; auth: string;
} }
export interface UserMentionResponse { export interface PersonMentionResponse {
user_mention_view: UserMentionView; person_mention_view: PersonMentionView;
} }
/** /**

View file

@ -44,6 +44,7 @@ export interface GetPosts {
limit?: number; limit?: number;
community_id?: number; community_id?: number;
community_name?: string; community_name?: string;
saved_only: boolean;
auth?: string; auth?: string;
} }

View file

@ -1,4 +1,4 @@
import { UserSafeSettings } from '../source'; import { LocalUserSettingsView } from '../views';
import { import {
CommentView, CommentView,
CommunityView, CommunityView,
@ -13,7 +13,7 @@ import {
ModStickyPostView, ModStickyPostView,
PostView, PostView,
SiteView, SiteView,
UserViewSafe, PersonViewSafe,
} from '../views'; } from '../views';
/** /**
@ -35,11 +35,11 @@ export interface SearchResponse {
comments: CommentView[]; comments: CommentView[];
posts: PostView[]; posts: PostView[];
communities: CommunityView[]; communities: CommunityView[];
users: UserViewSafe[]; users: PersonViewSafe[];
} }
export interface GetModlog { export interface GetModlog {
mod_user_id?: number; mod_person_id?: number;
community_id?: number; community_id?: number;
page?: number; page?: number;
limit?: number; limit?: number;
@ -89,16 +89,16 @@ export interface SiteResponse {
export interface GetSiteResponse { export interface GetSiteResponse {
site_view?: SiteView; // Because the site might not be set up yet site_view?: SiteView; // Because the site might not be set up yet
admins: UserViewSafe[]; admins: PersonViewSafe[];
banned: UserViewSafe[]; banned: PersonViewSafe[];
online: number; online: number;
version: string; version: string;
my_user?: UserSafeSettings; // Gives back your user and settings if logged in my_user?: LocalUserSettingsView; // Gives back your local user and settings if logged in
federated_instances?: FederatedInstances; federated_instances?: FederatedInstances;
} }
export interface TransferSite { export interface TransferSite {
user_id: number; person_id: number;
auth: string; auth: string;
} }

View file

@ -30,10 +30,10 @@ export enum UserOperation {
RemoveCommunity, RemoveCommunity,
FollowCommunity, FollowCommunity,
GetFollowedCommunities, GetFollowedCommunities,
GetUserDetails, GetPersonDetails,
GetReplies, GetReplies,
GetUserMentions, GetPersonMentions,
MarkUserMentionAsRead, MarkPersonMentionAsRead,
GetModlog, GetModlog,
BanFromCommunity, BanFromCommunity,
AddModToCommunity, AddModToCommunity,
@ -41,7 +41,7 @@ export enum UserOperation {
EditSite, EditSite,
GetSite, GetSite,
AddAdmin, AddAdmin,
BanUser, BanPerson,
Search, Search,
MarkAllAsRead, MarkAllAsRead,
SaveUserSettings, SaveUserSettings,

View file

@ -1,30 +1,7 @@
export interface UserSafe { export interface LocalUserSettings {
id: number; id: number;
name: string; person_id: number;
preferred_username?: string;
avatar?: string;
admin: boolean;
banned: boolean;
published: string;
updated?: string;
matrix_user_id?: string;
actor_id: string;
bio?: string;
local: boolean;
banner?: string;
deleted: boolean;
}
export interface UserSafeSettings {
id: number;
name: string;
preferred_username?: string;
email?: string; email?: string;
avatar?: string;
admin: boolean;
banned: boolean;
published: string;
updated?: string;
show_nsfw: boolean; show_nsfw: boolean;
theme: string; theme: string;
default_sort_type: number; default_sort_type: number;
@ -32,13 +9,25 @@ export interface UserSafeSettings {
lang: string; lang: string;
show_avatars: boolean; show_avatars: boolean;
send_notifications_to_email: boolean; send_notifications_to_email: boolean;
matrix_user_id?: string; }
export interface PersonSafe {
id: number;
name: string;
preferred_username?: string;
avatar?: string;
banned: boolean;
published: string;
updated?: string;
actor_id: string; actor_id: string;
bio?: string; bio?: string;
local: boolean; local: boolean;
last_refreshed_at: string;
banner?: string; banner?: string;
deleted: boolean; deleted: boolean;
inbox_url: string;
shared_inbox_url: string;
matrix_user_id?: string;
admin: boolean;
} }
export interface Site { export interface Site {
@ -106,14 +95,14 @@ export interface Post {
export interface PasswordResetRequest { export interface PasswordResetRequest {
id: number; id: number;
user_id: number; local_user_id: number;
token_encrypted: string; token_encrypted: string;
published: string; published: string;
} }
export interface ModRemovePost { export interface ModRemovePost {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
post_id: number; post_id: number;
reason?: string; reason?: string;
removed?: boolean; removed?: boolean;
@ -122,7 +111,7 @@ export interface ModRemovePost {
export interface ModLockPost { export interface ModLockPost {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
post_id: number; post_id: number;
locked?: boolean; locked?: boolean;
when_: string; when_: string;
@ -130,7 +119,7 @@ export interface ModLockPost {
export interface ModStickyPost { export interface ModStickyPost {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
post_id: number; post_id: number;
stickied?: boolean; stickied?: boolean;
when_: string; when_: string;
@ -138,7 +127,7 @@ export interface ModStickyPost {
export interface ModRemoveComment { export interface ModRemoveComment {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
comment_id: number; comment_id: number;
reason?: string; reason?: string;
removed?: boolean; removed?: boolean;
@ -147,7 +136,7 @@ export interface ModRemoveComment {
export interface ModRemoveCommunity { export interface ModRemoveCommunity {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
community_id: number; community_id: number;
reason?: string; reason?: string;
removed?: boolean; removed?: boolean;
@ -157,8 +146,8 @@ export interface ModRemoveCommunity {
export interface ModBanFromCommunity { export interface ModBanFromCommunity {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
other_user_id: number; other_person_id: number;
community_id: number; community_id: number;
reason?: string; reason?: string;
banned?: boolean; banned?: boolean;
@ -168,8 +157,8 @@ export interface ModBanFromCommunity {
export interface ModBan { export interface ModBan {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
other_user_id: number; other_person_id: number;
reason?: string; reason?: string;
banned?: boolean; banned?: boolean;
expires?: string; expires?: string;
@ -178,8 +167,8 @@ export interface ModBan {
export interface ModAddCommunity { export interface ModAddCommunity {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
other_user_id: number; other_person_id: number;
community_id: number; community_id: number;
removed?: boolean; removed?: boolean;
when_: string; when_: string;
@ -187,8 +176,8 @@ export interface ModAddCommunity {
export interface ModAdd { export interface ModAdd {
id: number; id: number;
mod_user_id: number; mod_person_id: number;
other_user_id: number; other_person_id: number;
removed?: boolean; removed?: boolean;
when_: string; when_: string;
} }
@ -237,7 +226,7 @@ export interface Comment {
local: boolean; local: boolean;
} }
export interface UserMention { export interface PersonMention {
id: number; id: number;
recipient_id: number; recipient_id: number;
comment_id: number; comment_id: number;

View file

@ -3,7 +3,7 @@ import {
CommunityAggregates, CommunityAggregates,
PostAggregates, PostAggregates,
SiteAggregates, SiteAggregates,
UserAggregates, PersonAggregates,
} from './aggregates'; } from './aggregates';
import { import {
Comment, Comment,
@ -22,22 +22,23 @@ import {
PostReport, PostReport,
PrivateMessage, PrivateMessage,
Site, Site,
UserMention, PersonMention,
UserSafe, PersonSafe,
LocalUserSettings,
} from './source'; } from './source';
export interface UserViewSafe { export interface PersonViewSafe {
user: UserSafe; person: PersonSafe;
counts: UserAggregates; counts: PersonAggregates;
} }
export interface UserMentionView { export interface PersonMentionView {
user_mention: UserMention; person_mention: PersonMention;
comment: Comment; comment: Comment;
creator: UserSafe; creator: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
recipient: UserSafe; recipient: PersonSafe;
counts: CommentAggregates; counts: CommentAggregates;
creator_banned_from_community: boolean; creator_banned_from_community: boolean;
subscribed: boolean; subscribed: boolean;
@ -45,21 +46,27 @@ export interface UserMentionView {
my_vote?: number; my_vote?: number;
} }
export interface LocalUserSettingsView {
local_user: LocalUserSettings;
person: PersonSafe;
counts: PersonAggregates;
}
export interface SiteView { export interface SiteView {
site: Site; site: Site;
creator: UserSafe; creator: PersonSafe;
counts: SiteAggregates; counts: SiteAggregates;
} }
export interface PrivateMessageView { export interface PrivateMessageView {
private_message: PrivateMessage; private_message: PrivateMessage;
creator: UserSafe; creator: PersonSafe;
recipient: UserSafe; recipient: PersonSafe;
} }
export interface PostView { export interface PostView {
post: Post; post: Post;
creator: UserSafe; creator: PersonSafe;
community: CommunitySafe; community: CommunitySafe;
creator_banned_from_community: boolean; creator_banned_from_community: boolean;
counts: PostAggregates; counts: PostAggregates;
@ -73,15 +80,15 @@ export interface PostReportView {
post_report: PostReport; post_report: PostReport;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
creator: UserSafe; creator: PersonSafe;
post_creator: UserSafe; post_creator: PersonSafe;
resolver?: UserSafe; resolver?: PersonSafe;
} }
export interface CommentView { export interface CommentView {
comment: Comment; comment: Comment;
creator: UserSafe; creator: PersonSafe;
recipient?: UserSafe; recipient?: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
counts: CommentAggregates; counts: CommentAggregates;
@ -96,91 +103,91 @@ export interface CommentReportView {
comment: Comment; comment: Comment;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
creator: UserSafe; creator: PersonSafe;
comment_creator: UserSafe; comment_creator: PersonSafe;
resolver?: UserSafe; resolver?: PersonSafe;
} }
export interface ModAddCommunityView { export interface ModAddCommunityView {
mod_add_community: ModAddCommunity; mod_add_community: ModAddCommunity;
moderator: UserSafe; moderator: PersonSafe;
community: CommunitySafe; community: CommunitySafe;
modded_user: UserSafe; modded_person: PersonSafe;
} }
export interface ModAddView { export interface ModAddView {
mod_add: ModAdd; mod_add: ModAdd;
moderator: UserSafe; moderator: PersonSafe;
modded_user: UserSafe; modded_person: PersonSafe;
} }
export interface ModBanFromCommunityView { export interface ModBanFromCommunityView {
mod_ban_from_community: ModBanFromCommunity; mod_ban_from_community: ModBanFromCommunity;
moderator: UserSafe; moderator: PersonSafe;
community: CommunitySafe; community: CommunitySafe;
banned_user: UserSafe; banned_person: PersonSafe;
} }
export interface ModBanView { export interface ModBanView {
mod_ban: ModBan; mod_ban: ModBan;
moderator: UserSafe; moderator: PersonSafe;
banned_user: UserSafe; banned_person: PersonSafe;
} }
export interface ModLockPostView { export interface ModLockPostView {
mod_lock_post: ModLockPost; mod_lock_post: ModLockPost;
moderator: UserSafe; moderator: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
} }
export interface ModRemoveCommentView { export interface ModRemoveCommentView {
mod_remove_comment: ModRemoveComment; mod_remove_comment: ModRemoveComment;
moderator: UserSafe; moderator: PersonSafe;
comment: Comment; comment: Comment;
commenter: UserSafe; commenter: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
} }
export interface ModRemoveCommunityView { export interface ModRemoveCommunityView {
mod_remove_community: ModRemoveCommunity; mod_remove_community: ModRemoveCommunity;
moderator: UserSafe; moderator: PersonSafe;
community: CommunitySafe; community: CommunitySafe;
} }
export interface ModRemovePostView { export interface ModRemovePostView {
mod_remove_post: ModRemovePost; mod_remove_post: ModRemovePost;
moderator: UserSafe; moderator: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
} }
export interface ModStickyPostView { export interface ModStickyPostView {
mod_sticky_post: ModStickyPost; mod_sticky_post: ModStickyPost;
moderator: UserSafe; moderator: PersonSafe;
post: Post; post: Post;
community: CommunitySafe; community: CommunitySafe;
} }
export interface CommunityFollowerView { export interface CommunityFollowerView {
community: CommunitySafe; community: CommunitySafe;
follower: UserSafe; follower: PersonSafe;
} }
export interface CommunityModeratorView { export interface CommunityModeratorView {
community: CommunitySafe; community: CommunitySafe;
moderator: UserSafe; moderator: PersonSafe;
} }
export interface CommunityUserBanView { export interface CommunityPersonBanView {
community: CommunitySafe; community: CommunitySafe;
user: UserSafe; person: PersonSafe;
} }
export interface CommunityView { export interface CommunityView {
community: CommunitySafe; community: CommunitySafe;
creator: UserSafe; creator: PersonSafe;
subscribed: boolean; subscribed: boolean;
counts: CommunityAggregates; counts: CommunityAggregates;
} }

View file

@ -45,24 +45,24 @@ import {
} from './interfaces/api/site'; } from './interfaces/api/site';
import { import {
AddAdmin, AddAdmin,
BanUser, BanPerson,
CreatePrivateMessage, CreatePrivateMessage,
DeleteAccount, DeleteAccount,
DeletePrivateMessage, DeletePrivateMessage,
EditPrivateMessage, EditPrivateMessage,
GetPrivateMessages, GetPrivateMessages,
GetReplies, GetReplies,
GetUserDetails, GetPersonDetails,
GetUserMentions, GetPersonMentions,
Login, Login,
MarkAllAsRead, MarkAllAsRead,
MarkPrivateMessageAsRead, MarkPrivateMessageAsRead,
MarkUserMentionAsRead, MarkPersonMentionAsRead,
PasswordChange, PasswordChange,
PasswordReset, PasswordReset,
Register, Register,
SaveUserSettings, SaveUserSettings,
} from './interfaces/api/user'; } from './interfaces/api/person';
import { UserJoin, PostJoin, CommunityJoin } from './interfaces/api/websocket'; import { UserJoin, PostJoin, CommunityJoin } from './interfaces/api/websocket';
import { UserOperation } from './interfaces/others'; import { UserOperation } from './interfaces/others';
@ -216,28 +216,28 @@ export class LemmyWebsocket {
return wrapper(UserOperation.TransferSite, form); return wrapper(UserOperation.TransferSite, form);
} }
banUser(form: BanUser) { banPerson(form: BanPerson) {
return wrapper(UserOperation.BanUser, form); return wrapper(UserOperation.BanPerson, form);
} }
addAdmin(form: AddAdmin) { addAdmin(form: AddAdmin) {
return wrapper(UserOperation.AddAdmin, form); return wrapper(UserOperation.AddAdmin, form);
} }
getUserDetails(form: GetUserDetails) { getPersonDetails(form: GetPersonDetails) {
return wrapper(UserOperation.GetUserDetails, form); return wrapper(UserOperation.GetPersonDetails, form);
} }
getReplies(form: GetReplies) { getReplies(form: GetReplies) {
return wrapper(UserOperation.GetReplies, form); return wrapper(UserOperation.GetReplies, form);
} }
getUserMentions(form: GetUserMentions) { getPersonMentions(form: GetPersonMentions) {
return wrapper(UserOperation.GetUserMentions, form); return wrapper(UserOperation.GetPersonMentions, form);
} }
markUserMentionAsRead(form: MarkUserMentionAsRead) { markPersonMentionAsRead(form: MarkPersonMentionAsRead) {
return wrapper(UserOperation.MarkUserMentionAsRead, form); return wrapper(UserOperation.MarkPersonMentionAsRead, form);
} }
getModlog(form: GetModlog) { getModlog(form: GetModlog) {