Skip to content

armgit / posta

Public Imported from GitHub
0

Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.

418 B
Raw Blame
import api from './client'
import type { ApiResponse, PaginatedResponse, Contact } from './types'

export const contactsApi = {
  list(page = 0, size = 20, search = '') {
    return api.get<PaginatedResponse<Contact>>('/workspaces/current/contacts', { params: { page, size, search: search || undefined } })
  },
  get(id: number) {
    return api.get<ApiResponse<Contact>>(`/workspaces/current/contacts/${id}`)
  },
}