files.com 1.2.261 → 1.2.263

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.261
1
+ 1.2.263
@@ -12,19 +12,23 @@
12
12
  "responseCode": 1,
13
13
  "success": true,
14
14
  "duration_ms": 1,
15
- "created_at": "2000-01-01T01:00:00Z"
15
+ "created_at": "2000-01-01T01:00:00Z",
16
+ "bytes_transferred": 1,
17
+ "http_method": "GET"
16
18
  }
17
19
  ```
18
20
 
19
21
  * `timestamp` (date-time): Start Time of Action. Deprecrated: Use created_at.
20
- * `remote_ip` (string): IP Address of Public Hosting Client
21
- * `server_ip` (string): IP Address of Public Hosting Server
22
- * `hostname` (string): HTTP Request Hostname
22
+ * `remote_ip` (string): IP Address of Public Hosting Client.
23
+ * `server_ip` (string): IP Address of Public Hosting Server.
24
+ * `hostname` (string): HTTP Request Hostname.
23
25
  * `path` (string): HTTP Request Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
24
- * `responseCode` (int64): HTTP Response Code
26
+ * `responseCode` (int64): HTTP Response Code.
25
27
  * `success` (boolean): Whether SFTP Action was successful.
26
- * `duration_ms` (int64): Duration (in milliseconds)
27
- * `created_at` (date-time): Start Time of Action
28
+ * `duration_ms` (int64): Duration (in milliseconds).
29
+ * `created_at` (date-time): Start Time of Action.
30
+ * `bytes_transferred` (int64): The number of bytes transferred for file downloads.
31
+ * `http_method` (string): Method of the HTTP call.
28
32
 
29
33
  ---
30
34
 
@@ -17,7 +17,6 @@
17
17
  "keep_after_copy": true,
18
18
  "delete_empty_folders": true,
19
19
  "disabled": true,
20
- "interval": "week",
21
20
  "trigger": "example",
22
21
  "trigger_file": "example",
23
22
  "include_patterns": [
@@ -29,6 +28,7 @@
29
28
  "created_at": "2000-01-01T01:00:00Z",
30
29
  "updated_at": "2000-01-01T01:00:00Z",
31
30
  "sync_interval_minutes": 1,
31
+ "interval": "week",
32
32
  "recurring_day": 25,
33
33
  "schedule_days_of_week": [
34
34
  0,
@@ -56,7 +56,6 @@
56
56
  * `keep_after_copy` (boolean): Keep files after copying?
57
57
  * `delete_empty_folders` (boolean): Delete empty folders after sync?
58
58
  * `disabled` (boolean): Is this sync disabled?
59
- * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
60
59
  * `trigger` (string): Trigger type: daily, custom_schedule, or manual
61
60
  * `trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
62
61
  * `include_patterns` (array(string)): Array of glob patterns to include
@@ -64,6 +63,7 @@
64
63
  * `created_at` (date-time): When this sync was created
65
64
  * `updated_at` (date-time): When this sync was last updated
66
65
  * `sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
66
+ * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
67
67
  * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
68
68
  * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
69
69
  * `schedule_times_of_day` (array(string)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
@@ -112,7 +112,7 @@ await Sync.create({
112
112
  'keep_after_copy': false,
113
113
  'delete_empty_folders': false,
114
114
  'disabled': false,
115
- 'interval': 1,
115
+ 'interval': "week",
116
116
  'trigger': "example",
117
117
  'trigger_file': "example",
118
118
  'recurring_day': 25,
@@ -135,7 +135,7 @@ await Sync.create({
135
135
  * `keep_after_copy` (boolean): Keep files after copying?
136
136
  * `delete_empty_folders` (boolean): Delete empty folders after sync?
137
137
  * `disabled` (boolean): Is this sync disabled?
138
- * `interval` (int64): Interval in minutes for sync (if scheduled)
138
+ * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
139
139
  * `trigger` (string): Trigger type: daily, custom_schedule, or manual
140
140
  * `trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
