Skip to content

Commit

Permalink
Merge pull request #155 from kitcc-org/151-orval-7.3.0
Browse files Browse the repository at this point in the history
Orval 7.3.0の変更に対応した
  • Loading branch information
kimurash authored Nov 23, 2024
2 parents cd65902 + 3aba25c commit 2348946
Show file tree
Hide file tree
Showing 44 changed files with 122 additions and 79 deletions.
2 changes: 1 addition & 1 deletion backend/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by orval v7.2.0 🍺
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* KITCC Library API
* OpenAPI spec version: 1.0.0
Expand Down
5 changes: 3 additions & 2 deletions frontend/app/components/books/BookListComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { Stack } from '@mantine/core';
import type { UseFormReturnType } from '@mantine/form';
import { SerializeFrom } from '@remix-run/cloudflare';
import { getBooksResponse } from 'client/client';
import type { GetBooksParams } from 'client/client.schemas';
import { PaginationProps } from '~/types/pagination';
import BookSearchComponent from '../book-search/BookSearchComponent';
import ErrorComponent from '../common/error/ErrorComponent';
import ContentsHeader from '../common/pagination/ContentsHeader';
import PaginationComponent from '../common/pagination/PaginationComponent';
import BookCards from './BookCards';
import { PaginationProps } from '~/types/paginatiion';

interface BookListComponentProps {
booksResponse: getBooksResponse;
booksResponse: SerializeFrom<getBooksResponse>;
form: UseFormReturnType<
GetBooksParams,
(values: GetBooksParams) => GetBooksParams
Expand Down
13 changes: 7 additions & 6 deletions frontend/app/components/global-books/GlobalBookListComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { Stack } from '@mantine/core';
import type { UseFormReturnType } from '@mantine/form';
import { SerializeFrom } from '@remix-run/cloudflare';
import type { searchBooksResponse } from 'client/client';
import type { SearchBooksParams } from 'client/client.schemas';
import React from 'react';
import NoQueryComponent from './NoQueryComponent';
import { Stack } from '@mantine/core';
import ContentsHeader from '../common/pagination/ContentsHeader';
import { PaginationProps } from '~/types/pagination';
import ErrorComponent from '../common/error/ErrorComponent';
import ContentsHeader from '../common/pagination/ContentsHeader';
import PaginationComponent from '../common/pagination/PaginationComponent';
import GlobalBookCards from './GlobalBookCards';
import GlobalBookSearchComponent from './GlobalBookSearchComponent';
import PaginationComponent from '../common/pagination/PaginationComponent';
import { PaginationProps } from '~/types/paginatiion';
import NoQueryComponent from './NoQueryComponent';

export interface HandleGlobalSearchFunctions {
handleDetailSubmit: (props: SearchBooksParams) => void;
handleKeywordSubmit: (props: SearchBooksParams) => void;
}

interface GlobalBookListComponentProps {
booksResponse?: searchBooksResponse;
booksResponse?: SerializeFrom<searchBooksResponse>;
form: UseFormReturnType<
SearchBooksParams,
(values: SearchBooksParams) => SearchBooksParams
Expand Down
7 changes: 4 additions & 3 deletions frontend/app/components/me/MyLoansListComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Stack } from '@mantine/core';
import { SerializeFrom } from '@remix-run/cloudflare';
import { getLoansResponse } from 'client/client';
import { PaginationProps } from '~/types/paginatiion';
import ContentsHeader from '../common/pagination/ContentsHeader';
import { PaginationProps } from '~/types/pagination';
import ErrorComponent from '../common/error/ErrorComponent';
import ContentsHeader from '../common/pagination/ContentsHeader';
import PaginationComponent from '../common/pagination/PaginationComponent';
import LoanCards from './LoanCards';

interface MyLoansListComponentProps {
loansResponse: getLoansResponse;
loansResponse: SerializeFrom<getLoansResponse>;
paginationProps: PaginationProps;
handleReturnButtonClick: () => void;
}
Expand Down
5 changes: 3 additions & 2 deletions frontend/app/components/me/MyPageComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Stack } from '@mantine/core';
import { SerializeFrom } from '@remix-run/cloudflare';
import { getLoansResponse } from 'client/client';
import { User } from 'client/client.schemas';
import { PaginationProps } from '~/types/paginatiion';
import { PaginationProps } from '~/types/pagination';
import MyLoansListComponent from './MyLoansListComponent';
import MyProfileDataComponent from './MyProfileComponent';

