files.com 1.2.242 → 1.2.243
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/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.243
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"id": 1,
|
|
9
9
|
"notify_on_registration": true,
|
|
10
10
|
"notify_on_upload": true,
|
|
11
|
-
"
|
|
11
|
+
"notify_user_id": 1
|
|
12
12
|
}
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `id` (int64): Bundle Notification ID
|
|
17
17
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
|
18
18
|
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
|
19
|
-
* `
|
|
19
|
+
* `notify_user_id` (int64): The id of the user to notify.
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -54,7 +54,7 @@ await BundleNotification.find(id)
|
|
|
54
54
|
```
|
|
55
55
|
await BundleNotification.create({
|
|
56
56
|
'bundle_id': 1,
|
|
57
|
-
'
|
|
57
|
+
'notify_user_id': 1,
|
|
58
58
|
'notify_on_registration': true,
|
|
59
59
|
'notify_on_upload': true,
|
|
60
60
|
})
|
|
@@ -64,7 +64,7 @@ await BundleNotification.create({
|
|
|
64
64
|
### Parameters
|
|
65
65
|
|
|
66
66
|
* `bundle_id` (int64): Required - Bundle ID to notify on
|
|
67
|
-
* `
|
|
67
|
+
* `notify_user_id` (int64): The id of the user to notify.
|
|
68
68
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
|
69
69
|
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
|
70
70
|
|
|
@@ -95,7 +95,7 @@ await bundle_notification.update({
|
|
|
95
95
|
"id": 1,
|
|
96
96
|
"notify_on_registration": true,
|
|
97
97
|
"notify_on_upload": true,
|
|
98
|
-
"
|
|
98
|
+
"notify_user_id": 1
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.243';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
|
@@ -61,11 +61,11 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
|
|
|
61
61
|
_this.attributes.notify_on_upload = value;
|
|
62
62
|
});
|
|
63
63
|
// int64 # The id of the user to notify.
|
|
64
|
-
(0, _defineProperty2.default)(this, "
|
|
65
|
-
return _this.attributes.
|
|
64
|
+
(0, _defineProperty2.default)(this, "getNotifyUserId", function () {
|
|
65
|
+
return _this.attributes.notify_user_id;
|
|
66
66
|
});
|
|
67
|
-
(0, _defineProperty2.default)(this, "
|
|
68
|
-
_this.attributes.
|
|
67
|
+
(0, _defineProperty2.default)(this, "setNotifyUserId", function (value) {
|
|
68
|
+
_this.attributes.notify_user_id = value;
|
|
69
69
|
});
|
|
70
70
|
// Parameters:
|
|
71
71
|
// notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
@@ -316,7 +316,7 @@ _BundleNotification = BundleNotification;
|
|
|
316
316
|
});
|
|
317
317
|
// Parameters:
|
|
318
318
|
// bundle_id (required) - int64 - Bundle ID to notify on
|
|
319
|
-
//
|
|
319
|
+
// notify_user_id - int64 - The id of the user to notify.
|
|
320
320
|
// notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
321
321
|
// notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
|
322
322
|
(0, _defineProperty2.default)(BundleNotification, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
@@ -341,11 +341,11 @@ _BundleNotification = BundleNotification;
|
|
|
341
341
|
}
|
|
342
342
|
throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
|
|
343
343
|
case 6:
|
|
344
|
-
if (!(params.
|
|
344
|
+
if (!(params.notify_user_id && !(0, _utils.isInt)(params.notify_user_id))) {
|
|
345
345
|
_context6.next = 8;
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
348
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
348
|
+
throw new errors.InvalidParameterError("Bad parameter: notify_user_id must be of type Int, received ".concat((0, _utils.getType)(params.notify_user_id)));
|
|
349
349
|
case 8:
|
|
350
350
|
_context6.next = 10;
|
|
351
351
|
return _Api.default.sendRequest('/bundle_notifications', 'POST', params, options);
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
|
@@ -57,10 +57,10 @@ class BundleNotification {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
// int64 # The id of the user to notify.
|
|
60
|
-
|
|
60
|
+
getNotifyUserId = () => this.attributes.notify_user_id
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
this.attributes.
|
|
62
|
+
setNotifyUserId = value => {
|
|
63
|
+
this.attributes.notify_user_id = value
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// Parameters:
|
|
@@ -182,7 +182,7 @@ class BundleNotification {
|
|
|
182
182
|
|
|
183
183
|
// Parameters:
|
|
184
184
|
// bundle_id (required) - int64 - Bundle ID to notify on
|
|
185
|
-
//
|
|
185
|
+
// notify_user_id - int64 - The id of the user to notify.
|
|
186
186
|
// notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
187
187
|
// notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
|
188
188
|
static create = async (params = {}, options = {}) => {
|
|
@@ -194,8 +194,8 @@ class BundleNotification {
|
|
|
194
194
|
throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params.bundle_id)}`)
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
if (params.
|
|
198
|
-
throw new errors.InvalidParameterError(`Bad parameter:
|
|
197
|
+
if (params.notify_user_id && !isInt(params.notify_user_id)) {
|
|
198
|
+
throw new errors.InvalidParameterError(`Bad parameter: notify_user_id must be of type Int, received ${getType(params.notify_user_id)}`)
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
const response = await Api.sendRequest('/bundle_notifications', 'POST', params, options)
|