25 lines
687 B
TypeScript
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}`),
|
|
};
|