aboutsummaryrefslogtreecommitdiff
path: root/resources/studip.d.ts
blob: ec5c065698cb6b778a29c76eafd97d82524f3fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { Emitter } from 'mitt';
import { URLHelper } from './assets/javascripts/lib/url_helper.d.ts';
export {};

declare global {
    interface Window {
        STUDIP: {
            wysiwyg_enabled: boolean;
            INSTALLED_LANGUAGES: { [name: string]: InstalledLanguage };
            ABSOLUTE_URI_STUDIP: string;
            ASSETS_URL: string;
            CSRF_TOKEN: { name: string; value: string };
            URLHelper: URLHelper;
            eventBus: Emitter;
        };
    }
}

export interface InstalledLanguage {
    name: string;
    path: string;
    picture: string;
    selected: boolean;
}

enum iconTypes {
    'accept',
    'attention',
    'clickable',
    'inactive',
    'info',
    'info_alt',
    'navigation',
    'new',
    'sort',
    'status-green',
    'status-red',
    'status-yellow'
}

export interface Icon {
    role: iconTypes;
    shape: string;
    attributes: Record<string, unknown>;
}