({
apiURI,
appId,
path,
refreshToken,
}: {
apiURI: string;
appId: string;
path: string;
refreshToken?: string;
})
| 49 | } |
| 50 | |
| 51 | export async function deleteFile({ |
| 52 | apiURI, |
| 53 | appId, |
| 54 | path, |
| 55 | refreshToken, |
| 56 | }: { |
| 57 | apiURI: string; |
| 58 | appId: string; |
| 59 | path: string; |
| 60 | refreshToken?: string; |
| 61 | }): Promise<DeleteFileResponse> { |
| 62 | const { data } = await jsonFetch( |
| 63 | `${apiURI}/storage/files?app_id=${appId}&filename=${encodeURIComponent(path)}`, |
| 64 | { |
| 65 | method: 'DELETE', |
| 66 | headers: { |
| 67 | 'content-type': 'application/json', |
| 68 | authorization: `Bearer ${refreshToken}`, |
| 69 | }, |
| 70 | }, |
| 71 | ); |
| 72 | |
| 73 | return data; |
| 74 | } |
| 75 | |
| 76 | // Deprecated Storage API (Jan 2025) |
| 77 | // --------------------------------- |
nothing calls this directly
no test coverage detected