femto-webapp/src/api/schema.ts
2025-05-04 23:22:45 +02:00

255 lines
5.6 KiB
TypeScript

export interface paths {
'/posts': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get: {
parameters: {
query?: {
From?: string
Amount?: number
}
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['GetAllPublicPostsResponse']
'application/json': components['schemas']['GetAllPublicPostsResponse']
'text/json': components['schemas']['GetAllPublicPostsResponse']
}
}
}
}
put?: never
post: {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
requestBody: {
content: {
'application/json': components['schemas']['CreatePostRequest']
'text/json': components['schemas']['CreatePostRequest']
'application/*+json': components['schemas']['CreatePostRequest']
}
}
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['CreatePostResponse']
'application/json': components['schemas']['CreatePostResponse']
'text/json': components['schemas']['CreatePostResponse']
}
}
}
}
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/media': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
post: {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
requestBody: {
content: {
'multipart/form-data': {
/** Format: binary */
file?: string
}
}
}
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['UploadMediaResponse']
'application/json': components['schemas']['UploadMediaResponse']
'text/json': components['schemas']['UploadMediaResponse']
}
}
}
}
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/media/{id}': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get: {
parameters: {
query?: never
header?: never
path: {
id: string
}
cookie?: never
}
requestBody?: never
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content?: never
}
}
}
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/authors/{username}/posts': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get: {
parameters: {
query?: {
From?: string
Amount?: number
}
header?: never
path: {
username: string
}
cookie?: never
}
requestBody?: never
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['GetAuthorPostsResponse']
'application/json': components['schemas']['GetAuthorPostsResponse']
'text/json': components['schemas']['GetAuthorPostsResponse']
}
}
}
}
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
schemas: {
AuthoPostAuthorDto: {
/** Format: uuid */
authorId: string
username: string
}
AuthorPostDto: {
/** Format: uuid */
postId: string
content: string
media: string[]
/** Format: date-time */
createdAt: string
author: components['schemas']['AuthoPostAuthorDto']
}
CreatePostRequest: {
/** Format: uuid */
authorId: string
content: string
media: string[]
}
CreatePostResponse: {
/** Format: uuid */
postId: string
}
GetAllPublicPostsResponse: {
posts: components['schemas']['PublicPostDto'][]
/** Format: uuid */
next: string | null
}
GetAuthorPostsResponse: {
posts: components['schemas']['AuthorPostDto'][]
/** Format: uuid */
next: string | null
}
PublicPostAuthorDto: {
/** Format: uuid */
authorId: string
username: string
}
PublicPostDto: {
author: components['schemas']['PublicPostAuthorDto']
/** Format: uuid */
postId: string
content: string
media: string[]
/** Format: date-time */
createdAt: string
}
UploadMediaResponse: {
/** Format: uuid */
mediaId: string
url: string
}
}
responses: never
parameters: never
requestBodies: never
headers: never
pathItems: never
}
export type $defs = Record<string, never>
export type operations = Record<string, never>