@m4l/core 0.0.27 → 0.0.28

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.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import type { GetLabelType, ModuleDictionary } from 'src/types/dictionary';
2
+ import type { GetLabelType, ModuleDictionary } from '../../types/dictionary';
3
3
  export interface ModuleDictionaryProviderProps {
4
4
  currentLang?: string;
5
5
  isAuth?: boolean;
@@ -1275,7 +1275,8 @@ const axiosOperation = async (props, enviroment, hostTools) => {
1275
1275
  parms = {},
1276
1276
  data: data2 = {},
1277
1277
  isRemote = true,
1278
- checkUnAuthorized = true
1278
+ checkUnAuthorized = true,
1279
+ headers
1279
1280
  } = props;
1280
1281
  let baseURL;
1281
1282
  if (isRemote) {
@@ -1289,8 +1290,9 @@ const axiosOperation = async (props, enviroment, hostTools) => {
1289
1290
  withCredentials: isRemote,
1290
1291
  method,
1291
1292
  url: `/${endPoint}`,
1292
- data: snakecaseKeys(data2, { deep: true }),
1293
+ data: data2,
1293
1294
  params: snakecaseKeys(parms, { deep: true }),
1295
+ headers,
1294
1296
  timeout
1295
1297
  }).then((response) => getResponse(endPoint, response)).catch((error) => Promise.reject(getError(error, hostTools, checkUnAuthorized))).finally(() => {
1296
1298
  hostTools.stopProgress();
@@ -16,6 +16,7 @@ export declare type NetworkProps = {
16
16
  timeout?: number;
17
17
  parms?: object;
18
18
  data?: object;
19
+ headers?: Record<string, string | number | boolean>;
19
20
  checkUnAuthorized?: boolean;
20
21
  isRemote?: boolean;
21
22
  showSuccesInfo?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/core",
3
3
  "private": false,
4
- "version": "0.0.27",
4
+ "version": "0.0.28",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {