Files
tgex-frontend/lib/api/channels.ts
2025-11-19 12:56:04 +03:00

25 lines
687 B
TypeScript

// ============================================================================
// Target Channels API
// ============================================================================
import { api } from "./client";
import type {
TargetChannel,
TargetChannelsListResponse,
SuccessResponse,
} from "@/lib/types/api";
export const channelsApi = {
/**
* Get list of target channels
* GET /api/v1/target_channels
*/
list: () => api.get<TargetChannelsListResponse>("/target_channels"),
/**
* Delete (disconnect) target channel
* DELETE /api/v1/target_channels/{channel_id}
*/
delete: (id: string) => api.delete<SuccessResponse>(`/target_channels/${id}`),
};