[chore] negodata/front: orval 생성 클라이언트 재생성 (카드 도메인 + 상품 카테고리·협력사 priority 파라미터)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
01e80281d1
commit
7c244bca27
551
negodata/front/src/api/generated/card/card.ts
Normal file
551
negodata/front/src/api/generated/card/card.ts
Normal file
@ -0,0 +1,551 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListCardsParams,
|
||||
ReqCreateCard,
|
||||
ReqUpdateCard,
|
||||
ResCard,
|
||||
ResCardList,
|
||||
ResDeleteCard,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator/custom-fetch";
|
||||
|
||||
/**
|
||||
* @summary 협상카드 목록
|
||||
*/
|
||||
export const listCards = (params?: ListCardsParams, signal?: AbortSignal) => {
|
||||
return customFetch<ResCardList>({
|
||||
url: `/v1/card/list`,
|
||||
method: "GET",
|
||||
params,
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getListCardsQueryKey = (params?: ListCardsParams) => {
|
||||
return [`/v1/card/list`, ...(params ? [params] : [])] as const;
|
||||
};
|
||||
|
||||
export const getListCardsQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listCards>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListCardsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListCardsQueryKey(params);
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listCards>>> = ({
|
||||
signal,
|
||||
}) => listCards(params, signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listCards>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListCardsQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof listCards>>
|
||||
>;
|
||||
export type ListCardsQueryError = void | HTTPValidationError;
|
||||
|
||||
export function useListCards<
|
||||
TData = Awaited<ReturnType<typeof listCards>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params: undefined | ListCardsParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listCards>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listCards>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListCards<
|
||||
TData = Awaited<ReturnType<typeof listCards>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListCardsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listCards>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listCards>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListCards<
|
||||
TData = Awaited<ReturnType<typeof listCards>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListCardsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 협상카드 목록
|
||||
*/
|
||||
|
||||
export function useListCards<
|
||||
TData = Awaited<ReturnType<typeof listCards>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListCardsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getListCardsQueryOptions(params, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 협상카드 등록
|
||||
*/
|
||||
export const createCard = (
|
||||
reqCreateCard: ReqCreateCard,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResCard>({
|
||||
url: `/v1/card/create`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqCreateCard,
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateCardMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createCard>>,
|
||||
TError,
|
||||
{ data: ReqCreateCard },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createCard>>,
|
||||
TError,
|
||||
{ data: ReqCreateCard },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["createCard"];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey } };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createCard>>,
|
||||
{ data: ReqCreateCard }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return createCard(data);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CreateCardMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof createCard>>
|
||||
>;
|
||||
export type CreateCardMutationBody = ReqCreateCard;
|
||||
export type CreateCardMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 협상카드 등록
|
||||
*/
|
||||
export const useCreateCard = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createCard>>,
|
||||
TError,
|
||||
{ data: ReqCreateCard },
|
||||
TContext
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createCard>>,
|
||||
TError,
|
||||
{ data: ReqCreateCard },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getCreateCardMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 협상카드 조회
|
||||
*/
|
||||
export const getCard = (cardId: string, signal?: AbortSignal) => {
|
||||
return customFetch<ResCard>({
|
||||
url: `/v1/card/${cardId}`,
|
||||
method: "GET",
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getGetCardQueryKey = (cardId?: string) => {
|
||||
return [`/v1/card/${cardId}`] as const;
|
||||
};
|
||||
|
||||
export const getGetCardQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getCard>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
cardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetCardQueryKey(cardId);
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getCard>>> = ({
|
||||
signal,
|
||||
}) => getCard(cardId, signal);
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!cardId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetCardQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getCard>>
|
||||
>;
|
||||
export type GetCardQueryError = void | HTTPValidationError;
|
||||
|
||||
export function useGetCard<
|
||||
TData = Awaited<ReturnType<typeof getCard>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
cardId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getCard>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getCard>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetCard<
|
||||
TData = Awaited<ReturnType<typeof getCard>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
cardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getCard>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getCard>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetCard<
|
||||
TData = Awaited<ReturnType<typeof getCard>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
cardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 협상카드 조회
|
||||
*/
|
||||
|
||||
export function useGetCard<
|
||||
TData = Awaited<ReturnType<typeof getCard>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
cardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetCardQueryOptions(cardId, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 협상카드 수정
|
||||
*/
|
||||
export const updateCard = (cardId: string, reqUpdateCard: ReqUpdateCard) => {
|
||||
return customFetch<ResCard>({
|
||||
url: `/v1/card/update/${cardId}`,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqUpdateCard,
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateCardMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateCard>>,
|
||||
TError,
|
||||
{ cardId: string; data: ReqUpdateCard },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateCard>>,
|
||||
TError,
|
||||
{ cardId: string; data: ReqUpdateCard },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["updateCard"];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey } };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateCard>>,
|
||||
{ cardId: string; data: ReqUpdateCard }
|
||||
> = (props) => {
|
||||
const { cardId, data } = props ?? {};
|
||||
|
||||
return updateCard(cardId, data);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UpdateCardMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof updateCard>>
|
||||
>;
|
||||
export type UpdateCardMutationBody = ReqUpdateCard;
|
||||
export type UpdateCardMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 협상카드 수정
|
||||
*/
|
||||
export const useUpdateCard = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateCard>>,
|
||||
TError,
|
||||
{ cardId: string; data: ReqUpdateCard },
|
||||
TContext
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateCard>>,
|
||||
TError,
|
||||
{ cardId: string; data: ReqUpdateCard },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getUpdateCardMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 협상카드 삭제
|
||||
*/
|
||||
export const deleteCard = (cardId: string) => {
|
||||
return customFetch<ResDeleteCard>({
|
||||
url: `/v1/card/delete/${cardId}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteCardMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteCard>>,
|
||||
TError,
|
||||
{ cardId: string },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteCard>>,
|
||||
TError,
|
||||
{ cardId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteCard"];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey } };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteCard>>,
|
||||
{ cardId: string }
|
||||
> = (props) => {
|
||||
const { cardId } = props ?? {};
|
||||
|
||||
return deleteCard(cardId);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteCardMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteCard>>
|
||||
>;
|
||||
|
||||
export type DeleteCardMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 협상카드 삭제
|
||||
*/
|
||||
export const useDeleteCard = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteCard>>,
|
||||
TError,
|
||||
{ cardId: string },
|
||||
TContext
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteCard>>,
|
||||
TError,
|
||||
{ cardId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getDeleteCardMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@ -24,11 +24,14 @@ import type {
|
||||
BodyUploadItemsExcelV1ItemUploadExcelPost,
|
||||
HTTPValidationError,
|
||||
ListItemsParams,
|
||||
ReqCheckCodes,
|
||||
ReqCreateItem,
|
||||
ReqUpdateItem,
|
||||
ResCheckCodes,
|
||||
ResDeleteItem,
|
||||
ResExcelUpload,
|
||||
ResItem,
|
||||
ResItemCategories,
|
||||
ResItemList,
|
||||
ResLowestPriceResult,
|
||||
ResLowestPriceTrigger,
|
||||
@ -171,6 +174,153 @@ export function useListItems<
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 상품 카테고리 목록(distinct)
|
||||
*/
|
||||
export const listItemCategories = (signal?: AbortSignal) => {
|
||||
return customFetch<ResItemCategories>({
|
||||
url: `/v1/item/categories`,
|
||||
method: "GET",
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getListItemCategoriesQueryKey = () => {
|
||||
return [`/v1/item/categories`] as const;
|
||||
};
|
||||
|
||||
export const getListItemCategoriesQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError = void,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
}) => {
|
||||
const { query: queryOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListItemCategoriesQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof listItemCategories>>
|
||||
> = ({ signal }) => listItemCategories(signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListItemCategoriesQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof listItemCategories>>
|
||||
>;
|
||||
export type ListItemCategoriesQueryError = void;
|
||||
|
||||
export function useListItemCategories<
|
||||
TData = Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError = void,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listItemCategories>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListItemCategories<
|
||||
TData = Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listItemCategories>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListItemCategories<
|
||||
TData = Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 상품 카테고리 목록(distinct)
|
||||
*/
|
||||
|
||||
export function useListItemCategories<
|
||||
TData = Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItemCategories>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getListItemCategoriesQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 상품 등록
|
||||
*/
|
||||
@ -256,6 +406,91 @@ export const useCreateItem = <
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 코드 중복 사전검사(업로드 즉시)
|
||||
*/
|
||||
export const checkItemCodes = (
|
||||
reqCheckCodes: ReqCheckCodes,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResCheckCodes>({
|
||||
url: `/v1/item/check-codes`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqCheckCodes,
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getCheckItemCodesMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["checkItemCodes"];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey } };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>,
|
||||
{ data: ReqCheckCodes }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return checkItemCodes(data);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CheckItemCodesMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>
|
||||
>;
|
||||
export type CheckItemCodesMutationBody = ReqCheckCodes;
|
||||
export type CheckItemCodesMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 코드 중복 사전검사(업로드 즉시)
|
||||
*/
|
||||
export const useCheckItemCodes = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof checkItemCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getCheckItemCodesMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 엑셀 일괄 등록(스텁)
|
||||
*/
|
||||
|
||||
30
negodata/front/src/api/generated/model/cardData.ts
Normal file
30
negodata/front/src/api/generated/model/cardData.ts
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { CardDataUserId } from "./cardDataUserId";
|
||||
import type { CardDataName } from "./cardDataName";
|
||||
import type { CardDataNumber } from "./cardDataNumber";
|
||||
import type { CardDataScript } from "./cardDataScript";
|
||||
import type { CardDataEditScript } from "./cardDataEditScript";
|
||||
import type { CardDataCondition } from "./cardDataCondition";
|
||||
import type { CardDataMemo } from "./cardDataMemo";
|
||||
import type { CardDataCreatedAt } from "./cardDataCreatedAt";
|
||||
import type { CardDataUpdatedAt } from "./cardDataUpdatedAt";
|
||||
|
||||
export interface CardData {
|
||||
nego_card_id: string;
|
||||
user_id?: CardDataUserId;
|
||||
is_wildcard?: boolean;
|
||||
name?: CardDataName;
|
||||
number?: CardDataNumber;
|
||||
script?: CardDataScript;
|
||||
edit_script?: CardDataEditScript;
|
||||
status?: number;
|
||||
condition?: CardDataCondition;
|
||||
memo?: CardDataMemo;
|
||||
created_at?: CardDataCreatedAt;
|
||||
updated_at?: CardDataUpdatedAt;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataCondition = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataCreatedAt = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataEditScript = unknown | null;
|
||||
8
negodata/front/src/api/generated/model/cardDataMemo.ts
Normal file
8
negodata/front/src/api/generated/model/cardDataMemo.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataMemo = string | null;
|
||||
8
negodata/front/src/api/generated/model/cardDataName.ts
Normal file
8
negodata/front/src/api/generated/model/cardDataName.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataName = string | null;
|
||||
8
negodata/front/src/api/generated/model/cardDataNumber.ts
Normal file
8
negodata/front/src/api/generated/model/cardDataNumber.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataNumber = string | null;
|
||||
8
negodata/front/src/api/generated/model/cardDataScript.ts
Normal file
8
negodata/front/src/api/generated/model/cardDataScript.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataScript = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataUpdatedAt = string | null;
|
||||
8
negodata/front/src/api/generated/model/cardDataUserId.ts
Normal file
8
negodata/front/src/api/generated/model/cardDataUserId.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataUserId = string | null;
|
||||
@ -8,6 +8,16 @@
|
||||
export * from "./asyncJob";
|
||||
export * from "./bodyUploadItemsExcelV1ItemUploadExcelPost";
|
||||
export * from "./bodyUploadSuppliersExcelV1SupplierUploadExcelPost";
|
||||
export * from "./cardData";
|
||||
export * from "./cardDataCondition";
|
||||
export * from "./cardDataCreatedAt";
|
||||
export * from "./cardDataEditScript";
|
||||
export * from "./cardDataMemo";
|
||||
export * from "./cardDataName";
|
||||
export * from "./cardDataNumber";
|
||||
export * from "./cardDataScript";
|
||||
export * from "./cardDataUpdatedAt";
|
||||
export * from "./cardDataUserId";
|
||||
export * from "./chatMessageData";
|
||||
export * from "./chatMessageDataCardId";
|
||||
export * from "./chatMessageDataCardType";
|
||||
@ -20,6 +30,7 @@ export * from "./errorInfoCode";
|
||||
export * from "./errorInfoDesc";
|
||||
export * from "./errorInfoSuccess";
|
||||
export * from "./hTTPValidationError";
|
||||
export * from "./itemCategory";
|
||||
export * from "./itemData";
|
||||
export * from "./itemDataCategory";
|
||||
export * from "./itemDataCode";
|
||||
@ -37,6 +48,7 @@ export * from "./itemDataQuantityUnit";
|
||||
export * from "./itemDataSpec";
|
||||
export * from "./itemDataUpdatedAt";
|
||||
export * from "./itemDataVatYn";
|
||||
export * from "./listCardsParams";
|
||||
export * from "./listItemsParams";
|
||||
export * from "./listQuotationsParams";
|
||||
export * from "./listSuppliersParams";
|
||||
@ -63,7 +75,15 @@ export * from "./quotationSettingData";
|
||||
export * from "./quotationSettingDataCreatedAt";
|
||||
export * from "./quotationSettingDataUpdatedAt";
|
||||
export * from "./quotationSettingDataUserId";
|
||||
export * from "./reqCheckCodes";
|
||||
export * from "./reqCreateAccount";
|
||||
export * from "./reqCreateCard";
|
||||
export * from "./reqCreateCardCondition";
|
||||
export * from "./reqCreateCardEditScript";
|
||||
export * from "./reqCreateCardMemo";
|
||||
export * from "./reqCreateCardName";
|
||||
export * from "./reqCreateCardNumber";
|
||||
export * from "./reqCreateCardScript";
|
||||
export * from "./reqCreateItem";
|
||||
export * from "./reqCreateItemCategory";
|
||||
export * from "./reqCreateItemCode";
|
||||
@ -92,6 +112,14 @@ export * from "./reqCreateSupplierManagerEmail";
|
||||
export * from "./reqCreateSupplierManagerName";
|
||||
export * from "./reqCreateSupplierPriority";
|
||||
export * from "./reqLogin";
|
||||
export * from "./reqUpdateCard";
|
||||
export * from "./reqUpdateCardCondition";
|
||||
export * from "./reqUpdateCardEditScript";
|
||||
export * from "./reqUpdateCardMemo";
|
||||
export * from "./reqUpdateCardName";
|
||||
export * from "./reqUpdateCardNumber";
|
||||
export * from "./reqUpdateCardScript";
|
||||
export * from "./reqUpdateCardStatus";
|
||||
export * from "./reqUpdateItem";
|
||||
export * from "./reqUpdateItemCategory";
|
||||
export * from "./reqUpdateItemCategoryType";
|
||||
@ -121,12 +149,21 @@ export * from "./reqUpdateSupplierManagerEmail";
|
||||
export * from "./reqUpdateSupplierManagerName";
|
||||
export * from "./reqUpdateSupplierName";
|
||||
export * from "./reqUpdateSupplierPriority";
|
||||
export * from "./resCard";
|
||||
export * from "./resCardCard";
|
||||
export * from "./resCardList";
|
||||
export * from "./resCardListMsg";
|
||||
export * from "./resCardMsg";
|
||||
export * from "./resCheckCodes";
|
||||
export * from "./resCheckCodesMsg";
|
||||
export * from "./resCreateAccount";
|
||||
export * from "./resCreateAccountMsg";
|
||||
export * from "./resCreateQuotation";
|
||||
export * from "./resCreateQuotationAsyncJob";
|
||||
export * from "./resCreateQuotationMsg";
|
||||
export * from "./resCreateQuotationQuotation";
|
||||
export * from "./resDeleteCard";
|
||||
export * from "./resDeleteCardMsg";
|
||||
export * from "./resDeleteItem";
|
||||
export * from "./resDeleteItemMsg";
|
||||
export * from "./resDeleteQuotation";
|
||||
@ -142,6 +179,8 @@ export * from "./resExcelUpload";
|
||||
export * from "./resExcelUploadMsg";
|
||||
export * from "./resExcelUploadReceivedFilename";
|
||||
export * from "./resItem";
|
||||
export * from "./resItemCategories";
|
||||
export * from "./resItemCategoriesMsg";
|
||||
export * from "./resItemItem";
|
||||
export * from "./resItemList";
|
||||
export * from "./resItemListMsg";
|
||||
|
||||
11
negodata/front/src/api/generated/model/itemCategory.ts
Normal file
11
negodata/front/src/api/generated/model/itemCategory.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ItemCategory {
|
||||
name: string;
|
||||
category_type?: number;
|
||||
}
|
||||
22
negodata/front/src/api/generated/model/listCardsParams.ts
Normal file
22
negodata/front/src/api/generated/model/listCardsParams.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListCardsParams = {
|
||||
/**
|
||||
* 카드명/카드번호/스크립트 검색
|
||||
*/
|
||||
search?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
@ -10,6 +10,10 @@ export type ListSuppliersParams = {
|
||||
* 협력사명/코드/담당자명 검색
|
||||
*/
|
||||
search?: string | null;
|
||||
/**
|
||||
* 우선순위 필터(HIGH/MEDIUM/LOW)
|
||||
*/
|
||||
priority?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
|
||||
10
negodata/front/src/api/generated/model/reqCheckCodes.ts
Normal file
10
negodata/front/src/api/generated/model/reqCheckCodes.ts
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ReqCheckCodes {
|
||||
codes?: string[];
|
||||
}
|
||||
23
negodata/front/src/api/generated/model/reqCreateCard.ts
Normal file
23
negodata/front/src/api/generated/model/reqCreateCard.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ReqCreateCardName } from "./reqCreateCardName";
|
||||
import type { ReqCreateCardNumber } from "./reqCreateCardNumber";
|
||||
import type { ReqCreateCardScript } from "./reqCreateCardScript";
|
||||
import type { ReqCreateCardEditScript } from "./reqCreateCardEditScript";
|
||||
import type { ReqCreateCardCondition } from "./reqCreateCardCondition";
|
||||
import type { ReqCreateCardMemo } from "./reqCreateCardMemo";
|
||||
|
||||
export interface ReqCreateCard {
|
||||
is_wildcard?: boolean;
|
||||
name?: ReqCreateCardName;
|
||||
number?: ReqCreateCardNumber;
|
||||
script?: ReqCreateCardScript;
|
||||
edit_script?: ReqCreateCardEditScript;
|
||||
status?: number;
|
||||
condition?: ReqCreateCardCondition;
|
||||
memo?: ReqCreateCardMemo;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardCondition = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardEditScript = unknown | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardMemo = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardName = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardNumber = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqCreateCardScript = string | null;
|
||||
23
negodata/front/src/api/generated/model/reqUpdateCard.ts
Normal file
23
negodata/front/src/api/generated/model/reqUpdateCard.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ReqUpdateCardName } from "./reqUpdateCardName";
|
||||
import type { ReqUpdateCardNumber } from "./reqUpdateCardNumber";
|
||||
import type { ReqUpdateCardScript } from "./reqUpdateCardScript";
|
||||
import type { ReqUpdateCardEditScript } from "./reqUpdateCardEditScript";
|
||||
import type { ReqUpdateCardStatus } from "./reqUpdateCardStatus";
|
||||
import type { ReqUpdateCardCondition } from "./reqUpdateCardCondition";
|
||||
import type { ReqUpdateCardMemo } from "./reqUpdateCardMemo";
|
||||
|
||||
export interface ReqUpdateCard {
|
||||
name?: ReqUpdateCardName;
|
||||
number?: ReqUpdateCardNumber;
|
||||
script?: ReqUpdateCardScript;
|
||||
edit_script?: ReqUpdateCardEditScript;
|
||||
status?: ReqUpdateCardStatus;
|
||||
condition?: ReqUpdateCardCondition;
|
||||
memo?: ReqUpdateCardMemo;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardCondition = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardEditScript = unknown | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardMemo = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardName = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardNumber = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardScript = string | null;
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReqUpdateCardStatus = number | null;
|
||||
15
negodata/front/src/api/generated/model/resCard.ts
Normal file
15
negodata/front/src/api/generated/model/resCard.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfo } from "./errorInfo";
|
||||
import type { ResCardMsg } from "./resCardMsg";
|
||||
import type { ResCardCard } from "./resCardCard";
|
||||
|
||||
export interface ResCard {
|
||||
result?: ErrorInfo;
|
||||
msg?: ResCardMsg;
|
||||
card?: ResCardCard;
|
||||
}
|
||||
9
negodata/front/src/api/generated/model/resCardCard.ts
Normal file
9
negodata/front/src/api/generated/model/resCardCard.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { CardData } from "./cardData";
|
||||
|
||||
export type ResCardCard = CardData | null;
|
||||
18
negodata/front/src/api/generated/model/resCardList.ts
Normal file
18
negodata/front/src/api/generated/model/resCardList.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfo } from "./errorInfo";
|
||||
import type { ResCardListMsg } from "./resCardListMsg";
|
||||
import type { CardData } from "./cardData";
|
||||
|
||||
export interface ResCardList {
|
||||
result?: ErrorInfo;
|
||||
msg?: ResCardListMsg;
|
||||
cards?: CardData[];
|
||||
total?: number;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
8
negodata/front/src/api/generated/model/resCardListMsg.ts
Normal file
8
negodata/front/src/api/generated/model/resCardListMsg.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ResCardListMsg = string | null;
|
||||
8
negodata/front/src/api/generated/model/resCardMsg.ts
Normal file
8
negodata/front/src/api/generated/model/resCardMsg.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ResCardMsg = string | null;
|
||||
14
negodata/front/src/api/generated/model/resCheckCodes.ts
Normal file
14
negodata/front/src/api/generated/model/resCheckCodes.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfo } from "./errorInfo";
|
||||
import type { ResCheckCodesMsg } from "./resCheckCodesMsg";
|
||||
|
||||
export interface ResCheckCodes {
|
||||
result?: ErrorInfo;
|
||||
msg?: ResCheckCodesMsg;
|
||||
existing?: string[];
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ResCheckCodesMsg = string | null;
|
||||
13
negodata/front/src/api/generated/model/resDeleteCard.ts
Normal file
13
negodata/front/src/api/generated/model/resDeleteCard.ts
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfo } from "./errorInfo";
|
||||
import type { ResDeleteCardMsg } from "./resDeleteCardMsg";
|
||||
|
||||
export interface ResDeleteCard {
|
||||
result?: ErrorInfo;
|
||||
msg?: ResDeleteCardMsg;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ResDeleteCardMsg = string | null;
|
||||
15
negodata/front/src/api/generated/model/resItemCategories.ts
Normal file
15
negodata/front/src/api/generated/model/resItemCategories.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfo } from "./errorInfo";
|
||||
import type { ResItemCategoriesMsg } from "./resItemCategoriesMsg";
|
||||
import type { ItemCategory } from "./itemCategory";
|
||||
|
||||
export interface ResItemCategories {
|
||||
result?: ErrorInfo;
|
||||
msg?: ResItemCategoriesMsg;
|
||||
categories?: ItemCategory[];
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ResItemCategoriesMsg = string | null;
|
||||
@ -20,5 +20,6 @@ export interface ResMe {
|
||||
email?: ResMeEmail;
|
||||
contact_number?: ResMeContactNumber;
|
||||
role?: number;
|
||||
role_label?: string;
|
||||
company?: ResMeCompany;
|
||||
}
|
||||
|
||||
@ -24,8 +24,10 @@ import type {
|
||||
BodyUploadSuppliersExcelV1SupplierUploadExcelPost,
|
||||
HTTPValidationError,
|
||||
ListSuppliersParams,
|
||||
ReqCheckCodes,
|
||||
ReqCreateSupplier,
|
||||
ReqUpdateSupplier,
|
||||
ResCheckCodes,
|
||||
ResDeleteSupplier,
|
||||
ResExcelUpload,
|
||||
ResSupplier,
|
||||
@ -257,6 +259,91 @@ export const useCreateSupplier = <
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 코드 중복 사전검사(업로드 즉시)
|
||||
*/
|
||||
export const checkSupplierCodes = (
|
||||
reqCheckCodes: ReqCheckCodes,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResCheckCodes>({
|
||||
url: `/v1/supplier/check-codes`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqCheckCodes,
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getCheckSupplierCodesMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["checkSupplierCodes"];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey } };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>,
|
||||
{ data: ReqCheckCodes }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return checkSupplierCodes(data);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CheckSupplierCodesMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>
|
||||
>;
|
||||
export type CheckSupplierCodesMutationBody = ReqCheckCodes;
|
||||
export type CheckSupplierCodesMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 코드 중복 사전검사(업로드 즉시)
|
||||
*/
|
||||
export const useCheckSupplierCodes = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof checkSupplierCodes>>,
|
||||
TError,
|
||||
{ data: ReqCheckCodes },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getCheckSupplierCodesMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 협력사 엑셀 일괄 등록(스텁)
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user