aq-fe-framework 0.1.204 → 0.1.205

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.
@@ -46,25 +46,25 @@ var useLoadConfig = () => {
46
46
  };
47
47
 
48
48
  // src/hooks/custom-hooks/createBaseApi.ts
49
- function createBaseApi(baseUrl) {
49
+ function createBaseApi(baseUrl, axiosInstance) {
50
50
  return {
51
51
  getAll: () => {
52
- return baseAxios_default.get(`${baseUrl}/GetAll`);
52
+ return axiosInstance.get(`${baseUrl}/GetAll`);
53
53
  },
54
54
  getById: (id) => {
55
- return baseAxios_default.get(`${baseUrl}/${id}`);
55
+ return axiosInstance.get(`${baseUrl}/${id}`);
56
56
  },
57
57
  create: (data) => {
58
- return baseAxios_default.post(`${baseUrl}/create`, data);
58
+ return axiosInstance.post(`${baseUrl}/create`, data);
59
59
  },
60
60
  update: (data) => {
61
- return baseAxios_default.put(`${baseUrl}/update`, data);
61
+ return axiosInstance.put(`${baseUrl}/update`, data);
62
62
  },
63
63
  createOrUpdate: (data) => {
64
- return baseAxios_default.put(`${baseUrl}/createOrUpdate`, data);
64
+ return axiosInstance.put(`${baseUrl}/createOrUpdate`, data);
65
65
  },
66
66
  delete: (id) => {
67
- return baseAxios_default.post(`${baseUrl}/delete`, { id });
67
+ return axiosInstance.post(`${baseUrl}/delete`, { id });
68
68
  }
69
69
  };
70
70
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  baseAxios_default,
3
3
  useQ_AQ_GetAQModule
4
- } from "./chunk-5X2EYQ3O.mjs";
4
+ } from "./chunk-CUMGXY5T.mjs";
5
5
  import {
6
6
  createGenericStore
7
7
  } from "./chunk-Y3YGC5IH.mjs";
@@ -66,8 +66,8 @@ import {
66
66
  useS_BasicAppShell,
67
67
  useS_ButtonImport,
68
68
  utils_layout_getItemsWithoutLinks
69
- } from "../chunk-KUWSCD5R.mjs";
70
- import "../chunk-5X2EYQ3O.mjs";
69
+ } from "../chunk-DTTVAJG7.mjs";
70
+ import "../chunk-CUMGXY5T.mjs";
71
71
  import "../chunk-Y3YGC5IH.mjs";
72
72
  import "../chunk-5U2JSHSJ.mjs";
73
73
  import "../chunk-7ZCOFATU.mjs";
@@ -1,5 +1,5 @@
1
1
  import * as axios from 'axios';
2
- import { AxiosResponse } from 'axios';
2
+ import { AxiosInstance, AxiosResponse } from 'axios';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { UseMutationOptions } from '@tanstack/react-query';
5
5
  import { I as IAQModule } from '../IAQModule-XZYlbivW.mjs';
@@ -11,7 +11,7 @@ interface MyApiResponse<IRes> {
11
11
  message: string;
12
12
  data: IRes;
13
13
  }
14
- declare function createBaseApi<T>(baseUrl: string): {
14
+ declare function createBaseApi<T>(baseUrl: string, axiosInstance: AxiosInstance): {
15
15
  getAll: () => Promise<axios.AxiosResponse<MyApiResponse<T[]>, any>>;
16
16
  getById: (id: number | string) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
17
17
  create: (data: Partial<T>) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
@@ -3,7 +3,7 @@ import {
3
3
  useLoadConfig,
4
4
  useMyReactMutation,
5
5
  useQ_AQ_GetAQModule
6
- } from "../chunk-5X2EYQ3O.mjs";
6
+ } from "../chunk-CUMGXY5T.mjs";
7
7
  import "../chunk-7ZCOFATU.mjs";
8
8
  import "../chunk-FWCSY2DS.mjs";
9
9
  export {
@@ -25,12 +25,12 @@ import {
25
25
  useS_BasicAppShell,
26
26
  useS_authenticate,
27
27
  utils_layout_getItemsWithoutLinks
28
- } from "../chunk-KUWSCD5R.mjs";
28
+ } from "../chunk-DTTVAJG7.mjs";
29
29
  import {
30
30
  baseAxios_default,
31
31
  useQ_AQ_GetAQModule,
32
32
  useQ_SkillCenter_GetAll
33
- } from "../chunk-5X2EYQ3O.mjs";
33
+ } from "../chunk-CUMGXY5T.mjs";
34
34
  import {
35
35
  createGenericStore
36
36
  } from "../chunk-Y3YGC5IH.mjs";
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "types": "./dist/hooks/index.d.mts"
23
23
  }
24
24
  },
25
- "version": "0.1.204",
25
+ "version": "0.1.205",
26
26
  "private": false,
27
27
  "files": [
28
28
  "dist"