files.com 1.2.104 → 1.2.105
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/File.md +1 -1
- package/docs/models/FileAction.md +1 -1
- package/docs/models/SftpHostKey.md +1 -1
- package/lib/Files.js +1 -1
- package/lib/models/File.js +1 -1
- package/lib/models/FileAction.js +1 -1
- package/lib/models/SftpHostKey.js +1 -1
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/File.js +1 -1
- package/src/models/FileAction.js +1 -1
- package/src/models/SftpHostKey.js +1 -1
- package/docs/models/ActionWebhookFailure.md +0 -16
- package/lib/models/ActionWebhookFailure.js +0 -98
- package/src/models/ActionWebhookFailure.js +0 -61
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.105
|
package/docs/models/File.md
CHANGED
@@ -10,4 +10,4 @@
|
|
10
10
|
```
|
11
11
|
|
12
12
|
* `status` (string): Status of file operation.
|
13
|
-
* `file_migration_id` (int64): If status is pending, this is the id of the
|
13
|
+
* `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates.
|
@@ -11,7 +11,7 @@
|
|
11
11
|
}
|
12
12
|
```
|
13
13
|
|
14
|
-
* `id` (int64):
|
14
|
+
* `id` (int64): SFTP Host Key ID
|
15
15
|
* `name` (string): The friendly name of this SFTP Host Key.
|
16
16
|
* `fingerprint_md5` (string): MD5 Fingerpint of the public key
|
17
17
|
* `fingerprint_sha256` (string): SHA256 Fingerpint of the public key
|
package/lib/Files.js
CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
11
11
|
var apiKey;
|
12
12
|
var baseUrl = 'https://app.files.com';
|
13
13
|
var sessionId = null;
|
14
|
-
var version = '1.2.
|
14
|
+
var version = '1.2.105';
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
17
17
|
var debugRequest = false;
|
package/lib/models/File.js
CHANGED
@@ -815,7 +815,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
815
815
|
}
|
816
816
|
}, _callee10);
|
817
817
|
})));
|
818
|
-
// Begin
|
818
|
+
// Begin File Upload
|
819
819
|
//
|
820
820
|
// Parameters:
|
821
821
|
// mkdir_parents - boolean - Create parent directories if they do not exist?
|
package/lib/models/FileAction.js
CHANGED
@@ -33,7 +33,7 @@ var FileAction = /*#__PURE__*/(0, _createClass2.default)(function FileAction() {
|
|
33
33
|
(0, _defineProperty2.default)(this, "getStatus", function () {
|
34
34
|
return _this.attributes.status;
|
35
35
|
});
|
36
|
-
// int64 # If status is pending, this is the id of the
|
36
|
+
// int64 # If status is pending, this is the id of the File Migration to check for status updates.
|
37
37
|
(0, _defineProperty2.default)(this, "getFileMigrationId", function () {
|
38
38
|
return _this.attributes.file_migration_id;
|
39
39
|
});
|
@@ -33,7 +33,7 @@ var SftpHostKey = /*#__PURE__*/(0, _createClass2.default)(function SftpHostKey()
|
|
33
33
|
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
34
34
|
return !!_this.attributes.id;
|
35
35
|
});
|
36
|
-
// int64 #
|
36
|
+
// int64 # SFTP Host Key ID
|
37
37
|
(0, _defineProperty2.default)(this, "getId", function () {
|
38
38
|
return _this.attributes.id;
|
39
39
|
});
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/File.js
CHANGED
package/src/models/FileAction.js
CHANGED
@@ -31,7 +31,7 @@ class FileAction {
|
|
31
31
|
// string # Status of file operation.
|
32
32
|
getStatus = () => this.attributes.status
|
33
33
|
|
34
|
-
// int64 # If status is pending, this is the id of the
|
34
|
+
// int64 # If status is pending, this is the id of the File Migration to check for status updates.
|
35
35
|
getFileMigrationId = () => this.attributes.file_migration_id
|
36
36
|
}
|
37
37
|
|
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
---
|
3
|
-
|
4
|
-
## retry Action Webhook Failure
|
5
|
-
|
6
|
-
```
|
7
|
-
const action_webhook_failure = new ActionWebhookFailure()
|
8
|
-
action_webhook_failure.path = myFilePath
|
9
|
-
|
10
|
-
await action_webhook_failure.retry()
|
11
|
-
```
|
12
|
-
|
13
|
-
### Parameters
|
14
|
-
|
15
|
-
* `id` (int64): Required - Action Webhook Failure ID.
|
16
|
-
|
@@ -1,98 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
5
|
-
exports.__esModule = true;
|
6
|
-
exports.default = void 0;
|
7
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
13
|
-
var _Api = _interopRequireDefault(require("../Api"));
|
14
|
-
var errors = _interopRequireWildcard(require("../Errors"));
|
15
|
-
var _utils = require("../utils");
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
18
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
19
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable no-unused-vars */
|
20
|
-
/* eslint-enable no-unused-vars */
|
21
|
-
/**
|
22
|
-
* Class ActionWebhookFailure
|
23
|
-
*/
|
24
|
-
var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function ActionWebhookFailure() {
|
25
|
-
var _this = this;
|
26
|
-
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
27
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
28
|
-
(0, _classCallCheck2.default)(this, ActionWebhookFailure);
|
29
|
-
(0, _defineProperty2.default)(this, "attributes", {});
|
30
|
-
(0, _defineProperty2.default)(this, "options", {});
|
31
|
-
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
32
|
-
return !!_this.attributes.id;
|
33
|
-
});
|
34
|
-
// retry Action Webhook Failure
|
35
|
-
(0, _defineProperty2.default)(this, "retry", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
36
|
-
var params,
|
37
|
-
_args = arguments;
|
38
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
39
|
-
while (1) switch (_context.prev = _context.next) {
|
40
|
-
case 0:
|
41
|
-
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
42
|
-
if (_this.attributes.id) {
|
43
|
-
_context.next = 3;
|
44
|
-
break;
|
45
|
-
}
|
46
|
-
throw new errors.EmptyPropertyError('Current object has no id');
|
47
|
-
case 3:
|
48
|
-
if ((0, _utils.isObject)(params)) {
|
49
|
-
_context.next = 5;
|
50
|
-
break;
|
51
|
-
}
|
52
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
53
|
-
case 5:
|
54
|
-
params.id = _this.attributes.id;
|
55
|
-
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
56
|
-
_context.next = 8;
|
57
|
-
break;
|
58
|
-
}
|
59
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
60
|
-
case 8:
|
61
|
-
if (params.id) {
|
62
|
-
_context.next = 14;
|
63
|
-
break;
|
64
|
-
}
|
65
|
-
if (!_this.attributes.id) {
|
66
|
-
_context.next = 13;
|
67
|
-
break;
|
68
|
-
}
|
69
|
-
params.id = _this.id;
|
70
|
-
_context.next = 14;
|
71
|
-
break;
|
72
|
-
case 13:
|
73
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
74
|
-
case 14:
|
75
|
-
_context.next = 16;
|
76
|
-
return _Api.default.sendRequest("/action_webhook_failures/".concat(encodeURIComponent(params.id), "/retry"), 'POST', params, _this.options);
|
77
|
-
case 16:
|
78
|
-
case "end":
|
79
|
-
return _context.stop();
|
80
|
-
}
|
81
|
-
}, _callee);
|
82
|
-
})));
|
83
|
-
Object.entries(attributes).forEach(function (_ref2) {
|
84
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
85
|
-
key = _ref3[0],
|
86
|
-
value = _ref3[1];
|
87
|
-
var normalizedKey = key.replace('?', '');
|
88
|
-
_this.attributes[normalizedKey] = value;
|
89
|
-
Object.defineProperty(_this, normalizedKey, {
|
90
|
-
value: value,
|
91
|
-
writable: false
|
92
|
-
});
|
93
|
-
});
|
94
|
-
this.options = _objectSpread({}, options);
|
95
|
-
});
|
96
|
-
var _default = exports.default = ActionWebhookFailure;
|
97
|
-
module.exports = ActionWebhookFailure;
|
98
|
-
module.exports.default = ActionWebhookFailure;
|
@@ -1,61 +0,0 @@
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
2
|
-
import Api from '../Api'
|
3
|
-
import * as errors from '../Errors'
|
4
|
-
import {
|
5
|
-
getType, isArray, isInt, isObject, isString,
|
6
|
-
} from '../utils'
|
7
|
-
/* eslint-enable no-unused-vars */
|
8
|
-
|
9
|
-
/**
|
10
|
-
* Class ActionWebhookFailure
|
11
|
-
*/
|
12
|
-
class ActionWebhookFailure {
|
13
|
-
attributes = {}
|
14
|
-
|
15
|
-
options = {}
|
16
|
-
|
17
|
-
constructor(attributes = {}, options = {}) {
|
18
|
-
Object.entries(attributes).forEach(([key, value]) => {
|
19
|
-
const normalizedKey = key.replace('?', '')
|
20
|
-
|
21
|
-
this.attributes[normalizedKey] = value
|
22
|
-
|
23
|
-
Object.defineProperty(this, normalizedKey, { value, writable: false })
|
24
|
-
})
|
25
|
-
|
26
|
-
this.options = { ...options }
|
27
|
-
}
|
28
|
-
|
29
|
-
isLoaded = () => !!this.attributes.id
|
30
|
-
|
31
|
-
// retry Action Webhook Failure
|
32
|
-
retry = async (params = {}) => {
|
33
|
-
if (!this.attributes.id) {
|
34
|
-
throw new errors.EmptyPropertyError('Current object has no id')
|
35
|
-
}
|
36
|
-
|
37
|
-
if (!isObject(params)) {
|
38
|
-
throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
39
|
-
}
|
40
|
-
|
41
|
-
params.id = this.attributes.id
|
42
|
-
if (params.id && !isInt(params.id)) {
|
43
|
-
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
44
|
-
}
|
45
|
-
|
46
|
-
if (!params.id) {
|
47
|
-
if (this.attributes.id) {
|
48
|
-
params.id = this.id
|
49
|
-
} else {
|
50
|
-
throw new errors.MissingParameterError('Parameter missing: id')
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
await Api.sendRequest(`/action_webhook_failures/${encodeURIComponent(params.id)}/retry`, 'POST', params, this.options)
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
export default ActionWebhookFailure
|
59
|
-
|
60
|
-
module.exports = ActionWebhookFailure
|
61
|
-
module.exports.default = ActionWebhookFailure
|