Files
homebox/frontend/lib/api/classes/actions.ts
copilot-swe-agent[bot] 35941583c8 Fix frontend linting errors in WipeInventoryDialog
- Replaced BaseModal and BaseButton with AlertDialog components from ui library
- Added proper imports for AlertDialog, AlertDialogContent, AlertDialogHeader, etc.
- Fixed prettier formatting issues (auto-fixed by eslint --fix)
- Fixed Tailwind CSS shorthand (h-4 w-4 -> size-4)
- Added addAlert/removeAlert for dialog provider integration
- All linting and type-checking errors resolved

Co-authored-by: katosdev <7927609+katosdev@users.noreply.github.com>
2025-12-28 16:26:09 +00:00

45 lines
1.2 KiB
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"),
});
}
createMissingThumbnails() {
return this.http.post<void, ActionAmountResult>({
url: route("/actions/create-missing-thumbnails"),
});
}
wipeInventory(options?: { wipeLabels?: boolean; wipeLocations?: boolean; wipeMaintenance?: boolean }) {
return this.http.post<
{ wipeLabels?: boolean; wipeLocations?: boolean; wipeMaintenance?: boolean },
ActionAmountResult
>({
url: route("/actions/wipe-inventory"),
body: options || {},
});
}
}