files.com 1.2.105 → 1.2.107
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/README.md +1 -0
- package/_VERSION +1 -1
- package/docs/Errors.md +1 -0
- package/docs/models/ApiKey.md +4 -4
- package/docs/models/Site.md +1 -0
- package/docs/models/User.md +7 -0
- package/lib/Errors.js +506 -494
- package/lib/Files.js +1 -1
- package/lib/models/ApiKey.js +4 -4
- package/lib/models/User.js +9 -0
- package/package.json +1 -1
- package/src/Errors.js +1 -0
- package/src/Files.js +1 -1
- package/src/models/ApiKey.js +4 -4
- package/src/models/User.js +9 -0
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.107';
|
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/ApiKey.js
CHANGED
@@ -86,7 +86,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
86
86
|
(0, _defineProperty2.default)(this, "setName", function (value) {
|
87
87
|
_this.attributes.name = value;
|
88
88
|
});
|
89
|
-
// string # Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
89
|
+
// string # Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
90
90
|
(0, _defineProperty2.default)(this, "getPermissionSet", function () {
|
91
91
|
return _this.attributes.permission_set;
|
92
92
|
});
|
@@ -124,7 +124,7 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
|
|
124
124
|
// Parameters:
|
125
125
|
// description - string - User-supplied description of API key.
|
126
126
|
// expires_at - string - API Key expiration date
|
127
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
127
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
128
128
|
// name - string - Internal name for the API Key. For your use.
|
129
129
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
130
130
|
var params,
|
@@ -428,7 +428,7 @@ _ApiKey = ApiKey;
|
|
428
428
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
429
429
|
// description - string - User-supplied description of API key.
|
430
430
|
// expires_at - string - API Key expiration date
|
431
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
431
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
432
432
|
// name (required) - string - Internal name for the API Key. For your use.
|
433
433
|
// path - string - Folder path restriction for this API key.
|
434
434
|
(0, _defineProperty2.default)(ApiKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
@@ -497,7 +497,7 @@ _ApiKey = ApiKey;
|
|
497
497
|
// Parameters:
|
498
498
|
// expires_at - string - API Key expiration date
|
499
499
|
// name - string - Internal name for the API Key. For your use.
|
500
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
500
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
501
501
|
(0, _defineProperty2.default)(ApiKey, "updateCurrent", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
502
502
|
var params,
|
503
503
|
options,
|
package/lib/models/User.js
CHANGED
@@ -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
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
package/src/models/ApiKey.js
CHANGED
@@ -80,7 +80,7 @@ class ApiKey {
|
|
80
80
|
this.attributes.name = value
|
81
81
|
}
|
82
82
|
|
83
|
-
// string # Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
83
|
+
// string # Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
84
84
|
getPermissionSet = () => this.attributes.permission_set
|
85
85
|
|
86
86
|
setPermissionSet = value => {
|
@@ -118,7 +118,7 @@ class ApiKey {
|
|
118
118
|
// Parameters:
|
119
119
|
// description - string - User-supplied description of API key.
|
120
120
|
// expires_at - string - API Key expiration date
|
121
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
121
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
122
122
|
// name - string - Internal name for the API Key. For your use.
|
123
123
|
update = async (params = {}) => {
|
124
124
|
if (!this.attributes.id) {
|
@@ -269,7 +269,7 @@ class ApiKey {
|
|
269
269
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
270
270
|
// description - string - User-supplied description of API key.
|
271
271
|
// expires_at - string - API Key expiration date
|
272
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
272
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
273
273
|
// name (required) - string - Internal name for the API Key. For your use.
|
274
274
|
// path - string - Folder path restriction for this API key.
|
275
275
|
static create = async (params = {}, options = {}) => {
|
@@ -309,7 +309,7 @@ class ApiKey {
|
|
309
309
|
// Parameters:
|
310
310
|
// expires_at - string - API Key expiration date
|
311
311
|
// name - string - Internal name for the API Key. For your use.
|
312
|
-
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations).
|
312
|
+
// permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
313
313
|
static updateCurrent = async (params = {}, options = {}) => {
|
314
314
|
if (params.expires_at && !isString(params.expires_at)) {
|
315
315
|
throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params.expires_at)}`)
|
package/src/models/User.js
CHANGED
@@ -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?
|