✨ Migrate to latest openapi-ts (#1430)

This commit is contained in:
Patrick Arminio
2024-11-27 12:06:59 +01:00
committed by GitHub
parent e34527325b
commit a21c57ab2b
12 changed files with 1707 additions and 578 deletions
+17 -16
View File
@@ -1,20 +1,21 @@
export type ApiRequestOptions = {
readonly method:
| "GET"
| "PUT"
| "POST"
| "DELETE"
| "OPTIONS"
| "HEAD"
| "PATCH"
readonly url: string
readonly path?: Record<string, unknown>
readonly cookies?: Record<string, unknown>
readonly headers?: Record<string, unknown>
readonly query?: Record<string, unknown>
readonly formData?: Record<string, unknown>
export type ApiRequestOptions<T = unknown> = {
readonly body?: any
readonly cookies?: Record<string, unknown>
readonly errors?: Record<number | string, string>
readonly formData?: Record<string, unknown> | any[] | Blob | File
readonly headers?: Record<string, unknown>
readonly mediaType?: string
readonly method:
| "DELETE"
| "GET"
| "HEAD"
| "OPTIONS"
| "PATCH"
| "POST"
| "PUT"
readonly path?: Record<string, unknown>
readonly query?: Record<string, unknown>
readonly responseHeader?: string
readonly errors?: Record<number, string>
readonly responseTransformer?: (data: unknown) => Promise<T>
readonly url: string
}