files.com 1.0.226 → 1.0.228

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;