37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
'use server';
|
|
|
|
import { useService } from './lib/service';
|
|
import { CustomersService } from '@repo/graphql/api/customers';
|
|
|
|
const getService = useService(CustomersService);
|
|
|
|
export async function addMasters(...variables: Parameters<CustomersService['addMasters']>) {
|
|
const service = await getService();
|
|
|
|
return service.addMasters(...variables);
|
|
}
|
|
|
|
export async function getClients(...variables: Parameters<CustomersService['getClients']>) {
|
|
const service = await getService();
|
|
|
|
return service.getClients(...variables);
|
|
}
|
|
|
|
export async function getCustomer(...variables: Parameters<CustomersService['getCustomer']>) {
|
|
const service = await getService();
|
|
|
|
return service.getCustomer(...variables);
|
|
}
|
|
|
|
export async function getMasters(...variables: Parameters<CustomersService['getMasters']>) {
|
|
const service = await getService();
|
|
|
|
return service.getMasters(...variables);
|
|
}
|
|
|
|
export async function updateCustomer(...variables: Parameters<CustomersService['updateCustomer']>) {
|
|
const service = await getService();
|
|
|
|
return service.updateCustomer(...variables);
|
|
}
|