@navservice/core 1.79.0 → 1.81.0

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/build/es/index.js CHANGED
@@ -617,11 +617,11 @@ class _hooks {
617
617
  }
618
618
  const utils_hooks = new _hooks;
619
619
  const _environment = class {
620
- static set(props) {
621
- window.sessionStorage.setItem("ENVIRONMENT", props);
620
+ static set(key, props) {
621
+ window.sessionStorage.setItem(key, props);
622
622
  }
623
- static get get() {
624
- return window.sessionStorage.getItem("ENVIRONMENT");
623
+ static get(key) {
624
+ return window.sessionStorage.getItem(key);
625
625
  }
626
626
  };
627
627
  const utils_environment = _environment;
@@ -1,29 +1,30 @@
1
1
  import { AxiosResponse } from "axios";
2
+ export type BaseUrl = "PUBLIC_BASE_URL_FINANCEIRO" | "PUBLIC_BASE_URL_USUARIO" | "PUBLIC_BASE_URL_BUCKET";
2
3
  declare const _api: {
3
4
  new (): {};
4
5
  servidor_pricipal: {
5
6
  new (): {};
6
- axios(key: string): import("axios").AxiosInstance;
7
+ axios(key: BaseUrl): import("axios").AxiosInstance;
7
8
  post({ baseURLKey, url, data, setToken }: {
8
- baseURLKey: string;
9
+ baseURLKey: BaseUrl;
9
10
  url: string;
10
11
  data: any;
11
12
  setToken?: boolean;
12
13
  }): Promise<AxiosResponse<any, any, {}>>;
13
14
  get({ baseURLKey, url, params, setToken }: {
14
- baseURLKey: string;
15
+ baseURLKey: BaseUrl;
15
16
  url: string;
16
17
  params?: any;
17
18
  setToken?: boolean;
18
19
  }): Promise<AxiosResponse<any, any, {}>>;
19
20
  patch({ baseURLKey, url, data, setToken }: {
20
- baseURLKey: string;
21
+ baseURLKey: BaseUrl;
21
22
  url: string;
22
23
  data: any;
23
24
  setToken?: boolean;
24
25
  }): Promise<AxiosResponse<any, any, {}>>;
25
26
  delete({ baseURLKey, url }: {
26
- baseURLKey: string;
27
+ baseURLKey: BaseUrl;
27
28
  url: string;
28
29
  setToken?: boolean;
29
30
  }): Promise<AxiosResponse<any, any, {}>>;
@@ -1,7 +1,7 @@
1
- type Envronment = "LOCALHOST" | "PRODUCAO" | "SANDBOX";
1
+ import { BaseUrl } from "./_api";
2
2
  declare const _environment: {
3
3
  new (): {};
4
- set(props: Envronment): void;
5
- get get(): Envronment;
4
+ set(key: BaseUrl, props: string): void;
5
+ get(key: BaseUrl): BaseUrl;
6
6
  };
7
7
  export default _environment;
@@ -4,27 +4,27 @@ declare const utils: {
4
4
  new (): {};
5
5
  servidor_pricipal: {
6
6
  new (): {};
7
- axios(key: string): import("axios").AxiosInstance;
7
+ axios(key: import("./_api").BaseUrl): import("axios").AxiosInstance;
8
8
  post({ baseURLKey, url, data, setToken }: {
9
- baseURLKey: string;
9
+ baseURLKey: import("./_api").BaseUrl;
10
10
  url: string;
11
11
  data: any;
12
12
  setToken?: boolean;
13
13
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
14
14
  get({ baseURLKey, url, params, setToken }: {
15
- baseURLKey: string;
15
+ baseURLKey: import("./_api").BaseUrl;
16
16
  url: string;
17
17
  params?: any;
18
18
  setToken?: boolean;
19
19
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
20
20
  patch({ baseURLKey, url, data, setToken }: {
21
- baseURLKey: string;
21
+ baseURLKey: import("./_api").BaseUrl;
22
22
  url: string;
23
23
  data: any;
24
24
  setToken?: boolean;
25
25
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
26
26
  delete({ baseURLKey, url }: {
27
- baseURLKey: string;
27
+ baseURLKey: import("./_api").BaseUrl;
28
28
  url: string;
29
29
  setToken?: boolean;
30
30
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -158,8 +158,8 @@ declare const utils: {
158
158
  };
159
159
  environment: {
160
160
  new (): {};
161
- set(props: "PRODUCAO" | "SANDBOX" | "LOCALHOST"): void;
162
- get get(): "PRODUCAO" | "SANDBOX" | "LOCALHOST";
161
+ set(key: import("./_api").BaseUrl, props: string): void;
162
+ get(key: import("./_api").BaseUrl): import("./_api").BaseUrl;
163
163
  };
164
164
  };
165
165
  export default utils;
@@ -792,12 +792,12 @@ class _hooks {
792
792
  //BANCO DE DADOS
793
793
  //SERVICES
794
794
  const _environment = class _environment {
795
- static set(props) {
796
- window.sessionStorage.setItem("ENVIRONMENT", props);
795
+ static set(key, props) {
796
+ window.sessionStorage.setItem(key, props);
797
797
  return;
798
798
  }
799
- static get get() {
800
- return window.sessionStorage.getItem("ENVIRONMENT");
799
+ static get(key) {
800
+ return window.sessionStorage.getItem(key);
801
801
  }
802
802
  };
803
803
  /* export default */ const utils_environment = (_environment);
@@ -1,29 +1,30 @@
1
1
  import { AxiosResponse } from "axios";
2
+ export type BaseUrl = "PUBLIC_BASE_URL_FINANCEIRO" | "PUBLIC_BASE_URL_USUARIO" | "PUBLIC_BASE_URL_BUCKET";
2
3
  declare const _api: {
3
4
  new (): {};
4
5
  servidor_pricipal: {
5
6
  new (): {};
6
- axios(key: string): import("axios").AxiosInstance;
7
+ axios(key: BaseUrl): import("axios").AxiosInstance;
7
8
  post({ baseURLKey, url, data, setToken }: {
8
- baseURLKey: string;
9
+ baseURLKey: BaseUrl;
9
10
  url: string;
10
11
  data: any;
11
12
  setToken?: boolean;
12
13
  }): Promise<AxiosResponse<any, any, {}>>;
13
14
  get({ baseURLKey, url, params, setToken }: {
14
- baseURLKey: string;
15
+ baseURLKey: BaseUrl;
15
16
  url: string;
16
17
  params?: any;
17
18
  setToken?: boolean;
18
19
  }): Promise<AxiosResponse<any, any, {}>>;
19
20
  patch({ baseURLKey, url, data, setToken }: {
20
- baseURLKey: string;
21
+ baseURLKey: BaseUrl;
21
22
  url: string;
22
23
  data: any;
23
24
  setToken?: boolean;
24
25
  }): Promise<AxiosResponse<any, any, {}>>;
25
26
  delete({ baseURLKey, url }: {
26
- baseURLKey: string;
27
+ baseURLKey: BaseUrl;
27
28
  url: string;
28
29
  setToken?: boolean;
29
30
  }): Promise<AxiosResponse<any, any, {}>>;
@@ -1,7 +1,7 @@
1
- type Envronment = "LOCALHOST" | "PRODUCAO" | "SANDBOX";
1
+ import { BaseUrl } from "./_api";
2
2
  declare const _environment: {
3
3
  new (): {};
4
- set(props: Envronment): void;
5
- get get(): Envronment;
4
+ set(key: BaseUrl, props: string): void;
5
+ get(key: BaseUrl): BaseUrl;
6
6
  };
7
7
  export default _environment;
@@ -4,27 +4,27 @@ declare const utils: {
4
4
  new (): {};
5
5
  servidor_pricipal: {
6
6
  new (): {};
7
- axios(key: string): import("axios").AxiosInstance;
7
+ axios(key: import("./_api").BaseUrl): import("axios").AxiosInstance;
8
8
  post({ baseURLKey, url, data, setToken }: {
9
- baseURLKey: string;
9
+ baseURLKey: import("./_api").BaseUrl;
10
10
  url: string;
11
11
  data: any;
12
12
  setToken?: boolean;
13
13
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
14
14
  get({ baseURLKey, url, params, setToken }: {
15
- baseURLKey: string;
15
+ baseURLKey: import("./_api").BaseUrl;
16
16
  url: string;
17
17
  params?: any;
18
18
  setToken?: boolean;
19
19
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
20
20
  patch({ baseURLKey, url, data, setToken }: {
21
- baseURLKey: string;
21
+ baseURLKey: import("./_api").BaseUrl;
22
22
  url: string;
23
23
  data: any;
24
24
  setToken?: boolean;
25
25
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
26
26
  delete({ baseURLKey, url }: {
27
- baseURLKey: string;
27
+ baseURLKey: import("./_api").BaseUrl;
28
28
  url: string;
29
29
  setToken?: boolean;
30
30
  }): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -158,8 +158,8 @@ declare const utils: {
158
158
  };
159
159
  environment: {
160
160
  new (): {};
161
- set(props: "PRODUCAO" | "SANDBOX" | "LOCALHOST"): void;
162
- get get(): "PRODUCAO" | "SANDBOX" | "LOCALHOST";
161
+ set(key: import("./_api").BaseUrl, props: string): void;
162
+ get(key: import("./_api").BaseUrl): import("./_api").BaseUrl;
163
163
  };
164
164
  };
165
165
  export default utils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/core",
3
- "version": "1.79.0",
3
+ "version": "1.81.0",
4
4
  "description": "Service core de todos os micro serviços",
5
5
  "type": "module",
6
6
  "exports": {