import Aliases, { CollectionAliasSchema } from "./Aliases"; import ApiCall from "./ApiCall"; export default class Alias { constructor(private name: string, private apiCall: ApiCall) {} async retrieve(): Promise { return this.apiCall.get(this.endpointPath()); } async delete(): Promise { return this.apiCall.delete(this.endpointPath()); } private endpointPath(): string { return `${Aliases.RESOURCEPATH}/${encodeURIComponent(this.name)}`; } }