mrfrys-node-server/src/types/basicTypes.ts
2021-02-22 12:14:01 +01:00

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
}