import express, { Express } from "express"; import mongoose, { Model, Schema } from "mongoose"; import TestAgent from "supertest/lib/agent"; export interface User { admin: boolean; name?: string; username: string; email: string; age?: number; disabled?: boolean; } export interface SuperUser extends User { superTitle: string; } export interface StaffUser extends User { department: string; } export interface FoodCategory { _id?: string; name: string; show: boolean; created: Date; updated: Date; } export interface Food { _id: string; name: string; calories: number; created: Date; ownerId: mongoose.Types.ObjectId | User; hidden?: boolean; source: { name: string; href?: string; dateAdded?: string; }; tags: string[]; eatenBy: [Schema.Types.ObjectId | User]; lastEatenWith: { [name: string]: Date; }; categories: FoodCategory[]; expiration: string; likesIds: { userId: string; likes: boolean; }[]; } export declare const UserModel: mongoose.PassportLocalModel; export declare const SuperUserModel: mongoose.Model & SuperUser & { _id: mongoose.Types.ObjectId; } & { __v: number; }, any>; export declare const StaffUserModel: mongoose.Model & StaffUser & { _id: mongoose.Types.ObjectId; } & { __v: number; }, any>; export declare const FoodModel: Model; interface RequiredField { name: string; about?: string; } export declare const RequiredModel: mongoose.PassportLocalModel; export declare function getBaseServer(): Express; export declare function authAsUser(app: express.Application, type: "admin" | "notAdmin"): Promise; export declare function setupDb(): Promise<(mongoose.Document & User & { _id: mongoose.Types.ObjectId; } & { __v: number; })[]>; export {};