@omniumretail/shared-resources 0.0.5 → 0.0.7

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.
Files changed (34) hide show
  1. package/dist/bundle.js +118 -41
  2. package/dist/types/hooks/activateEvaluationCycleQuery.hook.d.ts +2 -2
  3. package/dist/types/hooks/activateQuestionnaireQuery.hook.d.ts +2 -0
  4. package/dist/types/hooks/index.d.ts +10 -3
  5. package/dist/types/hooks/useAnalyticsUserQuery.hook.d.ts +8 -0
  6. package/dist/types/hooks/useEvaluationCycleQuery.hook.d.ts +3 -2
  7. package/dist/types/hooks/useQuestionnaireIdQuery.hook.d.ts +2 -0
  8. package/dist/types/hooks/useQuestionnaireMutateQuery.hook.d.ts +2 -0
  9. package/dist/types/hooks/useQuestionnaireQuery.hook.d.ts +4 -2
  10. package/dist/types/hooks/useUserBlockQuery.hook.d.ts +2 -0
  11. package/dist/types/hooks/useUserEmailVerifQuery.hook.d.ts +2 -0
  12. package/dist/types/hooks/useUserListQuery.hook.d.ts +8 -0
  13. package/dist/types/hooks/useUserQuery.hook.d.ts +4 -1
  14. package/dist/types/interfaces/EvaluationCycle.d.ts +1 -0
  15. package/dist/types/interfaces/Questionnaire.d.ts +13 -13
  16. package/dist/types/interfaces/User.d.ts +2 -0
  17. package/dist/types/services/ApiService/index.d.ts +2 -0
  18. package/package.json +1 -1
  19. package/src/hooks/activateEvaluationCycleQuery.hook.ts +12 -10
  20. package/src/hooks/activateQuestionnaireQuery.hook.ts +15 -0
  21. package/src/hooks/index.ts +12 -4
  22. package/src/hooks/useAnalyticsUserQuery.hook.ts +25 -0
  23. package/src/hooks/useEvaluationCycleQuery.hook.ts +10 -6
  24. package/src/hooks/useQuestionnaireIdQuery.hook.ts +13 -0
  25. package/src/hooks/useQuestionnaireMutateQuery.hook.ts +17 -0
  26. package/src/hooks/useQuestionnaireQuery.hook.ts +13 -7
  27. package/src/hooks/useUserBlockQuery.hook.ts +15 -0
  28. package/src/hooks/useUserEmailVerifQuery.hook.ts +15 -0
  29. package/src/hooks/useUserListQuery.hook.ts +25 -0
  30. package/src/hooks/useUserQuery.hook.ts +14 -7
  31. package/src/interfaces/EvaluationCycle.ts +1 -0
  32. package/src/interfaces/Questionnaire.ts +13 -13
  33. package/src/interfaces/User.ts +2 -0
  34. package/src/services/ApiService/index.ts +8 -0
@@ -1,2 +1,2 @@
1
- import { EvaluationCycle } from "../interfaces";
2
- export declare const activateEvaluationCycleQueryHook: (evaluationId: string) => import("@tanstack/react-query").UseQueryResult<EvaluationCycle, unknown>;
1
+ import { EvaluationCycle } from '../interfaces/EvaluationCycle';
2
+ export declare const activateEvaluationCycleQueryHook: () => import("@tanstack/react-query").UseMutationResult<EvaluationCycle, unknown, EvaluationCycle, unknown>;
@@ -0,0 +1,2 @@
1
+ import { Questionnaire } from '../interfaces/Questionnaire';
2
+ export declare const activateQuestionnaireQueryHook: () => import("@tanstack/react-query").UseMutationResult<Questionnaire, unknown, Questionnaire, unknown>;
@@ -3,9 +3,16 @@ export * from './useStoreQuery';
3
3
  export * from './useEvaluationCycleIdQuery.hook';
4
4
  export * from './useEvaluationCycleMutateQuery.hook';
5
5
  export * from './activateEvaluationCycleQuery.hook';
