1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { GroupsService, ContentsArguments } from "../groups-service/groups-service";
6 import { ProjectResource } from "../../models/project";
7 import { GroupClass } from "../../models/group";
8 import { ListArguments } from "../../common/api/common-resource-service";
9 import { FilterBuilder } from "../../common/api/filter-builder";
11 export class ProjectService extends GroupsService<ProjectResource> {
13 create(data: Partial<ProjectResource>) {
14 const projectData = { ...data, groupClass: GroupClass.Project };
15 return super.create(projectData);
18 list(args: ListArguments = {}) {
21 filters: this.addProjectFilter(args.filters)
25 private addProjectFilter(filters?: FilterBuilder) {
30 : FilterBuilder.create())
32 .create<ProjectResource>()
33 .addEqual("groupClass", GroupClass.Project));