1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { AxiosInstance } from "axios";
6 import { CommonResourceService } from "services/common-service/common-resource-service";
7 import { UserResource } from "models/user";
8 import { ApiActions } from "services/api/api-actions";
9 import { ListResults } from "services/common-service/common-service";
11 export class UserService extends CommonResourceService<UserResource> {
12 constructor(serverApi: AxiosInstance, actions: ApiActions, readOnlyFields: string[] = []) {
13 super(serverApi, "users", actions, readOnlyFields.concat([
20 activate(uuid: string) {
21 return CommonResourceService.defaultResponse<UserResource>(
23 .post(this.resourceType + `/${uuid}/activate`),
29 return CommonResourceService.defaultResponse<ListResults<any>>(
31 .post(this.resourceType + `/setup`, {}, { params: { uuid } }),
36 unsetup(uuid: string) {
37 return CommonResourceService.defaultResponse<UserResource>(
39 .post(this.resourceType + `/${uuid}/unsetup`),