@ama-sdk/core 11.3.0-prerelease.2 → 11.3.0-prerelease.20

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.
Files changed (42) hide show
  1. package/cjs/clients/api-angular-client.js +63 -3
  2. package/cjs/clients/api-fetch-client.js +2 -1
  3. package/cjs/fwk/date.js +12 -33
  4. package/cjs/fwk/errors.js +39 -43
  5. package/cjs/fwk/mocks/random-mock-adapter.js +10 -24
  6. package/cjs/fwk/mocks/sequential-mock-adapter.js +10 -24
  7. package/cjs/plugins/core/angular-plugin.js +4 -0
  8. package/cjs/plugins/mock-intercept/index.js +1 -0
  9. package/cjs/plugins/mock-intercept/mock-intercept.angular.js +347 -0
  10. package/cjs/plugins/si-token/si-token.request.js +21 -34
  11. package/esm2015/clients/api-angular-client.js +63 -3
  12. package/esm2015/clients/api-fetch-client.js +2 -1
  13. package/esm2015/fwk/date.js +12 -33
  14. package/esm2015/fwk/errors.js +39 -43
  15. package/esm2015/fwk/mocks/random-mock-adapter.js +10 -24
  16. package/esm2015/fwk/mocks/sequential-mock-adapter.js +10 -24
  17. package/esm2015/plugins/core/angular-plugin.js +4 -0
  18. package/esm2015/plugins/mock-intercept/index.js +1 -0
  19. package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +342 -0
  20. package/esm2015/plugins/si-token/si-token.request.js +21 -34
  21. package/package.json +16 -5
  22. package/src/clients/api-angular-client.d.ts +4 -0
  23. package/src/clients/api-angular-client.d.ts.map +1 -1
  24. package/src/clients/api-angular-client.js +18 -3
  25. package/src/clients/api-angular-client.js.map +1 -1
  26. package/src/clients/api-fetch-client.d.ts.map +1 -1
  27. package/src/clients/api-fetch-client.js +9 -1
  28. package/src/clients/api-fetch-client.js.map +1 -1
  29. package/src/plugins/core/angular-plugin.d.ts +40 -0
  30. package/src/plugins/core/angular-plugin.d.ts.map +1 -0
  31. package/src/plugins/core/angular-plugin.js +2 -0
  32. package/src/plugins/core/angular-plugin.js.map +1 -0
  33. package/src/plugins/core/fetch-plugin.d.ts +1 -0
  34. package/src/plugins/core/fetch-plugin.d.ts.map +1 -1
  35. package/src/plugins/mock-intercept/index.d.ts +1 -0
  36. package/src/plugins/mock-intercept/index.d.ts.map +1 -1
  37. package/src/plugins/mock-intercept/index.js +1 -0
  38. package/src/plugins/mock-intercept/index.js.map +1 -1
  39. package/src/plugins/mock-intercept/mock-intercept.angular.d.ts +15 -0
  40. package/src/plugins/mock-intercept/mock-intercept.angular.d.ts.map +1 -0
  41. package/src/plugins/mock-intercept/mock-intercept.angular.js +63 -0
  42. package/src/plugins/mock-intercept/mock-intercept.angular.js.map +1 -0
@@ -12,6 +12,14 @@ var _exception = require("../plugins/exception");
12
12
  var _reviver = require("../plugins/reviver");
13
13
  var _apihelpers = require("../fwk/api.helpers");
14
14
  var _errors = require("../fwk/errors");
15
+ function _array_like_to_array(arr, len) {
16
+ if (len == null || len > arr.length) len = arr.length;
17
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
18
+ return arr2;
19
+ }
20
+ function _array_without_holes(arr) {
21
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
22
+ }
15
23
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
16
24
  try {
17
25
  var info = gen[key](arg);
@@ -73,6 +81,12 @@ function _define_property(obj, key, value) {
73
81
  }
74
82
  return obj;
75
83
  }
