Add api types

This commit is contained in:
Jannis Mattheis 2018-04-19 21:04:45 +02:00 committed by Jannis Mattheis
parent d868a196b6
commit dbfa67469e
1 changed files with 54 additions and 0 deletions

54
ui/src/types.ts Normal file
View File

@ -0,0 +1,54 @@
interface IApplication {
id: number
token: string
name: string
description: string
image: string
}
interface IClient {
id: number
token: string
name: string
}
interface IMessage {
id: number
appid: number
message: string
title: string
priority: number
date: string
image?: string
}
interface IPagedMessages {
paging: IPaging
messages: IMessage[]
}
interface IPaging {
next?: string
since?: number
size: number
limit: number
}
interface IUser {
id: number
name: string
admin: boolean
}
interface IVersion {
version: string
commit: string
buildDate: string
}
interface IAppMessages {
messages: IMessage[]
hasMore: boolean
nextSince: number,
id?: number
}