import { ApiClient } from "../client/ApiClient"; import type { Endpoint } from "../client/endpoints"; import type { ApiResponse } from "../client/types"; import proto from "db://assets/Scripts/proto/proto.pb.js"; import type { ICommonService } from "./ICommonService"; export class HttpCommonService implements ICommonService { constructor(private api = ApiClient.I) {} // 获取配置 async reqResConfig(req: proto.cs.ICSGetResConfigReq): Promise> { const ep: Endpoint = { path: "api/logic/getResConfig", method: "POST", codec: "json", needsAuth: true, }; return this.api.call(ep, req); } }