feat(search): add advanced attachment filters for extension, category and mime type

This commit is contained in:
rustmailer
2026-03-19 20:23:20 +08:00
parent 884fdeba10
commit c19f3977ba
31 changed files with 466 additions and 40 deletions
+28
View File
@@ -105,4 +105,32 @@ export const restore_message = async (accountId: number, envelopeIds: string[])
envelope_ids: envelopeIds,
});
return response.data;
};
export interface AttachmentMetadata {
/**
* A collection of unique file extensions found in attachments.
* @example ["pdf", "docx", "png"]
*/
extensions: string[];
/**
* A collection of high-level attachment categories.
* @example ["document", "image", "archive"]
*/
categories: string[];
/**
* A collection of unique MIME types (Content-Type) for the attachments.
* @example ["application/pdf", "image/jpeg"]
*/
content_types: string[];
}
export const get_attachment_meta = async () => {
const response = await axiosInstance.get<AttachmentMetadata>("api/v1/attachment_metadata");
return response.data;
};