84
+ function _iterable_to_array(iter) {
85
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
86
+ }
87
+ function _non_iterable_spread() {
88
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
89
+ }
76
90
  function _object_spread(target) {
77
91
  for(var i = 1; i < arguments.length; i++){
78
92
  var source = arguments[i] != null ? arguments[i] : {};
@@ -112,6 +126,17 @@ function _object_spread_props(target, source) {
112
126
  }
113
127
  return target;
114
128
  }
129
+ function _to_consumable_array(arr) {
130
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
131
+ }
132
+ function _unsupported_iterable_to_array(o, minLen) {
133
+ if (!o) return;
134
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
135
+ var n = Object.prototype.toString.call(o).slice(8, -1);
136
+ if (n === "Object" && o.constructor) n = o.constructor.name;
137
+ if (n === "Map" || n === "Set") return Array.from(n);
138
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
139
+ }
115
140
  function _ts_generator(thisArg, body) {
116
141
  var f, y, t, g, _ = {
117
142
  label: 0,
@@ -212,7 +237,7 @@ var DEFAULT_OPTIONS = {
212
237
  new _reviver.ReviverReply(),
213
238
  new _exception.ExceptionReply()
214
239
  ],
215
- // AngularPlugins: [],
240
+ angularPlugins: [],
216
241
  requestPlugins: [],
217
242
  enableTokenization: false,
218
243
  disableFallback: false
@@ -360,10 +385,45 @@ var ApiAngularClient = /*#__PURE__*/ function() {
360
385
  var data;
361
386
  var metadataSignal = (_options_metadata = options.metadata) === null || _options_metadata === void 0 ? void 0 : _options_metadata.signal;
362
387
  metadataSignal === null || metadataSignal === void 0 ? void 0 : metadataSignal.throwIfAborted();
363
- var subscription = _this.options.httpClient.request(options.method, url, _object_spread_props(_object_spread({}, options), {
388
+ var loadedPlugins = [];
389
+ if (_this.options.angularPlugins) {
390
+ var _loadedPlugins;
391
+ (_loadedPlugins = loadedPlugins).push.apply(_loadedPlugins, _to_consumable_array(_this.options.angularPlugins.map(function(plugin) {
392
+ return plugin.load({
393
+ angularPlugins: loadedPlugins,
394
+ apiClient: _this,
395
+ url: url,
396
+ apiName: apiName,
397
+ requestOptions: options,
398
+ logger: _this.options.logger
399
+ });
400
+ })));
401
+ }
402
+ var httpRequest = _this.options.httpClient.request(options.method, url, _object_spread_props(_object_spread({}, options), {
364
403
  observe: 'response',
365
404
  headers: headers
366
- })).subscribe({
405
+ }));
406
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
407
+ try {
408
+ for(var _iterator = loadedPlugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
409
+ var plugin = _step.value;
410
+ httpRequest = plugin.transform(httpRequest);
411
+ }
412
+ } catch (err) {
413
+ _didIteratorError = true;
414
+ _iteratorError = err;
415
+ } finally{
416
+ try {
417
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
418
+ _iterator.return();
419
+ }
420
+ } finally{
421
+ if (_didIteratorError) {
422
+ throw _iteratorError;
423
+ }
424
+ }
425
+ }
426
+ var subscription = httpRequest.subscribe({
367
427
  next: function(res) {
368
428
  return data = res;
369
429
  },
@@ -403,7 +403,8 @@ var ApiFetchClient = /*#__PURE__*/ function() {
403
403
  fetchPlugins: loadedPlugins,
404
404
  controller: controller,
405
405
  apiClient: _this,
406
- logger: _this.options.logger
406
+ logger: _this.options.logger,
407
+ apiName: apiName
407
408
  });
408
409
  })));
409
410
  }
package/cjs/fwk/date.js CHANGED
@@ -36,6 +36,10 @@ function _assert_this_initialized(self) {
36
36
  }
37
37
  return self;
38
38
  }
