mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
fase 5
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import apiClient from './client'
|
||||
import type {
|
||||
SendJobListResponse,
|
||||
SendJobResponse,
|
||||
SendPecRequest,
|
||||
} from '@/types/api.types'
|
||||
|
||||
export interface SendJobFilters {
|
||||
page?: number
|
||||
page_size?: number
|
||||
mailbox_id?: string
|
||||
status?: string
|
||||
}
|
||||
|
||||
export const sendApi = {
|
||||
send: (data: SendPecRequest) =>
|
||||
apiClient.post<SendJobResponse>('/send', data).then((r) => r.data),
|
||||
|
||||
listJobs: (filters: SendJobFilters = {}) =>
|
||||
apiClient.get<SendJobListResponse>('/send/jobs', { params: filters }).then((r) => r.data),
|
||||
|
||||
getJob: (id: string) =>
|
||||
apiClient.get<SendJobResponse>(`/send/jobs/${id}`).then((r) => r.data),
|
||||
|
||||
cancelJob: (id: string) => apiClient.delete(`/send/jobs/${id}`),
|
||||
}
|
||||
Reference in New Issue
Block a user