X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b0573b45f19c656ac07901004a3686ef10d402a5..3e3eaa213219ebcac9b52c8fbe3ec3ef7c39c863:/src/models/collection.ts diff --git a/src/models/collection.ts b/src/models/collection.ts index cf5b4e68..3effe672 100644 --- a/src/models/collection.ts +++ b/src/models/collection.ts @@ -2,24 +2,38 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { Resource as R } from "./resource"; -import { Resource } from "../common/api/common-resource-service"; -import { ResourceKind } from "./kinds"; +import { + ResourceKind, + TrashableResource, + ResourceWithProperties +} from "./resource"; -export interface Collection extends R { -} - -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', }