files.com 1.2.231 → 1.2.232

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.231
1
+ 1.2.232
@@ -23,7 +23,7 @@
23
23
  }
24
24
  ```
25
25
 
26
- * `earliest_date` (date-time): Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
26
+ * `earliest_date` (date-time): Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
27
27
  * `id` (int64): Restore Record ID.
28
28
  * `dirs_restored` (int64): Number of directories that were successfully restored.
29
29
  * `dirs_errored` (int64): Number of directories that were not able to be restored.
@@ -31,11 +31,11 @@
31
31
  * `files_restored` (int64): Number of files successfully restored.
32
32
  * `files_errored` (int64): Number of files that were not able to be restored.
33
33
  * `files_total` (int64): Total number of files processed.
34
- * `prefix` (string): Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
34
+ * `prefix` (string): Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
35
35
  * `restore_in_place` (boolean): If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
36
36
  * `restore_deleted_permissions` (boolean): If true, we will also restore any Permissions that match the same path prefix from the same dates.
37
37
  * `status` (string): Status of the restoration process.
38
- * `update_timestamps` (boolean): If trie, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
38
+ * `update_timestamps` (boolean): If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
39
39
  * `error_messages` (array(string)): Error messages received while restoring files and/or directories. Only present if there were errors.
40
40
 
41
41
  ---
@@ -59,16 +59,18 @@ await Restore.list
59
59
  ```
60
60
  await Restore.create({
61
61
  'earliest_date': "2000-01-01T01:00:00Z",
62
+ 'prefix': "foo/bar/baz.txt",
62
63
  'restore_deleted_permissions': true,
63
64
  'restore_in_place': true,
64
- 'prefix': "foo/bar/baz.txt",
65
+ 'update_timestamps': true,
65
66
  })
66
67
  ```
67
68
 
68
69
 
69
70
  ### Parameters
70
71
 
71
- * `earliest_date` (string): Required - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
72
+ * `earliest_date` (string): Required - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
73
+ * `prefix` (string): Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
72
74
  * `restore_deleted_permissions` (boolean): If true, we will also restore any Permissions that match the same path prefix from the same dates.
73
75
  * `restore_in_place` (boolean): If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
74
- * `prefix` (string): Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
76
+ * `update_timestamps` (boolean): If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
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.231';
14
+ var version = '1.2.232';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -33,7 +33,7 @@ var Restore = /*#__PURE__*/(0, _createClass2.default)(function Restore() {
33
33
  (0, _defineProperty2.default)(this, "isLoaded", function () {
34
34
  return !!_this.attributes.id;
35
35
  });
36
- // date-time # Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
36
+ // date-time # Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
37
37
  (0, _defineProperty2.default)(this, "getEarliestDate", function () {
38
38
  return _this.attributes.earliest_date;
39
39
  });
@@ -89,7 +89,7 @@ var Restore = /*#__PURE__*/(0, _createClass2.default)(function Restore() {
89
89
  (0, _defineProperty2.default)(this, "setFilesTotal", function (value) {
90
90
  _this.attributes.files_total = value;
91
91
  });
92
- // string # Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
92
+ // string # Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
93
93
  (0, _defineProperty2.default)(this, "getPrefix", function () {
94
94
  return _this.attributes.prefix;
95
95
  });
@@ -117,7 +117,7 @@ var Restore = /*#__PURE__*/(0, _createClass2.default)(function Restore() {
117
117
  (0, _defineProperty2.default)(this, "setStatus", function (value) {
118
118
  _this.attributes.status = value;
119
119
  });
120
- // boolean # If trie, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
120
+ // boolean # If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
121
121
  (0, _defineProperty2.default)(this, "getUpdateTimestamps", function () {
122
122
  return _this.attributes.update_timestamps;
123
123
  });
@@ -213,10 +213,11 @@ _Restore = Restore;
213
213
  return _Restore.list(params, options);
214
214
  });
215
215
  // Parameters:
216
- // earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
216
+ // earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
217
+ // prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
217
218
  // restore_deleted_permissions - boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
218
219
  // restore_in_place - boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
219
- // prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
220
+ // update_timestamps - boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
220
221
  (0, _defineProperty2.default)(Restore, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
221
222
  var params,
222
223
  options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.231",
3
+ "version": "1.2.232",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
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.231'
8
+ const version = '1.2.232'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -28,7 +28,7 @@ class Restore {
28
28
 
29
29
  isLoaded = () => !!this.attributes.id
30
30
 
31
- // date-time # Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
31
+ // date-time # Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
32
32
  getEarliestDate = () => this.attributes.earliest_date
33
33
 
34
34
  setEarliestDate = value => {
@@ -84,7 +84,7 @@ class Restore {
84
84
  this.attributes.files_total = value
85
85
  }
86
86
 
87
- // string # Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
87
+ // string # Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
88
88
  getPrefix = () => this.attributes.prefix
89
89
 
90
90
  setPrefix = value => {
@@ -112,7 +112,7 @@ class Restore {
112
112
  this.attributes.status = value
113
113
  }
114
114
 
115
- // boolean # If trie, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
115
+ // boolean # If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
116
116
  getUpdateTimestamps = () => this.attributes.update_timestamps
117
117
 
118
118
  setUpdateTimestamps = value => {
@@ -157,10 +157,11 @@ class Restore {
157
157
  Restore.list(params, options)
158
158
 
159
159
  // Parameters:
160
- // earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365
160
+ // earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
161
+ // prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
161
162
  // restore_deleted_permissions - boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
162
163
  // restore_in_place - boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
163
- // prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash.
164
+ // update_timestamps - boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
164
165
  static create = async (params = {}, options = {}) => {
165
166
  if (!params.earliest_date) {
166
167
  throw new errors.MissingParameterError('Parameter missing: earliest_date')