shared/api/endpoints/
pdf.rspub mod user {
use crate::{
api::{ApiEndpoint, Method},
domain::{
pdf::{
user::{
UserPdfCreatePath, UserPdfDeletePath, UserPdfGetPath, UserPdfListPath,
UserPdfListResponse, UserPdfResponse, UserPdfUploadPath, UserPdfUploadRequest,
UserPdfUploadResponse,
},
PdfId,
},
CreateResponse,
},
error::EmptyError,
};
pub struct List;
impl ApiEndpoint for List {
type Path = UserPdfListPath;
type Req = ();
type Res = UserPdfListResponse;
type Err = EmptyError;
const METHOD: Method = Method::Get;
}
pub struct Get;
impl ApiEndpoint for Get {
type Path = UserPdfGetPath;
type Req = ();
type Res = UserPdfResponse;
type Err = EmptyError;
const METHOD: Method = Method::Get;
}
pub struct Create;
impl ApiEndpoint for Create {
type Path = UserPdfCreatePath;
type Req = ();
type Res = CreateResponse<PdfId>;
type Err = EmptyError;
const METHOD: Method = Method::Post;
}
pub struct Upload;
impl ApiEndpoint for Upload {
type Path = UserPdfUploadPath;
type Req = UserPdfUploadRequest;
type Res = UserPdfUploadResponse;
type Err = EmptyError;
const METHOD: Method = Method::Put;
}
pub struct Delete;
impl ApiEndpoint for Delete {
type Path = UserPdfDeletePath;
type Req = ();
type Res = ();
type Err = EmptyError;
const METHOD: Method = Method::Delete;
}
}