2022-03-03 01:53:44 +00:00
|
|
|
import { INotificationPreferences, IUser, IUserPreferences, IUserRegistered } from '../../IUser';
|
2022-02-14 16:20:29 +00:00
|
|
|
|
|
|
|
export type UserEndpoints = {
|
|
|
|
'users.info': {
|
|
|
|
GET: (params: { userId: IUser['_id'] }) => {
|
|
|
|
user: IUser;
|
|
|
|
success: boolean;
|
|
|
|
};
|
|
|
|
POST: (params: { userId: IUser['_id'] }) => {
|
|
|
|
user: IUser;
|
|
|
|
success: boolean;
|
|
|
|
};
|
|
|
|
};
|
2022-03-03 01:53:44 +00:00
|
|
|
'users.setPreferences': {
|
|
|
|
POST: (params: { userId: IUser['_id']; data: Partial<INotificationPreferences> }) => {
|
|
|
|
user: IUserPreferences;
|
|
|
|
success: boolean;
|
|
|
|
};
|
|
|
|
};
|
2022-03-02 20:08:56 +00:00
|
|
|
'users.register': {
|
|
|
|
POST: (params: { name: string; email: string; username: string; pass: string }) => { user: IUserRegistered };
|
|
|
|
};
|
2022-02-14 16:20:29 +00:00
|
|
|
};
|