|
2 | 2 | // DO NOT EDIT THIS FILE MANUALLY. |
3 | 3 | // See Also: https://github.com/moznion/openapi-fetch-gen |
4 | 4 | import createClient, { type ClientOptions } from "openapi-fetch"; |
5 | | -import type { paths } from "./schema.d.ts"; // generated by openapi-typescript |
| 5 | +import type { components, paths } from "./schema.d.ts"; // generated by openapi-typescript |
6 | 6 |
|
7 | 7 | export class Client<HT extends Record<string, string>> { |
8 | 8 | private readonly client; |
@@ -237,102 +237,16 @@ export class Client<HT extends Record<string, string>> { |
237 | 237 | } |
238 | 238 | } |
239 | 239 |
|
240 | | -export type Error = { code: number; message: string }; |
241 | | -export type User = { |
242 | | - id: string; |
243 | | - name: string; |
244 | | - email: string; |
245 | | - membershipType: "REGULAR" | "PREMIUM" | "STUDENT"; |
246 | | - registeredAt: string; |
247 | | - address?: { |
248 | | - postalCode?: string; |
249 | | - street: string; |
250 | | - city: string; |
251 | | - country: string; |
252 | | - }; |
253 | | -}; |
254 | | -export type Address = { |
255 | | - postalCode?: string; |
256 | | - street: string; |
257 | | - city: string; |
258 | | - country: string; |
259 | | -}; |
260 | | -export type UserCreate = { |
261 | | - name: string; |
262 | | - email: string; |
263 | | - membershipType: "REGULAR" | "PREMIUM" | "STUDENT"; |
264 | | - address?: { |
265 | | - postalCode?: string; |
266 | | - street: string; |
267 | | - city: string; |
268 | | - country: string; |
269 | | - }; |
270 | | -}; |
271 | | -export type UserUpdate = { |
272 | | - name: string; |
273 | | - email: string; |
274 | | - membershipType: "REGULAR" | "PREMIUM" | "STUDENT"; |
275 | | - address?: { |
276 | | - postalCode?: string; |
277 | | - street: string; |
278 | | - city: string; |
279 | | - country: string; |
280 | | - }; |
281 | | -} & { id: string }; |
282 | | -export type UserPatch = { |
283 | | - name?: string; |
284 | | - email?: string; |
285 | | - membershipType?: "REGULAR" | "PREMIUM" | "STUDENT"; |
286 | | - address?: { |
287 | | - postalCode?: string; |
288 | | - street: string; |
289 | | - city: string; |
290 | | - country: string; |
291 | | - }; |
292 | | -}; |
293 | | -export type UserList = { |
294 | | - id: string; |
295 | | - name: string; |
296 | | - email: string; |
297 | | - membershipType: "REGULAR" | "PREMIUM" | "STUDENT"; |
298 | | - registeredAt: string; |
299 | | - address?: { |
300 | | - postalCode?: string; |
301 | | - street: string; |
302 | | - city: string; |
303 | | - country: string; |
304 | | - }; |
305 | | -}[]; |
306 | | -export type UserPage = { |
307 | | - total: number; |
308 | | - page: number; |
309 | | - pageSize: number; |
310 | | - items: { |
311 | | - id: string; |
312 | | - name: string; |
313 | | - email: string; |
314 | | - membershipType: "REGULAR" | "PREMIUM" | "STUDENT"; |
315 | | - registeredAt: string; |
316 | | - address?: { |
317 | | - postalCode?: string; |
318 | | - street: string; |
319 | | - city: string; |
320 | | - country: string; |
321 | | - }; |
322 | | - }[]; |
323 | | -}; |
324 | | -export type Loan = { |
325 | | - loanId: string; |
326 | | - book: { isbn: string; title: string; author: string }; |
327 | | - borrowedAt: string; |
328 | | - dueAt: string; |
329 | | -}; |
330 | | -export type Book = { isbn: string; title: string; author: string }; |
331 | | -export type BulkJobStatus = { |
332 | | - jobId: string; |
333 | | - status: "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED"; |
334 | | - processed: number; |
335 | | - total: number; |
336 | | -}; |
337 | | -export type ClientSchema = { id?: string }; |
338 | | -export type schema_Something = { id?: string }; |
| 240 | +export type Error = components["schemas"]["Error"]; |
| 241 | +export type User = components["schemas"]["User"]; |
| 242 | +export type Address = components["schemas"]["Address"]; |
| 243 | +export type UserCreate = components["schemas"]["UserCreate"]; |
| 244 | +export type UserUpdate = components["schemas"]["UserUpdate"]; |
| 245 | +export type UserPatch = components["schemas"]["UserPatch"]; |
| 246 | +export type UserList = components["schemas"]["UserList"]; |
| 247 | +export type UserPage = components["schemas"]["UserPage"]; |
| 248 | +export type Loan = components["schemas"]["Loan"]; |
| 249 | +export type Book = components["schemas"]["Book"]; |
| 250 | +export type BulkJobStatus = components["schemas"]["BulkJobStatus"]; |
| 251 | +export type ClientSchema = components["schemas"]["Client"]; |
| 252 | +export type schema_Something = components["schemas"]["schema-Something"]; |
0 commit comments