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.

645 B
Raw Blame
import api from './client'
import type { ApiResponse, PaginatedResponse, Language, LanguageInput } from './types'

export const languagesApi = {
  list(page = 0, size = 100) {
    return api.get<PaginatedResponse<Language>>('/workspaces/current/languages', { params: { page, size } })
  },
  create(data: LanguageInput) {
    return api.post<ApiResponse<Language>>('/workspaces/current/languages', data)
  },
  update(id: number, data: Partial<LanguageInput>) {
    return api.put<ApiResponse<Language>>(`/workspaces/current/languages/${id}`, data)
  },
  delete(id: number) {
    return api.delete(`/workspaces/current/languages/${id}`)
  },
}