mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 13:57:54 +00:00
initial commit
This commit is contained in:
commit
358d608cc4
17 changed files with 1294 additions and 0 deletions
36
src/api/group.ts
Normal file
36
src/api/group.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
interface GroupPrivacy {
|
||||
description_privacy?: string | boolean | null;
|
||||
icon_privacy?: string | boolean | null;
|
||||
list_privacy?: string | boolean | null;
|
||||
visibility?: string | boolean | null;
|
||||
}
|
||||
|
||||
export default class Group {
|
||||
id?: string;
|
||||
uuid?: string;
|
||||
name?: string;
|
||||
display_name?: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
banner?: string;
|
||||
color?: string;
|
||||
privacy?: GroupPrivacy;
|
||||
|
||||
constructor(data: any) {
|
||||
this.id = data.id;
|
||||
this.uuid = data.uuid;
|
||||
this.name = data.name;
|
||||
this.display_name = data.display_name;
|
||||
this.description = data.description;
|
||||
this.icon = data.icon;
|
||||
this.banner = data.banner;
|
||||
this.color = data.color;
|
||||
if (data.privacy) {
|
||||
this.privacy = {}
|
||||
this.privacy.description_privacy = data.privacy.description_privacy;
|
||||
this.privacy.icon_privacy = data.privacy.icon_privacy;
|
||||
this.privacy.list_privacy = data.privacy.list_privacy;
|
||||
this.privacy.visibility = data.privacy.visibility;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue