Merge branch 'master' into 13864-Virtual-machines
[arvados-workbench2.git] / src / models / collection.ts
index 316b1fac59f6271ddc4fb2a0e6844669327f8c39..2b16ea2523a4de9d4cb4a776e402fc6ce2e7168e 100644 (file)
@@ -2,7 +2,29 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Resource } from "./resource";
+import { ResourceKind, TrashableResource } from "./resource";
 
-export interface Collection extends Resource {
+export interface CollectionResource extends TrashableResource {
+    kind: ResourceKind.COLLECTION;
+    name: string;
+    description: string;
+    properties: any;
+    portableDataHash: string;
+    manifestText: string;
+    replicationDesired: number;
+    replicationConfirmed: number;
+    replicationConfirmedAt: string;
+    storageClassesDesired: string[];
+    storageClassesConfirmed: string[];
+    storageClassesConfirmedAt: string;
+}
+
+export const getCollectionUrl = (uuid: string) => {
+    return `/collections/${uuid}`;
+};
+
+export enum CollectionType {
+    GENERAL = 'nil',
+    OUTPUT = 'output',
+    LOG = 'log',
 }