mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(web): drop axios (#7490)
* refactor: downloadApi * refactor: assetApi * chore: drop axios * chore: tidy up * chore: fix exports * fix: show notification when download starts
This commit is contained in:
parent
bb3d81bfc5
commit
09a7291527
37 changed files with 217 additions and 20671 deletions
2862
open-api/typescript-sdk/src/fetch-client.ts
Normal file
2862
open-api/typescript-sdk/src/fetch-client.ts
Normal file
File diff suppressed because it is too large
Load diff
15
open-api/typescript-sdk/src/fetch-errors.ts
Normal file
15
open-api/typescript-sdk/src/fetch-errors.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { HttpError } from '@oazapfts/runtime';
|
||||
|
||||
export interface ApiExceptionResponse {
|
||||
message: string;
|
||||
error?: string;
|
||||
statusCode: number;
|
||||
}
|
||||
|
||||
export interface ApiHttpError extends HttpError {
|
||||
data: ApiExceptionResponse;
|
||||
}
|
||||
|
||||
export function isHttpError(error: unknown): error is ApiHttpError {
|
||||
return error instanceof HttpError;
|
||||
}
|
||||
2
open-api/typescript-sdk/src/index.ts
Normal file
2
open-api/typescript-sdk/src/index.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export * from './fetch-client';
|
||||
export * from './fetch-errors';
|
||||
Loading…
Add table
Add a link
Reference in a new issue