// src/services/<service-name>.ts
import api from './axios';

// Types
export interface Contact {
  id: string;
  name: string;
  email: string;
}

// Service functions — each maps to one proxy endpoint
export const <serviceName>Service = {
  getContacts: () =>
    api.get<Contact[]>('/api/<service-name>/contacts').then(r => r.data),

  createContact: (data: { name: string; email: string }) =>
    api.post<Contact>('/api/<service-name>/contacts', data).then(r => r.data),
};