39
+ function _call_super(_this, derived, args) {
40
+ derived = _get_prototype_of(derived);
41
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
42
+ }
39
43
  function _class_call_check(instance, Constructor) {
40
44
  if (!(instance instanceof Constructor)) {
41
45
  throw new TypeError("Cannot call a class as a function");
@@ -162,28 +166,12 @@ function _wrap_native_super(Class) {
162
166
  return _wrap_native_super(Class);
163
167
  }
164
168
  function _is_native_reflect_construct() {
165
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
166
- if (Reflect.construct.sham) return false;
167
- if (typeof Proxy === "function") return true;
168
169
  try {
169
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
170
- return true;
171
- } catch (e) {
172
- return false;
173
- }
174
- }
175
- function _create_super(Derived) {
176
- var hasNativeReflectConstruct = _is_native_reflect_construct();
177
- return function _createSuperInternal() {
178
- var Super = _get_prototype_of(Derived), result;
179
- if (hasNativeReflectConstruct) {
180
- var NewTarget = _get_prototype_of(this).constructor;
181
- result = Reflect.construct(Super, arguments, NewTarget);
182
- } else {
183
- result = Super.apply(this, arguments);
184
- }
185
- return _possible_constructor_return(this, result);
186
- };
170
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
171
+ } catch (_) {}
172
+ return (_is_native_reflect_construct = function() {
173
+ return !!result;
174
+ })();
187
175
  }
188
176
  var _NativeDateClass = Date;
189
177
  function pad(val) {
@@ -194,7 +182,6 @@ function pad(val) {
194
182
  var CommonDate = /*#__PURE__*/ function(Date1) {
195
183
  "use strict";
196
184
  _inherits(CommonDate, Date1);
197
- var _super = _create_super(CommonDate);
198
185
  function CommonDate() {
199
186
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
200
187
  args[_key] = arguments[_key];
@@ -223,9 +210,7 @@ var CommonDate = /*#__PURE__*/ function(Date1) {
223
210
  args[0] = args[0];
224
211
  }
225
212
  }
226
- return _super.call.apply(_super, [
227
- this
228
- ].concat(_to_consumable_array(args)));
213
+ return _call_super(this, CommonDate, _to_consumable_array(args));
229
214
  }
230
215
  _create_class(CommonDate, [
231
216
  {
@@ -244,7 +229,6 @@ var utils;
244
229
  'use strict';
245
230
  var _$Date = /*#__PURE__*/ function(CommonDate) {
246
231
  _inherits(Date1, CommonDate);
247
- var _super = _create_super(Date1);
248
232
  function Date1() {
249
233
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
250
234
  args[_key] = arguments[_key];
@@ -255,9 +239,7 @@ var utils;
255
239
  } else if (_instanceof(args[0], _NativeDateClass)) {
256
240
  args[0] = "".concat(args[0].getFullYear(), "-").concat(pad(args[0].getMonth() + 1), "-").concat(pad(args[0].getDate()), "T00:00:00Z");
257
241
  }
258
- return _super.call.apply(_super, [
259
- this
260
- ].concat(_to_consumable_array(args)));
242
+ return _call_super(this, Date1, _to_consumable_array(args));
261
243
  }
262
244
  _create_class(Date1, [
263
245
  {
@@ -294,15 +276,12 @@ var utils;
294
276
  utils.Date = _$Date;
295
277
  var DateTime = /*#__PURE__*/ function(CommonDate) {
296
278
  _inherits(DateTime, CommonDate);
297
- var _super = _create_super(DateTime);
298
279
  function DateTime() {
299
280
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
300
281
  args[_key] = arguments[_key];
301
282
  }
302
283
  _class_call_check(this, DateTime);
303
- return _super.call.apply(_super, [
304
- this
305
- ].concat(_to_consumable_array(args)));
284
+ return _call_super(this, DateTime, _to_consumable_array(args));
306
285
  }
307
286
  _create_class(DateTime, [
308
287
  {
package/cjs/fwk/errors.js CHANGED
@@ -36,6 +36,10 @@ function _assert_this_initialized(self) {
36
36
  }
37
37
  return self;
38
38
  }
39
+ function _call_super(_this, derived, args) {
40
+ derived = _get_prototype_of(derived);
41
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
42
+ }
39
43
  function _class_call_check(instance, Constructor) {
40
44
  if (!(instance instanceof Constructor)) {
41
45
  throw new TypeError("Cannot call a class as a function");
@@ -137,56 +141,41 @@ function _wrap_native_super(Class) {
137
141
  return _wrap_native_super(Class);
138
142
  }
139
143
  function _is_native_reflect_construct() {
140
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
141
- if (Reflect.construct.sham) return false;
142
- if (typeof Proxy === "function") return true;
143
144
  try {
144
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
145
- return true;
146
- } catch (e) {
147
- return false;
148
- }
149
- }
150
- function _create_super(Derived) {
151
- var hasNativeReflectConstruct = _is_native_reflect_construct();
152
- return function _createSuperInternal() {
153
- var Super = _get_prototype_of(Derived), result;
154
- if (hasNativeReflectConstruct) {
155
- var NewTarget = _get_prototype_of(this).constructor;
156
- result = Reflect.construct(Super, arguments, NewTarget);
157
- } else {
158
- result = Super.apply(this, arguments);
159
- }
160
- return _possible_constructor_return(this, result);
161
- };
145
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
146
+ } catch (_) {}
147
+ return (_is_native_reflect_construct = function() {
148
+ return !!result;
149
+ })();
162
150
  }
163
151
  var GenericError = /*#__PURE__*/ function(Error1) {
164
152
  "use strict";
165
153
  _inherits(GenericError, Error1);
166
- var _super = _create_super(GenericError);
167
154
  function GenericError(message, context) {
168
155
  _class_call_check(this, GenericError);
169
156
  var httpRegexp = /^https?:\/\//;
170
157
  var baseUrl = (context === null || context === void 0 ? void 0 : context.url) ? context.url.replace(httpRegexp, '') : 'unknown';
171
158
  var origin = (context === null || context === void 0 ? void 0 : context.origin) ? context.origin.replace(httpRegexp, '') : 'unknown';
172
- return _super.call(this, context ? "[SDK] [apiName: ".concat(context.apiName || 'unknown', "] [operationId: ").concat(context.operationId || 'unknown', "] [baseUrl: ").concat(baseUrl, "] [origin: ").concat(origin, "] [errorType: SDK] ").concat(message) : "[SDK] ".concat(message));
159
+ return _call_super(this, GenericError, [
160
+ context ? "[SDK] [apiName: ".concat(context.apiName || 'unknown', "] [operationId: ").concat(context.operationId || 'unknown', "] [baseUrl: ").concat(baseUrl, "] [origin: ").concat(origin, "] [errorType: SDK] ").concat(message) : "[SDK] ".concat(message)
161
+ ]);
173
162
  }
174
163
  return GenericError;
175
164
  }(_wrap_native_super(Error));
176
165
  var RequestFailedError = /*#__PURE__*/ function(GenericError) {
177
166
  "use strict";
178
167
  _inherits(RequestFailedError, GenericError);
179
- var _super = _create_super(RequestFailedError);
180
168
  function RequestFailedError(message, statusCode, data, context) {
181
169
  _class_call_check(this, RequestFailedError);
182
170
  var _this;
183
- _this = _super.call(this, "[status: ".concat(statusCode, "] ").concat(message), context);
184
- /**
171
+ _this = _call_super(this, RequestFailedError, [
172
+ "[status: ".concat(statusCode, "] ").concat(message),
173
+ context
174
+ ]), /**
185
175
  * Request status code
186
- */ _define_property(_assert_this_initialized(_this), "statusCode", void 0);
187
- /**
176
+ */ _define_property(_this, "statusCode", void 0), /**
188
177
  * Data decoded from the response body
189
- */ _define_property(_assert_this_initialized(_this), "data", void 0);
178
+ */ _define_property(_this, "data", void 0);
190
179
  _this.statusCode = statusCode;
191
180
  _this.data = data;
192
181
  return _this;
@@ -196,14 +185,15 @@ var RequestFailedError = /*#__PURE__*/ function(GenericError) {
196
185
  var EmptyResponseError = /*#__PURE__*/ function(GenericError) {
197
186
  "use strict";
198
187
  _inherits(EmptyResponseError, GenericError);
199
- var _super = _create_super(EmptyResponseError);
200
188
  function EmptyResponseError(message, data, context) {
201
189
  _class_call_check(this, EmptyResponseError);
202
190
  var _this;
203
- _this = _super.call(this, "[Empty response] ".concat(message), context);
204
- /**
191
+ _this = _call_super(this, EmptyResponseError, [
192
+ "[Empty response] ".concat(message),
193
+ context
194
+ ]), /**
205
195
  * Data decoded from the response body
206
- */ _define_property(_assert_this_initialized(_this), "data", void 0);
196
+ */ _define_property(_this, "data", void 0);
207
197
  _this.data = data;
208
198
  return _this;
209
199
  }
@@ -212,37 +202,43 @@ var EmptyResponseError = /*#__PURE__*/ function(GenericError) {
212
202
  var ResponseTimeoutError = /*#__PURE__*/ function(GenericError) {
213
203
  "use strict";
214
204
  _inherits(ResponseTimeoutError, GenericError);
215
- var _super = _create_super(ResponseTimeoutError);
216
205
  function ResponseTimeoutError(message, context) {
217
206
  _class_call_check(this, ResponseTimeoutError);
218
- return _super.call(this, "[Response timeout] ".concat(message), context);
207
+ return _call_super(this, ResponseTimeoutError, [
208
+ "[Response timeout] ".concat(message),
209
+ context
210
+ ]);
219
211
  }
220
212
  return ResponseTimeoutError;
221
213
  }(GenericError);
222
214
  var ResponseJSONParseError = /*#__PURE__*/ function(RequestFailedError) {
223
215
  "use strict";
224
216
  _inherits(ResponseJSONParseError, RequestFailedError);
225
- var _super = _create_super(ResponseJSONParseError);
226
217
  function ResponseJSONParseError(message, httpStatus, bodyContent, context) {
227
218
  _class_call_check(this, ResponseJSONParseError);
228
- return _super.call(this, "[Response JSON parse error] ".concat(message), httpStatus, bodyContent, context);
219
+ return _call_super(this, ResponseJSONParseError, [
220
+ "[Response JSON parse error] ".concat(message),
221
+ httpStatus,
222
+ bodyContent,
223
+ context
224
+ ]);
229
225
  }
230
226
  return ResponseJSONParseError;
231
227
  }(RequestFailedError);
232
228
  var CanceledCallError = /*#__PURE__*/ function(GenericError) {
233
229
  "use strict";
234
230
  _inherits(CanceledCallError, GenericError);
235
- var _super = _create_super(CanceledCallError);
236
231
  function CanceledCallError(message, pluginIndex, pluginCanceling, context) {
237
232
  _class_call_check(this, CanceledCallError);
238
233
  var _this;
239
- _this = _super.call(this, "[Canceled call] ".concat(message), context);
240
- /**
234
+ _this = _call_super(this, CanceledCallError, [
235
+ "[Canceled call] ".concat(message),
236
+ context
237
+ ]), /**
241
238
  * First plugin canceling the call
242
- */ _define_property(_assert_this_initialized(_this), "pluginCanceling", void 0);
243
- /**
239
+ */ _define_property(_this, "pluginCanceling", void 0), /**
244
240
  * Index of the first plugin canceling the call
245
- */ _define_property(_assert_this_initialized(_this), "pluginIndex", void 0);
241
+ */ _define_property(_this, "pluginIndex", void 0);
246
242
  _this.pluginIndex = pluginIndex;
247
243
  _this.pluginCanceling = pluginCanceling;
248
244
  return _this;
@@ -15,6 +15,10 @@ function _assert_this_initialized(self) {
15
15
  }
16
16
  return self;
17
17
  }
18
+ function _call_super(_this, derived, args) {
19
+ derived = _get_prototype_of(derived);
20
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
+ }
18
22
  function _class_call_check(instance, Constructor) {
19
23
  if (!(instance instanceof Constructor)) {
20
24
  throw new TypeError("Cannot call a class as a function");
@@ -84,38 +88,20 @@ function _type_of(obj) {
84
88
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
85
89
  }
86
90
  function _is_native_reflect_construct() {
87
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
88
- if (Reflect.construct.sham) return false;
89
- if (typeof Proxy === "function") return true;
90
91
  try {
91
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
92
- return true;
93
- } catch (e) {
94
- return false;
95
- }
96
- }
97
- function _create_super(Derived) {
98
- var hasNativeReflectConstruct = _is_native_reflect_construct();
99
- return function _createSuperInternal() {
100
- var Super = _get_prototype_of(Derived), result;
101
- if (hasNativeReflectConstruct) {
102
- var NewTarget = _get_prototype_of(this).constructor;
103
- result = Reflect.construct(Super, arguments, NewTarget);
104
- } else {
105
- result = Super.apply(this, arguments);
106
- }
107
- return _possible_constructor_return(this, result);
108
- };
92
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
93
+ } catch (_) {}
94
+ return (_is_native_reflect_construct = function() {
95
+ return !!result;
96
+ })();
109
97
  }
110
98
  var RandomMockAdapter = /*#__PURE__*/ function(BaseMockAdapter) {
111
99
  "use strict";
112
100
  _inherits(RandomMockAdapter, BaseMockAdapter);
113
- var _super = _create_super(RandomMockAdapter);
114
101
  function RandomMockAdapter() {
115
102
  _class_call_check(this, RandomMockAdapter);
116
103
  var _this;
117
- _this = _super.apply(this, arguments);
118
- _define_property(_assert_this_initialized(_this), "cache", {});
104
+ _this = _call_super(this, RandomMockAdapter, arguments), _define_property(_this, "cache", {});
119
105
  return _this;
120
106
  }
121
107
  _create_class(RandomMockAdapter, [
@@ -15,6 +15,10 @@ function _assert_this_initialized(self) {
15
15
  }
16
16
  return self;
17
17
  }
18
+ function _call_super(_this, derived, args) {
19
+ derived = _get_prototype_of(derived);
20
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
+ }
18
22
  function _class_call_check(instance, Constructor) {
19
23
  if (!(instance instanceof Constructor)) {
20
24
  throw new TypeError("Cannot call a class as a function");
@@ -84,38 +88,20 @@ function _type_of(obj) {
84
88
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
85
89
  }
86
90
  function _is_native_reflect_construct() {
87
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
88
- if (Reflect.construct.sham) return false;
89
- if (typeof Proxy === "function") return true;
90
91
  try {
91
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
92
- return true;
93
- } catch (e) {
94
- return false;
95
- }
96
- }
97
- function _create_super(Derived) {
98
- var hasNativeReflectConstruct = _is_native_reflect_construct();
99
- return function _createSuperInternal() {
100
- var Super = _get_prototype_of(Derived), result;
101
- if (hasNativeReflectConstruct) {
102
- var NewTarget = _get_prototype_of(this).constructor;
103
- result = Reflect.construct(Super, arguments, NewTarget);
104
- } else {
105
- result = Super.apply(this, arguments);
106
- }
107
- return _possible_constructor_return(this, result);
108
- };
92
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
93
+ } catch (_) {}
94
+ return (_is_native_reflect_construct = function() {
95
+ return !!result;
96
+ })();
109
97
  }
110
98
  var SequentialMockAdapter = /*#__PURE__*/ function(BaseMockAdapter) {
111
99
  "use strict";
112
100
  _inherits(SequentialMockAdapter, BaseMockAdapter);
113
- var _super = _create_super(SequentialMockAdapter);
114
101
  function SequentialMockAdapter() {
115
102
  _class_call_check(this, SequentialMockAdapter);
116
103
  var _this;
117
- _this = _super.apply(this, arguments);
118
- _define_property(_assert_this_initialized(_this), "operationCounter", {});
104
+ _this = _call_super(this, SequentialMockAdapter, arguments), _define_property(_this, "operationCounter", {});
119
105
  return _this;
120
106
  }
121
107
  _create_class(SequentialMockAdapter, [
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  _export_star(require("./mock-intercept.request"), exports);
6
6
  _export_star(require("./mock-intercept.fetch"), exports);
7
+ _export_star(require("./mock-intercept.interface"), exports);
7
8
  function _export_star(from, to) {
8
9
  Object.keys(from).forEach(function(k) {
9
10
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {