eservices-core 1.0.410 → 1.0.411

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.
@@ -5,6 +5,9 @@ export interface ICustomerContext {
5
5
  email?: string;
6
6
  photo?: string;
7
7
  }
8
+ interface IUserInformation {
9
+ id: number;
10
+ }
8
11
  declare class ApplicationManager extends EventEmitter {
9
12
  #private;
10
13
  static EVENT_CONTEXT_UPDATE: string;
@@ -18,6 +21,10 @@ declare class ApplicationManager extends EventEmitter {
18
21
  * @description Current customer id. If Application state is not ready - undefined.
19
22
  */
20
23
  contextId?: number;
24
+ /**
25
+ * @description User information. Parent Object.
26
+ */
27
+ user?: IUserInformation;
21
28
  /**
22
29
  * @description Person information.
23
30
  */
@@ -15,6 +15,9 @@ export default function useCustomerState(): {
15
15
  readonly photo?: string;
16
16
  }[];
17
17
  readonly ready: boolean;
18
+ readonly user: {
19
+ readonly id: number;
20
+ };
18
21
  };
19
22
  currentContext: import("vue").ComputedRef<ICustomerContext>;
20
23
  isPerson: import("vue").ComputedRef<boolean>;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * eservices-core v1.0.410
2
+ * eservices-core v1.0.411
3
3
  * (c) 2022 ESERVICES
4
4
  */
5
5
  'use strict';
@@ -4611,6 +4611,7 @@ class ApplicationManager extends EventEmitter {
4611
4611
  const data = yield this.loadCustomerData();
4612
4612
  this.person = data;
4613
4613
  this.organizations = data.organizations;
4614
+ this.user = data.user;
4614
4615
  this.ready = true;
4615
4616
  const savedContext = Number.parseInt(localStorage.getItem(ApplicationManager.CURRENT_CONTEXT_KEY) || "");
4616
4617
  if (!Number.isNaN(savedContext) && this.validateContextId(Number(savedContext)))
@@ -6211,7 +6212,8 @@ function useCustomerState() {
6211
6212
  contextId: Manager.contextId,
6212
6213
  person: Manager.person,
6213
6214
  organizations: Manager.organizations,
6214
- ready: Manager.ready
6215
+ ready: Manager.ready,
6216
+ user: Manager.user
6215
6217
  });
6216
6218
  const currentContext = vue.computed(() => {
6217
6219
  if (!Manager.ready)
@@ -6230,6 +6232,7 @@ function useCustomerState() {
6230
6232
  Manager.onupdateData(() => {
6231
6233
  state.person = Manager.person;
6232
6234
  state.organizations = Manager.organizations;
6235
+ state.user = Manager.user;
6233
6236
  });
6234
6237
  Manager.onReady((v) => {
6235
6238
  state.ready = v;
@@ -10,4 +10,7 @@ export interface IClientContentData {
10
10
  id: number;
11
11
  name: string;
12
12
  }[];
13
+ user: {
14
+ id: number;
15
+ };
13
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.410",
3
+ "version": "1.0.411",
4
4
  "description": "Core library",
5
5
  "author": "",
6
6
  "scripts": {