bigbuffet-rw/packages/pl-fe/src/entity-store/entities.ts

36 lines
1.1 KiB
TypeScript
Raw Normal View History

import type { AdminDomain, AdminRelay, AdminRule, BookmarkFolder, GroupMember, GroupRelationship, Relationship, Scrobble, TrendsLink } from 'pl-api';
import type { Account, Group, Status } from 'pl-fe/normalizers';
2023-06-23 12:12:12 -07:00
enum Entities {
ACCOUNTS = 'Accounts',
BOOKMARK_FOLDERS = 'BookmarkFolders',
2024-03-27 04:31:54 -07:00
DOMAINS = 'Domains',
2023-03-14 07:19:34 -07:00
GROUPS = 'Groups',
GROUP_MEMBERSHIPS = 'GroupMemberships',
2023-06-08 06:00:49 -07:00
GROUP_MUTES = 'GroupMutes',
2023-03-29 10:21:28 -07:00
GROUP_RELATIONSHIPS = 'GroupRelationships',
2023-04-10 13:22:08 -07:00
RELATIONSHIPS = 'Relationships',
RELAYS = 'Relays',
RULES = 'Rules',
SCROBBLES = 'Scrobbles',
STATUSES = 'Statuses',
TRENDS_LINKS = 'TrendsLinks',
2023-06-23 12:12:12 -07:00
}
interface EntityTypes {
[Entities.ACCOUNTS]: Account;
[Entities.BOOKMARK_FOLDERS]: BookmarkFolder;
[Entities.DOMAINS]: AdminDomain;
[Entities.GROUPS]: Group;
[Entities.GROUP_MEMBERSHIPS]: GroupMember;
[Entities.GROUP_RELATIONSHIPS]: GroupRelationship;
[Entities.RELATIONSHIPS]: Relationship;
[Entities.RELAYS]: AdminRelay;
[Entities.RULES]: AdminRule;
[Entities.SCROBBLES]: Scrobble;
[Entities.STATUSES]: Status;
[Entities.TRENDS_LINKS]: TrendsLink;
2023-06-23 12:12:12 -07:00
}
export { Entities, type EntityTypes };