'use server' import {callByUser, callPublic} from '@/actions/base' import {Channel} from '@/lib/models' import {PageRecord} from '@/lib/api' import {Batch} from '@/lib/models/batch' export async function listChannels(props: { page: number size: number auth_type?: number prov?: string city?: string isp?: string expiration?: Date }) { return callByUser>('/api/channel/list', props) } type CreateChannelsResp = { host: string port: string username?: string password?: string } export async function createChannels(params: { resource_id: number protocol: number auth_type: number count: number prov?: string city?: string isp?: number }) { return callPublic('/api/channel/create', params) }