import { api as client } from "../auth/http"; import { unwrap } from "@/utils/endpoint"; import type { ApiResponse } from "@/types/apiResponse"; const BASE = "/stamp-settings"; /** Company stamp/seal used on generated invoice/receipt PDFs. */ export interface StampSettings { stampImageUrl: string | null; updatedById: string | null; updatedAt: string | null; } export const stampSettingsService = { get: async (): Promise => { const response = await client.get>(BASE); return unwrap(response.data); }, set: async (stampImageBase64: string): Promise => { const response = await client.put>(BASE, { stampImageBase64, }); return unwrap(response.data); }, clear: async (): Promise => { const response = await client.delete>(BASE); return unwrap(response.data); }, };