Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[arvados-workbench2.git] / src / models / collection.ts
index 2a92594473cac819263e0af8ece34044475ba37f..3effe6724847485185fb6d15c8043fe90baac69c 100644 (file)
@@ -2,19 +2,38 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Resource, ResourceKind } from "./resource";
+import {
+    ResourceKind,
+    TrashableResource,
+    ResourceWithProperties
+} from "./resource";
 
-export interface CollectionResource extends Resource {
-    kind: ResourceKind.Collection;
+export interface CollectionResource extends TrashableResource, ResourceWithProperties {
+    kind: ResourceKind.COLLECTION;
     name: string;
     description: string;
-    properties: any;
     portableDataHash: string;
     manifestText: string;
     replicationDesired: number;
     replicationConfirmed: number;
     replicationConfirmedAt: string;
-    trashAt: string;
-    deleteAt: string;
-    isTrashed: boolean;
+    storageClassesDesired: string[];
+    storageClassesConfirmed: string[];
+    storageClassesConfirmedAt: string;
+    currentVersionUuid: string;
+    version: number;
+    preserveVersion: boolean;
+    unsignedManifestText?: string;
+    fileCount: number;
+    fileSizeTotal: number;
+}
+
+export const getCollectionUrl = (uuid: string) => {
+    return `/collections/${uuid}`;
+};
+
+export enum CollectionType {
+    GENERAL = 'nil',
+    OUTPUT = 'output',
+    LOG = 'log',
 }