import {Extension, HttpMethod, IServiceCall, SessionRequirement} from "@chaosinsight/portalclient" import type {IAsset, IEndpointResult, IPortalResponse} from "../index" export default class EZLabel extends Extension { protected readonly extensionName = "EZLabel" public setPost(projectId: string, identifier: string | undefined, name: string): IServiceCall> { return this.call("Set", {projectId, label: {identifier, name}}, HttpMethod.Post, SessionRequirement.authenticated) } public deleteGet(id: string): IServiceCall> { return this.call("Delete", {id}, HttpMethod.Get, SessionRequirement.authenticated) } public associateWithPost(id: string, assetId: string): IServiceCall> { return this.call("AssociateWith", {id, assetId}, HttpMethod.Post, SessionRequirement.authenticated) } public disassociateWithPost(id: string, assetId: string): IServiceCall> { return this.call("DisassociateWith", {id, assetId}, HttpMethod.Post, SessionRequirement.authenticated) } } export interface IEZLabel { Identifier: string Name: string } Extension.add(EZLabel, "ezLabel") declare module "@chaosinsight/portalclient" { interface ExtensionHandler { ezLabel: EZLabel } }