24 lines
830 B
TypeScript
24 lines
830 B
TypeScript
import { POST } from "../defs";
|
|
import type { structure } from "../../apiStructure/sammoRootAPI";
|
|
import type { ExtractError, ExtractQuery, ExtractResponse } from "../../apiStructure/defs";
|
|
|
|
type BaseAPI = typeof structure.Login.LoginByID;
|
|
type RType = ExtractResponse<BaseAPI>;
|
|
type EType = ExtractError<BaseAPI>;
|
|
type QType = ExtractQuery<BaseAPI>;
|
|
|
|
class Q implements QType {
|
|
username!: string;
|
|
password!: string;
|
|
}
|
|
|
|
const procDecorator = [] as const;
|
|
|
|
export class LoginByID extends POST<RType, EType, QType, typeof procDecorator>{
|
|
readonly argValidator = Q;
|
|
readonly procDecorator = procDecorator;
|
|
protected LoginByID = Symbol("LoginByID");//TODO: remove this
|
|
protected override async api(query: QType, ctx,): Promise<RType | EType | true> {
|
|
throw new Error("Method not implemented.");
|
|
}
|
|
} |