@live-change/user-identification-service 0.8.149 → 0.9.1

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.
Files changed (2) hide show
  1. package/identification.js +3 -25
  2. package/package.json +4 -4
package/identification.js CHANGED
@@ -21,6 +21,7 @@ const identificationFields = {
21
21
  const Identification = definition.model({
22
22
  name: 'Identification',
23
23
  sessionOrUserProperty: {
24
+ globalView: true,
24
25
  ownerReadAccess: () => true,
25
26
  ownerWriteAccess: () => true,
26
27
  readAccess: () => true
@@ -30,29 +31,6 @@ const Identification = definition.model({
30
31
  }
31
32
  })
32
33
 
33
- definition.view({
34
- name: "identification",
35
- global: true,
36
- internal: true,
37
- properties: {
38
- sessionOrUserType: {
39
- type: String,
40
- validation: ['nonEmpty']
41
- },
42
- sessionOrUser: {
43
- validation: ['nonEmpty']
44
- }
45
- },
46
- returns: {
47
- type: Object
48
- },
49
- async daoPath({ sessionOrUserType, sessionOrUser }, { client, service }) {
50
- const owner = [sessionOrUserType, sessionOrUser]
51
- const id = owner.map(p => JSON.stringify(p)).join(':')
52
- return Identification.path(id)
53
- }
54
- })
55
-
56
34
  definition.trigger({
57
35
  name: 'setIdentification',
58
36
  properties: {
@@ -85,13 +63,13 @@ definition.trigger({
85
63
 
86
64
  if(currentIdentification) {
87
65
  emit({
88
- type: 'sessionOrUserOwnedIdentificationUpdated',
66
+ type: 'IdentificationUpdated',
89
67
  identifiers: { sessionOrUserType, sessionOrUser },
90
68
  data: newIdentification
91
69
  })
92
70
  } else {
93
71
  emit({
94
- type: 'sessionOrUserOwnedIdentificationSet',
72
+ type: 'IdentificationSet',
95
73
  identifiers: { sessionOrUserType, sessionOrUser },
96
74
  data: newIdentification
97
75
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-identification-service",
3
- "version": "0.8.149",
3
+ "version": "0.9.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.8.149",
26
- "@live-change/relations-plugin": "^0.8.149",
25
+ "@live-change/framework": "^0.9.1",
26
+ "@live-change/relations-plugin": "^0.9.1",
27
27
  "pluralize": "^8.0.0"
28
28
  },
29
- "gitHead": "0854ef672e27b8f3ea70ffeb788a33638844121e"
29
+ "gitHead": "d00e08ee081d6993421e4573fc25588345aaabca"
30
30
  }