Skip to content

Commit fe25d03

Browse files
[Bot] push changes from Files.com
1 parent 1f333e5 commit fe25d03

22 files changed

Lines changed: 142 additions & 35 deletions

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.588
1+
1.2.589

docs/models/Bundle.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"key": "example value"
7676
},
7777
"send_one_time_password_to_recipient_at_registration": true,
78+
"workspace_id": 1,
7879
"has_inbox": true,
7980
"dont_allow_folders_in_uploads": true,
8081
"paths": [
@@ -126,6 +127,7 @@
126127
* `watermark_attachment` (Image): Preview watermark image applied to all bundle items.
127128
* `watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
128129
* `send_one_time_password_to_recipient_at_registration` (boolean): If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
130+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
129131
* `has_inbox` (boolean): Does this bundle have an associated inbox?
130132
* `dont_allow_folders_in_uploads` (boolean): Should folder uploads be prevented?
131133
* `paths` (array(string)): A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.
@@ -206,6 +208,7 @@ await Bundle.create({
206208
'skip_company': true,
207209
'start_access_on_date': "2000-01-01T01:00:00Z",
208210
'snapshot_id': 1,
211+
'workspace_id': 1,
209212
})
210213
```
211214

@@ -238,6 +241,7 @@ await Bundle.create({
238241
* `skip_company` (boolean): BundleRegistrations can be saved without providing company?
239242
* `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
240243
* `snapshot_id` (int64): ID of the snapshot containing this bundle's contents.
244+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
241245
* `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
242246

243247
---
@@ -294,6 +298,7 @@ await bundle.update({
294298
'start_access_on_date': "2000-01-01T01:00:00Z",
295299
'skip_email': true,
296300
'skip_name': true,
301+
'workspace_id': 1,
297302
'user_id': 1,
298303
'watermark_attachment_delete': false,
299304
})
@@ -326,6 +331,7 @@ await bundle.update({
326331
* `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
327332
* `skip_email` (boolean): BundleRegistrations can be saved without providing email?
328333
* `skip_name` (boolean): BundleRegistrations can be saved without providing name?
334+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
329335
* `user_id` (int64): The owning user id. Only site admins can set this.
330336
* `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
331337
* `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
@@ -405,6 +411,7 @@ await bundle.update({
405411
"key": "example value"
406412
},
407413
"send_one_time_password_to_recipient_at_registration": true,
414+
"workspace_id": 1,
408415
"has_inbox": true,
409416
"dont_allow_folders_in_uploads": true,
410417
"paths": [

docs/models/BundleAction.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
"bundle_code": "example",
2121
"bundle_id": 1,
2222
"bundle_recipient_id": 1,
23+
"workspace_id": 1,
2324
"created_at": "2000-01-01T01:00:00Z"
2425
},
2526
"created_at": "2000-01-01T01:00:00Z",
2627
"destination": "/to_path",
2728
"path": "",
2829
"source": "/from_path",
2930
"bundle_registration_id": 1,
31+
"workspace_id": 1,
3032
"bundle_registration_name": "John Doe",
3133
"bundle_registration_email": "john@example.com",
3234
"bundle_registration_ip": "127.0.0.1"
@@ -40,6 +42,7 @@
4042
* `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
4143
* `source` (string): The source path for this bundle action, if applicable
4244
* `bundle_registration_id` (int64): Identifier of the associated bundle registration
45+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
4346
* `bundle_registration_name` (string): Name of the registrant who performed the action
4447
* `bundle_registration_email` (string): Email of the registrant
4548
* `bundle_registration_ip` (string): IP address of the registrant
@@ -60,7 +63,7 @@ await BundleAction.list({
6063
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
6164
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
6265
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
63-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at` and `bundle_registration_id`.
66+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `bundle_registration_id`.
6467
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `bundle_id` or `bundle_registration_id`. Valid field combinations are `[ bundle_id, created_at ]`, `[ bundle_registration_id, created_at ]`, `[ bundle_id, bundle_registration_id ]` or `[ bundle_id, bundle_registration_id, created_at ]`.
6568
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
6669
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.

docs/models/BundleDownload.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@
1919
"bundle_code": "example",
2020
"bundle_id": 1,
2121
"bundle_recipient_id": 1,
22+
"workspace_id": 1,
2223
"created_at": "2000-01-01T01:00:00Z"
2324
},
2425
"download_method": "file",
2526
"path": "a/b/test.txt",
27+
"workspace_id": 1,
2628
"created_at": "2000-01-01T01:00:00Z"
2729
}
2830
```
2931

3032
* `bundle_registration` (BundleRegistration):
3133
* `download_method` (string): Download method (file or full_zip)
3234
* `path` (string): Download path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
35+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
3336
* `created_at` (date-time): Download date/time
3437

3538
---
@@ -48,7 +51,7 @@ await BundleDownload.list({
4851

4952
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
5053
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
51-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
54+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `created_at`.
5255
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
5356
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
5457
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.

docs/models/BundleNotification.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"id": 1,
99
"notify_on_registration": true,
1010
"notify_on_upload": true,
11-
"notify_user_id": 1
11+
"notify_user_id": 1,
12+
"workspace_id": 1
1213
}
1314
```
1415

@@ -17,6 +18,7 @@
1718
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
1819
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
1920
* `notify_user_id` (int64): The id of the user to notify.
21+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
2022
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
2123

2224
---
@@ -35,7 +37,7 @@ await BundleNotification.list({
3537
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
3638
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
3739
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
38-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
40+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `bundle_id`.
3941
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `bundle_id`.
4042

4143
---
@@ -101,7 +103,8 @@ await bundle_notification.update({
101103
"id": 1,
102104
"notify_on_registration": true,
103105
"notify_on_upload": true,
104-
"notify_user_id": 1
106+
"notify_user_id": 1,
107+
"workspace_id": 1
105108
}
106109
```
107110

docs/models/BundleRecipient.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"name": "John Doe",
99
"note": "Some note.",
1010
"recipient": "john.doe@example.com",
11-
"sent_at": "2000-01-01T01:00:00Z"
11+
"sent_at": "2000-01-01T01:00:00Z",
12+
"workspace_id": 1
1213
}
1314
```
1415

@@ -17,6 +18,7 @@
1718
* `note` (string): A note sent to the recipient with the bundle.
1819
* `recipient` (string): The recipient's email address.
1920
* `sent_at` (date-time): When the Bundle was shared with this recipient.
21+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
2022
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
2123
* `bundle_id` (int64): Bundle to share.
2224
* `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
@@ -38,7 +40,7 @@ await BundleRecipient.list({
3840
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
3941
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
4042
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
43+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`.
4244
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`.
4345
* `bundle_id` (int64): Required - List recipients for the bundle with this ID.
4446

docs/models/BundleRegistration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"bundle_code": "example",
1919
"bundle_id": 1,
2020
"bundle_recipient_id": 1,
21+
"workspace_id": 1,
2122
"created_at": "2000-01-01T01:00:00Z"
2223
}
2324
```
@@ -34,6 +35,7 @@
3435
* `bundle_code` (string): Bundle URL code
3536
* `bundle_id` (int64): Id of associated bundle
3637
* `bundle_recipient_id` (int64): Id of associated bundle recipient
38+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
3739
* `created_at` (date-time): Registration creation date/time
3840

3941
---
@@ -53,5 +55,5 @@ await BundleRegistration.list({
5355
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
5456
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
5557
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
56-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id` and `created_at`.
58+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `bundle_id` or `created_at`.
5759
* `bundle_id` (int64): ID of the associated Bundle

lib/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var apiKey;
1212
var baseUrl = 'https://app.files.com';
1313
var sessionId = null;
1414
var language = null;
15-
var version = '1.2.588';
15+
var version = '1.2.589';
1616
var userAgent = "Files.com JavaScript SDK v".concat(version);
1717
var logLevel = _Logger.LogLevel.INFO;
1818
var debugRequest = false;

lib/models/Bundle.js

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
288288
(0, _defineProperty2.default)(this, "setSendOneTimePasswordToRecipientAtRegistration", function (value) {
289289
_this.attributes.send_one_time_password_to_recipient_at_registration = value;
290290
});
291+
// int64 # Workspace ID. `0` means the default workspace.
292+
(0, _defineProperty2.default)(this, "getWorkspaceId", function () {
293+
return _this.attributes.workspace_id;
294+
});
295+
(0, _defineProperty2.default)(this, "setWorkspaceId", function (value) {
296+
_this.attributes.workspace_id = value;
297+
});
291298
// boolean # Does this bundle have an associated inbox?
292299
(0, _defineProperty2.default)(this, "getHasInbox", function () {
293300
return _this.attributes.has_inbox;
@@ -455,6 +462,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
455462
// start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
456463
// skip_email - boolean - BundleRegistrations can be saved without providing email?
457464
// skip_name - boolean - BundleRegistrations can be saved without providing name?
465+
// workspace_id - int64 - Workspace ID. `0` means the default workspace.
458466
// user_id - int64 - The owning user id. Only site admins can set this.
459467
// watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
460468
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
@@ -569,32 +577,38 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
569577
}
570578
throw new errors.InvalidParameterError("Bad parameter: start_access_on_date must be of type String, received ".concat((0, _utils.getType)(params.start_access_on_date)));
571579
case 17:
572-
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
580+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
573581
_context2.next = 18;
574582
break;
575583
}
576-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
584+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
577585
case 18:
586+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
587+
_context2.next = 19;
588+
break;
589+
}
590+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
591+
case 19:
578592
if (params.id) {
579-
_context2.next = 20;
593+
_context2.next = 21;
580594
break;
581595
}
582596
if (!_this.attributes.id) {
583-
_context2.next = 19;
597+
_context2.next = 20;
584598
break;
585599
}
586600
params.id = _this.id;
587-
_context2.next = 20;
601+
_context2.next = 21;
588602
break;
589-
case 19:
590-
throw new errors.MissingParameterError('Parameter missing: id');
591603
case 20:
592-
_context2.next = 21;
593-
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
604+
throw new errors.MissingParameterError('Parameter missing: id');
594605
case 21:
606+
_context2.next = 22;
607+
return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
608+
case 22:
595609
response = _context2.sent;
596610
return _context2.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, _this.options));
597-
case 22:
611+
case 23:
598612
case "end":
599613
return _context2.stop();
600614
}
@@ -831,6 +845,7 @@ _Bundle = Bundle;
831845
// skip_company - boolean - BundleRegistrations can be saved without providing company?
832846
// start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
833847
// snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
848+
// workspace_id - int64 - Workspace ID. `0` means the default workspace.
834849
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
835850
(0, _defineProperty2.default)(Bundle, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
836851
var params,
@@ -944,12 +959,18 @@ _Bundle = Bundle;
944959
}
945960
throw new errors.InvalidParameterError("Bad parameter: snapshot_id must be of type Int, received ".concat((0, _utils.getType)(params.snapshot_id)));
946961
case 17:
947-
_context7.next = 18;
948-
return _Api.default.sendRequest('/bundles', 'POST', params, options);
962+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
963+
_context7.next = 18;
964+
break;
965+
}
966+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
949967
case 18:
968+
_context7.next = 19;
969+
return _Api.default.sendRequest('/bundles', 'POST', params, options);
970+
case 19:
950971
response = _context7.sent;
951972
return _context7.abrupt("return", new _Bundle(response === null || response === void 0 ? void 0 : response.data, options));
952-
case 19:
973+
case 20:
953974
case "end":
954975
return _context7.stop();
955976
}

0 commit comments

Comments
 (0)