femto-webapp/src/app/api/schema.ts
2025-05-16 16:09:35 +02:00

354 lines
7.8 KiB
TypeScript

export interface paths {
'/posts': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get: {
parameters: {
query?: {
From?: string
Amount?: number
AuthorId?: string
Author?: string
}
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
}
[path: `/media/${string}`]: {
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
}
'/auth/login': {
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: {
'application/json': components['schemas']['LoginRequest']
'text/json': components['schemas']['LoginRequest']
'application/*+json': components['schemas']['LoginRequest']
}
}
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['LoginResponse']
'application/json': components['schemas']['LoginResponse']
'text/json': components['schemas']['LoginResponse']
}
}
}
}
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/auth/register': {
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: {
'application/json': components['schemas']['RegisterRequest']
'text/json': components['schemas']['RegisterRequest']
'application/*+json': components['schemas']['RegisterRequest']
}
}
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content: {
'text/plain': components['schemas']['RegisterResponse']
'application/json': components['schemas']['RegisterResponse']
'text/json': components['schemas']['RegisterResponse']
}
}
}
}
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/auth/session': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
post?: never
delete: {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown
}
content?: never
}
}
}
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
schemas: {
CreatePostRequest: {
/** Format: uuid */
authorId: string
content: string
media: components['schemas']['CreatePostRequestMedia'][]
}
CreatePostRequestMedia: {
/** Format: uuid */
mediaId: string
/** Format: uri */
url: string
type: string | null
/** Format: int32 */
width: number | null
/** Format: int32 */
height: number | null
}
CreatePostResponse: {
/** Format: uuid */
postId: string
}
GetAllPublicPostsResponse: {
posts: components['schemas']['PublicPostDto'][]
/** Format: uuid */
next: string | null
}
LoginRequest: {
username: string
password: string
}
LoginResponse: {
/** Format: uuid */
userId: string
username: string
}
PublicPostAuthorDto: {
/** Format: uuid */
authorId: string
username: string
}
PublicPostDto: {
author: components['schemas']['PublicPostAuthorDto']
/** Format: uuid */
postId: string
content: string
media: components['schemas']['PublicPostMediaDto'][]
/** Format: date-time */
createdAt: string
}
PublicPostMediaDto: {
/** Format: uri */
url: string
/** Format: int32 */
width: number | null
/** Format: int32 */
height: number | null
}
RegisterRequest: {
username: string
password: string
signupCode: string
email: string | null
}
RegisterResponse: {
/** Format: uuid */
userId: string
username: 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>