mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
71 lines
1.1 KiB
TypeScript
71 lines
1.1 KiB
TypeScript
import express from 'express'
|
|
|
|
export interface QuestionData {
|
|
type: string
|
|
images?: Array<string>
|
|
hashedImages?: Array<string>
|
|
}
|
|
|
|
export interface Question {
|
|
Q: string
|
|
A: string
|
|
data: QuestionData
|
|
}
|
|
|
|
export interface Subject {
|
|
Name: string
|
|
Questions: Array<Question>
|
|
}
|
|
|
|
export interface DataFile {
|
|
path: string
|
|
name: string
|
|
locked?: Boolean
|
|
shouldSearch:
|
|
| string
|
|
| {
|
|
location?: {
|
|
val: string
|
|
}
|
|
}
|
|
shouldSave: {
|
|
location?: {
|
|
val: string
|
|
}
|
|
version?: {
|
|
compare: string
|
|
val: string
|
|
}
|
|
}
|
|
}
|
|
|
|
export interface QuestionDb extends DataFile {
|
|
data: Array<Subject>
|
|
index: number
|
|
}
|
|
|
|
export interface User {
|
|
id: number
|
|
pw: string
|
|
created: Date
|
|
}
|
|
|
|
export interface ModuleType {
|
|
app: express.Application
|
|
dailyAction?: Function
|
|
}
|
|
|
|
export interface User {
|
|
id: number
|
|
pw: string
|
|
pwRequestCount: number
|
|
pwGotFromCID: number
|
|
avaiblePWRequests: number
|
|
loginCount: number
|
|
}
|
|
|
|
export interface Request extends express.Request {
|
|
cookies: any
|
|
session: any
|
|
busboy: any
|
|
}
|