files.com 1.0.226 → 1.0.227

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.226
1
+ 1.0.227
@@ -29,6 +29,22 @@ await IpAddress.list({
29
29
  ```
30
30
 
31
31
 
32
+ ### Parameters
33
+
34
+ * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
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 ExaVault IP addresses
40
+
41
+ ```
42
+ await IpAddress.getExavaultReserved({
43
+ 'per_page': 1,
44
+ })
45
+ ```
46
+
47
+
32
48
  ### Parameters
33
49
 
34
50
  * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
@@ -99,7 +99,7 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
99
99
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
100
100
  return IpAddress.list(params, options);
101
101
  });
102
- (0, _defineProperty2.default)(IpAddress, "getReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
102
+ (0, _defineProperty2.default)(IpAddress, "getExavaultReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
103
103
  var _response$data2;
104
104
  var params,
105
105
  options,
@@ -124,7 +124,7 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
124
124
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
125
125
  case 6:
126
126
  _context2.next = 8;
127
- return _Api.default.sendRequest("/ip_addresses/reserved", 'GET', params, options);
127
+ return _Api.default.sendRequest("/ip_addresses/exavault-reserved", 'GET', params, options);
128
128
  case 8:
129
129
  response = _context2.sent;
130
130
  return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
@@ -137,5 +137,43 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
137
137
  }
138
138
  }, _callee2);
139
139
  })));
140
+ (0, _defineProperty2.default)(IpAddress, "getReserved", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
141
+ var _response$data3;
142
+ var params,
143
+ options,
144
+ response,
145
+ _args3 = arguments;
146
+ return _regenerator.default.wrap(function _callee3$(_context3) {
147
+ while (1) {
148
+ switch (_context3.prev = _context3.next) {
149
+ case 0:
150
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
151
+ options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
152
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
153
+ _context3.next = 4;
154
+ break;
155
+ }
156
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
157
+ case 4:
158
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
159
+ _context3.next = 6;
160
+ break;
161
+ }
162
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
163
+ case 6:
164
+ _context3.next = 8;
165
+ return _Api.default.sendRequest("/ip_addresses/reserved", 'GET', params, options);
166
+ case 8:
167
+ response = _context3.sent;
168
+ return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
169
+ return new PublicIpAddress(obj, options);
170
+ })) || []);
171
+ case 10:
172
+ case "end":
173
+ return _context3.stop();
174
+ }
175
+ }
176
+ }, _callee3);
177
+ })));
140
178
  var _default = IpAddress;
141
179
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.226",
3
+ "version": "1.0.227",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -56,6 +56,23 @@ class IpAddress {
56
56
  static all = (params = {}, options = {}) =>
57
57
  IpAddress.list(params, options)
58
58
 
59
+ // Parameters:
60
+ // cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
61
+ // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
62
+ static getExavaultReserved = async (params = {}, options = {}) => {
63
+ if (params['cursor'] && !isString(params['cursor'])) {
64
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
65
+ }
66
+
67
+ if (params['per_page'] && !isInt(params['per_page'])) {
68
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
69
+ }
70
+
71
+ const response = await Api.sendRequest(`/ip_addresses/exavault-reserved`, 'GET', params, options)
72
+
73
+ return response?.data?.map(obj => new PublicIpAddress(obj, options)) || []
74
+ }
75
+
59
76
  // Parameters:
60
77
  // cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
61
78
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).