feat(settings): change password

This commit is contained in:
Nicolas Meienberger
2025-11-08 09:47:10 +01:00
parent 195aea052e
commit 418369c4ad
10 changed files with 333 additions and 7 deletions

View File

@@ -14,6 +14,9 @@ import type {
GetMeResponses,
GetStatusData,
GetStatusResponses,
ChangePasswordData,
ChangePasswordResponses,
ChangePasswordErrors,
ListVolumesData,
ListVolumesResponses,
CreateVolumeData,
@@ -148,6 +151,22 @@ export const getStatus = <ThrowOnError extends boolean = false>(options?: Option
});
};
/**
* Change current user password
*/
export const changePassword = <ThrowOnError extends boolean = false>(
options?: Options<ChangePasswordData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).post<ChangePasswordResponses, ChangePasswordErrors, ThrowOnError>({
url: "/api/v1/auth/change-password",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* List all volumes
*/