interface MyPageComponentProps {
user: User;
loansResponse: getLoansResponse;
loansResponse: SerializeFrom<getLoansResponse>;
paginationProps: PaginationProps;
handleReturnButtonClick: () => void;
}
Expand Down
13 changes: 7 additions & 6 deletions frontend/app/components/users/UsersListComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { Container, Stack } from '@mantine/core';
import UsersListTitle from './UsersListTitle';
import { SerializeFrom } from '@remix-run/cloudflare';
import { getUsersResponse } from 'client/client';
import type { PaginationProps } from '~/types/pagination';
import ErrorComponent from '../common/error/ErrorComponent';
import ContentsHeader from '../common/pagination/ContentsHeader';
import type { PaginationProps } from '~/types/paginatiion';
import PaginationComponent from '../common/pagination/PaginationComponent';
import ErrorComponent from '../common/error/ErrorComponent';
import { getUsersResponse } from 'client/client';
import UsersListTable from './UsersListTable';
import UserCreateButton from './UserCreateButton';
import UsersListTable from './UsersListTable';
import UsersListTitle from './UsersListTitle';

interface UsersListComponentProps {
paginationProps: PaginationProps;
usersResponse: getUsersResponse;
usersResponse: SerializeFrom<getUsersResponse>;
handleDeleteUserButtonClick: (id: number) => void;
}

Expand Down
10 changes: 7 additions & 3 deletions frontend/app/routes/home.users.create/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ const UserCreatePage = () => {
? null
: '有効でないメールアドレスです',
password: (value) => {
if (value.length < 8) return 'パスワードは8文字以上で入力してください';
else if (/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]+$/.test(value)) return null;
else return 'パスワードにはアルファベットと数字を含めてください';
if (value.length < 8) {
return 'パスワードは8文字以上で入力してください';
} else if (/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]+$/.test(value)) {
return null;
} else {
return 'パスワードにはアルファベットと数字を含めてください';
}
},
},
});
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/client/client.schemas.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by orval v7.2.0 🍺
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* KITCC Library API
* OpenAPI spec version: 1.0.0
Expand Down
19 changes: 18 additions & 1 deletion frontend/client/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by orval v7.2.0 🍺
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* KITCC Library API
* OpenAPI spec version: 1.0.0
Expand Down Expand Up @@ -63,6 +63,7 @@ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
export type getBooksResponse = {
data: GetBooks200;
status: number;
headers: Headers;
}

