This commit is contained in:
commit
f265233a06
168 changed files with 31208 additions and 0 deletions
15
web-app/src/core/ApiKey.ts
Normal file
15
web-app/src/core/ApiKey.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
export interface ApiKeyData {
|
||||
id: string,
|
||||
key: string,
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface ApiKey extends Readonly<ApiKeyData> {}
|
||||
|
||||
export class ApiKey {
|
||||
|
||||
constructor(data: ApiKeyData) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
|
||||
}
|
23
web-app/src/core/Log.ts
Normal file
23
web-app/src/core/Log.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
export interface LogData {
|
||||
id: string,
|
||||
title: string,
|
||||
content: string,
|
||||
tags: {
|
||||
id: string
|
||||
name: string
|
||||
color: string
|
||||
}[]
|
||||
projectId: string
|
||||
createdAt: number
|
||||
createdBy: string
|
||||
}
|
||||
|
||||
export interface Log extends Readonly<LogData> {}
|
||||
|
||||
export class Log {
|
||||
|
||||
constructor(data: LogData) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
|
||||
}
|
34
web-app/src/core/Metric.ts
Normal file
34
web-app/src/core/Metric.ts
Normal file
|
@ -0,0 +1,34 @@
|
|||
export interface MetricDataOnCreation {
|
||||
projectId: string
|
||||
name: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface MetricDataOnUpdate {
|
||||
name: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface MetricData {
|
||||
id: string
|
||||
projectId: string
|
||||
name: string
|
||||
color: string
|
||||
history: {
|
||||
id: string
|
||||
seriesId: string
|
||||
date: number
|
||||
value: number
|
||||
}[] | null
|
||||
currentValue?: number
|
||||
}
|
||||
|
||||
export interface Metric extends Readonly<MetricData> {}
|
||||
|
||||
export class Metric {
|
||||
|
||||
constructor(data: MetricData) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
|
||||
}
|
15
web-app/src/core/Project.ts
Normal file
15
web-app/src/core/Project.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import {TagData} from "./Tag";
|
||||
|
||||
export interface ProjectData {
|
||||
id: string,
|
||||
name: string
|
||||
tags: TagData[]
|
||||
}
|
||||
|
||||
export interface Project extends Readonly<ProjectData> {}
|
||||
|
||||
export class Project {
|
||||
constructor(data: ProjectData) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
}
|
14
web-app/src/core/Tag.ts
Normal file
14
web-app/src/core/Tag.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
export interface TagData {
|
||||
id?: string
|
||||
name: string
|
||||
color: string
|
||||
}
|
||||
|
||||
export interface Tag extends Readonly<TagData> {}
|
||||
|
||||
export class Tag {
|
||||
|
||||
constructor(data: TagData) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
}
|
30
web-app/src/core/View.ts
Normal file
30
web-app/src/core/View.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
export interface ViewDataOnCreation<T> {
|
||||
name: string
|
||||
type: string
|
||||
provider: string
|
||||
config: T
|
||||
}
|
||||
|
||||
export interface ViewDataOnUpdate<T> {
|
||||
name: string
|
||||
config: T
|
||||
}
|
||||
|
||||
export interface ViewData<T> {
|
||||
id: string,
|
||||
projectId: string,
|
||||
type: string
|
||||
name: string
|
||||
provider: string
|
||||
config: T
|
||||
}
|
||||
|
||||
export interface View<T> extends Readonly<ViewData<T>> {}
|
||||
|
||||
export class View<T> {
|
||||
|
||||
constructor(data: ViewData<T>) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue