chore: add rest api return (#3864)
This commit is contained in:
parent
7a9cdde474
commit
abd9722133
|
@ -111,6 +111,7 @@ export interface INotificationPreferences {
|
||||||
desktopNotifications: TNotifications;
|
desktopNotifications: TNotifications;
|
||||||
pushNotifications: TNotifications;
|
pushNotifications: TNotifications;
|
||||||
emailNotificationMode?: 'mentions' | 'nothing';
|
emailNotificationMode?: 'mentions' | 'nothing';
|
||||||
|
language?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IUserPreferences {
|
export interface IUserPreferences {
|
||||||
|
|
|
@ -26,7 +26,7 @@ export type UsersEndpoints = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
'users.setPreferences': {
|
'users.setPreferences': {
|
||||||
POST: (params: { userId: IUser['_id']; data: Partial<INotificationPreferences> }) => {
|
POST: (params: { userId?: IUser['_id']; data: Partial<INotificationPreferences> }) => {
|
||||||
user: IUserPreferences;
|
user: IUserPreferences;
|
||||||
success: boolean;
|
success: boolean;
|
||||||
};
|
};
|
||||||
|
|
|
@ -551,10 +551,8 @@ export const saveUserProfile = (data: any, customFields?: any): any =>
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
sdk.post('users.updateOwnBasicInfo', { data, customFields });
|
sdk.post('users.updateOwnBasicInfo', { data, customFields });
|
||||||
|
|
||||||
export const saveUserPreferences = (data: any): any =>
|
export const saveUserPreferences = (data: Partial<INotificationPreferences>) =>
|
||||||
// RC 0.62.0
|
// RC 0.62.0
|
||||||
// TODO: missing definitions from server
|
|
||||||
// @ts-ignore
|
|
||||||
sdk.post('users.setPreferences', { data });
|
sdk.post('users.setPreferences', { data });
|
||||||
|
|
||||||
export const saveNotificationSettings = (roomId: string, notifications: any): any =>
|
export const saveNotificationSettings = (roomId: string, notifications: any): any =>
|
||||||
|
|
Loading…
Reference in New Issue