/** * Generated by orval v7.21.0 ๐Ÿบ * Do not edit manually. * Sample API * ์ƒ˜ํ”Œ ์ŠคํŽ™. ๋ฐฑ์—”๋“œ๊ฐ€ ์ค€๋น„๋˜๋ฉด `yarn codegen:sync`๋กœ ์‹ค์ œ OpenAPI ๋ฌธ์„œ๋ฅผ ๋‚ด๋ ค๋ฐ›์•„ ์ด ํŒŒ์ผ์„ ๋ฎ์–ด์“ด๋‹ค. * OpenAPI spec version: 1.0.0 */ import type { GetPostsParams, Post, PostCreate } from './api.schemas'; import { orvalInstance } from '../client'; /** * @summary ๊ธ€ ๋ชฉ๋ก ์กฐํšŒ */ export const getPosts = ( params?: GetPostsParams, ) => { return orvalInstance( {url: `/posts`, method: 'GET', params }, ); } /** * @summary ๊ธ€ ์ƒ์„ฑ */ export const createPost = ( postCreate: PostCreate, ) => { return orvalInstance( {url: `/posts`, method: 'POST', headers: {'Content-Type': 'application/json', }, data: postCreate }, ); } /** * @summary ๊ธ€ ๋‹จ๊ฑด ์กฐํšŒ */ export const getPost = ( id: number, ) => { return orvalInstance( {url: `/posts/${id}`, method: 'GET' }, ); } /** * @summary ๊ธ€ ์ˆ˜์ • */ export const updatePost = ( id: number, postCreate: PostCreate, ) => { return orvalInstance( {url: `/posts/${id}`, method: 'PUT', headers: {'Content-Type': 'application/json', }, data: postCreate }, ); } /** * @summary ๊ธ€ ์‚ญ์ œ */ export const deletePost = ( id: number, ) => { return orvalInstance( {url: `/posts/${id}`, method: 'DELETE' }, ); } export type GetPostsResult = NonNullable>> export type CreatePostResult = NonNullable>> export type GetPostResult = NonNullable>> export type UpdatePostResult = NonNullable>> export type DeletePostResult = NonNullable>>