files.com 1.2.264 → 1.2.266
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 +1 -1
- package/docs/models/RemoteMountBackend.md +199 -0
- package/docs/models/Sync.md +15 -0
- package/lib/Files.js +1 -1
- package/lib/models/RemoteMountBackend.js +657 -0
- package/lib/models/Sync.js +168 -119
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/RemoteMountBackend.js +427 -0
- package/src/models/Sync.js +26 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.266
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# RemoteMountBackend
|
|
2
|
+
|
|
3
|
+
## Example RemoteMountBackend Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"canary_file_path": "backend1.txt",
|
|
8
|
+
"enabled": true,
|
|
9
|
+
"fall": 1,
|
|
10
|
+
"health_check_enabled": true,
|
|
11
|
+
"health_check_type": "active",
|
|
12
|
+
"interval": 60,
|
|
13
|
+
"min_free_cpu": 1.0,
|
|
14
|
+
"min_free_mem": 1.0,
|
|
15
|
+
"priority": 1,
|
|
16
|
+
"remote_path": "/path/on/remote",
|
|
17
|
+
"remote_server_id": 1,
|
|
18
|
+
"remote_server_mount_id": 1,
|
|
19
|
+
"rise": 1,
|
|
20
|
+
"status": "healthy",
|
|
21
|
+
"undergoing_maintenance": true
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
* `canary_file_path` (string): Path to the canary file used for health checks.
|
|
26
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
27
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
28
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
29
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
30
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
31
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
32
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
33
|
+
* `priority` (int64): Priority of this backend.
|
|
34
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
35
|
+
* `remote_server_id` (int64): The remote server that this backend is associated with.
|
|
36
|
+
* `remote_server_mount_id` (int64): The mount ID of the Remote Server Mount that this backend is associated with.
|
|
37
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
38
|
+
* `status` (string): Status of this backend.
|
|
39
|
+
* `undergoing_maintenance` (boolean): True if this backend is undergoing maintenance.
|
|
40
|
+
* `id` (int64): Remote Mount Backend ID.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## List Remote Mount Backends
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
await RemoteMountBackend.list
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
* `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.
|
|
54
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Show Remote Mount Backend
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
await RemoteMountBackend.find(id)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Create Remote Mount Backend
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
await RemoteMountBackend.create({
|
|
75
|
+
'canary_file_path': "backend1.txt",
|
|
76
|
+
'remote_server_mount_id': 1,
|
|
77
|
+
'remote_server_id': 1,
|
|
78
|
+
'enabled': true,
|
|
79
|
+
'fall': 1,
|
|
80
|
+
'health_check_enabled': true,
|
|
81
|
+
'health_check_type': "active",
|
|
82
|
+
'interval': 60,
|
|
83
|
+
'min_free_cpu': 1.0,
|
|
84
|
+
'min_free_mem': 1.0,
|
|
85
|
+
'priority': 1,
|
|
86
|
+
'remote_path': "/path/on/remote",
|
|
87
|
+
'rise': 1,
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Parameters
|
|
93
|
+
|
|
94
|
+
* `canary_file_path` (string): Required - Path to the canary file used for health checks.
|
|
95
|
+
* `remote_server_mount_id` (int64): Required - The mount ID of the Remote Server Mount that this backend is associated with.
|
|
96
|
+
* `remote_server_id` (int64): Required - The remote server that this backend is associated with.
|
|
97
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
98
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
99
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
100
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
101
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
102
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
103
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
104
|
+
* `priority` (int64): Priority of this backend.
|
|
105
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
106
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Reset backend status to healthy
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
114
|
+
|
|
115
|
+
await remote_mount_backend.reset_status()
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Parameters
|
|
119
|
+
|
|
120
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Update Remote Mount Backend
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
129
|
+
|
|
130
|
+
await remote_mount_backend.update({
|
|
131
|
+
'canary_file_path': "backend1.txt",
|
|
132
|
+
'remote_server_mount_id': 1,
|
|
133
|
+
'remote_server_id': 1,
|
|
134
|
+
'enabled': true,
|
|
135
|
+
'fall': 1,
|
|
136
|
+
'health_check_enabled': true,
|
|
137
|
+
'health_check_type': "active",
|
|
138
|
+
'interval': 60,
|
|
139
|
+
'min_free_cpu': 1.0,
|
|
140
|
+
'min_free_mem': 1.0,
|
|
141
|
+
'priority': 1,
|
|
142
|
+
'remote_path': "/path/on/remote",
|
|
143
|
+
'rise': 1,
|
|
144
|
+
})
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
150
|
+
* `canary_file_path` (string): Required - Path to the canary file used for health checks.
|
|
151
|
+
* `remote_server_mount_id` (int64): Required - The mount ID of the Remote Server Mount that this backend is associated with.
|
|
152
|
+
* `remote_server_id` (int64): Required - The remote server that this backend is associated with.
|
|
153
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
154
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
155
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
156
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
157
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
158
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
159
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
160
|
+
* `priority` (int64): Priority of this backend.
|
|
161
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
162
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
163
|
+
|
|
164
|
+
### Example Response
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"canary_file_path": "backend1.txt",
|
|
169
|
+
"enabled": true,
|
|
170
|
+
"fall": 1,
|
|
171
|
+
"health_check_enabled": true,
|
|
172
|
+
"health_check_type": "active",
|
|
173
|
+
"interval": 60,
|
|
174
|
+
"min_free_cpu": 1.0,
|
|
175
|
+
"min_free_mem": 1.0,
|
|
176
|
+
"priority": 1,
|
|
177
|
+
"remote_path": "/path/on/remote",
|
|
178
|
+
"remote_server_id": 1,
|
|
179
|
+
"remote_server_mount_id": 1,
|
|
180
|
+
"rise": 1,
|
|
181
|
+
"status": "healthy",
|
|
182
|
+
"undergoing_maintenance": true
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Delete Remote Mount Backend
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
192
|
+
|
|
193
|
+
await remote_mount_backend.delete()
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Parameters
|
|
197
|
+
|
|
198
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
199
|
+
|
package/docs/models/Sync.md
CHANGED
|
@@ -152,6 +152,21 @@ await Sync.createMigrateTo
|
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Manually Run Sync
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
const sync = await Sync.find(id)
|
|
161
|
+
|
|
162
|
+
await sync.manual_run()
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Parameters
|
|
166
|
+
|
|
167
|
+
* `id` (int64): Required - Sync ID.
|
|
168
|
+
|
|
169
|
+
|
|
155
170
|
---
|
|
156
171
|
|
|
157
172
|
## Update Sync
|
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.266';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|