Combining the admin API routes with the backends user routes

This commit is contained in:
Keith Stevens
2023-01-14 16:55:14 +09:00
parent b543b4b545
commit f9c8d1dd81
8 changed files with 220 additions and 53 deletions
+51
View File
@@ -0,0 +1,51 @@
/**
* Reports the Backend's knowledge of a user.
*/
export interface BackendUser {
/**
* The user's unique ID according to the `auth_method`.
*/
id: string;
/**
* The user's set name
*/
display_name: string;
/**
* The authorization method. One of:
* - discord
* - local
*/
auth_method: string;
/**
* The backend's UUID for this user.
*/
user_id: string;
/**
* Arbitrary notes about the user.
*/
notes: string;
/**
* True when the user is able to access the platform. False otherwise.
*/
enabled: boolean;
/**
* True when the user is marked for deletion. False otherwise.
*/
deleted: boolean;
}
/**
* An expanded User for the web.
*/
export interface User extends BackendUser {
/**
* The user's roles within the webapp.
*/
role: string;
}