ca2b4b36d6965e42cba58467bf7041f9beee85b4
[arvados-workbench2.git] / src / models / collection.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ResourceKind, TrashableResource } from "./resource";
6
7 export interface CollectionResource extends TrashableResource {
8     kind: ResourceKind.COLLECTION;
9     name: string;
10     description: string;
11     properties: any;
12     portableDataHash: string;
13     manifestText: string;
14     replicationDesired: number;
15     replicationConfirmed: number;
16     replicationConfirmedAt: string;
17     storageClassesDesired: string[];
18     storageClassesConfirmed: string[];
19     storageClassesConfirmedAt: string;
20     currentVersionUuid: string;
21     version: number;
22     preserveVersion: boolean;
23     unsignedManifestText?: string;
24 }
25
26 export const getCollectionUrl = (uuid: string) => {
27     return `/collections/${uuid}`;
28 };
29
30 export enum CollectionType {
31     GENERAL = 'nil',
32     OUTPUT = 'output',
33     LOG = 'log',
34 }