@live-change/email-service 0.8.117 → 0.8.119

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/auth.js +8 -18
  2. package/package.json +3 -3
package/auth.js CHANGED
@@ -101,31 +101,21 @@ definition.trigger({
101
101
  }
102
102
  })
103
103
 
104
- definition.trigger({
105
- name: "getEmail",
104
+ definition.view({
105
+ name: 'getEmail',
106
+ internal: true,
107
+ global: true,
106
108
  properties: {
107
109
  email: {
108
110
  type: String,
109
111
  validation: ['nonEmpty', 'email']
110
112
  }
111
113
  },
112
- async execute({ email }, context, _emit) {
113
- const emailData = await Email.get(preFilter(email))
114
- if(!emailData) throw { properties: { email: 'notFound' } }
115
- return emailData
116
- }
117
- })
118
-
119
- definition.trigger({
120
- name: "getEmailOrNull",
121
- properties: {
122
- email: {
123
- type: String,
124
- validation: ['nonEmpty', 'email']
125
- }
114
+ returns: {
115
+ type: Email
126
116
  },
127
- async execute({ email }, context, _emit) {
128
- return await Email.get(preFilter(email))
117
+ async daoPath({ email }) {
118
+ return Email.path(preFilter(email))
129
119
  }
130
120
  })
131
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/email-service",
3
- "version": "0.8.117",
3
+ "version": "0.8.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.8.117",
24
+ "@live-change/framework": "^0.8.119",
25
25
  "got": "^11.8.6",
26
26
  "html-to-text": "8.1.0",
27
27
  "inline-css": "4.0.2",
@@ -29,6 +29,6 @@
29
29
  "juice": "11.0.0",
30
30
  "nodemailer": "^6.7.2"
31
31
  },
32
- "gitHead": "10546047b3799e2dae072c9270b9469af92ea48f",
32
+ "gitHead": "1f0bb577d5bfe8b8d355775d7adbd73c789cd1d5",
33
33
  "type": "module"
34
34
  }