// Copyright 2026 Arctel.net // SPDX-License-Identifier: Apache-2.0 import { BaseService } from '@/lib/services/core'; import type { CreateMessageChannelRequest, MessageChannel, MessageChannelDefinition, UpdateMessageChannelRequest, } from './types'; export class AdminMessageGatewayService extends BaseService { protected static readonly basePath = '/api/v1/admin/message-gateway'; static async list(): Promise { return this.get('/channels'); } static async definitions(): Promise { return this.get('/channels/definitions'); } static async create( data: CreateMessageChannelRequest, ): Promise { return this.post('/channels', data); } static async update( id: string, data: UpdateMessageChannelRequest, ): Promise { return this.patch(`/channels/${id}`, data); } static async remove(id: string): Promise { return this.delete(`/channels/${id}`); } static async test(id: string): Promise { return this.post(`/channels/${id}/test`); } }