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", "name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy", "description": "A javascript / typescript client for Lemmy",
"version": "0.11.3-rc.4", "version": "0.11.4-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

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

View file

@ -181,6 +181,15 @@ export interface ModAddCommunity {
when_: string; 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 { export interface ModAdd {
id: number; id: number;
mod_person_id: number; mod_person_id: number;

View file

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