cozy-client 29.1.0 → 29.1.3
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/CozyClient.js +2 -2
- package/dist/models/dacc.js +1 -1
- package/dist/models/dacc.spec.js +7 -0
- package/dist/models/index.js +5 -1
- package/package.json +2 -2
- package/types/models/index.d.ts +2 -1
package/dist/CozyClient.js
CHANGED
|
@@ -119,7 +119,7 @@ var referencesUnsupportedError = function referencesUnsupportedError(relationshi
|
|
|
119
119
|
var securiseUri = function securiseUri(uri) {
|
|
120
120
|
var _window$cozy;
|
|
121
121
|
|
|
122
|
-
if (uri && window && (_window$cozy = window['cozy']) !== null && _window$cozy !== void 0 && _window$cozy.isSecureProtocol) {
|
|
122
|
+
if (uri && typeof window !== 'undefined' && (_window$cozy = window['cozy']) !== null && _window$cozy !== void 0 && _window$cozy.isSecureProtocol) {
|
|
123
123
|
var secureUrl = new URL(uri);
|
|
124
124
|
secureUrl.protocol = 'https:';
|
|
125
125
|
return secureUrl.toString();
|
|
@@ -2550,7 +2550,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2550
2550
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2551
2551
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2552
2552
|
|
|
2553
|
-
CozyClient.version = "29.1.
|
|
2553
|
+
CozyClient.version = "29.1.3";
|
|
2554
2554
|
|
|
2555
2555
|
_microee.default.mixin(CozyClient);
|
|
2556
2556
|
|
package/dist/models/dacc.js
CHANGED
|
@@ -47,7 +47,7 @@ var checkMeasureParams = function checkMeasureParams(measure) {
|
|
|
47
47
|
throw new Error('Date should be in YYYY-MM-DD format');
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
if (
|
|
50
|
+
if (typeof value !== 'number') {
|
|
51
51
|
throw new Error('Missing or wrong type parameter: value');
|
|
52
52
|
}
|
|
53
53
|
|
package/dist/models/dacc.spec.js
CHANGED
|
@@ -28,12 +28,19 @@ describe('dacc', () => {
|
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
it('should throw an error when value is missing or malformed', () => {
|
|
31
|
+
const measureNoValue = { ...measure }
|
|
32
|
+
delete measureNoValue.value
|
|
33
|
+
expect(() => checkMeasureParams(measureNoValue)).toThrow()
|
|
31
34
|
expect(() => checkMeasureParams({ ...measure, value: null })).toThrow()
|
|
32
35
|
expect(() =>
|
|
33
36
|
checkMeasureParams({ ...measure, value: 'notacorrectvalue' })
|
|
34
37
|
).toThrow()
|
|
35
38
|
})
|
|
36
39
|
|
|
40
|
+
it('should not throw an error when value is 0', () => {
|
|
41
|
+
expect(() => checkMeasureParams({ ...measure, value: 0 })).not.toThrow()
|
|
42
|
+
})
|
|
43
|
+
|
|
37
44
|
it('should throw an error when measureName is missing or malformed', () => {
|
|
38
45
|
expect(() =>
|
|
39
46
|
checkMeasureParams({ ...measure, measureName: null })
|
package/dist/models/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.sharing = exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0;
|
|
8
|
+
exports.dacc = exports.sharing = exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0;
|
|
9
9
|
|
|
10
10
|
var trigger = _interopRequireWildcard(require("./trigger"));
|
|
11
11
|
|
|
@@ -58,6 +58,10 @@ exports.timeseries = timeseries;
|
|
|
58
58
|
var sharing = _interopRequireWildcard(require("./sharing"));
|
|
59
59
|
|
|
60
60
|
exports.sharing = sharing;
|
|
61
|
+
|
|
62
|
+
var dacc = _interopRequireWildcard(require("./dacc"));
|
|
63
|
+
|
|
64
|
+
exports.dacc = dacc;
|
|
61
65
|
// For backward compatibility before 9.0.0
|
|
62
66
|
var triggers = trigger;
|
|
63
67
|
exports.triggers = triggers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "29.1.
|
|
3
|
+
"version": "29.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "5471636693d11500031cd1cdb3d7217f5ae9871c"
|
|
77
77
|
}
|
package/types/models/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ import * as contact from "./contact";
|
|
|
13
13
|
import * as document from "./document";
|
|
14
14
|
import * as timeseries from "./timeseries";
|
|
15
15
|
import * as sharing from "./sharing";
|
|
16
|
-
|
|
16
|
+
import * as dacc from "./dacc";
|
|
17
|
+
export { trigger, instance, applications, file, folder, note, account, permission, utils, contact, document, timeseries, sharing, dacc };
|