import ApiCall from "./ApiCall"; import Stopwords from "./Stopwords"; export interface StopwordSchema { id: string; stopwords: string[] | { id: string; stopwords: string[] }; locale?: string; } export interface StopwordDeleteSchema { id: string; } export default class Stopword { constructor( private stopwordId: 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 `${Stopwords.RESOURCEPATH}/${encodeURIComponent(this.stopwordId)}`; } }