@fluxo-dev/api-client-base 25.3.1 → 25.3.3

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/index.cjs.js CHANGED
@@ -2637,6 +2637,11 @@ $$k({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2637
2637
  }
2638
2638
  });
2639
2639
 
2640
+ const LocalStorageConstants = {
2641
+ accessToken: 'access-token',
2642
+ userData: 'user-data'
2643
+ };
2644
+
2640
2645
  let HttpClient$1 = class HttpClient {
2641
2646
  get client() {
2642
2647
  return this._axiosInstance;
@@ -2654,7 +2659,9 @@ let HttpClient$1 = class HttpClient {
2654
2659
  const state$1 = state.store.getState();
2655
2660
  if (state$1.user.loggedIn) {
2656
2661
  return Object.assign(Object.assign({}, config), {
2657
- headers: Object.assign({}, config.headers)
2662
+ headers: Object.assign(Object.assign({}, config.headers), {
2663
+ 'Authorization': 'Bearer ' + localStorage.getItem(LocalStorageConstants.accessToken)
2664
+ })
2658
2665
  });
2659
2666
  }
2660
2667
  return config;
@@ -2785,11 +2792,6 @@ if ($stringify) {
2785
2792
 
2786
2793
  function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=true===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
2787
2794
 
2788
- const LocalStorageConstants = {
2789
- accessToken: 'access-token',
2790
- userData: 'user-data'
2791
- };
2792
-
2793
2795
  class FluxoStateDispatcher {
2794
2796
  static dispatchUserLogin(data) {
2795
2797
  state.store.dispatch(state.userLogin(data));
@@ -4320,14 +4322,6 @@ class ConfigurationService {
4320
4322
  getAllDomainRoleFrontends() {
4321
4323
  return HttpClient$1.Instance().client.get(`client/frontend`);
4322
4324
  }
4323
- getMultisessionUserState() {
4324
- return HttpClient$1.Instance().client.get('client/multisession');
4325
- }
4326
- setMultisessionUserState(state) {
4327
- return HttpClient$1.Instance().client.post('client/multisession', {
4328
- state
4329
- });
4330
- }
4331
4325
  }
4332
4326
 
4333
4327
  class UserService {
@@ -5240,6 +5234,9 @@ class ReportingService {
5240
5234
  print(command) {
5241
5235
  return HttpClient$1.Instance().client.post('reports/print', command);
5242
5236
  }
5237
+ updateReport(reportId, command) {
5238
+ return HttpClient$1.Instance().client.put(`reports/${reportId}`, command);
5239
+ }
5243
5240
  }
5244
5241
 
5245
5242
  exports.PrinterType = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxo-dev/api-client-base",
3
- "version": "25.3.1",
3
+ "version": "25.3.3",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "react": "^18.3.1",
@@ -8,7 +8,7 @@
8
8
  "react-router-dom": "^6.11.2",
9
9
  "react-redux": "^8.0.5",
10
10
  "@reduxjs/toolkit": "^1.9.1",
11
- "@fluxo-dev/state": "^25.3.1"
11
+ "@fluxo-dev/state": "^25.3.3"
12
12
  },
13
13
  "main": "./index.cjs.js",
14
14
  "types": "./index.cjs.d.ts"
@@ -1,4 +1,4 @@
1
1
  export interface DashboardCategory {
2
- id: string;
2
+ id: number;
3
3
  description: string;
4
4
  }
@@ -55,6 +55,4 @@ export declare class ConfigurationService {
55
55
  domainRoleId: number;
56
56
  frontends: string[];
57
57
  }[]>;
58
- getMultisessionUserState(): Promise<string>;
59
- setMultisessionUserState(state: string): Promise<void>;
60
58
  }
@@ -0,0 +1,8 @@
1
+ export interface CreateReportCommand {
2
+ name: string;
3
+ scope: string;
4
+ packageName: string;
5
+ namespace: string;
6
+ id: string;
7
+ annotations: string;
8
+ }
@@ -10,4 +10,8 @@ export declare class ReportingService {
10
10
  deleteReport(id: number): Promise<void>;
11
11
  getParametersSchema(fullScope: string): Promise<ParametersSchema>;
12
12
  print(command: PrintReportCommand): Promise<void>;
13
+ updateReport(reportId: number, command: {
14
+ name: string;
15
+ annotations: string;
16
+ }): Promise<void>;
13
17
  }