@ama-sdk/client-angular 12.3.0-prerelease.70 → 12.3.0-prerelease.72
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.
|
@@ -272,7 +272,6 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
272
272
|
{
|
|
273
273
|
key: "getRequestOptions",
|
|
274
274
|
value: /** @inheritdoc */ function getRequestOptions(requestOptionsParameters) {
|
|
275
|
-
var _this = this;
|
|
276
275
|
return _async_to_generator(function() {
|
|
277
276
|
var opts, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _requestOptionsParameters_api, err;
|
|
278
277
|
return _ts_generator(this, function(_state) {
|
|
@@ -282,7 +281,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
282
281
|
headers: new Headers((0, _core.filterUndefinedValues)(requestOptionsParameters.headers)),
|
|
283
282
|
queryParams: (0, _core.filterUndefinedValues)(requestOptionsParameters.queryParams)
|
|
284
283
|
});
|
|
285
|
-
if (!
|
|
284
|
+
if (!this.options.requestPlugins) return [
|
|
286
285
|
3,
|
|
287
286
|
8
|
|
288
287
|
];
|
|
@@ -295,7 +294,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
295
294
|
7,
|
|
296
295
|
8
|
|
297
296
|
]);
|
|
298
|
-
_iterator =
|
|
297
|
+
_iterator = this.options.requestPlugins[Symbol.iterator]();
|
|
299
298
|
_state.label = 2;
|
|
300
299
|
case 2:
|
|
301
300
|
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
@@ -306,7 +305,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
306
305
|
return [
|
|
307
306
|
4,
|
|
308
307
|
plugin.load({
|
|
309
|
-
logger:
|
|
308
|
+
logger: this.options.logger,
|
|
310
309
|
apiName: (_requestOptionsParameters_api = requestOptionsParameters.api) === null || _requestOptionsParameters_api === void 0 ? void 0 : _requestOptionsParameters_api.apiName
|
|
311
310
|
}).transform(opts)
|
|
312
311
|
];
|
|
@@ -352,7 +351,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
352
351
|
];
|
|
353
352
|
}
|
|
354
353
|
});
|
|
355
|
-
})();
|
|
354
|
+
}).call(this);
|
|
356
355
|
}
|
|
357
356
|
},
|
|
358
357
|
{
|
|
@@ -401,12 +400,12 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
401
400
|
{
|
|
402
401
|
key: "processCall",
|
|
403
402
|
value: function processCall(url, options, apiType, apiName, revivers, operationId) {
|
|
404
|
-
var _this = this;
|
|
405
403
|
return _async_to_generator(function() {
|
|
406
|
-
var response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
404
|
+
var _this, response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
407
405
|
return _ts_generator(this, function(_state) {
|
|
408
406
|
switch(_state.label){
|
|
409
407
|
case 0:
|
|
408
|
+
_this = this;
|
|
410
409
|
origin = options.headers.get('Origin');
|
|
411
410
|
_state.label = 1;
|
|
412
411
|
case 1:
|
|
@@ -514,9 +513,9 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
514
513
|
];
|
|
515
514
|
case 4:
|
|
516
515
|
reviver = (0, _core.getResponseReviver)(revivers, response, operationId, {
|
|
517
|
-
disableFallback:
|
|
516
|
+
disableFallback: this.options.disableFallback
|
|
518
517
|
});
|
|
519
|
-
replyPlugins =
|
|
518
|
+
replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map(function(plugin) {
|
|
520
519
|
return plugin.load({
|
|
521
520
|
dictionaries: root && root.dictionaries,
|
|
522
521
|
response: response && _object_spread_props(_object_spread({}, response), {
|
|
@@ -604,7 +603,7 @@ var ApiAngularClient = /*#__PURE__*/ function() {
|
|
|
604
603
|
];
|
|
605
604
|
}
|
|
606
605
|
});
|
|
607
|
-
})();
|
|
606
|
+
}).call(this);
|
|
608
607
|
}
|
|
609
608
|
}
|
|
610
609
|
]);
|
|
@@ -228,107 +228,105 @@ var MockInterceptAngular = /*#__PURE__*/ function() {
|
|
|
228
228
|
}
|
|
229
229
|
return {
|
|
230
230
|
transform: function(call) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return [
|
|
238
|
-
4,
|
|
239
|
-
_this1.options.adapter.initialize()
|
|
240
|
-
];
|
|
241
|
-
case 1:
|
|
242
|
-
_state.sent();
|
|
243
|
-
originalCall = call;
|
|
244
|
-
if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(_core.CUSTOM_MOCK_OPERATION_ID_HEADER)) {
|
|
231
|
+
return (0, _rxjs.from)(function() {
|
|
232
|
+
return _async_to_generator(function() {
|
|
233
|
+
var originalCall, delayTime, _tmp, operationId, mock, response;
|
|
234
|
+
return _ts_generator(this, function(_state) {
|
|
235
|
+
switch(_state.label){
|
|
236
|
+
case 0:
|
|
245
237
|
return [
|
|
246
|
-
|
|
247
|
-
|
|
238
|
+
4,
|
|
239
|
+
this.options.adapter.initialize()
|
|
248
240
|
];
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
];
|
|
254
|
-
if (!(typeof _this1.options.delayTiming === 'number')) return [
|
|
255
|
-
3,
|
|
256
|
-
2
|
|
257
|
-
];
|
|
258
|
-
_tmp = _this1.options.delayTiming;
|
|
259
|
-
return [
|
|
260
|
-
3,
|
|
261
|
-
4
|
|
262
|
-
];
|
|
263
|
-
case 2:
|
|
264
|
-
return [
|
|
265
|
-
4,
|
|
266
|
-
_this1.options.delayTiming(_object_spread_props(_object_spread({}, context), {
|
|
267
|
-
fetchPlugins: [],
|
|
268
|
-
options: context.requestOptions
|
|
269
|
-
}))
|
|
270
|
-
];
|
|
271
|
-
case 3:
|
|
272
|
-
_tmp = _state.sent();
|
|
273
|
-
_state.label = 4;
|
|
274
|
-
case 4:
|
|
275
|
-
delayTime = _tmp;
|
|
276
|
-
originalCall = originalCall.pipe((0, _rxjs.delay)(delayTime));
|
|
277
|
-
_state.label = 5;
|
|
278
|
-
case 5:
|
|
279
|
-
operationId = context.options.headers.get(_core.CUSTOM_MOCK_OPERATION_ID_HEADER);
|
|
280
|
-
try {
|
|
281
|
-
mock = _this1.options.adapter.getLatestMock(operationId);
|
|
282
|
-
if (!mock.getResponse) {
|
|
241
|
+
case 1:
|
|
242
|
+
_state.sent();
|
|
243
|
+
originalCall = call;
|
|
244
|
+
if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(_core.CUSTOM_MOCK_OPERATION_ID_HEADER)) {
|
|
283
245
|
return [
|
|
284
246
|
2,
|
|
285
247
|
originalCall
|
|
286
248
|
];
|
|
287
249
|
}
|
|
288
|
-
|
|
250
|
+
if (!(typeof this.options.delayTiming !== 'undefined')) return [
|
|
251
|
+
3,
|
|
252
|
+
5
|
|
253
|
+
];
|
|
254
|
+
if (!(typeof this.options.delayTiming === 'number')) return [
|
|
255
|
+
3,
|
|
256
|
+
2
|
|
257
|
+
];
|
|
258
|
+
_tmp = this.options.delayTiming;
|
|
259
|
+
return [
|
|
260
|
+
3,
|
|
261
|
+
4
|
|
262
|
+
];
|
|
263
|
+
case 2:
|
|
289
264
|
return [
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
switch(_state.label){
|
|
296
|
-
case 0:
|
|
297
|
-
return [
|
|
298
|
-
4,
|
|
299
|
-
response.json()
|
|
300
|
-
];
|
|
301
|
-
case 1:
|
|
302
|
-
body = _state.sent();
|
|
303
|
-
responseCloned = res.clone();
|
|
304
|
-
return [
|
|
305
|
-
2,
|
|
306
|
-
new _http.HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
|
|
307
|
-
body: body,
|
|
308
|
-
url: responseCloned.url || undefined
|
|
309
|
-
}))
|
|
310
|
-
];
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
return function(res) {
|
|
315
|
-
return _ref.apply(this, arguments);
|
|
316
|
-
};
|
|
317
|
-
}()))
|
|
265
|
+
4,
|
|
266
|
+
this.options.delayTiming(_object_spread_props(_object_spread({}, context), {
|
|
267
|
+
fetchPlugins: [],
|
|
268
|
+
options: context.requestOptions
|
|
269
|
+
}))
|
|
318
270
|
];
|
|
319
|
-
|
|
320
|
-
|
|
271
|
+
case 3:
|
|
272
|
+
_tmp = _state.sent();
|
|
273
|
+
_state.label = 4;
|
|
274
|
+
case 4:
|
|
275
|
+
delayTime = _tmp;
|
|
276
|
+
originalCall = originalCall.pipe((0, _rxjs.delay)(delayTime));
|
|
277
|
+
_state.label = 5;
|
|
278
|
+
case 5:
|
|
279
|
+
operationId = context.options.headers.get(_core.CUSTOM_MOCK_OPERATION_ID_HEADER);
|
|
280
|
+
try {
|
|
281
|
+
mock = this.options.adapter.getLatestMock(operationId);
|
|
282
|
+
if (!mock.getResponse) {
|
|
283
|
+
return [
|
|
284
|
+
2,
|
|
285
|
+
originalCall
|
|
286
|
+
];
|
|
287
|
+
}
|
|
288
|
+
response = mock.getResponse();
|
|
289
|
+
return [
|
|
290
|
+
2,
|
|
291
|
+
originalCall.pipe((0, _rxjs.mergeMap)(function(res) {
|
|
292
|
+
return _async_to_generator(function() {
|
|
293
|
+
var body, responseCloned;
|
|
294
|
+
return _ts_generator(this, function(_state) {
|
|
295
|
+
switch(_state.label){
|
|
296
|
+
case 0:
|
|
297
|
+
return [
|
|
298
|
+
4,
|
|
299
|
+
response.json()
|
|
300
|
+
];
|
|
301
|
+
case 1:
|
|
302
|
+
body = _state.sent();
|
|
303
|
+
responseCloned = res.clone();
|
|
304
|
+
return [
|
|
305
|
+
2,
|
|
306
|
+
new _http.HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
|
|
307
|
+
body: body,
|
|
308
|
+
url: responseCloned.url || undefined
|
|
309
|
+
}))
|
|
310
|
+
];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
})();
|
|
314
|
+
}))
|
|
315
|
+
];
|
|
316
|
+
} catch (e) {
|
|
317
|
+
(context.logger || console).error("Failed to retrieve the latest mock for Operation ID ".concat(operationId, ", fallback to default mock"));
|
|
318
|
+
return [
|
|
319
|
+
2,
|
|
320
|
+
originalCall
|
|
321
|
+
];
|
|
322
|
+
}
|
|
321
323
|
return [
|
|
322
|
-
2
|
|
323
|
-
originalCall
|
|
324
|
+
2
|
|
324
325
|
];
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
})()).pipe((0, _rxjs.mergeMap)(function(res) {
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}).call(_this);
|
|
329
|
+
}()).pipe((0, _rxjs.mergeMap)(function(res) {
|
|
332
330
|
return res;
|
|
333
331
|
}));
|
|
334
332
|
}
|
|
@@ -262,7 +262,6 @@ var DEFAULT_OPTIONS = {
|
|
|
262
262
|
{
|
|
263
263
|
key: "getRequestOptions",
|
|
264
264
|
value: /** @inheritdoc */ function getRequestOptions(requestOptionsParameters) {
|
|
265
|
-
var _this = this;
|
|
266
265
|
return _async_to_generator(function() {
|
|
267
266
|
var opts, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _requestOptionsParameters_api, err;
|
|
268
267
|
return _ts_generator(this, function(_state) {
|
|
@@ -272,7 +271,7 @@ var DEFAULT_OPTIONS = {
|
|
|
272
271
|
headers: new Headers(filterUndefinedValues(requestOptionsParameters.headers)),
|
|
273
272
|
queryParams: filterUndefinedValues(requestOptionsParameters.queryParams)
|
|
274
273
|
});
|
|
275
|
-
if (!
|
|
274
|
+
if (!this.options.requestPlugins) return [
|
|
276
275
|
3,
|
|
277
276
|
8
|
|
278
277
|
];
|
|
@@ -285,7 +284,7 @@ var DEFAULT_OPTIONS = {
|
|
|
285
284
|
7,
|
|
286
285
|
8
|
|
287
286
|
]);
|
|
288
|
-
_iterator =
|
|
287
|
+
_iterator = this.options.requestPlugins[Symbol.iterator]();
|
|
289
288
|
_state.label = 2;
|
|
290
289
|
case 2:
|
|
291
290
|
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
@@ -296,7 +295,7 @@ var DEFAULT_OPTIONS = {
|
|
|
296
295
|
return [
|
|
297
296
|
4,
|
|
298
297
|
plugin.load({
|
|
299
|
-
logger:
|
|
298
|
+
logger: this.options.logger,
|
|
300
299
|
apiName: (_requestOptionsParameters_api = requestOptionsParameters.api) === null || _requestOptionsParameters_api === void 0 ? void 0 : _requestOptionsParameters_api.apiName
|
|
301
300
|
}).transform(opts)
|
|
302
301
|
];
|
|
@@ -342,7 +341,7 @@ var DEFAULT_OPTIONS = {
|
|
|
342
341
|
];
|
|
343
342
|
}
|
|
344
343
|
});
|
|
345
|
-
})();
|
|
344
|
+
}).call(this);
|
|
346
345
|
}
|
|
347
346
|
},
|
|
348
347
|
{
|
|
@@ -391,12 +390,12 @@ var DEFAULT_OPTIONS = {
|
|
|
391
390
|
{
|
|
392
391
|
key: "processCall",
|
|
393
392
|
value: function processCall(url, options, apiType, apiName, revivers, operationId) {
|
|
394
|
-
var _this = this;
|
|
395
393
|
return _async_to_generator(function() {
|
|
396
|
-
var response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
394
|
+
var _this, response, root, exception, origin, headers, asyncResponse, e, reviver, replyPlugins, parsedData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pluginRunner, err;
|
|
397
395
|
return _ts_generator(this, function(_state) {
|
|
398
396
|
switch(_state.label){
|
|
399
397
|
case 0:
|
|
398
|
+
_this = this;
|
|
400
399
|
origin = options.headers.get('Origin');
|
|
401
400
|
_state.label = 1;
|
|
402
401
|
case 1:
|
|
@@ -504,9 +503,9 @@ var DEFAULT_OPTIONS = {
|
|
|
504
503
|
];
|
|
505
504
|
case 4:
|
|
506
505
|
reviver = getResponseReviver(revivers, response, operationId, {
|
|
507
|
-
disableFallback:
|
|
506
|
+
disableFallback: this.options.disableFallback
|
|
508
507
|
});
|
|
509
|
-
replyPlugins =
|
|
508
|
+
replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map(function(plugin) {
|
|
510
509
|
return plugin.load({
|
|
511
510
|
dictionaries: root && root.dictionaries,
|
|
512
511
|
response: response && _object_spread_props(_object_spread({}, response), {
|
|
@@ -594,7 +593,7 @@ var DEFAULT_OPTIONS = {
|
|
|
594
593
|
];
|
|
595
594
|
}
|
|
596
595
|
});
|
|
597
|
-
})();
|
|
596
|
+
}).call(this);
|
|
598
597
|
}
|
|
599
598
|
}
|
|
600
599
|
]);
|
|
@@ -223,107 +223,105 @@ import { delay, from, mergeMap } from 'rxjs';
|
|
|
223
223
|
}
|
|
224
224
|
return {
|
|
225
225
|
transform: function(call) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
return [
|
|
233
|
-
4,
|
|
234
|
-
_this1.options.adapter.initialize()
|
|
235
|
-
];
|
|
236
|
-
case 1:
|
|
237
|
-
_state.sent();
|
|
238
|
-
originalCall = call;
|
|
239
|
-
if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
|
|
226
|
+
return from(function() {
|
|
227
|
+
return _async_to_generator(function() {
|
|
228
|
+
var originalCall, delayTime, _tmp, operationId, mock, response;
|
|
229
|
+
return _ts_generator(this, function(_state) {
|
|
230
|
+
switch(_state.label){
|
|
231
|
+
case 0:
|
|
240
232
|
return [
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
4,
|
|
234
|
+
this.options.adapter.initialize()
|
|
243
235
|
];
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
];
|
|
249
|
-
if (!(typeof _this1.options.delayTiming === 'number')) return [
|
|
250
|
-
3,
|
|
251
|
-
2
|
|
252
|
-
];
|
|
253
|
-
_tmp = _this1.options.delayTiming;
|
|
254
|
-
return [
|
|
255
|
-
3,
|
|
256
|
-
4
|
|
257
|
-
];
|
|
258
|
-
case 2:
|
|
259
|
-
return [
|
|
260
|
-
4,
|
|
261
|
-
_this1.options.delayTiming(_object_spread_props(_object_spread({}, context), {
|
|
262
|
-
fetchPlugins: [],
|
|
263
|
-
options: context.requestOptions
|
|
264
|
-
}))
|
|
265
|
-
];
|
|
266
|
-
case 3:
|
|
267
|
-
_tmp = _state.sent();
|
|
268
|
-
_state.label = 4;
|
|
269
|
-
case 4:
|
|
270
|
-
delayTime = _tmp;
|
|
271
|
-
originalCall = originalCall.pipe(delay(delayTime));
|
|
272
|
-
_state.label = 5;
|
|
273
|
-
case 5:
|
|
274
|
-
operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
|
|
275
|
-
try {
|
|
276
|
-
mock = _this1.options.adapter.getLatestMock(operationId);
|
|
277
|
-
if (!mock.getResponse) {
|
|
236
|
+
case 1:
|
|
237
|
+
_state.sent();
|
|
238
|
+
originalCall = call;
|
|
239
|
+
if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
|
|
278
240
|
return [
|
|
279
241
|
2,
|
|
280
242
|
originalCall
|
|
281
243
|
];
|
|
282
244
|
}
|
|
283
|
-
|
|
245
|
+
if (!(typeof this.options.delayTiming !== 'undefined')) return [
|
|
246
|
+
3,
|
|
247
|
+
5
|
|
248
|
+
];
|
|
249
|
+
if (!(typeof this.options.delayTiming === 'number')) return [
|
|
250
|
+
3,
|
|
251
|
+
2
|
|
252
|
+
];
|
|
253
|
+
_tmp = this.options.delayTiming;
|
|
254
|
+
return [
|
|
255
|
+
3,
|
|
256
|
+
4
|
|
257
|
+
];
|
|
258
|
+
case 2:
|
|
284
259
|
return [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
switch(_state.label){
|
|
291
|
-
case 0:
|
|
292
|
-
return [
|
|
293
|
-
4,
|
|
294
|
-
response.json()
|
|
295
|
-
];
|
|
296
|
-
case 1:
|
|
297
|
-
body = _state.sent();
|
|
298
|
-
responseCloned = res.clone();
|
|
299
|
-
return [
|
|
300
|
-
2,
|
|
301
|
-
new HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
|
|
302
|
-
body: body,
|
|
303
|
-
url: responseCloned.url || undefined
|
|
304
|
-
}))
|
|
305
|
-
];
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
return function(res) {
|
|
310
|
-
return _ref.apply(this, arguments);
|
|
311
|
-
};
|
|
312
|
-
}()))
|
|
260
|
+
4,
|
|
261
|
+
this.options.delayTiming(_object_spread_props(_object_spread({}, context), {
|
|
262
|
+
fetchPlugins: [],
|
|
263
|
+
options: context.requestOptions
|
|
264
|
+
}))
|
|
313
265
|
];
|
|
314
|
-
|
|
315
|
-
|
|
266
|
+
case 3:
|
|
267
|
+
_tmp = _state.sent();
|
|
268
|
+
_state.label = 4;
|
|
269
|
+
case 4:
|
|
270
|
+
delayTime = _tmp;
|
|
271
|
+
originalCall = originalCall.pipe(delay(delayTime));
|
|
272
|
+
_state.label = 5;
|
|
273
|
+
case 5:
|
|
274
|
+
operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
|
|
275
|
+
try {
|
|
276
|
+
mock = this.options.adapter.getLatestMock(operationId);
|
|
277
|
+
if (!mock.getResponse) {
|
|
278
|
+
return [
|
|
279
|
+
2,
|
|
280
|
+
originalCall
|
|
281
|
+
];
|
|
282
|
+
}
|
|
283
|
+
response = mock.getResponse();
|
|
284
|
+
return [
|
|
285
|
+
2,
|
|
286
|
+
originalCall.pipe(mergeMap(function(res) {
|
|
287
|
+
return _async_to_generator(function() {
|
|
288
|
+
var body, responseCloned;
|
|
289
|
+
return _ts_generator(this, function(_state) {
|
|
290
|
+
switch(_state.label){
|
|
291
|
+
case 0:
|
|
292
|
+
return [
|
|
293
|
+
4,
|
|
294
|
+
response.json()
|
|
295
|
+
];
|
|
296
|
+
case 1:
|
|
297
|
+
body = _state.sent();
|
|
298
|
+
responseCloned = res.clone();
|
|
299
|
+
return [
|
|
300
|
+
2,
|
|
301
|
+
new HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
|
|
302
|
+
body: body,
|
|
303
|
+
url: responseCloned.url || undefined
|
|
304
|
+
}))
|
|
305
|
+
];
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
})();
|
|
309
|
+
}))
|
|
310
|
+
];
|
|
311
|
+
} catch (e) {
|
|
312
|
+
(context.logger || console).error("Failed to retrieve the latest mock for Operation ID ".concat(operationId, ", fallback to default mock"));
|
|
313
|
+
return [
|
|
314
|
+
2,
|
|
315
|
+
originalCall
|
|
316
|
+
];
|
|
317
|
+
}
|
|
316
318
|
return [
|
|
317
|
-
2
|
|
318
|
-
originalCall
|
|
319
|
+
2
|
|
319
320
|
];
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
})()).pipe(mergeMap(function(res) {
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
}).call(_this);
|
|
324
|
+
}()).pipe(mergeMap(function(res) {
|
|
327
325
|
return res;
|
|
328
326
|
}));
|
|
329
327
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/client-angular",
|
|
3
|
-
"version": "12.3.0-prerelease.
|
|
3
|
+
"version": "12.3.0-prerelease.72",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@o3r/schematics": "^12.3.0-prerelease.
|
|
41
|
+
"@o3r/schematics": "^12.3.0-prerelease.72",
|
|
42
42
|
"@swc/helpers": "~0.5.0",
|
|
43
43
|
"tslib": "^2.6.2",
|
|
44
44
|
"uuid": "^11.0.5"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@ama-sdk/core": "^12.3.0-prerelease.
|
|
47
|
+
"@ama-sdk/core": "^12.3.0-prerelease.72",
|
|
48
48
|
"@angular-devkit/schematics": "^19.0.0",
|
|
49
49
|
"@angular/cli": "^19.0.0",
|
|
50
50
|
"@angular/common": "^19.0.0",
|
|
51
|
-
"@o3r/schematics": "^12.3.0-prerelease.
|
|
51
|
+
"@o3r/schematics": "^12.3.0-prerelease.72",
|
|
52
52
|
"@schematics/angular": "^19.0.0",
|
|
53
53
|
"rxjs": "^7.8.1",
|
|
54
54
|
"typescript": "^5.5.4"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@ama-sdk/core": "^12.3.0-prerelease.
|
|
77
|
+
"@ama-sdk/core": "^12.3.0-prerelease.72",
|
|
78
78
|
"@angular-devkit/core": "~19.2.0",
|
|
79
79
|
"@angular-devkit/schematics": "~19.2.0",
|
|
80
80
|
"@angular/common": "~19.2.0",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
83
83
|
"@nx/eslint-plugin": "~20.8.0",
|
|
84
84
|
"@nx/jest": "~20.8.0",
|
|
85
|
-
"@o3r/build-helpers": "^12.3.0-prerelease.
|
|
86
|
-
"@o3r/eslint-plugin": "^12.3.0-prerelease.
|
|
87
|
-
"@o3r/test-helpers": "^12.3.0-prerelease.
|
|
85
|
+
"@o3r/build-helpers": "^12.3.0-prerelease.72",
|
|
86
|
+
"@o3r/eslint-plugin": "^12.3.0-prerelease.72",
|
|
87
|
+
"@o3r/test-helpers": "^12.3.0-prerelease.72",
|
|
88
88
|
"@schematics/angular": "~19.2.0",
|
|
89
89
|
"@stylistic/eslint-plugin": "~3.1.0",
|
|
90
90
|
"@stylistic/eslint-plugin-ts": "~3.1.0",
|