16583: Add "Intermediate" to collection type filters
[arvados-workbench2.git] / src / models / file-viewers-config.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 export type FileViewerList = FileViewer[];
6
7 export interface FileViewer {
8     /**
9      * Name is used as a label in file's context menu
10      */
11     name: string;
12
13     /**
14      * Limits files for which viewer is enabled
15      * If not given, viewer will be enabled for all files
16      * Viewer is enabled if file name ends with an extension.
17      * 
18      * Example: `['.zip', '.tar.gz', 'bam']`
19      */
20     extensions?: string[];
21
22     /**
23      * Determines whether a viewer is enabled for collections.
24      */
25     collections?: boolean;
26
27     /**
28      * URL that redirects to a viewer 
29      * Example: `https://bam-viewer.com`
30      */
31     url: string;
32
33     /**
34      * Name of a search param that will be used to send file's path to a viewer
35      * Example: 
36      * 
37      * `{ filePathParam: 'filePath' }`
38      * 
39      * `https://bam-viewer.com?filePath=/path/to/file`
40      */
41     filePathParam: string;
42
43     /**
44      * Icon that will display next to a label
45      */
46     iconUrl?: string;
47 }