import { OpenFlareBaseService } from './base.service'; import type { ProxyRouteItem, ProxyRouteMutationPayload } from './types'; export class ProxyRouteService extends OpenFlareBaseService { protected static override readonly basePath: string = '/api/v1/d/proxy-routes'; static async list(): Promise { return this.get('/'); } static async getById(id: number): Promise { return this.get(`/${id}`); } static async create( payload: ProxyRouteMutationPayload, ): Promise { return this.post('/', payload); } static async update( id: number, payload: ProxyRouteMutationPayload, ): Promise { return this.post(`/${id}/update`, payload); } static async deleteById(id: number): Promise { return this.post(`/${id}/delete`); } }