[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

113 lines
2.0 KiB

export enum EntityType {
User = 'users',
Group = 'groups',
Log = 'logs',
Invitation = 'invitations',
App = 'apps',
Installation = 'installations',
}
export enum GroupMembershipType {
Admin = 'admin',
Moderator = 'moderator',
Member = 'member',
}
export interface Entity {
[key: string]: any
id: string
created: number
}
export type Group = Entity & {
name: string
membership?: GroupMembershipType
about: string
}
type BaseInstallation = Entity & {
settings: object
}
export type Installation = BaseInstallation & {
app: App
user: User
}
export type NormalizedInstallation = BaseInstallation & {
app: string
user: string
}
type BaseUser = Entity & {
name: string
about?: string
imageUrl?: string
coverImageUrl?: string
requiresApproval: boolean
privacy: string
}
export type User = BaseUser & {
group?: Group
}
export type NormalizedUser = BaseUser & {
group?: string
}
type BaseGroupLog = Entity & {
content: string
}
export type GroupLog = BaseGroupLog & {
user: User
}
export type NormalizedGroupLog = BaseGroupLog & {
user: string
}
type BaseInvitation = Entity & {
uses: number
expires: number
}
export type Invitation = BaseInvitation & {
user: User
}
export type NormalizedInvitation = BaseInvitation & {
user: string
}
export type App = Entity & {
version: string
name: string
imageUrl?: string
coverImageUrl?: string
iconImageUrl?: string
about?: string
websiteUrl?: string
companyName?: string
composerUrl?: string
composerSchema?: object
rendererUrl?: string
rendererSchema?: object
initCallbackUrl?: string
composeCallbackUrl?: string
rating: number
publicKey?: string
privateKey?: string
active: boolean
updated: number
created: number
}
export interface EntityCollection {
[id: string]: Entity
}
export interface EntityStore {
[type: string]: EntityCollection
}