cozy-client 60.7.0 → 60.9.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 +21 -8
- package/package.json +2 -2
- package/types/models/file.d.ts +1 -1
package/dist/CozyClient.js
CHANGED
|
@@ -3126,7 +3126,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
3126
3126
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
3127
3127
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
3128
3128
|
|
|
3129
|
-
CozyClient.version = "60.
|
|
3129
|
+
CozyClient.version = "60.9.0";
|
|
3130
3130
|
|
|
3131
3131
|
_microee.default.mixin(CozyClient);
|
|
3132
3132
|
|
package/dist/models/file.js
CHANGED
|
@@ -488,30 +488,43 @@ exports.hasMetadataAttribute = hasMetadataAttribute;
|
|
|
488
488
|
|
|
489
489
|
var getFullpath = /*#__PURE__*/function () {
|
|
490
490
|
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client, dirId, name) {
|
|
491
|
-
var
|
|
491
|
+
var driveId,
|
|
492
|
+
query,
|
|
493
|
+
_yield$client$query,
|
|
494
|
+
parentDir,
|
|
495
|
+
parentDirectoryPath,
|
|
496
|
+
_args3 = arguments;
|
|
492
497
|
|
|
493
498
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
494
499
|
while (1) {
|
|
495
500
|
switch (_context3.prev = _context3.next) {
|
|
496
501
|
case 0:
|
|
502
|
+
driveId = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : undefined;
|
|
503
|
+
|
|
497
504
|
if (dirId) {
|
|
498
|
-
_context3.next =
|
|
505
|
+
_context3.next = 3;
|
|
499
506
|
break;
|
|
500
507
|
}
|
|
501
508
|
|
|
502
509
|
throw new Error('You must provide a dirId');
|
|
503
510
|
|
|
504
|
-
case
|
|
505
|
-
|
|
506
|
-
return client.query((0, _dsl.Q)(_const.DOCTYPE_FILES).getById(dirId));
|
|
511
|
+
case 3:
|
|
512
|
+
query = (0, _dsl.Q)(_const.DOCTYPE_FILES).getById(dirId);
|
|
507
513
|
|
|
508
|
-
|
|
514
|
+
if (driveId) {
|
|
515
|
+
query = query.sharingById(driveId);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
_context3.next = 7;
|
|
519
|
+
return client.query(query);
|
|
520
|
+
|
|
521
|
+
case 7:
|
|
509
522
|
_yield$client$query = _context3.sent;
|
|
510
523
|
parentDir = _yield$client$query.data;
|
|
511
524
|
parentDirectoryPath = (0, _trimEnd.default)(parentDir.path, '/');
|
|
512
525
|
return _context3.abrupt("return", "".concat(parentDirectoryPath, "/").concat(name));
|
|
513
526
|
|
|
514
|
-
case
|
|
527
|
+
case 11:
|
|
515
528
|
case "end":
|
|
516
529
|
return _context3.stop();
|
|
517
530
|
}
|
|
@@ -873,7 +886,7 @@ var uploadFileWithConflictStrategy = /*#__PURE__*/function () {
|
|
|
873
886
|
});
|
|
874
887
|
_context6.prev = 2;
|
|
875
888
|
_context6.next = 5;
|
|
876
|
-
return getFullpath(client, dirId, name);
|
|
889
|
+
return getFullpath(client, dirId, name, driveId);
|
|
877
890
|
|
|
878
891
|
case 5:
|
|
879
892
|
path = _context6.sent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "60.
|
|
3
|
+
"version": "60.9.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-native-ios11-devicecheck": "^0.0.3"
|
|
75
75
|
},
|
|
76
76
|
"sideEffects": false,
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "84de18bb08af33cae617573ff7f92b45fbcdcd50"
|
|
78
78
|
}
|
package/types/models/file.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function hasMetadataAttribute({ file, attribute }: {
|
|
|
55
55
|
file: import("../types").IOCozyFile;
|
|
56
56
|
attribute: string;
|
|
57
57
|
}): boolean;
|
|
58
|
-
export function getFullpath(client: CozyClient, dirId: string, name: string): Promise<string>;
|
|
58
|
+
export function getFullpath(client: CozyClient, dirId: string, name: string, driveId?: any): Promise<string>;
|
|
59
59
|
export function move(client: CozyClient, file: import('../types').IOCozyFile | import('../types').NextcloudFile, destination: import('../types').IOCozyFolder | import('../types').NextcloudFile, { force, driveId }?: {
|
|
60
60
|
force: boolean;
|
|
61
61
|
driveId: string;
|