export const getGetBooksUrl = (params?: GetBooksParams,) => {
Expand Down Expand Up @@ -145,6 +146,7 @@ export function useGetBooks<TData = Awaited<ReturnType<typeof getBooks>>, TError
export type createBookResponse = {
data: Book;
status: number;
headers: Headers;
}

export const getCreateBookUrl = () => {
Expand Down Expand Up @@ -214,6 +216,7 @@ export const useCreateBook = <TError = BadRequestResponse | UnauthorizedResponse
export type deleteBooksResponse = {
data: void;
status: number;
headers: Headers;
}

export const getDeleteBooksUrl = () => {
Expand Down Expand Up @@ -283,6 +286,7 @@ export const useDeleteBooks = <TError = BadRequestResponse | UnauthorizedRespons
export type getBookResponse = {
data: Book;
status: number;
headers: Headers;
}

export const getGetBookUrl = (bookId: string,) => {
Expand Down Expand Up @@ -360,6 +364,7 @@ export function useGetBook<TData = Awaited<ReturnType<typeof getBook>>, TError =
export type updateBookResponse = {
data: Book;
status: number;
headers: Headers;
}

export const getUpdateBookUrl = (bookId: string,) => {
Expand Down Expand Up @@ -430,6 +435,7 @@ export const useUpdateBook = <TError = BadRequestResponse | UnauthorizedResponse
export type deleteBookResponse = {
data: void;
status: number;
headers: Headers;
}

export const getDeleteBookUrl = (bookId: string,) => {
Expand Down Expand Up @@ -498,6 +504,7 @@ export const useDeleteBook = <TError = BadRequestResponse | UnauthorizedResponse
export type searchBooksResponse = {
data: SearchBooks200;
status: number;
headers: Headers;
}

export const getSearchBooksUrl = (params?: SearchBooksParams,) => {
Expand Down Expand Up @@ -581,6 +588,7 @@ export function useSearchBooks<TData = Awaited<ReturnType<typeof searchBooks>>,
export type getUsersResponse = {
data: GetUsers200;
status: number;
headers: Headers;
}

export const getGetUsersUrl = (params?: GetUsersParams,) => {
Expand Down Expand Up @@ -663,6 +671,7 @@ export function useGetUsers<TData = Awaited<ReturnType<typeof getUsers>>, TError
export type createUserResponse = {
data: User;
status: number;
headers: Headers;
}

export const getCreateUserUrl = () => {
Expand Down Expand Up @@ -732,6 +741,7 @@ export const useCreateUser = <TError = BadRequestResponse | UnauthorizedResponse
export type deleteUsersResponse = {
data: void;
status: number;
headers: Headers;
}

export const getDeleteUsersUrl = () => {
Expand Down Expand Up @@ -801,6 +811,7 @@ export const useDeleteUsers = <TError = BadRequestResponse | UnauthorizedRespons
export type getUserResponse = {
data: User;
status: number;
headers: Headers;
}

export const getGetUserUrl = (userId: string,) => {
Expand Down Expand Up @@ -877,6 +888,7 @@ export function useGetUser<TData = Awaited<ReturnType<typeof getUser>>, TError =
export type updateUserResponse = {
data: User;
status: number;
headers: Headers;
}

export const getUpdateUserUrl = (userId: string,) => {
Expand Down Expand Up @@ -947,6 +959,7 @@ export const useUpdateUser = <TError = BadRequestResponse | UnauthorizedResponse
export type deleteUserResponse = {
data: DeleteUser204;
status: number;
headers: Headers;
}

export const getDeleteUserUrl = (userId: string,) => {
Expand Down Expand Up @@ -1016,6 +1029,7 @@ export const useDeleteUser = <TError = BadRequestResponse | Error | NotFoundResp
export type getLoansResponse = {
data: GetLoans200;
status: number;
headers: Headers;
}

export const getGetLoansUrl = (params?: GetLoansParams,) => {
Expand Down Expand Up @@ -1098,6 +1112,7 @@ export function useGetLoans<TData = Awaited<ReturnType<typeof getLoans>>, TError
export type upsertLoansResponse = {
data: Loan[];
status: number;
headers: Headers;
}

export const getUpsertLoansUrl = () => {
Expand Down Expand Up @@ -1168,6 +1183,7 @@ export const useUpsertLoans = <TError = BadRequestResponse | UnauthorizedRespons
export type loginResponse = {
data: User;
status: number;
headers: Headers;
}

export const getLoginUrl = () => {
Expand Down Expand Up @@ -1238,6 +1254,7 @@ export const useLogin = <TError = BadRequestResponse | UnauthorizedResponse | No
export type logoutResponse = {
data: void;
status: number;
headers: Headers;
}

export const getLogoutUrl = () => {
Expand Down
Loading

0 comments on commit 2348946

Please sign in to comment.