improvement for the backend api

This commit is contained in:
ivannoskov
2025-11-19 12:56:04 +03:00
parent b0a9934220
commit d4672ea32b
40 changed files with 2383 additions and 3313 deletions

View File

@@ -5,11 +5,10 @@
import { api } from "./client";
import type {
Creative,
CreativeDetail,
CreativeQueryParams,
CreativeCreateRequest,
CreativeUpdateRequest,
ListResponse,
CreativesListResponse,
SuccessResponse,
} from "@/lib/types/api";
@@ -18,12 +17,12 @@ export const creativesApi = {
* Get list of creatives
*/
list: (params?: CreativeQueryParams) =>
api.get<ListResponse<Creative>>("/creatives", { params }),
api.get<CreativesListResponse>("/creatives", { params }),
/**
* Get creative details
*/
get: (id: string) => api.get<CreativeDetail>(`/creatives/${id}`),
get: (id: string) => api.get<Creative>(`/creatives/${id}`),
/**
* Create new creative