vjudge: codeforces

This commit is contained in:
undefined committed 2021-06-21 13:39:16 +08:00
1 parent 7e2fe8b198
commit 939584ec5e
5 files changed
+361

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
export interface RemoteAccount {
_id: string;
type: string;
cookie?: string[];
handle: string;
password: string;
}
declare module 'hydrooj/dist/interface' {
interface Collections {
vjudge: RemoteAccount;
}
interface DomainDoc {
mount: string;
mountInfo: any;
}
}
export interface IBasicProvider {
ensureLogin(): Promise<boolean>;
getProblem(id: string): Promise<{
title: string;
data: Record<string, any>;
files: Record<string, any>;
tag: string[];
content: string;
}>;
listProblem(page: number): Promise<string[]>;
submitProblem(id: string, lang: string, code: string): Promise<string>;
waitForSubmission(id: string, next: any, end: any): Promise<void>;
}
export interface BasicProvider {
new(account: RemoteAccount, save: (data: any) => Promise<void>): IBasicProvider
}