cozy-client 24.7.0 → 24.9.1
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/CHANGELOG.md +41 -0
- package/dist/CozyClient.js +1 -1
- package/dist/models/folder.js +8 -5
- package/dist/models/folder.spec.js +1 -0
- package/dist/store/documents.js +2 -16
- package/package.json +4 -4
- package/types/models/folder.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [24.9.1](https://github.com/cozy/cozy-client/compare/v24.9.0...v24.9.1) (2021-09-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Revert open upgrade ([6c945a5](https://github.com/cozy/cozy-client/commit/6c945a5ef8c286f546f4343df075cc73e6d3416c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [24.9.0](https://github.com/cozy/cozy-client/compare/v24.8.1...v24.9.0) (2021-09-22)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Add papers path to MAGIC_FOLDERS contante ([3e31d5b](https://github.com/cozy/cozy-client/commit/3e31d5b5e3de64b810366aee64610d92925de823))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [24.8.1](https://github.com/cozy/cozy-client/compare/v24.8.0...v24.8.1) (2021-09-20)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package cozy-client
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# [24.8.0](https://github.com/cozy/cozy-client/compare/v24.7.0...v24.8.0) (2021-09-16)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* Makes queryAll faster with many requests ([17a9e23](https://github.com/cozy/cozy-client/commit/17a9e2397f72f94daafd03b49f1cebae5bad0ec3))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
6
47
|
# [24.7.0](https://github.com/cozy/cozy-client/compare/v24.6.2...v24.7.0) (2021-09-14)
|
|
7
48
|
|
|
8
49
|
|
package/dist/CozyClient.js
CHANGED
|
@@ -2386,7 +2386,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2386
2386
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2387
2387
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2388
2388
|
|
|
2389
|
-
CozyClient.version = "24.
|
|
2389
|
+
CozyClient.version = "24.9.1";
|
|
2390
2390
|
|
|
2391
2391
|
_microee.default.mixin(CozyClient);
|
|
2392
2392
|
|
package/dist/models/folder.js
CHANGED
|
@@ -20,13 +20,16 @@ var _types = require("../types");
|
|
|
20
20
|
var _const = require("../const");
|
|
21
21
|
|
|
22
22
|
var APP_DOCTYPE = 'io.cozy.apps';
|
|
23
|
+
var administrative = 'administrative';
|
|
24
|
+
var photos = 'photos';
|
|
23
25
|
var MAGIC_FOLDERS = {
|
|
24
|
-
ADMINISTRATIVE: "".concat(APP_DOCTYPE, "/
|
|
25
|
-
PHOTOS: "".concat(APP_DOCTYPE, "/
|
|
26
|
-
PHOTOS_BACKUP: "".concat(APP_DOCTYPE, "/photos/mobile"),
|
|
27
|
-
PHOTOS_UPLOAD: "".concat(APP_DOCTYPE, "/photos/upload"),
|
|
26
|
+
ADMINISTRATIVE: "".concat(APP_DOCTYPE, "/").concat(administrative),
|
|
27
|
+
PHOTOS: "".concat(APP_DOCTYPE, "/").concat(photos),
|
|
28
|
+
PHOTOS_BACKUP: "".concat(APP_DOCTYPE, "/").concat(photos, "/mobile"),
|
|
29
|
+
PHOTOS_UPLOAD: "".concat(APP_DOCTYPE, "/").concat(photos, "/upload"),
|
|
28
30
|
NOTES: "".concat(APP_DOCTYPE, "/notes"),
|
|
29
|
-
HOME: "".concat(APP_DOCTYPE, "/home")
|
|
31
|
+
HOME: "".concat(APP_DOCTYPE, "/home"),
|
|
32
|
+
PAPERS: "".concat(APP_DOCTYPE, "/").concat(administrative, "/papers")
|
|
30
33
|
};
|
|
31
34
|
/**
|
|
32
35
|
* Returns a "Magic Folder", given its id. See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/#special-iocozyapps-doctypes
|
|
@@ -21,6 +21,7 @@ describe('Folder model', () => {
|
|
|
21
21
|
expect(MAGIC_FOLDERS.PHOTOS_BACKUP).toBeDefined()
|
|
22
22
|
expect(MAGIC_FOLDERS.NOTES).toBeDefined()
|
|
23
23
|
expect(MAGIC_FOLDERS.HOME).toBeDefined()
|
|
24
|
+
expect(MAGIC_FOLDERS.PAPERS).toBeDefined()
|
|
24
25
|
})
|
|
25
26
|
|
|
26
27
|
describe('ensureMagicFolder', () => {
|
package/dist/store/documents.js
CHANGED
|
@@ -184,21 +184,7 @@ var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStat
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
var sortedData = (0, _keyBy.default)(data, _helpers.properId);
|
|
187
|
-
var mergedData = {};
|
|
188
|
-
|
|
189
|
-
if (updatedStateWithIncluded && updatedStateWithIncluded[doctype]) {
|
|
190
|
-
Object.values(updatedStateWithIncluded[doctype]).map(function (dataState) {
|
|
191
|
-
if (!mergedData[doctype]) mergedData[doctype] = {};
|
|
192
|
-
var id = (0, _helpers.properId)(dataState);
|
|
193
|
-
|
|
194
|
-
if (sortedData[id]) {
|
|
195
|
-
mergedData[doctype][id] = _objectSpread(_objectSpread(_objectSpread({}, dataState), sortedData[id]), mergedData[doctype][id]);
|
|
196
|
-
} else {
|
|
197
|
-
mergedData[doctype][id] = _objectSpread(_objectSpread({}, dataState), mergedData[doctype][id]);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
|
|
187
|
+
var mergedData = Object.assign({}, updatedStateWithIncluded);
|
|
202
188
|
Object.values(sortedData).map(function (data) {
|
|
203
189
|
if (!mergedData[doctype]) mergedData[doctype] = {};
|
|
204
190
|
var id = (0, _helpers.properId)(data);
|
|
@@ -209,7 +195,7 @@ var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStat
|
|
|
209
195
|
mergedData[doctype][id] = data;
|
|
210
196
|
}
|
|
211
197
|
});
|
|
212
|
-
return
|
|
198
|
+
return mergedData;
|
|
213
199
|
};
|
|
214
200
|
|
|
215
201
|
exports.extractAndMergeDocument = extractAndMergeDocument;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"cozy-device-helper": "^1.12.0",
|
|
22
22
|
"cozy-flags": "2.7.1",
|
|
23
23
|
"cozy-logger": "^1.6.0",
|
|
24
|
-
"cozy-stack-client": "^24.
|
|
24
|
+
"cozy-stack-client": "^24.8.1",
|
|
25
25
|
"json-stable-stringify": "^1.0.1",
|
|
26
26
|
"lodash": "^4.17.13",
|
|
27
27
|
"microee": "^0.0.6",
|
|
28
28
|
"node-fetch": "^2.6.1",
|
|
29
|
-
"open": "
|
|
29
|
+
"open": "7.4.2",
|
|
30
30
|
"prop-types": "^15.6.2",
|
|
31
31
|
"react-redux": "^7.2.0",
|
|
32
32
|
"redux": "3 || 4",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"react-native-inappbrowser-reborn": "^3.5.1"
|
|
69
69
|
},
|
|
70
70
|
"sideEffects": false,
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "c1aa4cf33bf9bb17711953ec0bbba50e635c79a3"
|
|
72
72
|
}
|
package/types/models/folder.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export namespace MAGIC_FOLDERS {
|
|
|
5
5
|
const PHOTOS_UPLOAD: string;
|
|
6
6
|
const NOTES: string;
|
|
7
7
|
const HOME: string;
|
|
8
|
+
const PAPERS: string;
|
|
8
9
|
}
|
|
9
10
|
export function ensureMagicFolder(client: CozyClient, id: string, path: string): Promise<IOCozyFolder>;
|
|
10
11
|
export function createFolderWithReference(client: CozyClient, path: string, document: CozyClientDocument): Promise<IOCozyFolder>;
|