UNPKG

@gaiot/apis

Version:

aiot apis

115 lines (114 loc) 2.87 kB
var r = (s, e, t) => new Promise((d, l) => { var n = (i) => { try { c(t.next(i)); } catch (o) { l(o); } }, S = (i) => { try { c(t.throw(i)); } catch (o) { l(o); } }, c = (i) => i.done ? d(i.value) : Promise.resolve(i.value).then(n, S); c((t = t.apply(s, e)).next()); }); import v from "axios"; import { BaseApi as p } from "../base/index.mjs"; class u extends p { constructor(e, t) { super(e != null ? e : v.create(), t); } listModelServices(e) { return r(this, null, function* () { return this.listPaged("/modelService", e); }); } postModelService(e) { return r(this, null, function* () { return this.post("/modelService", e); }); } getModelServiceById(e) { return r(this, null, function* () { return this.get(`/modelService/${e}`); }); } patchModelServiceById(e, t) { return r(this, null, function* () { return this.patch(`/modelService/${e}`, t); }); } deleteModelService(e) { return r(this, null, function* () { return this.delete(`/modelService/${e}`); }); } getEnableModelService(e) { return r(this, null, function* () { return this.get(`/modelService/${e}/enable`); }); } getDisableModelService(e) { return r(this, null, function* () { return this.get(`/modelService/${e}/disable`); }); } // 上架 getModelServiceList(e) { return r(this, null, function* () { return this.get(`/modelService/${e}/list`); }); } // 下架 getModelServiceDelist(e) { return r(this, null, function* () { return this.get(`/modelService/${e}/delist`); }); } // 导入 importService(e) { return r(this, null, function* () { return this.post("/modelService/import", e); }); } // 编辑服务 patchModelService(e, t) { return r(this, null, function* () { return this.patch(`/modelService/${e}`, t); }); } // async listStatistic(params: PageQueryParams & IStatisticQueryParams) { // return this.listPaged<IStatistic>(`/modelService/statistics`, params); // } // async getServiceStastic(sid: string, params: IServiceStasticParams) { // return this.get<IServiceStastic[]>( // `/modelService/${sid}/statistics`, // params // ); // } openModelServices(e) { return r(this, null, function* () { return this.get("/openModelService", e); }); } importMirronService(e) { return r(this, null, function* () { return this.post("/modelService/importMirron", e); }); } patchMirronService(e, t) { return r(this, null, function* () { return this.patch(`/modelService/importMirron/${e}`, t); }); } getServiceSignList(e) { return r(this, null, function* () { return this.get("/serviceSign", e); }); } } export { u as ModelServiceApi };