homebox/frontend/lib/api/classes/actions.ts
2024-03-01 11:21:45 -06:00

28 lines
710 B
TypeScript

import { BaseAPI, route } from "../base";
import type { ActionAmountResult } from "../types/data-contracts";
export class ActionsAPI extends BaseAPI {
ensureAssetIDs() {
return this.http.post<void, ActionAmountResult>({
url: route("/actions/ensure-asset-ids"),
});
}
resetItemDateTimes() {
return this.http.post<void, ActionAmountResult>({
url: route("/actions/zero-item-time-fields"),
});
}
ensureImportRefs() {
return this.http.post<void, ActionAmountResult>({
url: route("/actions/ensure-import-refs"),
});
}
setPrimaryPhotos() {
return this.http.post<void, ActionAmountResult>({
url: route("/actions/set-primary-photos"),
});
}
}