-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
188 lines (170 loc) · 4.12 KB
/
index.d.ts
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
type App = import("vue").App;
type Component = import("vue").Component;
type VNode = import("vue").VNode;
type Axios = import("axios").Axios
export type State = {
baseUri: string;
currentUser: any;
mainMenu: any[];
userMenu: any[];
resources: any[];
version: string;
mainMenuShown: boolean;
canLeaveForm: boolean;
canLeaveModal: boolean;
pushStateWasTriggered: boolean;
validLicense: true;
[key: string]: any;
};
export type Store = import("vuex").Store<State>;
export type Color = {
[key: string]: string;
};
export interface AppConfig {
algoliaApiKey?: any;
algoliaAppId?: any;
appName: string;
base: string;
brandColors: Color[];
brandColorsCSS: string;
customLoginPath: boolean;
customLogoutPath: boolean;
debounce: number;
footer: string;
forgotPasswordPath: boolean;
globalSearchEnabled: boolean;
hasGloballySearchableResources: boolean;
initialPath: string;
locale: string;
logo?: string;
mainMenu: Menu[];
notificationCenterEnabled: boolean;
notificationPollingInterval: number;
pagination: string;
resetPasswordPath: boolean;
resources: Resource[];
rtlEnabled: boolean;
themeSwitcherEnabled: boolean;
timezone: string;
translations: Translations;
userId: number;
userMenu: Menu[];
userTimezone?: any;
version: string;
withAuthentication: boolean;
withPasswordReset: boolean;
}
export type Resource = {
uriKey: string;
label: string;
singularLabel: string;
createButtonLabel: string;
updateButtonLabel: string;
authorizedToCreate: boolean;
searchable: boolean;
perPageOptions: number[];
tableStyle: string;
showColumnBorders: boolean;
debounce: number;
clickAction: string;
};
export type Translations = {
[key: string]: string;
};
export type Menu = {
key: string;
name: string;
component: "menu-section" | "menu-group" | "menu-item";
items: (Menu | MenuItem)[];
collapsable: boolean;
icon: string;
path: string;
active?: boolean;
badge?: Badge;
};
export type MenuItem = {
active: boolean;
prefixComponent: boolean;
onlyOnDetail: boolean;
badge?: Badge;
component: "menu-item";
data?: any;
external: boolean;
headers?: Header;
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
name: string;
path: string;
target?: "_self" | "_blank" | "_parent" | "_top";
};
export type Header = {
[key: string]: string;
};
export type Badge = {
typeClass: string;
value: any;
};
export type Page = {
[key: string]: Component;
};
export type MountTo = {
_vnode: VNode;
__vue_app__: App;
};
export interface ProgressSettings {
minimum: number;
easing: string;
positionUsing: string;
speed: number;
trickle: boolean;
trickleRate: number;
trickleSpeed: number;
showSpinner: boolean;
barSelector: string;
spinnerSelector: string;
parent: string;
template: string;
}
export type Progress = {
version: string;
settings: ProgressSettings;
status?: any;
};
export type ToastedOptions = {
theme: string;
position: string;
duration: number;
};
export type Toasted = {
id: string;
options: ToastedOptions;
global: any;
groups: any[];
toasts: any[];
};
export declare type Nova = {
app: App;
appConfig: AppConfig;
bootingCallbacks: ((app: App, store: Store) => void)[];
notificationPollingInterval: number;
useShortcuts: boolean;
mountTo: MountTo;
$progress: Progress;
$toasted: Toasted;
applyTheme: () => void;
booting: (callback: (app: App, store: Store) => void) => void;
config: (key: string) => any;
error: (message: string) => void;
inertia: (name: string, component: string) => void;
info: (message: string) => void;
log: (message: any, type: string) => void;
redirectToLogin: () => void;
request: (options: Object) => Axios;
success: (message: string) => void;
url: (path: string, parameters: { [key: string]: string }) => string;
visit: (path: string, options?: Object) => void;
warning: (message: string) => void;
$emit: (event: string, ...args: any[]) => void;
$on: (event: string, callback: Function, ctx?: any) => void;
$once: (event: string, callback: Function, ctx?: any) => void;
$off: (event: string, callback?: Function) => void;
};