import request from './request'
import type { SyncLog } from '@/types'

export const syncApi = {
  syncProducts: () => {
    return request.post<any, SyncLog>('/sync/products')
  },

  getSyncStatus: (limit?: number) => {
    return request.get<any, SyncLog[]>('/sync/status', {
      params: limit ? { limit } : undefined,
    })
  },
}
