@@ -4,11 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
var _typeof = require ( "@babel/runtime/helpers/typeof" ) ;
5
5
exports . __esModule = true ;
6
6
exports . default = void 0 ;
7
- var _regenerator = _interopRequireDefault ( require ( "@babel/runtime/regenerator" ) ) ;
8
7
var _slicedToArray2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/slicedToArray" ) ) ;
9
8
var _toConsumableArray2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/toConsumableArray" ) ) ;
10
9
var _createClass2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/createClass" ) ) ;
11
10
var _classCallCheck2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/classCallCheck" ) ) ;
11
+ var _regenerator = _interopRequireDefault ( require ( "@babel/runtime/regenerator" ) ) ;
12
12
var _defineProperty2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/defineProperty" ) ) ;
13
13
var _asyncToGenerator2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/asyncToGenerator" ) ) ;
14
14
var _objectWithoutProperties2 = _interopRequireDefault ( require ( "@babel/runtime/helpers/objectWithoutProperties" ) ) ;
@@ -17,7 +17,7 @@ var _Files = _interopRequireDefault(require("./Files"));
17
17
var errors = _interopRequireWildcard ( require ( "./Errors" ) ) ;
18
18
var _Logger = _interopRequireDefault ( require ( "./Logger" ) ) ;
19
19
var _utils = require ( "./utils" ) ;
20
- var _ref2 , _class , _ref3 , _ref5 , _ref7 ;
20
+ var _class ;
21
21
var _excluded = [ "timeoutSecs" ] ,
22
22
_excluded2 = [ "getAgentForUrl" ] ;
23
23
function _getRequireWildcardCache ( nodeInterop ) { if ( typeof WeakMap !== "function" ) return null ; var cacheBabelInterop = new WeakMap ( ) ; var cacheNodeInterop = new WeakMap ( ) ; return ( _getRequireWildcardCache = function _getRequireWildcardCache ( nodeInterop ) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop ; } ) ( nodeInterop ) ; }
@@ -34,8 +34,8 @@ var _fetchWithTimeout = function _fetchWithTimeout(url) {
34
34
} , timeoutSecs * 1000 ) ;
35
35
} ) ] ) ;
36
36
} ;
37
- var fetchWithRetry = function fetchWithRetry ( _x , _x2 ) {
38
- return ( _ref2 = _ref2 || ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee ( url , options ) {
37
+ var fetchWithRetry = /*#__PURE__*/ function ( ) {
38
+ var _ref2 = ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee ( url , options ) {
39
39
var retries ,
40
40
maxRetries ,
41
41
minRetryDelaySecs ,
@@ -79,14 +79,17 @@ var fetchWithRetry = function fetchWithRetry(_x, _x2) {
79
79
return _context . stop ( ) ;
80
80
}
81
81
} , _callee , null , [ [ 4 , 10 ] ] ) ;
82
- } ) ) ) . apply ( this , arguments ) ;
83
- } ;
82
+ } ) ) ;
83
+ return function fetchWithRetry ( _x , _x2 ) {
84
+ return _ref2 . apply ( this , arguments ) ;
85
+ } ;
86
+ } ( ) ;
84
87
var Api = /*#__PURE__*/ ( 0 , _createClass2 . default ) ( function Api ( ) {
85
88
( 0 , _classCallCheck2 . default ) ( this , Api ) ;
86
89
} ) ;
87
90
_class = Api ;
88
- ( 0 , _defineProperty2 . default ) ( Api , "_sendVerbatim" , function ( _x3 , _x4 , _x5 ) {
89
- return ( _ref3 = _ref3 || ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee2 ( path , verb , optionsRaw ) {
91
+ ( 0 , _defineProperty2 . default ) ( Api , "_sendVerbatim" , /*#__PURE__*/ function ( ) {
92
+ var _ref3 = ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee2 ( path , verb , optionsRaw ) {
90
93
var _ref4 , getAgentForUrl , options , isExternal , baseUrl , url , agent , response , headers , contentType , data , normalizedResponse ;
91
94
return _regenerator . default . wrap ( function _callee2$ ( _context2 ) {
92
95
while ( 1 ) switch ( _context2 . prev = _context2 . next ) {
@@ -194,17 +197,20 @@ _class = Api;
194
197
return _context2 . stop ( ) ;
195
198
}
196
199
} , _callee2 , null , [ [ 8 , 46 ] ] ) ;
197
- } ) ) ) . apply ( this , arguments ) ;
198
- } ) ;
200
+ } ) ) ;
201
+ return function ( _x3 , _x4 , _x5 ) {
202
+ return _ref3 . apply ( this , arguments ) ;
203
+ } ;
204
+ } ( ) ) ;
199
205
( 0 , _defineProperty2 . default ) ( Api , "sendFilePart" , function ( externalUrl , verb , data ) {
200
206
var optionsRaw = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : { } ;
201
207
var options = _objectSpread ( _objectSpread ( { } , optionsRaw ) , { } , {
202
208
body : data
203
209
} ) ;
204
210
return _class . _sendVerbatim ( externalUrl , verb , options ) ;
205
211
} ) ;
206
- ( 0 , _defineProperty2 . default ) ( Api , "_autoPaginate" , function ( _x6 , _x7 , _x8 , _x9 , _x10 , _x11 ) {
207
- return ( _ref5 = _ref5 || ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee3 ( path , verb , params , options , response , metadata ) {
212
+ ( 0 , _defineProperty2 . default ) ( Api , "_autoPaginate" , /*#__PURE__*/ function ( ) {
213
+ var _ref5 = ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee3 ( path , verb , params , options , response , metadata ) {
208
214
var _options$autoPaginate ;
209
215
var _response$headers , nextCursor , _ref6 , autoPaginateCount , previousAutoPaginateData , nextPage , nextParams , nextMetadata ;
210
216
return _regenerator . default . wrap ( function _callee3$ ( _context3 ) {
@@ -246,10 +252,13 @@ _class = Api;
246
252
return _context3 . stop ( ) ;
247
253
}
248
254
} , _callee3 ) ;
249
- } ) ) ) . apply ( this , arguments ) ;
250
- } ) ;
251
- ( 0 , _defineProperty2 . default ) ( Api , "sendRequest" , function ( _x12 , _x13 ) {
252
- return ( _ref7 = _ref7 || ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee4 ( path , verb ) {
255
+ } ) ) ;
256
+ return function ( _x6 , _x7 , _x8 , _x9 , _x10 , _x11 ) {
257
+ return _ref5 . apply ( this , arguments ) ;
258
+ } ;
259
+ } ( ) ) ;
260
+ ( 0 , _defineProperty2 . default ) ( Api , "sendRequest" , /*#__PURE__*/ function ( ) {
261
+ var _ref7 = ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee4 ( path , verb ) {
253
262
var params ,
254
263
options ,
255
264
metadata ,
@@ -342,8 +351,11 @@ _class = Api;
342
351
return _context4 . stop ( ) ;
343
352
}
344
353
} , _callee4 ) ;
345
- } ) ) ) . apply ( this , arguments ) ;
346
- } ) ;
354
+ } ) ) ;
355
+ return function ( _x12 , _x13 ) {
356
+ return _ref7 . apply ( this , arguments ) ;
357
+ } ;
358
+ } ( ) ) ;
347
359
var _default = Api ;
348
360
exports . default = _default ;
349
361
module . exports = Api ;
0 commit comments