@live-change/phone-service 0.8.118 → 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 -21
  2. package/package.json +4 -4
package/auth.js CHANGED
@@ -107,34 +107,21 @@ definition.trigger({
107
107
  }
108
108
  })
109
109
 
110
- definition.trigger({
111
- name: "getPhone",
110
+ definition.view({
111
+ name: 'getPhone',
112
+ internal: true,
113
+ global: true,
112
114
  properties: {
113
115
  phone: {
114
116
  type: String,
115
117
  validation: ['nonEmpty', 'phone']
116
118
  }
117
119
  },
118
- async execute({ phone }, context, emit) {
119
- phone = preFilter(phone)
120
- const phoneData = await Phone.get(phone)
121
- if(!phoneData) throw { properties: { phone: 'notFound' } }
122
- return phoneData
123
- }
124
- })
125
-
126
- definition.trigger({
127
- name: "getPhoneOrNull",
128
- properties: {
129
- phone: {
130
- type: String,
131
- validation: ['nonEmpty', 'phone']
132
- }
120
+ returns: {
121
+ type: Phone
133
122
  },
134
- async execute({ phone }, context, emit) {
135
- phone = preFilter(phone)
136
- const phoneData = await Phone.get(phone)
137
- return phoneData
123
+ async daoPath({ phone }) {
124
+ return Phone.path(preFilter(phone))
138
125
  }
139
126
  })
140
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/phone-service",
3
- "version": "0.8.118",
3
+ "version": "0.8.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.8.118",
26
- "@live-change/relations-plugin": "^0.8.118",
25
+ "@live-change/framework": "^0.8.119",
26
+ "@live-change/relations-plugin": "^0.8.119",
27
27
  "got": "^11.8.6",
28
28
  "html-to-text": "8.1.0",
29
29
  "jsdom": "^24.1.0",
30
30
  "smsapi": "2.0.9"
31
31
  },
32
- "gitHead": "cfccde9b1d340cbb23df96a2f0fba72da0a6e3ab"
32
+ "gitHead": "1f0bb577d5bfe8b8d355775d7adbd73c789cd1d5"
33
33
  }