diff --git a/scripts/core/superdesk-api.d.ts b/scripts/core/superdesk-api.d.ts index c75d65e50a..1846396d77 100644 --- a/scripts/core/superdesk-api.d.ts +++ b/scripts/core/superdesk-api.d.ts @@ -1297,12 +1297,14 @@ declare module 'superdesk-api' { archive_item: IArticle; } + export interface IUserPrivileges { + [privilege: string]: 1 | 0; + } + export interface IUserRole extends IBaseRestApiResponse { _id: string; name: string; - privileges?: { - [privilege: string]: 1 | 0; - }; + privileges?: IUserPrivileges; author_role: string; editor_role: string; } @@ -1378,7 +1380,7 @@ declare module 'superdesk-api' { avatar: string; avatar_renditions: {}; role?: IUserRole['_id']; - privileges: {}; + privileges: IUserPrivileges; user_type: 'user' | 'administrator'; is_support: boolean; is_author: boolean; @@ -2843,6 +2845,7 @@ declare module 'superdesk-api' { ): string; }; privileges: { + getOwnPrivileges(): Promise; hasPrivilege(privilege: string): boolean; }; preferences: {