import { IRestApiContext , ITag } from '@/Interface' ; import { makeRestApiRequest } from './helpers' ; export async function getTags ( context , withUsageCount = false ) { return await makeRestApiRequest ( context , 'GET' , '/tags' , { withUsageCount } ) ; } export async function createTag ( context , params ) { return await makeRestApiRequest ( context , 'POST' , '/tags' , params ) ; } export async function updateTag ( context , id , params ) { return await makeRestApiRequest ( context , 'PATCH' , `/tags/${ id }` , params ) ; } export async function deleteTag ( context , id ) { return await makeRestApiRequest ( context , 'DELETE' , `/tags/${ id }` ) ; }