feat: global platform v2 update
This commit is contained in:
@@ -1,24 +1,18 @@
|
||||
// ============================================================================
|
||||
// Target Channels API
|
||||
// Channels API (Catalog for Placements)
|
||||
// ============================================================================
|
||||
|
||||
import { api } from "./client";
|
||||
import type {
|
||||
TargetChannel,
|
||||
TargetChannelsListResponse,
|
||||
SuccessResponse,
|
||||
Channel,
|
||||
ChannelsQueryParams,
|
||||
PaginatedResponse,
|
||||
} from "@/lib/types/api";
|
||||
|
||||
export const channelsApi = {
|
||||
/**
|
||||
* Get list of target channels
|
||||
* GET /api/v1/target_channels
|
||||
* Get catalog of channels for placements
|
||||
*/
|
||||
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}`),
|
||||
list: (params?: ChannelsQueryParams) =>
|
||||
api.get<PaginatedResponse<Channel>>("/channels", { params }),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user