Refactor OasstApiClient

This commit is contained in:
notmd
2023-01-25 15:04:39 +07:00
parent ffaf5c48d1
commit 94d2ed820e
3 changed files with 87 additions and 147 deletions
+16
View File
@@ -51,3 +51,19 @@ export interface User extends BackendUser {
*/
role: string;
}
export type FetchUsersParams = {
limit: number;
cursor?: string;
direction: "forward" | "back";
searchDisplayName?: string;
sortKey?: "username" | "display_name";
};
export type FetchUsersResponse<T extends User | BackendUser = BackendUser> = {
items: T[];
next?: string;
prev?: string;
sort_key: "username" | "display_name";
order: "asc" | "desc";
};