@routr/simpledata 2.0.6-alpha.2 → 2.0.7-alpha.0
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.
- package/dist/api.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -65,7 +65,7 @@ function get(resources) {
|
|
|
65
65
|
if (call.request.ref == null) {
|
|
66
66
|
return callback(new errors_1.BadRequest("parameter ref is required"), null);
|
|
67
67
|
}
|
|
68
|
-
const resource = common_1.Helper.deepCopy(resources.find((r) => r.
|
|
68
|
+
const resource = common_1.Helper.deepCopy(resources.find((r) => r.ref === call.request.ref));
|
|
69
69
|
// Serialize to protobuf
|
|
70
70
|
if (resource)
|
|
71
71
|
resource.spec = jsonToStruct(resource.spec);
|
package/dist/utils.js
CHANGED
|
@@ -54,7 +54,7 @@ const jsonFromStruct = protobufUtil.struct.decode;
|
|
|
54
54
|
const logger = (0, logger_1.getLogger)({ service: "simpledata", filePath: __filename });
|
|
55
55
|
const findCriteriaMap = {};
|
|
56
56
|
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_AGENT_BY_USERNAME] = (parameters) => `$..[?(@.spec.username=='${parameters.username}')]`;
|
|
57
|
-
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_CREDENTIAL_BY_REFERENCE] = (parameters) => `$..[?(@.
|
|
57
|
+
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_CREDENTIAL_BY_REFERENCE] = (parameters) => `$..[?(@.ref=='${parameters.ref}')]`;
|
|
58
58
|
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_DOMAIN_BY_DOMAINURI] = (parameters) => `$..[?(@.spec.context.domainUri=='${parameters.domainUri}')]`;
|
|
59
59
|
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_NUMBER_BY_TELURL] = (parameters) => `$..[?(@.spec.location.telUrl=="${parameters.telUrl}")]`;
|
|
60
60
|
findCriteriaMap[common_1.CommonConnect.FindCriteria.FIND_TRUNKS_WITH_SEND_REGISTER] = () => "$..[?(@.spec.outbound.sendRegister==true)]";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/simpledata",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-alpha.0",
|
|
4
4
|
"description": "Files-based API Server for Routr Connect",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
30
30
|
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
31
31
|
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
32
|
-
"@routr/common": "^2.0.
|
|
33
|
-
"@routr/processor": "^2.0.
|
|
32
|
+
"@routr/common": "^2.0.7-alpha.0",
|
|
33
|
+
"@routr/processor": "^2.0.7-alpha.0",
|
|
34
34
|
"ajv": "^6.12.6",
|
|
35
35
|
"google-protobuf": "^3.9.2",
|
|
36
36
|
"jsonpath": "^1.1.1",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"@types/google-protobuf": "^3.15.6",
|
|
54
54
|
"@types/jsonpath": "^0.2.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "1c08d04c570d1fa156729a8f61e43c3c51b68f96"
|
|
57
57
|
}
|