56 lines
1.0 KiB
TypeScript
56 lines
1.0 KiB
TypeScript
import { JSONSchema6, JSONSchema7 } from "json-schema"
|
|
|
|
export interface Port {
|
|
Number: number
|
|
Protocol: 'tcp' | 'udp'
|
|
}
|
|
|
|
|
|
export interface ImageInfo {
|
|
Id: string
|
|
Name: string
|
|
Version: string
|
|
Ports: Port[]
|
|
}
|
|
|
|
|
|
export interface ServerInfo {
|
|
Id: string
|
|
Name: string
|
|
On: boolean
|
|
OwnerId: string
|
|
Image: ImageInfo
|
|
Ports: Port[] | null
|
|
Domain: string
|
|
Nickname?: string
|
|
}
|
|
|
|
|
|
export interface User {
|
|
Username: string
|
|
Email: string
|
|
Permissions: number
|
|
}
|
|
|
|
|
|
export interface Browser {
|
|
Id: string
|
|
Domain: string
|
|
Url: string
|
|
OwnerId: string
|
|
ConnectedTo: ServerInfo
|
|
}
|
|
|
|
|
|
export interface OpenApiMethodSchema {
|
|
summary: string
|
|
requestBody: {content: Record<string, {schema: JSONSchema7}>}
|
|
api_response: 'Ignore' | 'Browse' | 'Terminal'
|
|
permissions: number
|
|
}
|
|
|
|
|
|
export interface OpenAPISchema {
|
|
paths: Record<string, {get?: OpenApiMethodSchema, post?: OpenApiMethodSchema, delete?: OpenApiMethodSchema}>
|
|
components: {schema: Record<string, JSONSchema7>}
|
|
} |