diff --git a/src/new-frontend/src/client/index.ts b/src/new-frontend/src/client/index.ts index adc379d..fb94ef6 100644 --- a/src/new-frontend/src/client/index.ts +++ b/src/new-frontend/src/client/index.ts @@ -11,6 +11,7 @@ export type { Body_login_login_access_token } from './models/Body_login_login_ac export type { HTTPValidationError } from './models/HTTPValidationError'; export type { ItemCreate } from './models/ItemCreate'; export type { ItemOut } from './models/ItemOut'; +export type { ItemsOut } from './models/ItemsOut'; export type { ItemUpdate } from './models/ItemUpdate'; export type { Message } from './models/Message'; export type { NewPassword } from './models/NewPassword'; @@ -19,6 +20,7 @@ export type { UpdatePassword } from './models/UpdatePassword'; export type { UserCreate } from './models/UserCreate'; export type { UserCreateOpen } from './models/UserCreateOpen'; export type { UserOut } from './models/UserOut'; +export type { UsersOut } from './models/UsersOut'; export type { UserUpdate } from './models/UserUpdate'; export type { UserUpdateMe } from './models/UserUpdateMe'; export type { ValidationError } from './models/ValidationError'; @@ -27,6 +29,7 @@ export { $Body_login_login_access_token } from './schemas/$Body_login_login_acce export { $HTTPValidationError } from './schemas/$HTTPValidationError'; export { $ItemCreate } from './schemas/$ItemCreate'; export { $ItemOut } from './schemas/$ItemOut'; +export { $ItemsOut } from './schemas/$ItemsOut'; export { $ItemUpdate } from './schemas/$ItemUpdate'; export { $Message } from './schemas/$Message'; export { $NewPassword } from './schemas/$NewPassword'; @@ -35,6 +38,7 @@ export { $UpdatePassword } from './schemas/$UpdatePassword'; export { $UserCreate } from './schemas/$UserCreate'; export { $UserCreateOpen } from './schemas/$UserCreateOpen'; export { $UserOut } from './schemas/$UserOut'; +export { $UsersOut } from './schemas/$UsersOut'; export { $UserUpdate } from './schemas/$UserUpdate'; export { $UserUpdateMe } from './schemas/$UserUpdateMe'; export { $ValidationError } from './schemas/$ValidationError'; diff --git a/src/new-frontend/src/client/models/Body_login_login_access_token.ts b/src/new-frontend/src/client/models/Body_login_login_access_token.ts index bc8efd0..7798e61 100644 --- a/src/new-frontend/src/client/models/Body_login_login_access_token.ts +++ b/src/new-frontend/src/client/models/Body_login_login_access_token.ts @@ -4,10 +4,10 @@ /* eslint-disable */ export type Body_login_login_access_token = { - grant_type?: string; + grant_type?: (string | null); username: string; password: string; scope?: string; - client_id?: string; - client_secret?: string; + client_id?: (string | null); + client_secret?: (string | null); }; diff --git a/src/new-frontend/src/client/models/ItemCreate.ts b/src/new-frontend/src/client/models/ItemCreate.ts index fbe7c16..aeefb6d 100644 --- a/src/new-frontend/src/client/models/ItemCreate.ts +++ b/src/new-frontend/src/client/models/ItemCreate.ts @@ -5,5 +5,5 @@ export type ItemCreate = { title: string; - description?: string; + description?: (string | null); }; diff --git a/src/new-frontend/src/client/models/ItemOut.ts b/src/new-frontend/src/client/models/ItemOut.ts index 06787f5..cbe6c02 100644 --- a/src/new-frontend/src/client/models/ItemOut.ts +++ b/src/new-frontend/src/client/models/ItemOut.ts @@ -5,6 +5,7 @@ export type ItemOut = { title: string; - description?: string; + description?: (string | null); id: number; + owner_id: number; }; diff --git a/src/new-frontend/src/client/models/ItemUpdate.ts b/src/new-frontend/src/client/models/ItemUpdate.ts index ef82c3c..89ccb4e 100644 --- a/src/new-frontend/src/client/models/ItemUpdate.ts +++ b/src/new-frontend/src/client/models/ItemUpdate.ts @@ -4,6 +4,6 @@ /* eslint-disable */ export type ItemUpdate = { - title?: string; - description?: string; + title?: (string | null); + description?: (string | null); }; diff --git a/src/new-frontend/src/client/models/ItemsOut.ts b/src/new-frontend/src/client/models/ItemsOut.ts new file mode 100644 index 0000000..e45794b --- /dev/null +++ b/src/new-frontend/src/client/models/ItemsOut.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ItemOut } from './ItemOut'; + +export type ItemsOut = { + data: Array; + count: number; +}; diff --git a/src/new-frontend/src/client/models/UserCreate.ts b/src/new-frontend/src/client/models/UserCreate.ts index 9970feb..f49d0bf 100644 --- a/src/new-frontend/src/client/models/UserCreate.ts +++ b/src/new-frontend/src/client/models/UserCreate.ts @@ -7,6 +7,6 @@ export type UserCreate = { email: string; is_active?: boolean; is_superuser?: boolean; - full_name?: string; + full_name?: (string | null); password: string; }; diff --git a/src/new-frontend/src/client/models/UserCreateOpen.ts b/src/new-frontend/src/client/models/UserCreateOpen.ts index 27ca0f1..f859e9b 100644 --- a/src/new-frontend/src/client/models/UserCreateOpen.ts +++ b/src/new-frontend/src/client/models/UserCreateOpen.ts @@ -6,5 +6,5 @@ export type UserCreateOpen = { email: string; password: string; - full_name?: string; + full_name?: (string | null); }; diff --git a/src/new-frontend/src/client/models/UserOut.ts b/src/new-frontend/src/client/models/UserOut.ts index 9f2faf5..8387dc6 100644 --- a/src/new-frontend/src/client/models/UserOut.ts +++ b/src/new-frontend/src/client/models/UserOut.ts @@ -7,6 +7,6 @@ export type UserOut = { email: string; is_active?: boolean; is_superuser?: boolean; - full_name?: string; + full_name?: (string | null); id: number; }; diff --git a/src/new-frontend/src/client/models/UserUpdate.ts b/src/new-frontend/src/client/models/UserUpdate.ts index d64e3da..9ba346a 100644 --- a/src/new-frontend/src/client/models/UserUpdate.ts +++ b/src/new-frontend/src/client/models/UserUpdate.ts @@ -4,9 +4,9 @@ /* eslint-disable */ export type UserUpdate = { - email?: string; + email?: (string | null); is_active?: boolean; is_superuser?: boolean; - full_name?: string; - password?: string; + full_name?: (string | null); + password?: (string | null); }; diff --git a/src/new-frontend/src/client/models/UserUpdateMe.ts b/src/new-frontend/src/client/models/UserUpdateMe.ts index 84ee306..aa7a2fb 100644 --- a/src/new-frontend/src/client/models/UserUpdateMe.ts +++ b/src/new-frontend/src/client/models/UserUpdateMe.ts @@ -4,6 +4,6 @@ /* eslint-disable */ export type UserUpdateMe = { - full_name?: string; - email?: string; + full_name?: (string | null); + email?: (string | null); }; diff --git a/src/new-frontend/src/client/models/UsersOut.ts b/src/new-frontend/src/client/models/UsersOut.ts new file mode 100644 index 0000000..0e317ab --- /dev/null +++ b/src/new-frontend/src/client/models/UsersOut.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { UserOut } from './UserOut'; + +export type UsersOut = { + data: Array; + count: number; +}; diff --git a/src/new-frontend/src/client/schemas/$Body_login_login_access_token.ts b/src/new-frontend/src/client/schemas/$Body_login_login_access_token.ts index 81547d3..5d701cc 100644 --- a/src/new-frontend/src/client/schemas/$Body_login_login_access_token.ts +++ b/src/new-frontend/src/client/schemas/$Body_login_login_access_token.ts @@ -5,8 +5,13 @@ export const $Body_login_login_access_token = { properties: { grant_type: { + type: 'any-of', + contains: [{ type: 'string', pattern: 'password', +}, { + type: 'null', +}], }, username: { type: 'string', @@ -20,10 +25,20 @@ export const $Body_login_login_access_token = { type: 'string', }, client_id: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, client_secret: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$ItemCreate.ts b/src/new-frontend/src/client/schemas/$ItemCreate.ts index 1185124..70037ee 100644 --- a/src/new-frontend/src/client/schemas/$ItemCreate.ts +++ b/src/new-frontend/src/client/schemas/$ItemCreate.ts @@ -9,7 +9,12 @@ export const $ItemCreate = { isRequired: true, }, description: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$ItemOut.ts b/src/new-frontend/src/client/schemas/$ItemOut.ts index 6eac037..015a518 100644 --- a/src/new-frontend/src/client/schemas/$ItemOut.ts +++ b/src/new-frontend/src/client/schemas/$ItemOut.ts @@ -9,11 +9,20 @@ export const $ItemOut = { isRequired: true, }, description: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, id: { type: 'number', isRequired: true, +}, + owner_id: { + type: 'number', + isRequired: true, }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$ItemUpdate.ts b/src/new-frontend/src/client/schemas/$ItemUpdate.ts index 25250d7..bf76d61 100644 --- a/src/new-frontend/src/client/schemas/$ItemUpdate.ts +++ b/src/new-frontend/src/client/schemas/$ItemUpdate.ts @@ -5,10 +5,20 @@ export const $ItemUpdate = { properties: { title: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, description: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$ItemsOut.ts b/src/new-frontend/src/client/schemas/$ItemsOut.ts new file mode 100644 index 0000000..782b68d --- /dev/null +++ b/src/new-frontend/src/client/schemas/$ItemsOut.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ItemsOut = { + properties: { + data: { + type: 'array', + contains: { + type: 'ItemOut', + }, + isRequired: true, +}, + count: { + type: 'number', + isRequired: true, +}, + }, +} as const; diff --git a/src/new-frontend/src/client/schemas/$UserCreate.ts b/src/new-frontend/src/client/schemas/$UserCreate.ts index 2275432..84503be 100644 --- a/src/new-frontend/src/client/schemas/$UserCreate.ts +++ b/src/new-frontend/src/client/schemas/$UserCreate.ts @@ -7,7 +7,6 @@ export const $UserCreate = { email: { type: 'string', isRequired: true, - format: 'email', }, is_active: { type: 'boolean', @@ -16,7 +15,12 @@ export const $UserCreate = { type: 'boolean', }, full_name: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, password: { type: 'string', diff --git a/src/new-frontend/src/client/schemas/$UserCreateOpen.ts b/src/new-frontend/src/client/schemas/$UserCreateOpen.ts index 7aa75cd..ae2fff5 100644 --- a/src/new-frontend/src/client/schemas/$UserCreateOpen.ts +++ b/src/new-frontend/src/client/schemas/$UserCreateOpen.ts @@ -7,14 +7,18 @@ export const $UserCreateOpen = { email: { type: 'string', isRequired: true, - format: 'email', }, password: { type: 'string', isRequired: true, }, full_name: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$UserOut.ts b/src/new-frontend/src/client/schemas/$UserOut.ts index c920f09..8261402 100644 --- a/src/new-frontend/src/client/schemas/$UserOut.ts +++ b/src/new-frontend/src/client/schemas/$UserOut.ts @@ -7,7 +7,6 @@ export const $UserOut = { email: { type: 'string', isRequired: true, - format: 'email', }, is_active: { type: 'boolean', @@ -16,7 +15,12 @@ export const $UserOut = { type: 'boolean', }, full_name: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, id: { type: 'number', diff --git a/src/new-frontend/src/client/schemas/$UserUpdate.ts b/src/new-frontend/src/client/schemas/$UserUpdate.ts index f0f38ac..396e617 100644 --- a/src/new-frontend/src/client/schemas/$UserUpdate.ts +++ b/src/new-frontend/src/client/schemas/$UserUpdate.ts @@ -5,8 +5,12 @@ export const $UserUpdate = { properties: { email: { + type: 'any-of', + contains: [{ type: 'string', - format: 'email', +}, { + type: 'null', +}], }, is_active: { type: 'boolean', @@ -15,10 +19,20 @@ export const $UserUpdate = { type: 'boolean', }, full_name: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, password: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$UserUpdateMe.ts b/src/new-frontend/src/client/schemas/$UserUpdateMe.ts index 0aaf6ab..ed9c011 100644 --- a/src/new-frontend/src/client/schemas/$UserUpdateMe.ts +++ b/src/new-frontend/src/client/schemas/$UserUpdateMe.ts @@ -5,11 +5,20 @@ export const $UserUpdateMe = { properties: { full_name: { + type: 'any-of', + contains: [{ type: 'string', +}, { + type: 'null', +}], }, email: { + type: 'any-of', + contains: [{ type: 'string', - format: 'email', +}, { + type: 'null', +}], }, }, } as const; diff --git a/src/new-frontend/src/client/schemas/$UsersOut.ts b/src/new-frontend/src/client/schemas/$UsersOut.ts new file mode 100644 index 0000000..9c22868 --- /dev/null +++ b/src/new-frontend/src/client/schemas/$UsersOut.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $UsersOut = { + properties: { + data: { + type: 'array', + contains: { + type: 'UserOut', + }, + isRequired: true, +}, + count: { + type: 'number', + isRequired: true, +}, + }, +} as const; diff --git a/src/new-frontend/src/client/services/ItemsService.ts b/src/new-frontend/src/client/services/ItemsService.ts index 0f46422..b68a28a 100644 --- a/src/new-frontend/src/client/services/ItemsService.ts +++ b/src/new-frontend/src/client/services/ItemsService.ts @@ -4,6 +4,7 @@ /* eslint-disable */ import type { ItemCreate } from '../models/ItemCreate'; import type { ItemOut } from '../models/ItemOut'; +import type { ItemsOut } from '../models/ItemsOut'; import type { ItemUpdate } from '../models/ItemUpdate'; import type { Message } from '../models/Message'; @@ -16,7 +17,7 @@ export class ItemsService { /** * Read Items * Retrieve items. - * @returns ItemOut Successful Response + * @returns ItemsOut Successful Response * @throws ApiError */ public static readItems({ @@ -25,7 +26,7 @@ limit = 100, }: { skip?: number, limit?: number, -}): CancelablePromise> { +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/items/', diff --git a/src/new-frontend/src/client/services/UsersService.ts b/src/new-frontend/src/client/services/UsersService.ts index 16481fc..055debe 100644 --- a/src/new-frontend/src/client/services/UsersService.ts +++ b/src/new-frontend/src/client/services/UsersService.ts @@ -7,6 +7,7 @@ import type { UpdatePassword } from '../models/UpdatePassword'; import type { UserCreate } from '../models/UserCreate'; import type { UserCreateOpen } from '../models/UserCreateOpen'; import type { UserOut } from '../models/UserOut'; +import type { UsersOut } from '../models/UsersOut'; import type { UserUpdate } from '../models/UserUpdate'; import type { UserUpdateMe } from '../models/UserUpdateMe'; @@ -19,7 +20,7 @@ export class UsersService { /** * Read Users * Retrieve users. - * @returns UserOut Successful Response + * @returns UsersOut Successful Response * @throws ApiError */ public static readUsers({ @@ -28,7 +29,7 @@ limit = 100, }: { skip?: number, limit?: number, -}): CancelablePromise> { +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/users/', @@ -166,29 +167,6 @@ userId: number, }); } - /** - * Delete User - * Delete a user. - * @returns Message Successful Response - * @throws ApiError - */ - public static deleteUser({ -userId, -}: { -userId: number, -}): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v1/users/{user_id}', - path: { - 'user_id': userId, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** * Update User * Update a user. @@ -216,4 +194,27 @@ requestBody: UserUpdate, }); } + /** + * Delete User + * Delete a user. + * @returns Message Successful Response + * @throws ApiError + */ + public static deleteUser({ +userId, +}: { +userId: number, +}): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v1/users/{user_id}', + path: { + 'user_id': userId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + }