Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[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 {
6     ResourceKind,
7     TrashableResource,
8     ResourceWithProperties
9 } from "./resource";
10
11 export interface CollectionResource extends TrashableResource, ResourceWithProperties {
12     kind: ResourceKind.COLLECTION;
13     name: string;
14     description: string;
15     portableDataHash: string;
16     manifestText: string;
17     replicationDesired: number;
18     replicationConfirmed: number;
19     replicationConfirmedAt: string;
20     storageClassesDesired: string[];
21     storageClassesConfirmed: string[];
22     storageClassesConfirmedAt: string;
23     currentVersionUuid: string;
24     version: number;
25     preserveVersion: boolean;
26     unsignedManifestText?: string;
27     fileCount: number;
28     fileSizeTotal: number;
29 }
30
31 export const getCollectionUrl = (uuid: string) => {
32     return `/collections/${uuid}`;
33 };
34
35 export enum CollectionType {
36     GENERAL = 'nil',
37     OUTPUT = 'output',
38     LOG = 'log',
39 }