import { client } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { PageableList } from "@/shared/model"; import type { PostService, PostingParams, Post, PostPayloadData, } from "../model/posting-interface"; export class PostingApiService implements PostService { public async getPostingHistory( params: PostingParams, ): Promise> { const response = await client.get>( `${ENDPOINT.CMS_SERVICE.POSTINGS}`, { params }, ); return response.data; } public async savePosting(data: PostPayloadData[]): Promise { const response = await client.post( `${ENDPOINT.CMS_SERVICE.POSTINGS}`, data, ); return response.data; } } export const PostingApi = new PostingApiService();