import {Extension, HttpMethod, IServiceCall, SessionRequirement} from "@chaosinsight/portalclient" import type {IEndpointResult, IEZLabel, IEZUser, IPortalResponse} from "../index" export default class EZProject extends Extension { protected readonly extensionName = "EZProject" public getGet(): IServiceCall> { return this.call("Get", null, HttpMethod.Get, SessionRequirement.authenticated) } public setPost(identifier: string | undefined, name: string): IServiceCall> { return this.call("Set", {project: {identifier, name}}, HttpMethod.Post, SessionRequirement.authenticated) } public deleteGet(id: string): IServiceCall> { return this.call("Delete", {id}, HttpMethod.Get, SessionRequirement.authenticated) } public associateWithGet(id: string, userId: string): IServiceCall> { return this.call("AssociateWith", {id, userId}, HttpMethod.Get, SessionRequirement.authenticated) } public disassociateWithGet(id: string, userId: string): IServiceCall> { return this.call("DisassociateWith", {id, userId}, HttpMethod.Get, SessionRequirement.authenticated) } } export interface IEZProject { Identifier: string Name: string Users: IEZUser[] Labels: IEZLabel[] } Extension.add(EZProject, "ezProject") declare module "@chaosinsight/portalclient"{ interface ExtensionHandler { ezProject: EZProject } }