UNPKG

13.1 kBTypeScriptView Raw
1/**
2 * Copy options of a Dashboard.
3 */
4export interface CopyDashboardOptions {
5 /**
6 * Dashboard Scope. Can be either Project or Project_Team
7 */
8 copyDashboardScope: DashboardScope;
9 /**
10 * When this flag is set to true,option to select the folder to copy Queries of copy dashboard will appear.
11 */
12 copyQueriesFlag?: boolean;
13 /**
14 * Description of the dashboard
15 */
16 description?: string;
17 /**
18 * Name of the dashboard
19 */
20 name?: string;
21 /**
22 * ID of the project. Provided by service at creation time.
23 */
24 projectId: string;
25 /**
26 * Path to which the queries should be copied of copy dashboard
27 */
28 queryFolderPath?: string;
29 /**
30 * Refresh interval of dashboard
31 */
32 refreshInterval?: number;
33 /**
34 * ID of the team. Provided by service at creation time
35 */
36 teamId?: string;
37}
38export interface CopyDashboardResponse {
39 /**
40 * Copied Dashboard
41 */
42 copiedDashboard?: Dashboard;
43 /**
44 * Copy Dashboard options
45 */
46 copyDashboardOptions: CopyDashboardOptions;
47}
48/**
49 * Model of a Dashboard.
50 */
51export interface Dashboard {
52 _links?: any;
53 /**
54 * Entity to which the dashboard is scoped.
55 */
56 dashboardScope?: DashboardScope;
57 /**
58 * Description of the dashboard.
59 */
60 description?: string;
61 /**
62 * Server defined version tracking value, used for edit collision detection.
63 */
64 eTag?: string;
65 /**
66 * Dashboard Global Parameters Config
67 */
68 globalParametersConfig?: string;
69 /**
70 * ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty.
71 */
72 groupId?: string;
73 /**
74 * ID of the Dashboard. Provided by service at creation time.
75 */
76 id?: string;
77 /**
78 * Dashboard Last Accessed Date.
79 */
80 lastAccessedDate?: Date;
81 /**
82 * Id of the person who modified Dashboard.
83 */
84 modifiedBy?: string;
85 /**
86 * Dashboard's last modified date.
87 */
88 modifiedDate?: Date;
89 /**
90 * Name of the Dashboard.
91 */
92 name?: string;
93 /**
94 * ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard.
95 */
96 ownerId?: string;
97 /**
98 * Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service.
99 */
100 position?: number;
101 /**
102 * Interval for client to automatically refresh the dashboard. Expressed in minutes.
103 */
104 refreshInterval?: number;
105 url?: string;
106 /**
107 * The set of Widgets on the dashboard.
108 */
109 widgets?: Widget[];
110}
111/**
112 * Describes a list of dashboards associated to an owner. Currently, teams own dashboard groups.
113 */
114export interface DashboardGroup {
115 _links?: any;
116 /**
117 * A list of Dashboards held by the Dashboard Group
118 */
119 dashboardEntries?: DashboardGroupEntry[];
120 /**
121 * Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125.
122 */
123 permission?: GroupMemberPermission;
124 /**
125 * A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved.
126 */
127 teamDashboardPermission?: TeamDashboardPermission;
128 url?: string;
129}
130/**
131 * Dashboard group entry, wrapping around Dashboard (needed?)
132 */
133export interface DashboardGroupEntry extends Dashboard {
134}
135/**
136 * Response from RestAPI when saving and editing DashboardGroupEntry
137 */
138export interface DashboardGroupEntryResponse extends DashboardGroupEntry {
139}
140export interface DashboardResponse extends DashboardGroupEntry {
141}
142/**
143 * identifies the scope of dashboard storage and permissions.
144 */
145export declare enum DashboardScope {
146 /**
147 * [DEPRECATED] Dashboard is scoped to the collection user.
148 */
149 Collection_User = 0,
150 /**
151 * Dashboard is scoped to the team.
152 */
153 Project_Team = 1,
154 /**
155 * Dashboard is scoped to the project.
156 */
157 Project = 2
158}
159/**
160 * None - Team member cannot edit dashboard Edit - Team member can add, configure and delete widgets Manage - Team member can add, reorder, delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
161 */
162export declare enum GroupMemberPermission {
163 None = 0,
164 Edit = 1,
165 Manage = 2,
166 ManagePermissions = 3
167}
168/**
169 * Lightbox configuration
170 */
171export interface LightboxOptions {
172 /**
173 * Height of desired lightbox, in pixels
174 */
175 height?: number;
176 /**
177 * True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false.
178 */
179 resizable?: boolean;
180 /**
181 * Width of desired lightbox, in pixels
182 */
183 width?: number;
184}
185/**
186 * versioning for an artifact as described at: http://semver.org/, of the form major.minor.patch.
187 */
188export interface SemanticVersion {
189 /**
190 * Major version when you make incompatible API changes
191 */
192 major?: number;
193 /**
194 * Minor version when you add functionality in a backwards-compatible manner
195 */
196 minor?: number;
197 /**
198 * Patch version when you make backwards-compatible bug fixes
199 */
200 patch?: number;
201}
202/**
203 * Read - User can see dashboards Create - User can create dashboards Edit - User can add, configure and delete widgets, and edit dashboard settings. Delete - User can delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
204 */
205export declare enum TeamDashboardPermission {
206 None = 0,
207 Read = 1,
208 Create = 2,
209 Edit = 4,
210 Delete = 8,
211 ManagePermissions = 16
212}
213/**
214 * Widget data
215 */
216export interface Widget {
217 _links?: any;
218 /**
219 * Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget
220 */
221 allowedSizes?: WidgetSize[];
222 /**
223 * Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user.
224 */
225 areSettingsBlockedForUser?: boolean;
226 /**
227 * Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact.
228 */
229 artifactId?: string;
230 configurationContributionId?: string;
231 configurationContributionRelativeId?: string;
232 contentUri?: string;
233 /**
234 * The id of the underlying contribution defining the supplied Widget Configuration.
235 */
236 contributionId?: string;
237 /**
238 * Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs
239 */
240 dashboard?: Dashboard;
241 eTag?: string;
242 id?: string;
243 isEnabled?: boolean;
244 isNameConfigurable?: boolean;
245 lightboxOptions?: LightboxOptions;
246 loadingImageUrl?: string;
247 name?: string;
248 position?: WidgetPosition;
249 settings?: string;
250 settingsVersion?: SemanticVersion;
251 size?: WidgetSize;
252 typeId?: string;
253 url?: string;
254}
255/**
256 * Contribution based information describing Dashboard Widgets.
257 */
258export interface WidgetMetadata {
259 /**
260 * Sizes supported by the Widget.
261 */
262 allowedSizes?: WidgetSize[];
263 /**
264 * Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available.
265 */
266 analyticsServiceRequired?: boolean;
267 /**
268 * Resource for an icon in the widget catalog.
269 */
270 catalogIconUrl?: string;
271 /**
272 * Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted
273 */
274 catalogInfoUrl?: string;
275 /**
276 * The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.
277 */
278 configurationContributionId?: string;
279 /**
280 * The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.
281 */
282 configurationContributionRelativeId?: string;
283 /**
284 * Indicates if the widget requires configuration before being added to dashboard.
285 */
286 configurationRequired?: boolean;
287 /**
288 * Uri for the widget content to be loaded from .
289 */
290 contentUri?: string;
291 /**
292 * The id of the underlying contribution defining the supplied Widget.
293 */
294 contributionId?: string;
295 /**
296 * Optional default settings to be copied into widget settings.
297 */
298 defaultSettings?: string;
299 /**
300 * Summary information describing the widget.
301 */
302 description?: string;
303 /**
304 * Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context)
305 */
306 isEnabled?: boolean;
307 /**
308 * Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest.
309 */
310 isNameConfigurable?: boolean;
311 /**
312 * Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog.
313 */
314 isVisibleFromCatalog?: boolean;
315 /**
316 * Keywords associated with this widget, non-filterable and invisible
317 */
318 keywords?: string[];
319 /**
320 * Opt-in properties for customizing widget presentation in a "lightbox" dialog.
321 */
322 lightboxOptions?: LightboxOptions;
323 /**
324 * Resource for a loading placeholder image on dashboard
325 */
326 loadingImageUrl?: string;
327 /**
328 * User facing name of the widget type. Each widget must use a unique value here.
329 */
330 name?: string;
331 /**
332 * Publisher Name of this kind of widget.
333 */
334 publisherName?: string;
335 /**
336 * Data contract required for the widget to function and to work in its container.
337 */
338 supportedScopes?: WidgetScope[];
339 /**
340 * Tags associated with this widget, visible on each widget and filterable.
341 */
342 tags?: string[];
343 /**
344 * Contribution target IDs
345 */
346 targets?: string[];
347 /**
348 * Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types.
349 */
350 typeId?: string;
351}
352export interface WidgetMetadataResponse {
353 uri?: string;
354 widgetMetadata?: WidgetMetadata;
355}
356export interface WidgetPosition {
357 column?: number;
358 row?: number;
359}
360/**
361 * Response from RestAPI when saving and editing Widget
362 */
363export interface WidgetResponse extends Widget {
364}
365/**
366 * data contract required for the widget to function in a webaccess area or page.
367 */
368export declare enum WidgetScope {
369 Collection_User = 0,
370 Project_Team = 1
371}
372export interface WidgetSize {
373 /**
374 * The Width of the widget, expressed in dashboard grid columns.
375 */
376 columnSpan?: number;
377 /**
378 * The height of the widget, expressed in dashboard grid rows.
379 */
380 rowSpan?: number;
381}
382/**
383 * Wrapper class to support HTTP header generation using CreateResponse, ClientHeaderParameter and ClientResponseType in WidgetV2Controller
384 */
385export interface WidgetsVersionedList {
386 eTag?: string[];
387 widgets?: Widget[];
388}
389export interface WidgetTypesResponse {
390 _links?: any;
391 uri?: string;
392 widgetTypes?: WidgetMetadata[];
393}
394export declare var TypeInfo: {
395 CopyDashboardOptions: any;
396 CopyDashboardResponse: any;
397 Dashboard: any;
398 DashboardGroup: any;
399 DashboardGroupEntry: any;
400 DashboardGroupEntryResponse: any;
401 DashboardResponse: any;
402 DashboardScope: {
403 enumValues: {
404 collection_User: number;
405 project_Team: number;
406 project: number;
407 };
408 };
409 GroupMemberPermission: {
410 enumValues: {
411 none: number;
412 edit: number;
413 manage: number;
414 managePermissions: number;
415 };
416 };
417 TeamDashboardPermission: {
418 enumValues: {
419 none: number;
420 read: number;
421 create: number;
422 edit: number;
423 delete: number;
424 managePermissions: number;
425 };
426 };
427 Widget: any;
428 WidgetMetadata: any;
429 WidgetMetadataResponse: any;
430 WidgetResponse: any;
431 WidgetScope: {
432 enumValues: {
433 collection_User: number;
434 project_Team: number;
435 };
436 };
437 WidgetsVersionedList: any;
438 WidgetTypesResponse: any;
439};