← full-stack-fastapi-template  /  frontend/src/client/schemas.gen.ts

1
// This file is auto-generated by @hey-api/openapi-ts
2
3
export const Body_login_login_access_tokenSchema = {
4
    properties: {
5
        grant_type: {
6
            anyOf: [
7
                {
8
                    type: 'string',
9
                    pattern: '^password$'
10
                },
11
                {
12
                    type: 'null'
13
                }
14
            ],
15
            title: 'Grant Type'
16
        },
17
        username: {
18
            type: 'string',
19
            title: 'Username'
20
        },
21
        password: {
22
            type: 'string',
23
            format: 'password',
24
            title: 'Password'
25
        },
26
        scope: {
27
            type: 'string',
28
            title: 'Scope',
29
            default: ''
30
        },
31
        client_id: {
32
            anyOf: [
33
                {
34
                    type: 'string'
35
                },
36
                {
37
                    type: 'null'
38
                }
39
            ],
40
            title: 'Client Id'
41
        },
42
        client_secret: {
43
            anyOf: [
44
                {
45
                    type: 'string'
46
                },
47
                {
48
                    type: 'null'
49
                }
50
            ],
51
            format: 'password',
52
            title: 'Client Secret'
53
        }
54
    },
55
    type: 'object',
56
    required: ['username', 'password'],
57
    title: 'Body_login-login_access_token'
58
} as const;
59
60
export const HTTPValidationErrorSchema = {
61
    properties: {
62
        detail: {
63
            items: {
64
                '$ref': '#/components/schemas/ValidationError'
65
            },
66
            type: 'array',
67
            title: 'Detail'
68
        }
69
    },
70
    type: 'object',
71
    title: 'HTTPValidationError'
72
} as const;
73
74
export const ItemCreateSchema = {
75
    properties: {
76
        title: {
77
            type: 'string',
78
            maxLength: 255,
79
            minLength: 1,
80
            title: 'Title'
81
        },
82
        description: {
83
            anyOf: [
84
                {
85
                    type: 'string',
86
                    maxLength: 255
87
                },
88
                {
89
                    type: 'null'
90
                }
91
            ],
92
            title: 'Description'
93
        }
94
    },
95
    type: 'object',
96
    required: ['title'],
97
    title: 'ItemCreate'
98
} as const;
99
100
export const ItemPublicSchema = {
101
    properties: {
102
        title: {
103
            type: 'string',
104
            maxLength: 255,
105
            minLength: 1,
106
            title: 'Title'
107
        },
108
        description: {
109
            anyOf: [
110
                {
111
                    type: 'string',
112
                    maxLength: 255
113
                },
114
                {
115
                    type: 'null'
116
                }
117
            ],
118
            title: 'Description'
119
        },
120
        id: {
121
            type: 'string',
122
            format: 'uuid',
123
            title: 'Id'
124
        },
125
        owner_id: {
126
            type: 'string',
127
            format: 'uuid',
128
            title: 'Owner Id'
129
        },
130
        created_at: {
131
            anyOf: [
132
                {
133
                    type: 'string',
134
                    format: 'date-time'
135
                },
136
                {
137
                    type: 'null'
138
                }
139
            ],
140
            title: 'Created At'
141
        }
142
    },
143
    type: 'object',
144
    required: ['title', 'id', 'owner_id'],
145
    title: 'ItemPublic'
146
} as const;
147
148
export const ItemUpdateSchema = {
149
    properties: {
150
        title: {
151
            anyOf: [
152
                {
153
                    type: 'string',
154
                    maxLength: 255,
155
                    minLength: 1
156
                },
157
                {
158
                    type: 'null'
159
                }
160
            ],
161
            title: 'Title'
162
        },
163
        description: {
164
            anyOf: [
165
                {
166
                    type: 'string',
167
                    maxLength: 255
168
                },
169
                {
170
                    type: 'null'
171
                }
172
            ],
173
            title: 'Description'
174
        }
175
    },
176
    type: 'object',
177
    title: 'ItemUpdate'
178
} as const;
179
180
export const ItemsPublicSchema = {
181
    properties: {
182
        data: {
183
            items: {
184
                '$ref': '#/components/schemas/ItemPublic'
185
            },
186
            type: 'array',
187
            title: 'Data'
188
        },
189
        count: {
190
            type: 'integer',
191
            title: 'Count'
192
        }
193
    },
194
    type: 'object',
195
    required: ['data', 'count'],
196
    title: 'ItemsPublic'
197
} as const;
198
199
export const MessageSchema = {
200
    properties: {
201
        message: {
202
            type: 'string',
203
            title: 'Message'
204
        }
205
    },
206
    type: 'object',
207
    required: ['message'],
208
    title: 'Message'
209
} as const;
210
211
export const NewPasswordSchema = {
212
    properties: {
213
        token: {
214
            type: 'string',
215
            title: 'Token'
216
        },
217
        new_password: {
218
            type: 'string',
219
            maxLength: 128,
220
            minLength: 8,
221
            title: 'New Password'
222
        }
223
    },
224
    type: 'object',
225
    required: ['token', 'new_password'],
226
    title: 'NewPassword'
227
} as const;
228
229
export const PrivateUserCreateSchema = {
230
    properties: {
231
        email: {
232
            type: 'string',
233
            title: 'Email'
234
        },
235
        password: {
236
            type: 'string',
237
            title: 'Password'
238
        },
239
        full_name: {
240
            type: 'string',
241
            title: 'Full Name'
242
        },
243
        is_verified: {
244
            type: 'boolean',
245
            title: 'Is Verified',
246
            default: false
247
        }
248
    },
249
    type: 'object',
250
    required: ['email', 'password', 'full_name'],
251
    title: 'PrivateUserCreate'
252
} as const;
253
254
export const TokenSchema = {
255
    properties: {
256
        access_token: {
257
            type: 'string',
258
            title: 'Access Token'
259
        },
260
        token_type: {
261
            type: 'string',
262
            title: 'Token Type',
263
            default: 'bearer'
264
        }
265
    },
266
    type: 'object',
267
    required: ['access_token'],
268
    title: 'Token'
269
} as const;
270
271
export const UpdatePasswordSchema = {
272
    properties: {
273
        current_password: {
274
            type: 'string',
275
            maxLength: 128,
276
            minLength: 8,
277
            title: 'Current Password'
278
        },
279
        new_password: {
280
            type: 'string',
281
            maxLength: 128,
282
            minLength: 8,
283
            title: 'New Password'
284
        }
285
    },
286
    type: 'object',
287
    required: ['current_password', 'new_password'],
288
    title: 'UpdatePassword'
289
} as const;
290
291
export const UserCreateSchema = {
292
    properties: {
293
        email: {
294
            type: 'string',
295
            maxLength: 255,
296
            format: 'email',
297
            title: 'Email'
298
        },
299
        is_active: {
300
            type: 'boolean',
301
            title: 'Is Active',
302
            default: true
303
        },
304
        is_superuser: {
305
            type: 'boolean',
306
            title: 'Is Superuser',
307
            default: false
308
        },
309
        full_name: {
310
            anyOf: [
311
                {
312
                    type: 'string',
313
                    maxLength: 255
314
                },
315
                {
316
                    type: 'null'
317
                }
318
            ],
319
            title: 'Full Name'
320
        },
321
        password: {
322
            type: 'string',
323
            maxLength: 128,
324
            minLength: 8,
325
            title: 'Password'
326
        }
327
    },
328
    type: 'object',
329
    required: ['email', 'password'],
330
    title: 'UserCreate'
331
} as const;
332
333
export const UserPublicSchema = {
334
    properties: {
335
        email: {
336
            type: 'string',
337
            maxLength: 255,
338
            format: 'email',
339
            title: 'Email'
340
        },
341
        is_active: {
342
            type: 'boolean',
343
            title: 'Is Active',
344
            default: true
345
        },
346
        is_superuser: {
347
            type: 'boolean',
348
            title: 'Is Superuser',
349
            default: false
350
        },
351
        full_name: {
352
            anyOf: [
353
                {
354
                    type: 'string',
355
                    maxLength: 255
356
                },
357
                {
358
                    type: 'null'
359
                }
360
            ],
361
            title: 'Full Name'
362
        },
363
        id: {
364
            type: 'string',
365
            format: 'uuid',
366
            title: 'Id'
367
        },
368
        created_at: {
369
            anyOf: [
370
                {
371
                    type: 'string',
372
                    format: 'date-time'
373
                },
374
                {
375
                    type: 'null'
376
                }
377
            ],
378
            title: 'Created At'
379
        }
380
    },
381
    type: 'object',
382
    required: ['email', 'id'],
383
    title: 'UserPublic'
384
} as const;
385
386
export const UserRegisterSchema = {
387
    properties: {
388
        email: {
389
            type: 'string',
390
            maxLength: 255,
391
            format: 'email',
392
            title: 'Email'
393
        },
394
        password: {
395
            type: 'string',
396
            maxLength: 128,
397
            minLength: 8,
398
            title: 'Password'
399
        },
400
        full_name: {
401
            anyOf: [
402
                {
403
                    type: 'string',
404
                    maxLength: 255
405
                },
406
                {
407
                    type: 'null'
408
                }
409
            ],
410
            title: 'Full Name'
411
        }
412
    },
413
    type: 'object',
414
    required: ['email', 'password'],
415
    title: 'UserRegister'
416
} as const;
417
418
export const UserUpdateSchema = {
419
    properties: {
420
        email: {
421
            anyOf: [
422
                {
423
                    type: 'string',
424
                    maxLength: 255,
425
                    format: 'email'
426
                },
427
                {
428
                    type: 'null'
429
                }
430
            ],
431
            title: 'Email'
432
        },
433
        is_active: {
434
            type: 'boolean',
435
            title: 'Is Active',
436
            default: true
437
        },
438
        is_superuser: {
439
            type: 'boolean',
440
            title: 'Is Superuser',
441
            default: false
442
        },
443
        full_name: {
444
            anyOf: [
445
                {
446
                    type: 'string',
447
                    maxLength: 255
448
                },
449
                {
450
                    type: 'null'
451
                }
452
            ],
453
            title: 'Full Name'
454
        },
455
        password: {
456
            anyOf: [
457
                {
458
                    type: 'string',
459
                    maxLength: 128,
460
                    minLength: 8
461
                },
462
                {
463
                    type: 'null'
464
                }
465
            ],
466
            title: 'Password'
467
        }
468
    },
469
    type: 'object',
470
    title: 'UserUpdate'
471
} as const;
472
473
export const UserUpdateMeSchema = {
474
    properties: {
475
        full_name: {
476
            anyOf: [
477
                {
478
                    type: 'string',
479
                    maxLength: 255
480
                },
481
                {
482
                    type: 'null'
483
                }
484
            ],
485
            title: 'Full Name'
486
        },
487
        email: {
488
            anyOf: [
489
                {
490
                    type: 'string',
491
                    maxLength: 255,
492
                    format: 'email'
493
                },
494
                {
495
                    type: 'null'
496
                }
497
            ],
498
            title: 'Email'
499
        }
500
    },
501
    type: 'object',
502
    title: 'UserUpdateMe'
503
} as const;
504
505
export const UsersPublicSchema = {
506
    properties: {
507
        data: {
508
            items: {
509
                '$ref': '#/components/schemas/UserPublic'
510
            },
511
            type: 'array',
512
            title: 'Data'
513
        },
514
        count: {
515
            type: 'integer',
516
            title: 'Count'
517
        }
518
    },
519
    type: 'object',
520
    required: ['data', 'count'],
521
    title: 'UsersPublic'
522
} as const;
523
524
export const ValidationErrorSchema = {
525
    properties: {
526
        loc: {
527
            items: {
528
                anyOf: [
529
                    {
530
                        type: 'string'
531
                    },
532
                    {
533
                        type: 'integer'
534
                    }
535
                ]
536
            },
537
            type: 'array',
538
            title: 'Location'
539
        },
540
        msg: {
541
            type: 'string',
542
            title: 'Message'
543
        },
544
        type: {
545
            type: 'string',
546
            title: 'Error Type'
547
        },
548
        input: {
549
            title: 'Input'
550
        },
551
        ctx: {
552
            type: 'object',
553
            title: 'Context'
554
        }
555
    },
556
    type: 'object',
557
    required: ['loc', 'msg', 'type'],
558
    title: 'ValidationError'
559
} as const;