141
141
  * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -170,7 +170,7 @@ await sync.update({
170
170
  'keep_after_copy': false,
171
171
  'delete_empty_folders': false,
172
172
  'disabled': false,
173
- 'interval': 1,
173
+ 'interval': "week",
174
174
  'trigger': "example",
175
175
  'trigger_file': "example",
176
176
  'recurring_day': 25,
@@ -193,7 +193,7 @@ await sync.update({
193
193
  * `keep_after_copy` (boolean): Keep files after copying?
194
194
  * `delete_empty_folders` (boolean): Delete empty folders after sync?
195
195
  * `disabled` (boolean): Is this sync disabled?
196
- * `interval` (int64): Interval in minutes for sync (if scheduled)
196
+ * `interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
197
197
  * `trigger` (string): Trigger type: daily, custom_schedule, or manual
198
198
  * `trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
199
199
  * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -218,7 +218,6 @@ await sync.update({
218
218
  "keep_after_copy": true,
219
219
  "delete_empty_folders": true,
220
220
  "disabled": true,
221
- "interval": "week",
222
221
  "trigger": "example",
223
222
  "trigger_file": "example",
224
223
  "include_patterns": [
@@ -230,6 +229,7 @@ await sync.update({
230
229
  "created_at": "2000-01-01T01:00:00Z",
231
230
  "updated_at": "2000-01-01T01:00:00Z",
232
231
  "sync_interval_minutes": 1,
232
+ "interval": "week",
233
233
  "recurring_day": 25,
234
234
  "schedule_days_of_week": [
235
235
  0,
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.261';
15
+ var version = '1.2.263';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -36,15 +36,15 @@ var PublicHostingRequestLog = /*#__PURE__*/(0, _createClass2.default)(function P
36
36
  (0, _defineProperty2.default)(this, "getTimestamp", function () {
37
37
  return _this.attributes.timestamp;
38
38
  });
39
- // string # IP Address of Public Hosting Client
39
+ // string # IP Address of Public Hosting Client.
40
40
  (0, _defineProperty2.default)(this, "getRemoteIp", function () {
41
41
  return _this.attributes.remote_ip;
42
42
  });
43
- // string # IP Address of Public Hosting Server
43
+ // string # IP Address of Public Hosting Server.
44
44
  (0, _defineProperty2.default)(this, "getServerIp", function () {
45
45
  return _this.attributes.server_ip;
46
46
  });
47
- // string # HTTP Request Hostname
47
+ // string # HTTP Request Hostname.
48
48
  (0, _defineProperty2.default)(this, "getHostname", function () {
49
49
  return _this.attributes.hostname;
50
50
  });
@@ -52,7 +52,7 @@ var PublicHostingRequestLog = /*#__PURE__*/(0, _createClass2.default)(function P
52
52
  (0, _defineProperty2.default)(this, "getPath", function () {
53
53
  return _this.attributes.path;
54
54
  });
55
- // int64 # HTTP Response Code
55
+ // int64 # HTTP Response Code.
56
56
  (0, _defineProperty2.default)(this, "getResponseCode", function () {
57
57
  return _this.attributes.responseCode;
58
58
  });
@@ -60,14 +60,22 @@ var PublicHostingRequestLog = /*#__PURE__*/(0, _createClass2.default)(function P
60
60
  (0, _defineProperty2.default)(this, "getSuccess", function () {
61
61
  return _this.attributes.success;
62
62
  });
63
- // int64 # Duration (in milliseconds)
63
+ // int64 # Duration (in milliseconds).
64
64
  (0, _defineProperty2.default)(this, "getDurationMs", function () {
65
65
  return _this.attributes.duration_ms;
66
66
  });
67
- // date-time # Start Time of Action
67
+ // date-time # Start Time of Action.
68
68
  (0, _defineProperty2.default)(this, "getCreatedAt", function () {
69
69
  return _this.attributes.created_at;
70
70
  });
71
+ // int64 # The number of bytes transferred for file downloads.
72
+ (0, _defineProperty2.default)(this, "getBytesTransferred", function () {
73
+ return _this.attributes.bytes_transferred;
74
+ });
75
+ // string # Method of the HTTP call.
76
+ (0, _defineProperty2.default)(this, "getHttpMethod", function () {
77
+ return _this.attributes.http_method;
78
+ });
71
79
  Object.entries(attributes).forEach(function (_ref) {
72
80
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
73
81
  key = _ref2[0],
@@ -123,13 +123,6 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
123
123
  (0, _defineProperty2.default)(this, "setDisabled", function (value) {
124
124
  _this.attributes.disabled = value;
125
125
  });
126
- // string # If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
127
- (0, _defineProperty2.default)(this, "getInterval", function () {
128
- return _this.attributes.interval;
129
- });
130
- (0, _defineProperty2.default)(this, "setInterval", function (value) {
131
- _this.attributes.interval = value;
132
- });
133
126
  // string # Trigger type: daily, custom_schedule, or manual
134
127
  (0, _defineProperty2.default)(this, "getTrigger", function () {
135
128
  return _this.attributes.trigger;
@@ -173,6 +166,13 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
173
166
  (0, _defineProperty2.default)(this, "setSyncIntervalMinutes", function (value) {
174
167
  _this.attributes.sync_interval_minutes = value;
175
168
  });
169
+ // string # If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
170
+ (0, _defineProperty2.default)(this, "getInterval", function () {
171
+ return _this.attributes.interval;
172
+ });
173
+ (0, _defineProperty2.default)(this, "setInterval", function (value) {
174
+ _this.attributes.interval = value;
175
+ });
176
176
  // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
177
177
  (0, _defineProperty2.default)(this, "getRecurringDay", function () {
178
178
  return _this.attributes.recurring_day;
@@ -212,7 +212,7 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
212
212
  // keep_after_copy - boolean - Keep files after copying?
213
213
  // delete_empty_folders - boolean - Delete empty folders after sync?
214
214
  // disabled - boolean - Is this sync disabled?
215
- // interval - int64 - Interval in minutes for sync (if scheduled)
215
+ // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
216
216
  // trigger - string - Trigger type: daily, custom_schedule, or manual
217
217
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
218
218
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -282,11 +282,11 @@ var Sync = /*#__PURE__*/(0, _createClass2.default)(function Sync() {
282
282
  }
283
283
  throw new errors.InvalidParameterError("Bad parameter: dest_remote_server_id must be of type Int, received ".concat((0, _utils.getType)(params.dest_remote_server_id)));
284
284
  case 9:
285
- if (!(params.interval && !(0, _utils.isInt)(params.interval))) {
285
+ if (!(params.interval && !(0, _utils.isString)(params.interval))) {
286
286
  _context.next = 10;
287
287
  break;
288
288
  }
289
- throw new errors.InvalidParameterError("Bad parameter: interval must be of type Int, received ".concat((0, _utils.getType)(params.interval)));
289
+ throw new errors.InvalidParameterError("Bad parameter: interval must be of type String, received ".concat((0, _utils.getType)(params.interval)));
290
290
  case 10:
291
291
  if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
292
292
  _context.next = 11;
@@ -550,7 +550,7 @@ _Sync = Sync;
550
550
  // keep_after_copy - boolean - Keep files after copying?
551
551
  // delete_empty_folders - boolean - Delete empty folders after sync?
552
552
  // disabled - boolean - Is this sync disabled?
553
- // interval - int64 - Interval in minutes for sync (if scheduled)
553
+ // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
554
554
  // trigger - string - Trigger type: daily, custom_schedule, or manual
555
555
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
556
556
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -603,11 +603,11 @@ _Sync = Sync;
603
603
  }
604
604
  throw new errors.InvalidParameterError("Bad parameter: dest_remote_server_id must be of type Int, received ".concat((0, _utils.getType)(params.dest_remote_server_id)));
605
605
  case 6:
606
- if (!(params.interval && !(0, _utils.isInt)(params.interval))) {
606
+ if (!(params.interval && !(0, _utils.isString)(params.interval))) {
607
607
  _context6.next = 7;
608
608
  break;
609
609
  }
610
- throw new errors.InvalidParameterError("Bad parameter: interval must be of type Int, received ".concat((0, _utils.getType)(params.interval)));
610
+ throw new errors.InvalidParameterError("Bad parameter: interval must be of type String, received ".concat((0, _utils.getType)(params.interval)));
611
611
  case 7:
612
612
  if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
613
613
  _context6.next = 8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.261",
3
+ "version": "1.2.263",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -6,7 +6,7 @@ let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
8
  let language = null
9
- const version = '1.2.261'
9
+ const version = '1.2.263'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -31,30 +31,36 @@ class PublicHostingRequestLog {
31
31
  // date-time # Start Time of Action. Deprecrated: Use created_at.
32
32
  getTimestamp = () => this.attributes.timestamp
33
33
 
34
- // string # IP Address of Public Hosting Client
34
+ // string # IP Address of Public Hosting Client.
35
35
  getRemoteIp = () => this.attributes.remote_ip
36
36
 
37
- // string # IP Address of Public Hosting Server
37
+ // string # IP Address of Public Hosting Server.
38
38
  getServerIp = () => this.attributes.server_ip
39
39
 
40
- // string # HTTP Request Hostname
40
+ // string # HTTP Request Hostname.
41
41
  getHostname = () => this.attributes.hostname
42
42
 
43
43
  // string # HTTP Request Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
44
44
  getPath = () => this.attributes.path
45
45
 
46
- // int64 # HTTP Response Code
46
+ // int64 # HTTP Response Code.
47
47
  getResponseCode = () => this.attributes.responseCode
48
48
 
49
49
  // boolean # Whether SFTP Action was successful.
50
50
  getSuccess = () => this.attributes.success
51
51
 
52
- // int64 # Duration (in milliseconds)
52
+ // int64 # Duration (in milliseconds).
53
53
  getDurationMs = () => this.attributes.duration_ms
54
54
 
55
- // date-time # Start Time of Action
55
+ // date-time # Start Time of Action.
56
56
  getCreatedAt = () => this.attributes.created_at
57
57
 
58
+ // int64 # The number of bytes transferred for file downloads.
59
+ getBytesTransferred = () => this.attributes.bytes_transferred
60
+
61
+ // string # Method of the HTTP call.
62
+ getHttpMethod = () => this.attributes.http_method
63
+
58
64
  // Parameters:
59
65
  // 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.
60
66
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
@@ -119,13 +119,6 @@ class Sync {
119
119
  this.attributes.disabled = value
120
120
  }
121
121
 
122
- // string # If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
123
- getInterval = () => this.attributes.interval
124
-
125
- setInterval = value => {
126
- this.attributes.interval = value
127
- }
128
-
129
122
  // string # Trigger type: daily, custom_schedule, or manual
130
123
  getTrigger = () => this.attributes.trigger
131
124
 
@@ -167,6 +160,13 @@ class Sync {
167
160
  this.attributes.sync_interval_minutes = value
168
161
  }
169
162
 
163
+ // string # If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
164
+ getInterval = () => this.attributes.interval
165
+
166
+ setInterval = value => {
167
+ this.attributes.interval = value
168
+ }
169
+
170
170
  // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
171
171
  getRecurringDay = () => this.attributes.recurring_day
172
172
 
@@ -206,7 +206,7 @@ class Sync {
206
206
  // keep_after_copy - boolean - Keep files after copying?
207
207
  // delete_empty_folders - boolean - Delete empty folders after sync?
208
208
  // disabled - boolean - Is this sync disabled?
209
- // interval - int64 - Interval in minutes for sync (if scheduled)
209
+ // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
210
210
  // trigger - string - Trigger type: daily, custom_schedule, or manual
211
211
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
212
212
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -251,8 +251,8 @@ class Sync {
251
251
  throw new errors.InvalidParameterError(`Bad parameter: dest_remote_server_id must be of type Int, received ${getType(params.dest_remote_server_id)}`)
252
252
  }
253
253
 
254
- if (params.interval && !isInt(params.interval)) {
255
- throw new errors.InvalidParameterError(`Bad parameter: interval must be of type Int, received ${getType(params.interval)}`)
254
+ if (params.interval && !isString(params.interval)) {
255
+ throw new errors.InvalidParameterError(`Bad parameter: interval must be of type String, received ${getType(params.interval)}`)
256
256
  }
257
257
 
258
258
  if (params.trigger && !isString(params.trigger)) {
@@ -388,7 +388,7 @@ class Sync {
388
388
  // keep_after_copy - boolean - Keep files after copying?
389
389
  // delete_empty_folders - boolean - Delete empty folders after sync?
390
390
  // disabled - boolean - Is this sync disabled?
391
- // interval - int64 - Interval in minutes for sync (if scheduled)
391
+ // interval - string - If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
392
392
  // trigger - string - Trigger type: daily, custom_schedule, or manual
393
393
  // trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
394
394
  // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
@@ -420,8 +420,8 @@ class Sync {
420
420
  throw new errors.InvalidParameterError(`Bad parameter: dest_remote_server_id must be of type Int, received ${getType(params.dest_remote_server_id)}`)
421
421
  }
422
422
 
423
- if (params.interval && !isInt(params.interval)) {
424
- throw new errors.InvalidParameterError(`Bad parameter: interval must be of type Int, received ${getType(params.interval)}`)
423
+ if (params.interval && !isString(params.interval)) {
424
+ throw new errors.InvalidParameterError(`Bad parameter: interval must be of type String, received ${getType(params.interval)}`)
425
425
  }
426
426
 
427
427
  if (params.trigger && !isString(params.trigger)) {