Skip to content

Commit b44cf50

Browse files
[Bot] push changes from Files.com
1 parent 327147f commit b44cf50

File tree

7 files changed

+106
-83
lines changed

7 files changed

+106
-83
lines changed

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.416
1+
1.0.417

docs/models/Site.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"ask_about_overwrites": true,
1919
"bundle_activity_notifications": "never",
2020
"bundle_expiration": 1,
21+
"bundle_not_found_message": "example",
2122
"bundle_password_required": true,
2223
"bundle_registration_notifications": "never",
2324
"bundle_require_registration": true,
@@ -237,6 +238,7 @@
237238
* `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
238239
* `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
239240
* `bundle_expiration` (int64): Site-wide Bundle expiration in days
241+
* `bundle_not_found_message` (string): Custom error message to show when bundle is not found.
240242
* `bundle_password_required` (boolean): Do Bundles require password protection?
241243
* `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
242244
* `bundle_require_registration` (boolean): Do Bundles require registration?
@@ -453,6 +455,7 @@ await Site.update({
453455
'disable_password_reset': true,
454456
'immutable_files': true,
455457
'session_pinned_by_ip': true,
458+
'bundle_not_found_message': "example",
456459
'bundle_password_required': true,
457460
'bundle_require_registration': true,
458461
'bundle_require_share_recipient': true,
@@ -588,6 +591,7 @@ await Site.update({
588591
* `disable_password_reset` (boolean): Is password reset disabled?
589592
* `immutable_files` (boolean): Are files protected from modification?
590593
* `session_pinned_by_ip` (boolean): Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
594+
* `bundle_not_found_message` (string): Custom error message to show when bundle is not found.
591595
* `bundle_password_required` (boolean): Do Bundles require password protection?
592596
* `bundle_require_registration` (boolean): Do Bundles require registration?
593597
* `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?

lib/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
1111
var apiKey;
1212
var baseUrl = 'https://app.files.com';
1313
var sessionId = null;
14-
var version = "1.0.416";
14+
var version = "1.0.417";
1515
var userAgent = "Files.com JavaScript SDK v".concat(version);
1616
var logLevel = _Logger.LogLevel.INFO;
1717
var debugRequest = false;

lib/models/Site.js

Lines changed: 90 additions & 79 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "files.com",
3-
"version": "1.0.416",
3+
"version": "1.0.417",
44
"description": "Files.com SDK for JavaScript",
55
"keywords": [
66
"files.com",

src/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
55
let apiKey
66
let baseUrl = 'https://app.files.com'
77
let sessionId = null
8-
let version = "1.0.416"
8+
let version = "1.0.417"
99
let userAgent = `Files.com JavaScript SDK v${version}`
1010

1111
let logLevel = LogLevel.INFO

src/models/Site.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ class Site {
6565
// int64 # Site-wide Bundle expiration in days
6666
getBundleExpiration = () => this.attributes.bundle_expiration
6767

68+
// string # Custom error message to show when bundle is not found.
69+
getBundleNotFoundMessage = () => this.attributes.bundle_not_found_message
70+
6871
// boolean # Do Bundles require password protection?
6972
getBundlePasswordRequired = () => this.attributes.bundle_password_required
7073

@@ -534,6 +537,7 @@ class Site {
534537
// disable_password_reset - boolean - Is password reset disabled?
535538
// immutable_files - boolean - Are files protected from modification?
536539
// session_pinned_by_ip - boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
540+
// bundle_not_found_message - string - Custom error message to show when bundle is not found.
537541
// bundle_password_required - boolean - Do Bundles require password protection?
538542
// bundle_require_registration - boolean - Do Bundles require registration?
539543
// bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
@@ -723,6 +727,10 @@ class Site {
723727
throw new errors.InvalidParameterError(`Bad parameter: password_min_length must be of type Int, received ${getType(params['password_min_length'])}`)
724728
}
725729

730+
if (params['bundle_not_found_message'] && !isString(params['bundle_not_found_message'])) {
731+
throw new errors.InvalidParameterError(`Bad parameter: bundle_not_found_message must be of type String, received ${getType(params['bundle_not_found_message'])}`)
732+
}
733+
726734
if (params['bundle_registration_notifications'] && !isString(params['bundle_registration_notifications'])) {
727735
throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_notifications must be of type String, received ${getType(params['bundle_registration_notifications'])}`)
728736
}

0 commit comments

Comments
 (0)