refactor(web): use new open api client (#7097)

* refactor(web): use new open api client

* refactor: remove activity api

* refactor: trash, oauth, and partner apis

* refactor: job api

* refactor: face, library, system config

* refactor: user api

* refactor: album api
This commit is contained in:
Jason Rasmussen
2024-02-13 17:07:37 -05:00
committed by GitHub
parent 9b4a770b9d
commit 8fd94211c0
66 changed files with 593 additions and 850 deletions
+5 -4
View File
@@ -11,10 +11,11 @@
import { downloadManager } from '$lib/stores/download';
import { downloadBlob } from '$lib/utils/asset-utils';
import { handleError } from '$lib/utils/handle-error';
import { type FileReportItemDto, api, copyToClipboard } from '@api';
import { type FileReportItemDto, copyToClipboard } from '@api';
import Icon from '$lib/components/elements/icon.svelte';
import type { PageData } from './$types';
import { mdiWrench, mdiCheckAll, mdiDownload, mdiRefresh, mdiContentCopy } from '@mdi/js';
import { fixAuditFiles, getAuditFiles, getFileChecksums } from '@immich/sdk';
export let data: PageData;
@@ -65,7 +66,7 @@
repairing = true;
try {
await api.auditApi.fixAuditFiles({
await fixAuditFiles({
fileReportFixDto: {
items: matches.map(({ orphan, extra }) => ({
entityId: orphan.entityId,
@@ -101,7 +102,7 @@
extras = [];
try {
const { data: report } = await api.auditApi.getAuditFiles();
const report = await getAuditFiles();
orphans = report.orphans;
extras = normalize(report.extras);
@@ -144,7 +145,7 @@
};
const loadAndMatch = async (filenames: string[]) => {
const { data: items } = await api.auditApi.getFileChecksums({
const items = await getFileChecksums({
fileChecksumDto: { filenames },
});