@caido/sdk-frontend 0.40.1-beta.0 → 0.40.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/types/commands.d.ts +32 -10
- package/src/types/editor.d.ts +23 -0
- package/src/types/findings.d.ts +22 -11
- package/src/types/index.d.ts +247 -26
- package/src/types/menu.d.ts +40 -4
- package/src/types/scopes.d.ts +16 -18
- package/src/types/sidebar.d.ts +10 -0
package/package.json
CHANGED
package/src/types/commands.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
run: (context: CommandContext) => void;
|
|
7
|
-
group?: string;
|
|
8
|
-
when?: (context: CommandContext) => boolean;
|
|
9
|
-
};
|
|
1
|
+
export type CommandContext = CommandContextBase | CommandContextRequestRow | CommandContextRequest | CommandContextResponse;
|
|
2
|
+
/**
|
|
3
|
+
* The base context for a command.
|
|
4
|
+
* This context is used for commands that are not executed in a specific context, such as via shortcuts and the command palette.
|
|
5
|
+
*/
|
|
10
6
|
type CommandContextBase = {
|
|
11
7
|
type: "BaseContext";
|
|
12
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* The context for a command that is executed on a row in the request table.
|
|
11
|
+
*/
|
|
13
12
|
type CommandContextRequestRow = {
|
|
14
13
|
type: "RequestRowContext";
|
|
14
|
+
/**
|
|
15
|
+
* The requests that are selected in the request table.
|
|
16
|
+
*/
|
|
15
17
|
requests: {
|
|
16
18
|
id: string;
|
|
17
19
|
host: string;
|
|
@@ -21,8 +23,14 @@ type CommandContextRequestRow = {
|
|
|
21
23
|
isTls: boolean;
|
|
22
24
|
}[];
|
|
23
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* The context for a command that is executed on a request pane.
|
|
28
|
+
*/
|
|
24
29
|
type CommandContextRequest = {
|
|
25
30
|
type: "RequestContext";
|
|
31
|
+
/**
|
|
32
|
+
* The request that is currently open in the request pane.
|
|
33
|
+
*/
|
|
26
34
|
request: {
|
|
27
35
|
host: string;
|
|
28
36
|
port: number;
|
|
@@ -31,10 +39,19 @@ type CommandContextRequest = {
|
|
|
31
39
|
isTls: boolean;
|
|
32
40
|
raw: string;
|
|
33
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* The currently selected text in the request pane.
|
|
44
|
+
*/
|
|
34
45
|
selection: string;
|
|
35
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* The context for a command that is executed on a response pane.
|
|
49
|
+
*/
|
|
36
50
|
type CommandContextResponse = {
|
|
37
51
|
type: "ResponseContext";
|
|
52
|
+
/**
|
|
53
|
+
* The request that is associated with the response.
|
|
54
|
+
*/
|
|
38
55
|
request: {
|
|
39
56
|
id: string;
|
|
40
57
|
host: string;
|
|
@@ -43,13 +60,18 @@ type CommandContextResponse = {
|
|
|
43
60
|
query: string;
|
|
44
61
|
isTls: boolean;
|
|
45
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* The response that is currently open in the response pane.
|
|
65
|
+
*/
|
|
46
66
|
response: {
|
|
47
67
|
id: string;
|
|
48
68
|
raw: string;
|
|
49
69
|
statusCode: number;
|
|
50
70
|
roundtripTime: number;
|
|
51
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* The currently selected text in the response pane.
|
|
74
|
+
*/
|
|
52
75
|
selection: string;
|
|
53
76
|
};
|
|
54
|
-
export type CommandContext = CommandContextBase | CommandContextRequestRow | CommandContextRequest | CommandContextResponse;
|
|
55
77
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic editor interface.
|
|
3
|
+
*/
|
|
4
|
+
export type Editor = {
|
|
5
|
+
/**
|
|
6
|
+
* Get the currently selected text of the editor.
|
|
7
|
+
*/
|
|
8
|
+
getSelectedText: () => string;
|
|
9
|
+
/**
|
|
10
|
+
* Replace the currently selected text of the editor.
|
|
11
|
+
* @param text The text to replace the selection with.
|
|
12
|
+
*/
|
|
13
|
+
replaceSelectedText: (text: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Check whether the editor is read-only.
|
|
16
|
+
* @returns Whether the editor is read-only.
|
|
17
|
+
*/
|
|
18
|
+
isReadOnly: () => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Focus the editor.
|
|
21
|
+
*/
|
|
22
|
+
focus: () => void;
|
|
23
|
+
};
|
package/src/types/findings.d.ts
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type Finding = {
|
|
1
|
+
/**
|
|
2
|
+
* Represents a finding.
|
|
3
|
+
*/
|
|
4
|
+
export type Finding = {
|
|
5
|
+
/**
|
|
6
|
+
* The ID of the finding.
|
|
7
|
+
*/
|
|
5
8
|
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* The title of the finding.
|
|
11
|
+
*/
|
|
6
12
|
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* The description of the finding.
|
|
15
|
+
*/
|
|
7
16
|
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The reporter of the finding.
|
|
19
|
+
*/
|
|
8
20
|
reporter: string;
|
|
21
|
+
/**
|
|
22
|
+
* The host of the request attached to this finding
|
|
23
|
+
*/
|
|
9
24
|
host: string;
|
|
25
|
+
/**
|
|
26
|
+
* The path of the request attached to this finding
|
|
27
|
+
*/
|
|
10
28
|
path: string;
|
|
11
29
|
};
|
|
12
|
-
type CreateFindingsOptions = {
|
|
13
|
-
title: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
reporter: string;
|
|
16
|
-
dedupeKey?: string;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
package/src/types/index.d.ts
CHANGED
|
@@ -1,40 +1,261 @@
|
|
|
1
1
|
import type { Sdk } from "./__generated__/graphql-sdk";
|
|
2
2
|
import type { BackendEndpoints, BackendEvents, ToBackendRPC } from "./backend";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type { Window } from "./window";
|
|
3
|
+
import type { CommandContext } from "./commands";
|
|
4
|
+
import type { Editor } from "./editor";
|
|
5
|
+
import type { Finding } from "./findings";
|
|
6
|
+
import type { MenuItem } from "./menu";
|
|
7
|
+
import type { Scope } from "./scopes";
|
|
8
|
+
import type { SidebarItem } from "./sidebar";
|
|
9
|
+
import type { JSONCompatible, JSONValue } from "./utils";
|
|
11
10
|
export type { CommandContext } from "./commands";
|
|
11
|
+
export type { MenuItem } from "./menu";
|
|
12
12
|
export type API<T extends BackendEndpoints = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
|
|
13
|
-
|
|
13
|
+
graphql: Sdk;
|
|
14
14
|
backend: ToBackendRPC<T, E>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Utilities to create UI components.
|
|
17
|
+
*/
|
|
18
|
+
ui: {
|
|
19
|
+
/**
|
|
20
|
+
* Create a button.
|
|
21
|
+
* @param options Options for the button.
|
|
22
|
+
* @param options.variant The variant of the button.
|
|
23
|
+
* @param options.label The label of the button.
|
|
24
|
+
* @param options.leadingIcon The leading icon of the button.
|
|
25
|
+
* @param options.trailingIcon The trailing icon of the button.
|
|
26
|
+
* @param options.size The size of the button.
|
|
27
|
+
* @returns The button element.
|
|
28
|
+
*/
|
|
29
|
+
button: (options?: {
|
|
30
|
+
variant?: "primary" | "secondary" | "tertiary";
|
|
31
|
+
label?: string;
|
|
32
|
+
leadingIcon?: string;
|
|
33
|
+
trailingIcon?: string;
|
|
34
|
+
size?: "small" | "medium" | "large";
|
|
35
|
+
}) => HTMLElement;
|
|
36
|
+
/**
|
|
37
|
+
* Create a card.
|
|
38
|
+
* @param options Options for the card.
|
|
39
|
+
* @param options.header The header of the card.
|
|
40
|
+
* @param options.body The body of the card.
|
|
41
|
+
* @param options.footer The footer of the card.
|
|
42
|
+
* @returns The card element.
|
|
43
|
+
*/
|
|
44
|
+
card: (options?: {
|
|
45
|
+
header?: HTMLElement;
|
|
46
|
+
body?: HTMLElement;
|
|
47
|
+
footer?: HTMLElement;
|
|
48
|
+
}) => HTMLElement;
|
|
49
|
+
/**
|
|
50
|
+
* Create a well.
|
|
51
|
+
* @param options Options for the well.
|
|
52
|
+
* @param options.header The header of the well.
|
|
53
|
+
* @param options.body The body of the well.
|
|
54
|
+
* @param options.footer The footer of the well.
|
|
55
|
+
* @returns The well element.
|
|
56
|
+
*/
|
|
57
|
+
well: (options?: {
|
|
58
|
+
header?: HTMLElement;
|
|
59
|
+
body?: HTMLElement;
|
|
60
|
+
footer?: HTMLElement;
|
|
61
|
+
}) => HTMLElement;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Utilities to interact with scopes
|
|
65
|
+
*/
|
|
66
|
+
scopes: {
|
|
67
|
+
/**
|
|
68
|
+
* Get all scopes.
|
|
69
|
+
* @returns A list of scopes.
|
|
70
|
+
*/
|
|
71
|
+
getScopes: () => Scope[];
|
|
72
|
+
/**
|
|
73
|
+
* Create a scope.
|
|
74
|
+
* @param options Options for the scope.
|
|
75
|
+
* @param options.name The name of the scope.
|
|
76
|
+
* @param options.allowlist The list of included items in the scope.
|
|
77
|
+
* @param options.denylist The list of excluded items in the scope.
|
|
78
|
+
* @returns The created scope.
|
|
79
|
+
*/
|
|
80
|
+
createScope: (options: {
|
|
81
|
+
name: string;
|
|
82
|
+
allowlist: string[];
|
|
83
|
+
denylist: string[];
|
|
84
|
+
}) => Promise<Scope | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* Update a scope.
|
|
87
|
+
* @param id The id of the scope to update.
|
|
88
|
+
* @param options Options for the scope.
|
|
89
|
+
* @param options.name The name of the scope.
|
|
90
|
+
* @param options.allowlist The list of included items in the scope.
|
|
91
|
+
* @param options.denylist The list of excluded items in the scope.
|
|
92
|
+
* @returns The updated scope.
|
|
93
|
+
*/
|
|
94
|
+
updateScope: (id: string, options: {
|
|
95
|
+
name?: string;
|
|
96
|
+
allowlist?: string[];
|
|
97
|
+
denylist?: string[];
|
|
98
|
+
}) => Promise<Scope | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
* Delete a scope.
|
|
101
|
+
* @param id The id of the scope to delete.
|
|
102
|
+
* @returns Whether the scope was deleted.
|
|
103
|
+
*/
|
|
104
|
+
deleteScope: (id: string) => Promise<boolean>;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Utilities to interact with findings
|
|
108
|
+
*/
|
|
109
|
+
findings: {
|
|
110
|
+
/**
|
|
111
|
+
* Create a finding.
|
|
112
|
+
* @param requestId The id of the request the finding is associated with.
|
|
113
|
+
* @param options Options for the finding.
|
|
114
|
+
* @param options.title The title of the finding.
|
|
115
|
+
* @param options.description The description of the finding.
|
|
116
|
+
* @param options.reporter The reporter of the finding.
|
|
117
|
+
* @param options.dedupeKey The dedupe key of the finding.
|
|
118
|
+
* @returns The created finding.
|
|
119
|
+
*/
|
|
120
|
+
createFinding: (requestId: string, options: {
|
|
121
|
+
title: string;
|
|
122
|
+
description?: string;
|
|
123
|
+
reporter: string;
|
|
124
|
+
dedupeKey?: string;
|
|
125
|
+
}) => Promise<Finding | undefined>;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Utilities to interact with commands
|
|
129
|
+
*/
|
|
130
|
+
commands: {
|
|
131
|
+
/**
|
|
132
|
+
* Register a command.
|
|
133
|
+
* @param id The id of the command.
|
|
134
|
+
* @param options Options for the command.
|
|
135
|
+
* @param options.name The name of the command.
|
|
136
|
+
* @param options.run The function to run when the command is executed.
|
|
137
|
+
* @param options.group The group this command belongs to.
|
|
138
|
+
* @param options.when A function to determine if the command is available.
|
|
139
|
+
*/
|
|
140
|
+
register: (id: string, options: {
|
|
141
|
+
name: string;
|
|
142
|
+
run: (context: CommandContext) => void;
|
|
143
|
+
group?: string;
|
|
144
|
+
when?: (context: CommandContext) => boolean;
|
|
145
|
+
}) => void;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Utilities to insert menu items and context-menus throughout the UI.
|
|
149
|
+
*/
|
|
150
|
+
menu: {
|
|
151
|
+
/**
|
|
152
|
+
* Register a menu item.
|
|
153
|
+
* @param item The menu item to register.
|
|
154
|
+
*/
|
|
155
|
+
registerItem: (item: MenuItem) => void;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Utilities to interact with navigation.
|
|
159
|
+
*/
|
|
160
|
+
navigation: {
|
|
161
|
+
/**
|
|
162
|
+
* Navigate to a path.
|
|
163
|
+
* @param path The path to navigate to.
|
|
164
|
+
*/
|
|
165
|
+
goTo: (path: string) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Add a page to the navigation.
|
|
168
|
+
* @param path The path of the page.
|
|
169
|
+
* @param options Options for the page.
|
|
170
|
+
* @param options.body The body of the page.
|
|
171
|
+
* @param options.topbar The topbar of the page.
|
|
172
|
+
*/
|
|
173
|
+
addPage: (path: string, options: {
|
|
174
|
+
body: HTMLElement;
|
|
175
|
+
topbar?: HTMLElement;
|
|
176
|
+
}) => void;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Utilities to interact with the active page.
|
|
180
|
+
*/
|
|
181
|
+
window: {
|
|
182
|
+
/**
|
|
183
|
+
* Get the active editor.
|
|
184
|
+
* @returns The active editor.
|
|
185
|
+
*/
|
|
186
|
+
getActiveEditor: () => Editor | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Show a toast message.
|
|
189
|
+
* @param message The message to show.
|
|
190
|
+
* @param options Options for the toast message.
|
|
191
|
+
* @param options.variant The variant of the toast message.
|
|
192
|
+
* @param options.duration The duration of the toast message in milliseconds.
|
|
193
|
+
*/
|
|
194
|
+
showToast: (message: string, options?: {
|
|
195
|
+
variant?: "success" | "error" | "warning" | "info";
|
|
196
|
+
duration?: number;
|
|
197
|
+
}) => void;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Utilities to interact with frontend-plugin storage.
|
|
201
|
+
*/
|
|
202
|
+
storage: {
|
|
203
|
+
/**
|
|
204
|
+
* Get the storage.
|
|
205
|
+
* @returns The storage.
|
|
206
|
+
*/
|
|
207
|
+
get: () => JSONValue;
|
|
208
|
+
/**
|
|
209
|
+
* Set the storage.
|
|
210
|
+
* @param value The value to set the storage to
|
|
211
|
+
* @returns A promise that resolves when the storage has been set.
|
|
212
|
+
*/
|
|
213
|
+
set: <T>(value: JSONCompatible<T>) => Promise<void>;
|
|
214
|
+
/**
|
|
215
|
+
* Subscribe to storage changes.
|
|
216
|
+
* @param callback The callback to call when the storage changes.
|
|
217
|
+
*/
|
|
218
|
+
onChange: (callback: (value: JSONValue) => void) => void;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Utilities to interact with shortcuts.
|
|
222
|
+
*/
|
|
22
223
|
shortcuts: {
|
|
224
|
+
/**
|
|
225
|
+
* Register a shortcut.
|
|
226
|
+
* @param commandId The id of the command to run when the shortcut is triggered.
|
|
227
|
+
* @param keys The keys of the shortcut.
|
|
228
|
+
*/
|
|
23
229
|
register: (commandId: string, keys: string[]) => void;
|
|
24
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* Utilities to interact with the command palette.
|
|
233
|
+
*/
|
|
25
234
|
commandPalette: {
|
|
235
|
+
/**
|
|
236
|
+
* Register a command.
|
|
237
|
+
* @param commandId The id of the command to register.
|
|
238
|
+
*/
|
|
26
239
|
register: (commandId: string) => void;
|
|
27
240
|
};
|
|
241
|
+
/**
|
|
242
|
+
* Utilities to interact with the sidebar.
|
|
243
|
+
*/
|
|
28
244
|
sidebar: {
|
|
29
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Register a sidebar item.
|
|
247
|
+
* @param name The name of the sidebar item.
|
|
248
|
+
* @param path The path that the user will be navigated to when the sidebar item is clicked.
|
|
249
|
+
* @param options Options for the sidebar item.
|
|
250
|
+
* @param options.icon The icon of the sidebar item.
|
|
251
|
+
* @param options.group The group the sidebar item belongs to.
|
|
252
|
+
* @param options.isExternal Whether the path points to an external URL.
|
|
253
|
+
* @returns The created sidebar item.
|
|
254
|
+
*/
|
|
255
|
+
registerItem: (name: string, path: string, options?: {
|
|
256
|
+
icon?: string;
|
|
257
|
+
group?: string;
|
|
258
|
+
isExternal?: boolean;
|
|
259
|
+
}) => SidebarItem;
|
|
30
260
|
};
|
|
31
|
-
graphql: Sdk;
|
|
32
|
-
};
|
|
33
|
-
type SidebarItemOptions = {
|
|
34
|
-
icon?: string;
|
|
35
|
-
group?: string;
|
|
36
|
-
isExternal?: boolean;
|
|
37
|
-
};
|
|
38
|
-
type SidebarItem = {
|
|
39
|
-
setCount: (count: number) => void;
|
|
40
261
|
};
|
package/src/types/menu.d.ts
CHANGED
|
@@ -1,26 +1,62 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export type MenuItem = RequestRowMenuItem | SettingsMenuItem | RequestMenuItem | ResponseMenuItem;
|
|
2
|
+
/**
|
|
3
|
+
* A context-menu item that appears when right-clicking a request row.
|
|
4
|
+
*/
|
|
5
5
|
type RequestRowMenuItem = {
|
|
6
6
|
type: "RequestRow";
|
|
7
|
+
/**
|
|
8
|
+
* The command ID to execute when the menu item is clicked.
|
|
9
|
+
*/
|
|
7
10
|
commandId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The icon to display to the left of the menu item.
|
|
13
|
+
*/
|
|
8
14
|
leadingIcon?: string;
|
|
9
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* A context-menu item that appears when right-clicking a request pane.
|
|
18
|
+
*/
|
|
10
19
|
type RequestMenuItem = {
|
|
11
20
|
type: "Request";
|
|
21
|
+
/**
|
|
22
|
+
* The command ID to execute when the menu item is clicked.
|
|
23
|
+
*/
|
|
12
24
|
commandId: string;
|
|
25
|
+
/**
|
|
26
|
+
* The icon to display to the left of the menu item.
|
|
27
|
+
*/
|
|
13
28
|
leadingIcon?: string;
|
|
14
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* A context-menu item that appears when right-clicking a response pane.
|
|
32
|
+
*/
|
|
15
33
|
type ResponseMenuItem = {
|
|
16
34
|
type: "Response";
|
|
35
|
+
/**
|
|
36
|
+
* The command ID to execute when the menu item is
|
|
37
|
+
*/
|
|
17
38
|
commandId: string;
|
|
39
|
+
/**
|
|
40
|
+
* The icon to display to the left of the menu item.
|
|
41
|
+
*/
|
|
18
42
|
leadingIcon?: string;
|
|
19
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* A menu item that appears in the settings menu.
|
|
46
|
+
*/
|
|
20
47
|
type SettingsMenuItem = {
|
|
21
48
|
type: "Settings";
|
|
49
|
+
/**
|
|
50
|
+
* The label of the menu item.
|
|
51
|
+
*/
|
|
22
52
|
label: string;
|
|
53
|
+
/**
|
|
54
|
+
* The path that the user will be navigated to when the menu item is clicked
|
|
55
|
+
*/
|
|
23
56
|
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* The icon to display to the left of the menu item.
|
|
59
|
+
*/
|
|
24
60
|
leadingIcon?: string;
|
|
25
61
|
};
|
|
26
62
|
export {};
|
package/src/types/scopes.d.ts
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Represents a scope.
|
|
3
|
+
*/
|
|
4
|
+
export type Scope = {
|
|
5
|
+
/**
|
|
6
|
+
* The unique ID of the scope.
|
|
7
|
+
*/
|
|
8
8
|
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the scope.
|
|
11
|
+
*/
|
|
9
12
|
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The list of included items.
|
|
15
|
+
*/
|
|
10
16
|
allowlist: string[];
|
|
17
|
+
/**
|
|
18
|
+
* The list of excluded items.
|
|
19
|
+
*/
|
|
11
20
|
denylist: string[];
|
|
12
21
|
};
|
|
13
|
-
type CreateScopeOptions = {
|
|
14
|
-
name: string;
|
|
15
|
-
allowlist: string[];
|
|
16
|
-
denylist: string[];
|
|
17
|
-
};
|
|
18
|
-
type UpdateScopeOptions = {
|
|
19
|
-
name?: string;
|
|
20
|
-
allowlist?: string[];
|
|
21
|
-
denylist?: string[];
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a sidebar item.
|
|
3
|
+
*/
|
|
4
|
+
export type SidebarItem = {
|
|
5
|
+
/**
|
|
6
|
+
* Set the value of a notification badge next to the sidebar item.
|
|
7
|
+
* @param count - The number to display in the badge. A value of 0 will hide the badge.
|
|
8
|
+
*/
|
|
9
|
+
setCount: (count: number) => void;
|
|
10
|
+
};
|