@omniumretail/shared-resources 0.0.84 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +365 -310
- package/dist/types/hooks/{useAnalyticsEvaluationCyclesQuery.hook.d.ts → Analytics/get/useAnalyticsEvaluationCyclesQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnalyticsQuestionsQuery.hook.d.ts → Analytics/get/useAnalyticsQuestionsQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnalyticsSideBarQuery.hook.d.ts → Analytics/get/useAnalyticsSideBarQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnalyticsUserIdQuery.hook.d.ts → Analytics/get/useAnalyticsUserIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnalyticsUserQuery.hook.d.ts → Analytics/get/useAnalyticsUserQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnswerIdQuery.hook.d.ts → Answer/get/useAnswerIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnswersUserSupervisorQuery.hook.d.ts → Answer/get/useAnswersUserSupervisorQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAnswerMutateQuery.hook.d.ts → Answer/mutate/useAnswerMutateQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/AsvProduct/get/getProductsByRefQuery.hook.d.ts +6 -0
- package/dist/types/hooks/AsvProduct/get/getProductsByStoreQuery.hook.d.ts +7 -0
- package/dist/types/hooks/{useEvaluationCycleIdQuery.hook.d.ts → EvaluationCycle/get/useEvaluationCycleIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useEvaluationCycleQuery.hook.d.ts → EvaluationCycle/get/useEvaluationCycleQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useEvaluationCycleMutateQuery.hook.d.ts → EvaluationCycle/mutate/useEvaluationCycleMutateQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{activateEvaluationCycleQuery.hook.d.ts → EvaluationCycle/others/activateEvaluationCycleQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{cancelEvaluationCycleQuery.hook.d.ts → EvaluationCycle/others/cancelEvaluationCycleQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{deleteEvaluationCycleQuery.hook.d.ts → EvaluationCycle/others/deleteEvaluationCycleQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{finishEvaluationCycleQuery.hook.d.ts → EvaluationCycle/others/finishEvaluationCycleQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useApplicationDataQuery.hook.d.ts → Others/useApplicationDataQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useContractStatesQuery.hook.d.ts → Others/useContractStatesQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useCountriesQuery.hook.d.ts → Others/useCountriesQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useCustomersQuery.hook.d.ts → Others/useCustomersQuery.hook.d.ts} +5 -1
- package/dist/types/hooks/{useJobTitlesQuery.hook.d.ts → Others/useJobTitlesQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useTermNotificationQuery.hook.d.ts → Others/useTermNotificationQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useProductHierarchies.hook.d.ts → Product/get/useProductHierarchies.hook.d.ts} +1 -1
- package/dist/types/hooks/{useProductsQuery.hook.d.ts → Product/get/useProductsQuery.hook.d.ts} +5 -1
- package/dist/types/hooks/{useQuestionnaireIdQuery.hook.d.ts → Questionnaire/get/useQuestionnaireIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useQuestionnaireQuery.hook.d.ts → Questionnaire/get/useQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useQuestionnaireMutateQuery.hook.d.ts → Questionnaire/mutate/useQuestionnaireMutateQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{activateQuestionnaireQuery.hook.d.ts → Questionnaire/others/activateQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{cancelQuestionnaireQuery.hook.d.ts → Questionnaire/others/cancelQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{deleteQuestionnaireQuery.hook.d.ts → Questionnaire/others/deleteQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{duplicateQuestionnaireQuery.hook.d.ts → Questionnaire/others/duplicateQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{finishQuestionnaireQuery.hook.d.ts → Questionnaire/others/finishQuestionnaireQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAllRolesQuery.hook.d.ts → Roles/get/useAllRolesQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useAllStoreQuery.hook.d.ts → Roles/get/useAllStoreQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useStoreQuery.d.ts → Store/useStoreQuery.d.ts} +1 -1
- package/dist/types/hooks/{useExpUsersAnswersQuery.hook.d.ts → Users/get/useExpUsersAnswersQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useSingleUserIdQuery.hook.d.ts → Users/get/useSingleUserIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUserIdQuery.hook.d.ts → Users/get/useUserIdQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUserListQuery.hook.d.ts → Users/get/useUserListQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUserQuery.hook.d.ts → Users/get/useUserQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useSingleUserIdMutateQuery.hook.d.ts → Users/mutate/useSingleUserIdMutateQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUpdateSupervisorMutateQuery.hook.d.ts → Users/mutate/useUpdateSupervisorMutateQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useSingleUserResetPassword.hook.d.ts → Users/others/useSingleUserResetPassword.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUserBlockQuery.hook.d.ts → Users/others/useUserBlockQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/{useUserEmailVerifQuery.hook.d.ts → Users/others/useUserEmailVerifQuery.hook.d.ts} +1 -1
- package/dist/types/hooks/index.d.ts +46 -44
- package/dist/types/interfaces/AsvProductsByReference.d.ts +12 -0
- package/dist/types/interfaces/AsvProductsByStore.d.ts +11 -0
- package/dist/types/interfaces/index.d.ts +2 -0
- package/package.json +2 -2
- package/src/contexts/useStore.tsx +1 -1
- package/src/hooks/{useAnalyticsEvaluationCyclesQuery.hook.ts → Analytics/get/useAnalyticsEvaluationCyclesQuery.hook.ts} +2 -2
- package/src/hooks/{useAnalyticsQuestionsQuery.hook.ts → Analytics/get/useAnalyticsQuestionsQuery.hook.ts} +2 -2
- package/src/hooks/{useAnalyticsSideBarQuery.hook.ts → Analytics/get/useAnalyticsSideBarQuery.hook.ts} +2 -2
- package/src/hooks/{useAnalyticsUserIdQuery.hook.ts → Analytics/get/useAnalyticsUserIdQuery.hook.ts} +2 -2
- package/src/hooks/{useAnalyticsUserQuery.hook.ts → Analytics/get/useAnalyticsUserQuery.hook.ts} +2 -2
- package/src/hooks/{useAnswerIdQuery.hook.ts → Answer/get/useAnswerIdQuery.hook.ts} +2 -2
- package/src/hooks/{useAnswersUserSupervisorQuery.hook.tsx → Answer/get/useAnswersUserSupervisorQuery.hook.tsx} +2 -2
- package/src/hooks/{useAnswerMutateQuery.hook.ts → Answer/mutate/useAnswerMutateQuery.hook.ts} +2 -2
- package/src/hooks/AsvProduct/get/getProductsByRefQuery.hook.ts +19 -0
- package/src/hooks/AsvProduct/get/getProductsByStoreQuery.hook.ts +21 -0
- package/src/hooks/{useEvaluationCycleIdQuery.hook.ts → EvaluationCycle/get/useEvaluationCycleIdQuery.hook.ts} +2 -2
- package/src/hooks/{useEvaluationCycleQuery.hook.ts → EvaluationCycle/get/useEvaluationCycleQuery.hook.ts} +2 -2
- package/src/hooks/{useEvaluationCycleMutateQuery.hook.ts → EvaluationCycle/mutate/useEvaluationCycleMutateQuery.hook.ts} +2 -2
- package/src/hooks/{activateEvaluationCycleQuery.hook.ts → EvaluationCycle/others/activateEvaluationCycleQuery.hook.ts} +2 -2
- package/src/hooks/{cancelEvaluationCycleQuery.hook.ts → EvaluationCycle/others/cancelEvaluationCycleQuery.hook.ts} +2 -2
- package/src/hooks/{deleteEvaluationCycleQuery.hook.ts → EvaluationCycle/others/deleteEvaluationCycleQuery.hook.ts} +2 -2
- package/src/hooks/{finishEvaluationCycleQuery.hook.ts → EvaluationCycle/others/finishEvaluationCycleQuery.hook.ts} +2 -2
- package/src/hooks/{useApplicationDataQuery.hook.ts → Others/useApplicationDataQuery.hook.ts} +2 -2
- package/src/hooks/{useContractStatesQuery.hook.ts → Others/useContractStatesQuery.hook.ts} +2 -2
- package/src/hooks/{useCountriesQuery.hook.ts → Others/useCountriesQuery.hook.ts} +2 -2
- package/src/hooks/{useCustomersQuery.hook.ts → Others/useCustomersQuery.hook.ts} +1 -1
- package/src/hooks/{useJobTitlesQuery.hook.ts → Others/useJobTitlesQuery.hook.ts} +2 -2
- package/src/hooks/{useTermNotificationQuery.hook.ts → Others/useTermNotificationQuery.hook.ts} +2 -2
- package/src/hooks/{useProductHierarchies.hook.ts → Product/get/useProductHierarchies.hook.ts} +1 -1
- package/src/hooks/{useProductsQuery.hook.ts → Product/get/useProductsQuery.hook.ts} +1 -1
- package/src/hooks/{useQuestionnaireIdQuery.hook.ts → Questionnaire/get/useQuestionnaireIdQuery.hook.ts} +2 -2
- package/src/hooks/{useQuestionnaireQuery.hook.ts → Questionnaire/get/useQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{useQuestionnaireMutateQuery.hook.ts → Questionnaire/mutate/useQuestionnaireMutateQuery.hook.ts} +2 -2
- package/src/hooks/{activateQuestionnaireQuery.hook.ts → Questionnaire/others/activateQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{cancelQuestionnaireQuery.hook.ts → Questionnaire/others/cancelQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{deleteQuestionnaireQuery.hook.ts → Questionnaire/others/deleteQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{duplicateQuestionnaireQuery.hook.ts → Questionnaire/others/duplicateQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{finishQuestionnaireQuery.hook.ts → Questionnaire/others/finishQuestionnaireQuery.hook.ts} +2 -2
- package/src/hooks/{useAllRolesQuery.hook.ts → Roles/get/useAllRolesQuery.hook.ts} +2 -2
- package/src/hooks/{useAllStoreQuery.hook.ts → Roles/get/useAllStoreQuery.hook.ts} +2 -2
- package/src/hooks/{useStoreQuery.ts → Store/useStoreQuery.ts} +2 -2
- package/src/hooks/{useExpUsersAnswersQuery.hook.ts → Users/get/useExpUsersAnswersQuery.hook.ts} +2 -2
- package/src/hooks/{useSingleUserIdQuery.hook.ts → Users/get/useSingleUserIdQuery.hook.ts} +2 -2
- package/src/hooks/{useUserIdQuery.hook.ts → Users/get/useUserIdQuery.hook.ts} +2 -2
- package/src/hooks/{useUserListQuery.hook.ts → Users/get/useUserListQuery.hook.ts} +2 -2
- package/src/hooks/{useUserQuery.hook.ts → Users/get/useUserQuery.hook.ts} +2 -2
- package/src/hooks/{useSingleUserIdMutateQuery.hook.ts → Users/mutate/useSingleUserIdMutateQuery.hook.ts} +2 -2
- package/src/hooks/{useUpdateSupervisorMutateQuery.hook.ts → Users/mutate/useUpdateSupervisorMutateQuery.hook.ts} +2 -2
- package/src/hooks/{useSingleUserResetPassword.hook.ts → Users/others/useSingleUserResetPassword.hook.ts} +2 -2
- package/src/hooks/{useUserBlockQuery.hook.ts → Users/others/useUserBlockQuery.hook.ts} +2 -2
- package/src/hooks/{useUserEmailVerifQuery.hook.ts → Users/others/useUserEmailVerifQuery.hook.ts} +2 -2
- package/src/hooks/index.ts +65 -44
- package/src/interfaces/AsvProductsByReference.ts +14 -0
- package/src/interfaces/AsvProductsByStore.ts +12 -0
- package/src/interfaces/index.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { AnswersUserSupervisor, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { AnswersUserSupervisor, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface AnswersUserSupervisorQuery extends UseQueryOptions<AnswersUserSupervisor> {
|
|
6
6
|
evaluationId: string;
|
package/src/hooks/{useAnswerMutateQuery.hook.ts → Answer/mutate/useAnswerMutateQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { Answer } from '
|
|
3
|
-
import { putAuth0, postAuth0 } from '
|
|
2
|
+
import { Answer } from '../../../interfaces';
|
|
3
|
+
import { putAuth0, postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export interface AnswerQuery extends UseQueryOptions<Answer> {
|
|
6
6
|
pQuestionnaireId?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { AsvProductsByReference, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { get } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface ProductsByRefProps extends UseQueryOptions<ResponseList<"", AsvProductsByReference>> {
|
|
6
|
+
reference: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const getProductsByRef = ({ reference }: ProductsByRefProps) => {
|
|
10
|
+
return useQuery(
|
|
11
|
+
['ASV_PRODUCT_BY_REF', reference],
|
|
12
|
+
() => get<ResponseList<"", AsvProductsByReference>>('/ASV/Products', {
|
|
13
|
+
pReference: reference,
|
|
14
|
+
}),
|
|
15
|
+
{
|
|
16
|
+
keepPreviousData: true,
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { AsvProductsByStore, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { get } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export interface ProductsByStoreProps extends UseQueryOptions<ResponseList<"", AsvProductsByStore>> {
|
|
6
|
+
reference: string;
|
|
7
|
+
storeCode: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getProductsByStore = ({ reference, storeCode }: ProductsByStoreProps) => {
|
|
11
|
+
return useQuery(
|
|
12
|
+
['ASV_PRODUCT_BY_STORE', reference, storeCode],
|
|
13
|
+
() => get<ResponseList<"", AsvProductsByStore>>('/ASV/Products', {
|
|
14
|
+
pReference: reference,
|
|
15
|
+
pStoreCode: storeCode
|
|
16
|
+
}),
|
|
17
|
+
{
|
|
18
|
+
keepPreviousData: true,
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { EvaluationCycle } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { EvaluationCycle } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useEvaluationCycleIdQueryHook = (evaluationId: string) => {
|
|
6
6
|
return useQuery(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { EvaluationCycle, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { EvaluationCycle, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface EvaluationCycleProps extends UseQueryOptions<ResponseList<"EvaluationCycles", EvaluationCycle>> {
|
|
6
6
|
tags?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { putAuth0, postAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0, postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const useEvaluationCycleMutateHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const activateEvaluationCycleQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const cancelEvaluationCycleQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { toDeleteAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { toDeleteAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const deleteEvaluationCycleMutateHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const finishEvaluationCycleQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
package/src/hooks/{useApplicationDataQuery.hook.ts → Others/useApplicationDataQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { ApplicationsByCategory, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { ApplicationsByCategory, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useApplicationDataQueryHook = () => {
|
|
6
6
|
return useQuery(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { ContractStates, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { ContractStates, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
interface ContractStatesQueryProps extends UseQueryOptions<ContractStates> {
|
|
6
6
|
records: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { Countries, ResponseList } from "
|
|
3
|
-
import { get } from "
|
|
2
|
+
import { Countries, ResponseList } from "../../interfaces";
|
|
3
|
+
import { get } from "../../services";
|
|
4
4
|
|
|
5
5
|
interface CountriesQueryProps extends UseQueryOptions<Countries> {
|
|
6
6
|
records: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { get, Customer, ResponseList } from '
|
|
1
|
+
import { get, Customer, ResponseList } from '../../';
|
|
2
2
|
import { useInfiniteQuery, useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
export interface CustomersQuery extends UseQueryOptions<ResponseList<"Customers", Customer>> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { JobTitles, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { JobTitles, ResponseList } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services";
|
|
4
4
|
|
|
5
5
|
interface JobTitlesQueryProps extends UseQueryOptions<JobTitles> {
|
|
6
6
|
records: string;
|
package/src/hooks/{useTermNotificationQuery.hook.ts → Others/useTermNotificationQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { TermNotification } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { TermNotification } from "../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useTermNotificationQueryHook = () => {
|
|
6
6
|
return useQuery(
|
package/src/hooks/{useProductHierarchies.hook.ts → Product/get/useProductHierarchies.hook.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { get, ProductsHierarchies, ResponseList } from '
|
|
1
|
+
import { get, ProductsHierarchies, ResponseList } from '../../../';
|
|
2
2
|
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
export interface useProductsHierarchiesQueryHook extends UseQueryOptions<ResponseList<"Hierarchies", ProductsHierarchies>> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { get, Product, ResponseList } from '
|
|
1
|
+
import { get, Product, ResponseList } from '../../../';
|
|
2
2
|
import { useInfiniteQuery, useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
export interface ProductsQuery extends UseQueryOptions<ResponseList<"Products", Product>> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { Questionnaire } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { Questionnaire } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useQuestionnaireIdQueryHook = (surveyId: string) => {
|
|
6
6
|
return useQuery(
|
package/src/hooks/{useQuestionnaireQuery.hook.ts → Questionnaire/get/useQuestionnaireQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { Questionnaire, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { Questionnaire, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface QuestionnaireQuery extends UseQueryOptions<ResponseList<"Questionnairezes", Questionnaire>> {
|
|
6
6
|
tags?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Questionnaire } from '
|
|
3
|
-
import { putAuth0, postAuth0 } from '
|
|
2
|
+
import { Questionnaire } from '../../../interfaces/Questionnaire';
|
|
3
|
+
import { putAuth0, postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const useQuestionnaireMutateHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Questionnaire } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { Questionnaire } from '../../../interfaces/Questionnaire';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const activateQuestionnaireQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Questionnaire } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { Questionnaire } from '../../../interfaces/Questionnaire';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const cancelQuestionnaireQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Questionnaire } from '
|
|
3
|
-
import { toDeleteAuth0 } from '
|
|
2
|
+
import { Questionnaire } from '../../../interfaces/Questionnaire';
|
|
3
|
+
import { toDeleteAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const deleteQuestionnaireMutateHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Questionnaire } from '
|
|
3
|
-
import { postAuth0 } from '
|
|
2
|
+
import { Questionnaire } from '../../../interfaces/Questionnaire';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const duplicateQuestionnaireMutateHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { Answer } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { Answer } from '../../../interfaces';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const finishQuestionnaireQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { Roles, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { Roles, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services";
|
|
4
4
|
|
|
5
5
|
interface RolesQueryProps extends UseQueryOptions<ResponseList<"Roles", Roles>> {
|
|
6
6
|
records: number | string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { Store, ResponseList } from "
|
|
3
|
-
import { get } from "
|
|
2
|
+
import { Store, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { get } from "../../../services";
|
|
4
4
|
|
|
5
5
|
interface StoreQueryProps extends UseQueryOptions<Store> {
|
|
6
6
|
records: number | string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { Store } from "
|
|
3
|
-
import { get } from "
|
|
2
|
+
import { Store } from "../../interfaces/Store";
|
|
3
|
+
import { get } from "../../services";
|
|
4
4
|
|
|
5
5
|
interface StoreQueryProps extends UseQueryOptions<Store> {
|
|
6
6
|
id: string;
|
package/src/hooks/{useExpUsersAnswersQuery.hook.ts → Users/get/useExpUsersAnswersQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { ExpUsersAnswers, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { ExpUsersAnswers, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface ExpUsersAnswersProps extends UseQueryOptions<ResponseList<"Users", ExpUsersAnswers>> {
|
|
6
6
|
tags?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { User } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { User } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useSingleUserIdQueryHook = (userId: string) => {
|
|
6
6
|
return useQuery(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
|
-
import { User } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { User } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useUserIdQueryHook = (userId: string) => {
|
|
6
6
|
return useQuery(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { User, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { User, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", User>> {
|
|
6
6
|
tags?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
-
import { User, ResponseList } from "
|
|
3
|
-
import { getAuth0 } from "
|
|
2
|
+
import { User, ResponseList } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export interface UserQuery extends UseQueryOptions<ResponseList<"Users", User>> {
|
|
6
6
|
tags?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { SingleUser } from '
|
|
3
|
-
import { putAuth0, postAuth0 } from '
|
|
2
|
+
import { SingleUser } from '../../../interfaces/User';
|
|
3
|
+
import { putAuth0, postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export const useSingleUserIdMutateQuery = (bodyType?: string) => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '
|
|
3
|
-
import { putAuth0 } from '
|
|
2
|
+
import { EvaluationCycle } from '../../../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export interface UpdateSupervisorMutateQuery extends UseQueryOptions<EvaluationCycle> {
|
|
6
6
|
evaluationCycleId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { User } from "
|
|
3
|
-
import { postAuth0 } from "
|
|
2
|
+
import { User } from "../../../interfaces";
|
|
3
|
+
import { postAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
interface UserWithResetPasswordURL extends User {
|
|
6
6
|
ResetPasswordURL: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { User } from "
|
|
3
|
-
import { putAuth0 } from "
|
|
2
|
+
import { User } from "../../../interfaces";
|
|
3
|
+
import { putAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useUserBlockQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
package/src/hooks/{useUserEmailVerifQuery.hook.ts → Users/others/useUserEmailVerifQuery.hook.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { User } from "
|
|
3
|
-
import { postAuth0 } from "
|
|
2
|
+
import { User } from "../../../interfaces";
|
|
3
|
+
import { postAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
5
|
export const useUserEmailVerifQueryHook = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,44 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './useStoreQuery';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './
|
|
27
|
-
export * from './
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
38
|
-
export * from './useAnalyticsQuestionsQuery.hook';
|
|
39
|
-
export * from './useAnalyticsSideBarQuery.hook';
|
|
40
|
-
export * from './
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export * from './
|
|
44
|
-
export * from './
|
|
1
|
+
//Stores
|
|
2
|
+
export * from './Store/useStoreQuery';
|
|
3
|
+
|
|
4
|
+
//EvaluationCycle
|
|
5
|
+
export * from './EvaluationCycle/get/useEvaluationCycleIdQuery.hook';
|
|
6
|
+
export * from './EvaluationCycle/mutate/useEvaluationCycleMutateQuery.hook';
|
|
7
|
+
export * from './EvaluationCycle/others/activateEvaluationCycleQuery.hook';
|
|
8
|
+
export * from './EvaluationCycle/others/deleteEvaluationCycleQuery.hook';
|
|
9
|
+
export * from './EvaluationCycle/get/useEvaluationCycleQuery.hook';
|
|
10
|
+
export * from './EvaluationCycle/others/cancelEvaluationCycleQuery.hook';
|
|
11
|
+
export * from './EvaluationCycle/others/finishEvaluationCycleQuery.hook';
|
|
12
|
+
|
|
13
|
+
//Questionnaire
|
|
14
|
+
export * from './Questionnaire/get/useQuestionnaireQuery.hook';
|
|
15
|
+
export * from './Questionnaire/others/deleteQuestionnaireQuery.hook';
|
|
16
|
+
export * from './Questionnaire/others/duplicateQuestionnaireQuery.hook';
|
|
17
|
+
export * from './Questionnaire/mutate/useQuestionnaireMutateQuery.hook';
|
|
18
|
+
export * from './Questionnaire/others/activateQuestionnaireQuery.hook';
|
|
19
|
+
export * from './Questionnaire/get/useQuestionnaireIdQuery.hook';
|
|
20
|
+
export * from './Questionnaire/others/finishQuestionnaireQuery.hook';
|
|
21
|
+
export * from './Questionnaire/others/cancelQuestionnaireQuery.hook';
|
|
22
|
+
|
|
23
|
+
//Users
|
|
24
|
+
export * from './Users/get/useUserQuery.hook';
|
|
25
|
+
export * from './Users/get/useUserListQuery.hook';
|
|
26
|
+
export * from './Users/others/useUserBlockQuery.hook';
|
|
27
|
+
export * from './Users/others/useUserEmailVerifQuery.hook';
|
|
28
|
+
export * from './Users/get/useExpUsersAnswersQuery.hook';
|
|
29
|
+
export * from './Users/mutate/useUpdateSupervisorMutateQuery.hook';
|
|
30
|
+
export * from './Users/others/useSingleUserResetPassword.hook';
|
|
31
|
+
export * from './Users/get/useSingleUserIdQuery.hook';
|
|
32
|
+
export * from './Users/mutate/useSingleUserIdMutateQuery.hook';
|
|
33
|
+
export * from './Users/get/useUserIdQuery.hook';
|
|
34
|
+
|
|
35
|
+
//Analytics
|
|
36
|
+
export * from './Analytics/get/useAnalyticsEvaluationCyclesQuery.hook';
|
|
37
|
+
export * from './Analytics/get/useAnalyticsUserIdQuery.hook';
|
|
38
|
+
export * from './Analytics/get/useAnalyticsQuestionsQuery.hook';
|
|
39
|
+
export * from './Analytics/get/useAnalyticsSideBarQuery.hook';
|
|
40
|
+
export * from './Analytics/get/useAnalyticsUserQuery.hook';
|
|
41
|
+
|
|
42
|
+
//Answers
|
|
43
|
+
export * from './Answer/get/useAnswerIdQuery.hook';
|
|
44
|
+
export * from './Answer/mutate/useAnswerMutateQuery.hook';
|
|
45
|
+
export * from './Answer/get/useAnswersUserSupervisorQuery.hook';
|
|
46
|
+
|
|
47
|
+
//Products
|
|
48
|
+
export * from './Product/get/useProductsQuery.hook';
|
|
49
|
+
export * from './Product/get/useProductHierarchies.hook';
|
|
50
|
+
|
|
51
|
+
//Roles
|
|
52
|
+
export * from './Roles/get/useAllStoreQuery.hook';
|
|
53
|
+
export * from './Roles/get/useAllRolesQuery.hook';
|
|
54
|
+
|
|
55
|
+
//AsvProduct
|
|
56
|
+
export * from './AsvProduct/get/getProductsByRefQuery.hook';
|
|
57
|
+
export * from './AsvProduct/get/getProductsByStoreQuery.hook';
|
|
58
|
+
|
|
59
|
+
//Others
|
|
60
|
+
export * from './Others/useJobTitlesQuery.hook';
|
|
61
|
+
export * from './Others/useContractStatesQuery.hook';
|
|
62
|
+
export * from './Others/useApplicationDataQuery.hook';
|
|
63
|
+
export * from './Others/useTermNotificationQuery.hook';
|
|
64
|
+
export * from './Others/useCustomersQuery.hook';
|
|
65
|
+
export * from './Others/useCountriesQuery.hook';
|