6
- export * from './useUserQuery.hook';
7
- export * from './useQuestionnaireQuery.hook';
8
- export * from './useEvaluationCycleQuery.hook';
9
6
  export * from './deleteEvaluationCycleQuery.hook';
7
+ export * from './useEvaluationCycleQuery.hook';
8
+ export * from './useQuestionnaireQuery.hook';
10
9
  export * from './deleteQuestionnaireQuery.hook';
11
10
  export * from './duplicateQuestionnaireQuery.hook';
11
+ export * from './useQuestionnaireMutateQuery.hook';
12
+ export * from './activateQuestionnaireQuery.hook';
13
+ export * from './useQuestionnaireIdQuery.hook';
14
+ export * from './useUserQuery.hook';
15
+ export * from './useAnalyticsUserQuery.hook';
16
+ export * from './useUserListQuery.hook';
17
+ export * from './useUserBlockQuery.hook';
18
+ export * from './useUserEmailVerifQuery.hook';
@@ -0,0 +1,8 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { User, ResponseList } from "../interfaces";
3
+ export interface AnalyticsUserQuery extends UseQueryOptions<ResponseList<"Users", User>> {
4
+ tags?: string;
5
+ page?: number;
6
+ records?: number;
7
+ }
8
+ export declare const useAnalyticsUserQueryHook: ({ tags, page, records }: AnalyticsUserQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
@@ -2,6 +2,7 @@ import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { EvaluationCycle, ResponseList } from "../interfaces";
3
3
  export interface EvaluationCycleProps extends UseQueryOptions<ResponseList<"EvaluationCycles", EvaluationCycle>> {
4
4
  tags?: string;
5
- limit?: number;
5
+ page?: number;
6
+ records?: number;
6
7
  }
7
- export declare const useEvaluationCycleQueryHook: ({ tags, limit }: EvaluationCycleProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"EvaluationCycles", EvaluationCycle>, unknown>;
8
+ export declare const useEvaluationCycleQueryHook: ({ tags, page, records }: EvaluationCycleProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"EvaluationCycles", EvaluationCycle>, unknown>;
@@ -0,0 +1,2 @@
1
+ import { Questionnaire } from "../interfaces";
2
+ export declare const useQuestionnaireIdQueryHook: (surveyId: string) => import("@tanstack/react-query").UseQueryResult<Questionnaire, unknown>;
@@ -0,0 +1,2 @@
1
+ import { Questionnaire } from '../interfaces/Questionnaire';
2
+ export declare const useQuestionnaireMutateHook: () => import("@tanstack/react-query").UseMutationResult<Questionnaire, unknown, Questionnaire, unknown>;
@@ -2,6 +2,8 @@ import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { Questionnaire, ResponseList } from "../interfaces";
3
3
  export interface QuestionnaireQuery extends UseQueryOptions<ResponseList<"Questionnairezes", Questionnaire>> {
4
4
  tags?: string;
5
- limit?: number;
5
+ page?: number;
6
+ records?: number;
7
+ queryField?: string;
6
8
  }
7
- export declare const useQuestionnaireQueryHook: ({ tags, limit }: QuestionnaireQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Questionnairezes", Questionnaire>, unknown>;
9
+ export declare const useQuestionnaireQueryHook: ({ tags, page, records, queryField }: QuestionnaireQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Questionnairezes", Questionnaire>, unknown>;
@@ -0,0 +1,2 @@
1
+ import { User } from "../interfaces";
2
+ export declare const useUserBlockQueryHook: () => import("@tanstack/react-query").UseMutationResult<User, unknown, User, unknown>;
@@ -0,0 +1,2 @@
1
+ import { User } from "../interfaces";
2
+ export declare const useUserEmailVerifQueryHook: () => import("@tanstack/react-query").UseMutationResult<User, unknown, User, unknown>;
@@ -0,0 +1,8 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { User, ResponseList } from "../interfaces";
3
+ export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", User>> {
4
+ tags?: string;
5
+ records: number;
6
+ page: number;
7
+ }
8
+ export declare const useUserListQueryHook: ({ tags, records, page }: UserListQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
@@ -2,6 +2,9 @@ import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { User, ResponseList } from "../interfaces";
3
3
  export interface UserQuery extends UseQueryOptions<ResponseList<"Users", User>> {
4
4
  tags?: string;
5
+ page?: number;
6
+ records?: number;
5
7
  evaluationId?: string;
8
+ queryField?: string;
6
9
  }
7
- export declare const useUserQueryHook: ({ tags, evaluationId }: UserQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
10
+ export declare const useUserQueryHook: ({ tags, evaluationId, page, records, queryField }: UserQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
@@ -17,6 +17,7 @@ export interface EvaluationCycle {
17
17
  NotificationAgenda: string;
18
18
  TotalNumberOfUsers: number;
19
19
  TotalNumberOfAnswers: number;
20
+ IsOnlyForUsers: boolean;
20
21
  }
21
22
  export interface EvaluationNotifications {
22
23
  NotificationTypeId: string;
@@ -9,19 +9,19 @@ export interface Questionnaire {
9
9
  }
10
10
  export interface Categories {
11
11
  Id: string;
12
- Name: string;
13
- OpenAnswer: boolean;
14
- Level: number;
15
- Weighting: number;
16
- Description: string;
17
- Number: number;
18
- Questions: Questions[];
19
- SubCategories: [];
12
+ Title: string;
13
+ Key: string;
14
+ Data: {
15
+ CategoryName: string;
16
+ OpenAnswer: boolean;
17
+ Grade: number;
18
+ GeneralEvaluationLevel: number;
19
+ Questions: Questions[];
20
+ };
21
+ Children: Categories[];
20
22
  }
21
23
  export interface Questions {
22
- Id: string;
23
- Subject: string;
24
- Description: string;
25
- Number: number;
26
- Weighting: number;
24
+ Question: string;
25
+ Info: string;
26
+ Grade: number;
27
27
  }
@@ -8,4 +8,6 @@ export interface User {
8
8
  ContractStateId: string;
9
9
  ContractStateName: string;
10
10
  IsSelected: boolean;
11
+ UserScore: number;
12
+ SupervisorScore: number;
11
13
  }
@@ -1,6 +1,8 @@
1
1
  import 'whatwg-fetch';
2
2
  export declare const get: <T>(path: string, params?: Record<string, unknown>) => Promise<T>;
3
3
  export declare const getAuth0: <T>(path: string, params?: Record<string, unknown>) => Promise<T>;
4
+ export declare const putAuth0: <T>(path: string, params?: Record<string, unknown>) => Promise<T>;
5
+ export declare const postAuth0: <T>(path: string, params?: Record<string, unknown>) => Promise<T>;
4
6
  export declare const post: <T>(path: string, body?: unknown) => Promise<T>;
5
7
  export declare const put: <T>(path: string, body?: unknown) => Promise<T>;
6
8
  export declare const toDelete: <T>(path: string, body?: unknown) => Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -1,13 +1,15 @@
1
- import { useQuery } from "@tanstack/react-query";
2
- import { EvaluationCycle } from "../interfaces";
3
- import { put } from "../services/ApiService";
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { EvaluationCycle } from '../interfaces/EvaluationCycle';
3
+ import { put } from '../services/ApiService';
4
4
 
5
- export const activateEvaluationCycleQueryHook = (evaluationId: string) => {
6
- return useQuery(
7
- ['EVALUATION_CYCLE_ID_QUERY', evaluationId],
8
- () => put<EvaluationCycle>(`/EvaluationCycle/Activate/${evaluationId}`),
9
- {
10
- enabled: !!(evaluationId),
5
+ export const activateEvaluationCycleQueryHook = () => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<EvaluationCycle, unknown, EvaluationCycle>((data: EvaluationCycle) => {
8
+ return put(`/EvaluationCycle/Activate/${data.Id}`, data)
9
+ }, {
10
+ onSuccess: (data: EvaluationCycle) => {
11
+ queryClient.setQueryData(
12
+ ['EVALUATION_CYCLE_ID_QUERY'], data);
11
13
  },
12
- );
14
+ });
13
15
  }
@@ -0,0 +1,15 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { Questionnaire } from '../interfaces/Questionnaire';
3
+ import { put } from '../services/ApiService';
4
+
5
+ export const activateQuestionnaireQueryHook = () => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<Questionnaire, unknown, Questionnaire>((data: Questionnaire) => {
8
+ return put(`/Questionnaire/Activate/${data.Id}`, data)
9
+ }, {
10
+ onSuccess: (data: Questionnaire) => {
11
+ queryClient.setQueryData(
12
+ ['QUESTIONNAIRE_ID_QUERY'], data);
13
+ },
14
+ });
15
+ }
@@ -3,9 +3,17 @@ export * from './useStoreQuery';
3
3
  export * from './useEvaluationCycleIdQuery.hook';
4
4
  export * from './useEvaluationCycleMutateQuery.hook';
5
5
  export * from './activateEvaluationCycleQuery.hook';
6
- export * from './useUserQuery.hook';
7
- export * from './useQuestionnaireQuery.hook';
8
- export * from './useEvaluationCycleQuery.hook';
9
6
  export * from './deleteEvaluationCycleQuery.hook';
7
+ export * from './useEvaluationCycleQuery.hook';
8
+ export * from './useQuestionnaireQuery.hook';
10
9
  export * from './deleteQuestionnaireQuery.hook';
11
- export * from './duplicateQuestionnaireQuery.hook';
10
+ export * from './duplicateQuestionnaireQuery.hook';
11
+ export * from './useQuestionnaireMutateQuery.hook';
12
+ export * from './activateQuestionnaireQuery.hook';
13
+ export * from './useQuestionnaireIdQuery.hook';
14
+ export * from './useUserQuery.hook';
15
+ export * from './useAnalyticsUserQuery.hook';
16
+ export * from './useUserListQuery.hook';
17
+ export * from './useUserBlockQuery.hook';
18
+ export * from './useUserEmailVerifQuery.hook';
19
+
@@ -0,0 +1,25 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { User, ResponseList } from "../interfaces";
3
+ import { get } from "../services/ApiService";
4
+
5
+ export interface AnalyticsUserQuery extends UseQueryOptions<ResponseList<"Users", User>> {
6
+ tags?: string;
7
+ page?: number;
8
+ records?: number;
9
+ }
10
+
11
+ export const useAnalyticsUserQueryHook = ({ tags, page, records }: AnalyticsUserQuery) => {
12
+ return useQuery(
13
+ ['ANALYTICS_USER_QUERY', tags, page, records],
14
+ () => get<ResponseList<"Users", User>>('/Analytics/EvaluationCycle/GetUsers', {
15
+ pPage: page || 1,
16
+ pRecords: records || 50,
17
+ pSortBy: 'Type',
18
+ pSortDirection: 'asc',
19
+ pTerms: tags,
20
+ }),
21
+ {
22
+ keepPreviousData: true,
23
+ }
24
+ );
25
+ }
@@ -4,18 +4,22 @@ import { get } from "../services/ApiService";
4
4
 
5
5
  export interface EvaluationCycleProps extends UseQueryOptions<ResponseList<"EvaluationCycles", EvaluationCycle>> {
6
6
  tags?: string;
7
- limit?: number;
7
+ page?: number;
8
+ records?: number;
8
9
  }
9
10
 
10
- export const useEvaluationCycleQueryHook = ({ tags, limit }: EvaluationCycleProps) => {
11
+ export const useEvaluationCycleQueryHook = ({ tags, page, records }: EvaluationCycleProps) => {
11
12
  return useQuery(
12
- ['EVALUATION_CYCLE_QUERY', tags, limit],
13
+ ['EVALUATION_CYCLE_QUERY', tags, page, records],
13
14
  () => get<ResponseList<"EvaluationCycles", EvaluationCycle>>('/EvaluationCycle', {
14
- pPage: 1,
15
- pRecords: limit || 50,
15
+ pPage: page || 1,
16
+ pRecords: records || 50,
16
17
  pSortBy: 'Type',
17
18
  pSortDirection: 'asc',
18
19
  pTerms: tags,
19
- })
20
+ }),
21
+ {
22
+ keepPreviousData: true,
23
+ }
20
24
  );
21
25
  }
@@ -0,0 +1,13 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { Questionnaire } from "../interfaces";
3
+ import { get } from "../services/ApiService";
4
+
5
+ export const useQuestionnaireIdQueryHook = (surveyId: string) => {
6
+ return useQuery(
7
+ ['QUESTIONNAIRE_ID_QUERY', surveyId],
8
+ () => get<Questionnaire>(`/Questionnaire/${surveyId}`),
9
+ {
10
+ enabled: !!(surveyId),
11
+ },
12
+ );
13
+ }
@@ -0,0 +1,17 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { Questionnaire } from '../interfaces/Questionnaire';
3
+ import { put, post } from '../services/ApiService';
4
+
5
+ export const useQuestionnaireMutateHook = () => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<Questionnaire, unknown, Questionnaire>((data: Questionnaire) => {
8
+ return data.Id ?
9
+ put(`/Questionnaire/${data.Id}`, data) :
10
+ post('/Questionnaire', data);
11
+ }, {
12
+ onSuccess: (data: Questionnaire) => {
13
+ queryClient.setQueryData(
14
+ ['QUESTIONNAIRE_ID_QUERY'], data);
15
+ },
16
+ });
17
+ }
@@ -4,18 +4,24 @@ import { get } from "../services/ApiService";
4
4
 
5
5
  export interface QuestionnaireQuery extends UseQueryOptions<ResponseList<"Questionnairezes", Questionnaire>> {
6
6
  tags?: string;
7
- limit?: number;
7
+ page?: number;
8
+ records?: number;
9
+ queryField?: string;
8
10
  }
9
11
 
10
- export const useQuestionnaireQueryHook = ({ tags, limit }: QuestionnaireQuery) => {
12
+ export const useQuestionnaireQueryHook = ({ tags, page, records, queryField }: QuestionnaireQuery) => {
11
13
  return useQuery(
12
- ['QUESTIONNAIRE_QUERY', tags, limit],
14
+ ['QUESTIONNAIRE_QUERY', tags, page, records, queryField],
13
15
  () => get<ResponseList<"Questionnairezes", Questionnaire>>('/Questionnaire', {
14
- pPage: 1,
15
- pRecords: limit || 50,
16
+ pPage: page || 1,
17
+ pRecords: records || 50,
16
18
  pSortBy: 'Type',
17
19
  pSortDirection: 'asc',
18
- pTerms: tags
19
- })
20
+ pTerms: tags,
21
+ pQuery: queryField
22
+ }),
23
+ {
24
+ keepPreviousData: true,
25
+ }
20
26
  );
21
27
  }
@@ -0,0 +1,15 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { User } from "../interfaces";
3
+ import { putAuth0 } from "../services/ApiService";
4
+
5
+ export const useUserBlockQueryHook = () => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<User, unknown, User>((data: User) => {
8
+ return putAuth0(`/Users/block?pUserId=${data.UserId}`)
9
+ }, {
10
+ onSuccess: (data: User) => {
11
+ queryClient.setQueryData(
12
+ ['USER_LIST_QUERY'], data);
13
+ },
14
+ });
15
+ }
@@ -0,0 +1,15 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { User } from "../interfaces";
3
+ import { postAuth0 } from "../services/ApiService";
4
+
5
+ export const useUserEmailVerifQueryHook = () => {
6
+ const queryClient = useQueryClient();
7
+ return useMutation<User, unknown, User>((data: User) => {
8
+ return postAuth0(`/Users/sendVerificationEmail?pUserId=${data.UserId}`)
9
+ }, {
10
+ onSuccess: (data: User) => {
11
+ queryClient.setQueryData(
12
+ ['USER_LIST_QUERY'], data);
13
+ },
14
+ });
15
+ }
@@ -0,0 +1,25 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { User, ResponseList } from "../interfaces";
3
+ import { getAuth0 } from "../services/ApiService";
4
+
5
+ export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", User>> {
6
+ tags?: string;
7
+ records: number;
8
+ page: number;
9
+ }
10
+
11
+ export const useUserListQueryHook = ({ tags, records, page }: UserListQuery) => {
12
+ return useQuery(
13
+ ['USER_LIST_QUERY', tags, records, page],
14
+ () => getAuth0<ResponseList<"Users", User>>('/Users', {
15
+ pPage: page,
16
+ pRecords: records,
17
+ pSortBy: 'Code',
18
+ pSortDirection: 'asc',
19
+ pTerms: tags,
20
+ }),
21
+ {
22
+ keepPreviousData: true,
23
+ },
24
+ );
25
+ }
@@ -4,19 +4,26 @@ import { get } from "../services/ApiService";
4
4
 
5
5
  export interface UserQuery extends UseQueryOptions<ResponseList<"Users", User>> {
6
6
  tags?: string;
7
+ page?: number;
8
+ records?: number;
7
9
  evaluationId?: string;
10
+ queryField?: string;
8
11
  }
9
12
 
10
- export const useUserQueryHook = ({ tags, evaluationId }: UserQuery) => {
13
+ export const useUserQueryHook = ({ tags, evaluationId, page, records, queryField }: UserQuery) => {
11
14
  return useQuery(
12
- ['USER_QUERY', tags, evaluationId],
13
- () => get<ResponseList<"Users", User>>('/User/AACP', {
14
- pPage: 1,
15
- pRecords: 50,
15
+ ['USER_QUERY', tags, evaluationId, page, records, queryField],
16
+ () => get<ResponseList<"Users", User>>('/Users/APE', {
17
+ pPage: page || 1,
18
+ pRecords: records || 50,
16
19
  pSortBy: 'Type',
17
20
  pSortDirection: 'asc',
18
21
  pTerms: tags,
19
- pEvaluationCycleId: evaluationId
20
- })
22
+ pEvaluationCycleId: evaluationId,
23
+ pQuery: queryField
24
+ }),
25
+ {
26
+ keepPreviousData: true,
27
+ }
21
28
  );
22
29
  }
@@ -15,6 +15,7 @@ export interface EvaluationCycle {
15
15
  NotificationAgenda: string;
16
16
  TotalNumberOfUsers: number;
17
17
  TotalNumberOfAnswers: number;
18
+ IsOnlyForUsers: boolean;
18
19
  }
19
20
 
20
21
  export interface EvaluationNotifications {
@@ -11,20 +11,20 @@ export interface Questionnaire {
11
11
 
12
12
  export interface Categories {
13
13
  Id: string;
14
- Name: string;
15
- OpenAnswer: boolean;
16
- Level: number;
17
- Weighting: number;
18
- Description: string;
19
- Number: number;
20
- Questions: Questions[];
21
- SubCategories: [];
14
+ Title: string;
15
+ Key: string;
16
+ Data: {
17
+ CategoryName: string;
18
+ OpenAnswer: boolean;
19
+ Grade: number;
20
+ GeneralEvaluationLevel: number;
21
+ Questions: Questions[];
22
+ };
23
+ Children: Categories[];
22
24
  }
23
25
 
24
26
  export interface Questions {
25
- Id: string;
26
- Subject: string;
27
- Description: string;
28
- Number: number;
29
- Weighting: number;
27
+ Question: string;
28
+ Info: string;
29
+ Grade: number;
30
30
  }
@@ -9,4 +9,6 @@ export interface User {
9
9
  ContractStateId: string;
10
10
  ContractStateName: string;
11
11
  IsSelected: boolean;
12
+ UserScore: number;
13
+ SupervisorScore: number;
12
14
  }
@@ -9,6 +9,14 @@ export const getAuth0 = <T>(path: string, params?: Record<string, unknown>): Pro
9
9
  return buildApiRequestForAuth0<T>(`${path}?${buildParams(params || {})}`, 'GET');
10
10
  }
11
11
 
12
+ export const putAuth0 = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
13
+ return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'PUT');
14
+ }
15
+
16
+ export const postAuth0 = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
17
+ return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'POST');
18
+ }
19
+
12
20
  export const post = <T>(path: string, body?: unknown): Promise<T> => {
13
21
  return buildApiRequest<T>(path, 'POST', body);
14
22
  }