cozy-client 58.3.1 → 58.4.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/CozyClient.js +1 -1
- package/dist/models/file.js +17 -2
- package/package.json +3 -3
- package/types/models/file.d.ts +1 -0
package/dist/CozyClient.js
CHANGED
|
@@ -3143,7 +3143,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
3143
3143
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
3144
3144
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
3145
3145
|
|
|
3146
|
-
CozyClient.version = "58.
|
|
3146
|
+
CozyClient.version = "58.4.0";
|
|
3147
3147
|
|
|
3148
3148
|
_microee.default.mixin(CozyClient);
|
|
3149
3149
|
|
package/dist/models/file.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.normalize = normalize;
|
|
9
9
|
exports.ensureFilePath = ensureFilePath;
|
|
10
10
|
exports.getParentFolderId = getParentFolderId;
|
|
11
|
-
exports.downloadFile = exports.copy = exports.fetchBlobFileById = exports.isFromKonnector = exports.hasCertifications = exports.hasQualifications = exports.isPlainText = exports.uploadFileWithConflictStrategy = exports.generateFileNameForRevision = exports.generateNewFileNameOnConflict = exports.overrideFileForPath = exports.move = exports.getFullpath = exports.hasMetadataAttribute = exports.fetchFilesByQualificationRules = exports.saveFileQualification = exports.isSharingShorcutNew = exports.isSharingShortcutNew = exports.isSharingShorcut = exports.isSharingShortcut = exports.getSharingShortcutTargetDoctype = exports.getSharingShortcutTargetMime = exports.getSharingShortcutStatus = exports.isShortcut = exports.shouldBeOpenedByOnlyOffice = exports.isOnlyOfficeFile = exports.isEncryptedFileOrFolder = exports.isEncryptedFolder = exports.getEncryptiondRef = exports.isEncrypted = exports.isNote = exports.isDirectory = exports.isFile = exports.splitFilename = exports.ALBUMS_DOCTYPE = void 0;
|
|
11
|
+
exports.downloadFile = exports.copy = exports.fetchBlobFileById = exports.isFromKonnector = exports.hasCertifications = exports.hasQualifications = exports.isPlainText = exports.uploadFileWithConflictStrategy = exports.generateFileNameForRevision = exports.generateNewFileNameOnConflict = exports.overrideFileForPath = exports.move = exports.getFullpath = exports.hasMetadataAttribute = exports.fetchFilesByQualificationRules = exports.saveFileQualification = exports.isSharingShorcutNew = exports.isSharingShortcutNew = exports.isSharingShorcut = exports.isSharingShortcut = exports.getSharingShortcutTargetDoctype = exports.getSharingShortcutTargetMime = exports.getSharingShortcutStatus = exports.isShortcut = exports.shouldBeOpenedByOnlyOffice = exports.isOnlyOfficeFile = exports.isEncryptedFileOrFolder = exports.isEncryptedFolder = exports.getEncryptiondRef = exports.isEncrypted = exports.isDocs = exports.isNote = exports.isDirectory = exports.isFile = exports.splitFilename = exports.ALBUMS_DOCTYPE = void 0;
|
|
12
12
|
|
|
13
13
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
14
14
|
|
|
@@ -107,6 +107,21 @@ var isNote = function isNote(file) {
|
|
|
107
107
|
if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.title !== undefined && file.metadata.version !== undefined) return true;
|
|
108
108
|
return false;
|
|
109
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Is the given file a Docs note
|
|
112
|
+
*
|
|
113
|
+
* @param {import("../types").IOCozyFile} file The io.cozy.files
|
|
114
|
+
* @returns {boolean}
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
exports.isNote = isNote;
|
|
119
|
+
|
|
120
|
+
var isDocs = function isDocs(file) {
|
|
121
|
+
var _file$name, _file$metadata;
|
|
122
|
+
|
|
123
|
+
return (file === null || file === void 0 ? void 0 : (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.endsWith('.docs-note')) && !!(file !== null && file !== void 0 && (_file$metadata = file.metadata) !== null && _file$metadata !== void 0 && _file$metadata.externalId);
|
|
124
|
+
};
|
|
110
125
|
/**
|
|
111
126
|
* Whether the file is client-side encrypted
|
|
112
127
|
*
|
|
@@ -115,7 +130,7 @@ var isNote = function isNote(file) {
|
|
|
115
130
|
*/
|
|
116
131
|
|
|
117
132
|
|
|
118
|
-
exports.
|
|
133
|
+
exports.isDocs = isDocs;
|
|
119
134
|
|
|
120
135
|
var isEncrypted = function isEncrypted(file) {
|
|
121
136
|
return !!file.encrypted;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "58.
|
|
3
|
+
"version": "58.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/jest": "^26.0.20",
|
|
20
20
|
"@types/lodash": "^4.14.170",
|
|
21
21
|
"btoa": "^1.2.1",
|
|
22
|
-
"cozy-stack-client": "^58.
|
|
22
|
+
"cozy-stack-client": "^58.4.0",
|
|
23
23
|
"date-fns": "2.29.3",
|
|
24
24
|
"fast-deep-equal": "^3.1.3",
|
|
25
25
|
"json-stable-stringify": "^1.0.1",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-native-ios11-devicecheck": "^0.0.3"
|
|
75
75
|
},
|
|
76
76
|
"sideEffects": false,
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "b6264ded3f20fb399a83dcab9b8ec10b77bec5ad"
|
|
78
78
|
}
|
package/types/models/file.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export function splitFilename(file: import("../types").IOCozyFile): {
|
|
|
32
32
|
export function isFile(file: import("../types").IOCozyFile): boolean;
|
|
33
33
|
export function isDirectory(file: import("../types").IOCozyFile): boolean;
|
|
34
34
|
export function isNote(file: import("../types").IOCozyFile): boolean;
|
|
35
|
+
export function isDocs(file: import("../types").IOCozyFile): boolean;
|
|
35
36
|
export function isEncrypted(file: import("../types").IOCozyFile): boolean;
|
|
36
37
|
export function getEncryptiondRef(dir: import("../types").IOCozyFile): boolean;
|
|
37
38
|
export function isEncryptedFolder(dir: import("../types").IOCozyFile): boolean;
|