blob: ab9b78fb9f94341045082f283503950dd5650b11 (
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
46
47
48
49
50
51
|
import { Emitter } from 'mitt';
import { URLHelper } from './assets/javascripts/lib/url_helper.d.ts';
export {};
type SupportedMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE';
declare global {
interface Window {
STUDIP: {
jsonapi: {
withPromises(): {
[key in SupportedMethod]: (url: string, options?: object) => Promise<unknown>;
}
}
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>;
}
|