@live-change/notification-service 0.8.13 → 0.8.15

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/notification.js +22 -0
  2. package/package.json +3 -3
package/notification.js CHANGED
@@ -370,4 +370,26 @@ definition.action({
370
370
  }
371
371
  })
372
372
 
373
+ definition.action({
374
+ name: 'testNotification',
375
+ properties: {
376
+ notificationType: {
377
+ type: String
378
+ },
379
+ ...config.fields
380
+ },
381
+ async execute({ notificationType, ...data }, { client, service }, emit) {
382
+ if(!notificationType) notificationType = 'example_TestNotification'
383
+ const fields = {}
384
+ for(const key in config.fields) fields[key] = data[key]
385
+ service.trigger({
386
+ type: 'notify',
387
+ sessionOrUserType: client.user ? 'user_User' : 'session_Session',
388
+ sessionOrUser: client.user || client.session,
389
+ notificationType,
390
+ ...fields
391
+ })
392
+ }
393
+ })
394
+
373
395
  export default definition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/notification-service",
3
- "version": "0.8.13",
3
+ "version": "0.8.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,8 +21,8 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.8.13"
24
+ "@live-change/framework": "^0.8.15"
25
25
  },
26
- "gitHead": "4453aa639a9fe1a857d93d73ebd28a82c97fdd87",
26
+ "gitHead": "4897eefbf3ce9ace57630127da89503c71114563",
27
27
  "type": "module"
28
28
  }