files.com 1.2.3 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/IpAddress.md +16 -0
- package/lib/Files.js +1 -1
- package/lib/models/IpAddress.js +45 -4
- package/package.json +1 -1
- package/shared/url_test_data.json +18 -0
- package/src/Files.js +1 -1
- package/src/models/IpAddress.js +18 -0
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.5
|
package/docs/models/IpAddress.md
CHANGED
@@ -29,6 +29,22 @@ await IpAddress.list({
|
|
29
29
|
```
|
30
30
|
|
31
31
|
|
32
|
+
### Parameters
|
33
|
+
|
34
|
+
* `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.
|
35
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
## List all possible public SmartFile IP addresses
|
40
|
+
|
41
|
+
```
|
42
|
+
await IpAddress.getSmartfileReserved({
|
43
|
+
'per_page': 1,
|
44
|
+
})
|
45
|
+
```
|
46
|
+
|
47
|
+
|
32
48
|
### Parameters
|
33
49
|
|
34
50
|
* `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.
|
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.
|
14
|
+
var version = '1.2.5';
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
17
17
|
var debugRequest = false;
|
package/lib/models/IpAddress.js
CHANGED
@@ -110,7 +110,7 @@ _class = IpAddress;
|
|
110
110
|
// Parameters:
|
111
111
|
// 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.
|
112
112
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
|
-
(0, _defineProperty2.default)(IpAddress, "
|
113
|
+
(0, _defineProperty2.default)(IpAddress, "getSmartfileReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
114
114
|
var _response$data2;
|
115
115
|
var params,
|
116
116
|
options,
|
@@ -135,7 +135,7 @@ _class = IpAddress;
|
|
135
135
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
136
136
|
case 6:
|
137
137
|
_context2.next = 8;
|
138
|
-
return _Api.default.sendRequest('/ip_addresses/
|
138
|
+
return _Api.default.sendRequest('/ip_addresses/smartfile-reserved', 'GET', params, options);
|
139
139
|
case 8:
|
140
140
|
response = _context2.sent;
|
141
141
|
PublicIpAddress = require('./PublicIpAddress.js').default;
|
@@ -151,7 +151,7 @@ _class = IpAddress;
|
|
151
151
|
// Parameters:
|
152
152
|
// 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.
|
153
153
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
154
|
-
(0, _defineProperty2.default)(IpAddress, "
|
154
|
+
(0, _defineProperty2.default)(IpAddress, "getExavaultReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
155
155
|
var _response$data3;
|
156
156
|
var params,
|
157
157
|
options,
|
@@ -176,7 +176,7 @@ _class = IpAddress;
|
|
176
176
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
177
177
|
case 6:
|
178
178
|
_context3.next = 8;
|
179
|
-
return _Api.default.sendRequest('/ip_addresses/reserved', 'GET', params, options);
|
179
|
+
return _Api.default.sendRequest('/ip_addresses/exavault-reserved', 'GET', params, options);
|
180
180
|
case 8:
|
181
181
|
response = _context3.sent;
|
182
182
|
PublicIpAddress = require('./PublicIpAddress.js').default;
|
@@ -189,6 +189,47 @@ _class = IpAddress;
|
|
189
189
|
}
|
190
190
|
}, _callee3);
|
191
191
|
})));
|
192
|
+
// Parameters:
|
193
|
+
// 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.
|
194
|
+
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
195
|
+
(0, _defineProperty2.default)(IpAddress, "getReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
196
|
+
var _response$data4;
|
197
|
+
var params,
|
198
|
+
options,
|
199
|
+
response,
|
200
|
+
PublicIpAddress,
|
201
|
+
_args4 = arguments;
|
202
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
203
|
+
while (1) switch (_context4.prev = _context4.next) {
|
204
|
+
case 0:
|
205
|
+
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
206
|
+
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
207
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
208
|
+
_context4.next = 4;
|
209
|
+
break;
|
210
|
+
}
|
211
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
212
|
+
case 4:
|
213
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
214
|
+
_context4.next = 6;
|
215
|
+
break;
|
216
|
+
}
|
217
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
218
|
+
case 6:
|
219
|
+
_context4.next = 8;
|
220
|
+
return _Api.default.sendRequest('/ip_addresses/reserved', 'GET', params, options);
|
221
|
+
case 8:
|
222
|
+
response = _context4.sent;
|
223
|
+
PublicIpAddress = require('./PublicIpAddress.js').default;
|
224
|
+
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : _response$data4.map(function (obj) {
|
225
|
+
return new PublicIpAddress(obj, options);
|
226
|
+
})) || []);
|
227
|
+
case 11:
|
228
|
+
case "end":
|
229
|
+
return _context4.stop();
|
230
|
+
}
|
231
|
+
}, _callee4);
|
232
|
+
})));
|
192
233
|
var _default = exports.default = IpAddress;
|
193
234
|
module.exports = IpAddress;
|
194
235
|
module.exports.default = IpAddress;
|
package/package.json
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"substitute_urls": [
|
3
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=%s&X-Goog-Expires=%s&X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-SignedHeaders=host",
|
4
|
+
"https://s3.amazonaws.com/test.example.com/metadata/1234/00000000-0000-0000-0001-00000000?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=%s&X-Amz-Expires=%s",
|
5
|
+
"https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=se=%s"
|
6
|
+
],
|
7
|
+
"error_urls": [
|
8
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z",
|
9
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z&X-Goog-Date=20220202T120000Z",
|
10
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Expires=900&X-Goog-Expires=600",
|
11
|
+
"https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=se=20220101T120000Z&sp=se=20220202T120000Z",
|
12
|
+
"https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=20220101T120000Z",
|
13
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101&X-Goog-Expires=900",
|
14
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=asdf&X-Goog-Expires=900",
|
15
|
+
"https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z&&X-Goog-Expires=900",
|
16
|
+
"https://s3.amazonaws.com/test.example.com/metadata/1234/00000000-0000-0000-0001-00000000?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=asdf&X-Amz-Expires=900"
|
17
|
+
]
|
18
|
+
}
|
package/src/Files.js
CHANGED
package/src/models/IpAddress.js
CHANGED
@@ -60,6 +60,24 @@ class IpAddress {
|
|
60
60
|
static all = (params = {}, options = {}) =>
|
61
61
|
IpAddress.list(params, options)
|
62
62
|
|
63
|
+
// Parameters:
|
64
|
+
// 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.
|
65
|
+
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
66
|
+
static getSmartfileReserved = async (params = {}, options = {}) => {
|
67
|
+
if (params.cursor && !isString(params.cursor)) {
|
68
|
+
throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
|
69
|
+
}
|
70
|
+
|
71
|
+
if (params.per_page && !isInt(params.per_page)) {
|
72
|
+
throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params.per_page)}`)
|
73
|
+
}
|
74
|
+
|
75
|
+
const response = await Api.sendRequest('/ip_addresses/smartfile-reserved', 'GET', params, options)
|
76
|
+
|
77
|
+
const PublicIpAddress = require('./PublicIpAddress.js').default
|
78
|
+
return response?.data?.map(obj => new PublicIpAddress(obj, options)) || []
|
79
|
+
}
|
80
|
+
|
63
81
|
// Parameters:
|
64
82
|
// 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.
|
65
83
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|