refactor: renamed built_in_modules into modules

This commit is contained in:
2025-10-21 12:34:42 +04:00
parent 4d5723bc72
commit 57a7ab0871
12 changed files with 202 additions and 208 deletions

View File

@ -51,7 +51,6 @@ import {
getBarcodeTemplateSizes,
getBaseMarketplaces,
getBoards,
getBuiltInModules,
getClients,
getDealProducts,
getDeals,
@ -59,6 +58,7 @@ import {
getDealTagColors,
getDealTags,
getMarketplaces,
getModules,
getProductBarcodePdf,
getProducts,
getProjects,
@ -203,7 +203,6 @@ import type {
GetBarcodeTemplateSizesData,
GetBaseMarketplacesData,
GetBoardsData,
GetBuiltInModulesData,
GetClientsData,
GetDealProductsData,
GetDealsData,
@ -214,6 +213,7 @@ import type {
GetDealTagColorsResponse,
GetDealTagsData,
GetMarketplacesData,
GetModulesData,
GetProductBarcodePdfData,
GetProductBarcodePdfError,
GetProductBarcodePdfResponse2,
@ -1033,19 +1033,16 @@ export const getDealTagColorsMutation = (
return mutationOptions;
};
export const getBuiltInModulesQueryKey = (
options?: Options<GetBuiltInModulesData>
) => createQueryKey("getBuiltInModules", options);
export const getModulesQueryKey = (options?: Options<GetModulesData>) =>
createQueryKey("getModules", options);
/**
* Get Built In Modules
* Get Modules
*/
export const getBuiltInModulesOptions = (
options?: Options<GetBuiltInModulesData>
) => {
export const getModulesOptions = (options?: Options<GetModulesData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await getBuiltInModules({
const { data } = await getModules({
...options,
...queryKey[0],
signal,
@ -1053,7 +1050,7 @@ export const getBuiltInModulesOptions = (
});
return data;
},
queryKey: getBuiltInModulesQueryKey(options),
queryKey: getModulesQueryKey(options),
});
};