Mod transfer community (#25)

* Adding ModTransferCommunity to API

* v0.11.4-rc.10
This commit is contained in:
Dessalines 2021-08-18 19:07:36 -04:00 committed by GitHub
parent 768d930592
commit 0c63a87707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View file

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

View file

@ -3,6 +3,7 @@ import {
CommentView,
CommunityView,
ModAddCommunityView,
ModTransferCommunityView,
ModAddView,
ModBanFromCommunityView,
ModBanView,
@ -56,6 +57,7 @@ export interface GetModlogResponse {
banned_from_community: ModBanFromCommunityView[];
banned: ModBanView[];
added_to_community: ModAddCommunityView[];
transferred_to_community: ModTransferCommunityView[];
added: ModAddView[];
}

View file

@ -181,6 +181,15 @@ export interface ModAddCommunity {
when_: string;
}
export interface ModTransferCommunity {
id: number;
mod_person_id: number;
other_person_id: number;
community_id: number;
removed?: boolean;
when_: string;
}
export interface ModAdd {
id: number;
mod_person_id: number;

View file

@ -11,6 +11,7 @@ import {
CommunitySafe,
ModAdd,
ModAddCommunity,
ModTransferCommunity,
ModBan,
ModBanFromCommunity,
ModLockPost,
@ -115,6 +116,13 @@ export interface ModAddCommunityView {
modded_person: PersonSafe;
}
export interface ModTransferCommunityView {
mod_transfer_community: ModTransferCommunity;
moderator: PersonSafe;
community: CommunitySafe;
modded_person: PersonSafe;
}
export interface ModAddView {
mod_add: ModAdd;
moderator: PersonSafe;