files.com 1.2.104 → 1.2.106

Sign up to get free protection for your applications and to get access to all the features.
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.104';
14
+ var version = '1.2.106';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -815,7 +815,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
815
815
  }
816
816
  }, _callee10);
817
817
  })));
818
- // Begin file upload
818
+ // Begin File Upload
819
819
  //
820
820
  // Parameters:
821
821
  // mkdir_parents - boolean - Create parent directories if they do not exist?
@@ -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 FileMigration to check for status updates.
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 # Sftp Host Key ID
36
+ // int64 # SFTP Host Key ID
37
37
  (0, _defineProperty2.default)(this, "getId", function () {
38
38
  return _this.attributes.id;
39
39
  });
@@ -359,6 +359,13 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
359
359
  (0, _defineProperty2.default)(this, "setPasswordExpired", function (value) {
360
360
  _this.attributes.password_expired = value;
361
361
  });
362
+ // boolean # Is the user an allowed to view all (non-billing) site configuration for this site?
363
+ (0, _defineProperty2.default)(this, "getReadonlySiteAdmin", function () {
364
+ return _this.attributes.readonly_site_admin;
365
+ });
366
+ (0, _defineProperty2.default)(this, "setReadonlySiteAdmin", function (value) {
367
+ _this.attributes.readonly_site_admin = value;
368
+ });
362
369
  // boolean # Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)
363
370
  (0, _defineProperty2.default)(this, "getRestapiPermission", function () {
364
371
  return _this.attributes.restapi_permission;
@@ -712,6 +719,7 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
712
719
  // notes - string - Any internal notes on the user
713
720
  // office_integration_enabled - boolean - Enable integration with Office for the web?
714
721
  // password_validity_days - int64 - Number of days to allow user to use the same password
722
+ // readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
715
723
  // receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
716
724
  // require_login_by - string - Require user to login by specified date otherwise it will be disabled.
717
725
  // require_password_change - boolean - Is a password change required upon next user login?
@@ -1177,6 +1185,7 @@ _User = User;
1177
1185
  // notes - string - Any internal notes on the user
1178
1186
  // office_integration_enabled - boolean - Enable integration with Office for the web?
1179
1187
  // password_validity_days - int64 - Number of days to allow user to use the same password
1188
+ // readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
1180
1189
  // receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
1181
1190
  // require_login_by - string - Require user to login by specified date otherwise it will be disabled.
1182
1191
  // require_password_change - boolean - Is a password change required upon next user login?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.104",
3
+ "version": "1.2.106",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Errors.js CHANGED
@@ -157,6 +157,7 @@ export class NotAuthorized_ApiKeyIsPathRestrictedError extends NotAuthorizedErro
157
157
  export class NotAuthorized_ApiKeyOnlyForDesktopAppError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_ApiKeyOnlyForDesktopAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForDesktopAppError = NotAuthorized_ApiKeyOnlyForDesktopAppError
158
158
  export class NotAuthorized_ApiKeyOnlyForMobileAppError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_ApiKeyOnlyForMobileAppError' } } errorClasses.NotAuthorized_ApiKeyOnlyForMobileAppError = NotAuthorized_ApiKeyOnlyForMobileAppError
159
159
  export class NotAuthorized_ApiKeyOnlyForOfficeIntegrationError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_ApiKeyOnlyForOfficeIntegrationError' } } errorClasses.NotAuthorized_ApiKeyOnlyForOfficeIntegrationError = NotAuthorized_ApiKeyOnlyForOfficeIntegrationError
160
+ export class NotAuthorized_BillingOrSiteAdminPermissionRequiredError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_BillingOrSiteAdminPermissionRequiredError' } } errorClasses.NotAuthorized_BillingOrSiteAdminPermissionRequiredError = NotAuthorized_BillingOrSiteAdminPermissionRequiredError
160
161
  export class NotAuthorized_BillingPermissionRequiredError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_BillingPermissionRequiredError' } } errorClasses.NotAuthorized_BillingPermissionRequiredError = NotAuthorized_BillingPermissionRequiredError
161
162
  export class NotAuthorized_BundleMaximumUsesReachedError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_BundleMaximumUsesReachedError' } } errorClasses.NotAuthorized_BundleMaximumUsesReachedError = NotAuthorized_BundleMaximumUsesReachedError
162
163
  export class NotAuthorized_CannotLoginWhileUsingKeyError extends NotAuthorizedError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotAuthorized_CannotLoginWhileUsingKeyError' } } errorClasses.NotAuthorized_CannotLoginWhileUsingKeyError = NotAuthorized_CannotLoginWhileUsingKeyError
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.104'
8
+ const version = '1.2.106'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -806,7 +806,7 @@ class File {
806
806
  return new FileAction(response?.data, this.options)
807
807
  }
808
808
 
809
- // Begin file upload
809
+ // Begin File Upload
810
810
  //
811
811
  // Parameters:
812
812
  // mkdir_parents - boolean - Create parent directories if they do not exist?
@@ -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 FileMigration to check for status updates.
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
 
@@ -28,7 +28,7 @@ class SftpHostKey {
28
28
 
29
29
  isLoaded = () => !!this.attributes.id
30
30
 
31
- // int64 # Sftp Host Key ID
31
+ // int64 # SFTP Host Key ID
32
32
  getId = () => this.attributes.id
33
33
 
34
34
  setId = value => {
@@ -353,6 +353,13 @@ class User {
353
353
  this.attributes.password_expired = value
354
354
  }
355
355
 
356
+ // boolean # Is the user an allowed to view all (non-billing) site configuration for this site?
357
+ getReadonlySiteAdmin = () => this.attributes.readonly_site_admin
358
+
359
+ setReadonlySiteAdmin = value => {
360
+ this.attributes.readonly_site_admin = value
361
+ }
362
+
356
363
  // boolean # Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)
357
364
  getRestapiPermission = () => this.attributes.restapi_permission
358
365
 
@@ -637,6 +644,7 @@ class User {
637
644
  // notes - string - Any internal notes on the user
638
645
  // office_integration_enabled - boolean - Enable integration with Office for the web?
639
646
  // password_validity_days - int64 - Number of days to allow user to use the same password
647
+ // readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
640
648
  // receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
641
649
  // require_login_by - string - Require user to login by specified date otherwise it will be disabled.
642
650
  // require_password_change - boolean - Is a password change required upon next user login?
@@ -916,6 +924,7 @@ class User {
916
924
  // notes - string - Any internal notes on the user
917
925
  // office_integration_enabled - boolean - Enable integration with Office for the web?
918
926
  // password_validity_days - int64 - Number of days to allow user to use the same password
927
+ // readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
919
928
  // receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
920
929
  // require_login_by - string - Require user to login by specified date otherwise it will be disabled.
921
930
  // require_password_change - boolean - Is a password change required upon next user login?
@@ -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