@aurigma/ng-storefront-api-client 2.29.5 → 2.32.1
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.
- package/aurigma-ng-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +261 -79
- package/bundles/aurigma-ng-storefront-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-storefront-api-client.js +1 -1
- package/esm2015/lib/storefront-api-client.js +164 -7
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +163 -6
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +32 -0
- package/package.json +1 -1
|
@@ -32,4 +32,4 @@ StorefrontModule.decorators = [
|
|
|
32
32
|
exports: []
|
|
33
33
|
},] }
|
|
34
34
|
];
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVmcm9udC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDMvX3dvcmsvMS9zL0JhY2tlbmQvc3JjL0JhY2tPZmZpY2UuV2ViLlB1YmxpY0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9zdG9yZWZyb250LWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL3N0b3JlZnJvbnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0IsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzVELE9BQ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AgICAgICB1c2VWYWx1ZTogYXBpVXJsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBTdG9yZWZyb250QXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/storefront.module';
|
|
5
5
|
export * from './lib/storefront-api-client';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMy9fd29yay8xL3MvQmFja2VuZC9zcmMvQmFja09mZmljZS5XZWIuUHVibGljQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3N0b3JlZnJvbnQtY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdG9yZWZyb250LWFwaS1jbGllbnQnO1xuIl19
|
|
@@ -1401,6 +1401,163 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
return of(null);
|
|
1403
1403
|
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Returns a project preview file by project identifier.
|
|
1406
|
+
* @param id Project identifier.
|
|
1407
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1408
|
+
* @return Success
|
|
1409
|
+
*/
|
|
1410
|
+
getPreview(id, tenantId) {
|
|
1411
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/preview?";
|
|
1412
|
+
if (id === undefined || id === null)
|
|
1413
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1414
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1415
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1416
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1417
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1418
|
+
let options_ = {
|
|
1419
|
+
observe: "response",
|
|
1420
|
+
responseType: "blob",
|
|
1421
|
+
headers: new HttpHeaders({
|
|
1422
|
+
"Accept": "text/plain"
|
|
1423
|
+
})
|
|
1424
|
+
};
|
|
1425
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1426
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1427
|
+
})).pipe(mergeMap((response_) => {
|
|
1428
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreview(r));
|
|
1429
|
+
})).pipe(catchError((response_) => {
|
|
1430
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1431
|
+
try {
|
|
1432
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreview(r));
|
|
1433
|
+
}
|
|
1434
|
+
catch (e) {
|
|
1435
|
+
return throwError(e);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
else
|
|
1439
|
+
return throwError(response_);
|
|
1440
|
+
}));
|
|
1441
|
+
}
|
|
1442
|
+
processGetPreview(response) {
|
|
1443
|
+
const status = response.status;
|
|
1444
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1445
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1446
|
+
let _headers = {};
|
|
1447
|
+
if (response.headers) {
|
|
1448
|
+
for (let key of response.headers.keys()) {
|
|
1449
|
+
_headers[key] = response.headers.get(key);
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
if (status === 200 || status === 206) {
|
|
1453
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
1454
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1455
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1456
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
1457
|
+
}
|
|
1458
|
+
else if (status === 404) {
|
|
1459
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1460
|
+
let result404 = null;
|
|
1461
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1462
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1463
|
+
}));
|
|
1464
|
+
}
|
|
1465
|
+
else if (status === 401) {
|
|
1466
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1467
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1468
|
+
}));
|
|
1469
|
+
}
|
|
1470
|
+
else if (status === 403) {
|
|
1471
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1472
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1473
|
+
}));
|
|
1474
|
+
}
|
|
1475
|
+
else if (status !== 200 && status !== 204) {
|
|
1476
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1477
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1478
|
+
}));
|
|
1479
|
+
}
|
|
1480
|
+
return of(null);
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* Returns a project preview URL by project identifier.
|
|
1484
|
+
* @param id Project identifier.
|
|
1485
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1486
|
+
* @return Success
|
|
1487
|
+
*/
|
|
1488
|
+
getPreviewUrl(id, tenantId) {
|
|
1489
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/preview-url?";
|
|
1490
|
+
if (id === undefined || id === null)
|
|
1491
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1492
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1493
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1494
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1495
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1496
|
+
let options_ = {
|
|
1497
|
+
observe: "response",
|
|
1498
|
+
responseType: "blob",
|
|
1499
|
+
headers: new HttpHeaders({
|
|
1500
|
+
"Accept": "text/plain"
|
|
1501
|
+
})
|
|
1502
|
+
};
|
|
1503
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1504
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1505
|
+
})).pipe(mergeMap((response_) => {
|
|
1506
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreviewUrl(r));
|
|
1507
|
+
})).pipe(catchError((response_) => {
|
|
1508
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1509
|
+
try {
|
|
1510
|
+
return this.transformResult(url_, response_, (r) => this.processGetPreviewUrl(r));
|
|
1511
|
+
}
|
|
1512
|
+
catch (e) {
|
|
1513
|
+
return throwError(e);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
else
|
|
1517
|
+
return throwError(response_);
|
|
1518
|
+
}));
|
|
1519
|
+
}
|
|
1520
|
+
processGetPreviewUrl(response) {
|
|
1521
|
+
const status = response.status;
|
|
1522
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1523
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1524
|
+
let _headers = {};
|
|
1525
|
+
if (response.headers) {
|
|
1526
|
+
for (let key of response.headers.keys()) {
|
|
1527
|
+
_headers[key] = response.headers.get(key);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
if (status === 200) {
|
|
1531
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1532
|
+
let result200 = null;
|
|
1533
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1534
|
+
return of(result200);
|
|
1535
|
+
}));
|
|
1536
|
+
}
|
|
1537
|
+
else if (status === 404) {
|
|
1538
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1539
|
+
let result404 = null;
|
|
1540
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1541
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1542
|
+
}));
|
|
1543
|
+
}
|
|
1544
|
+
else if (status === 401) {
|
|
1545
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1546
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1547
|
+
}));
|
|
1548
|
+
}
|
|
1549
|
+
else if (status === 403) {
|
|
1550
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1551
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1552
|
+
}));
|
|
1553
|
+
}
|
|
1554
|
+
else if (status !== 200 && status !== 204) {
|
|
1555
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1556
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1557
|
+
}));
|
|
1558
|
+
}
|
|
1559
|
+
return of(null);
|
|
1560
|
+
}
|
|
1404
1561
|
/**
|
|
1405
1562
|
* Creates a new project by 'Render HiRes' scenario.
|
|
1406
1563
|
* @param storefrontId Storefront identifier.
|
|
@@ -3146,24 +3303,24 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3146
3303
|
_headers[key] = response.headers.get(key);
|
|
3147
3304
|
}
|
|
3148
3305
|
}
|
|
3149
|
-
if (status ===
|
|
3306
|
+
if (status === 200) {
|
|
3150
3307
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3151
|
-
let
|
|
3152
|
-
|
|
3153
|
-
return of(
|
|
3308
|
+
let result200 = null;
|
|
3309
|
+
result200 = _responseText === "" ? null : _responseText;
|
|
3310
|
+
return of(result200);
|
|
3154
3311
|
}));
|
|
3155
3312
|
}
|
|
3156
3313
|
else if (status === 404) {
|
|
3157
3314
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3158
3315
|
let result404 = null;
|
|
3159
|
-
result404 = _responseText === "" ? null :
|
|
3316
|
+
result404 = _responseText === "" ? null : _responseText;
|
|
3160
3317
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3161
3318
|
}));
|
|
3162
3319
|
}
|
|
3163
3320
|
else if (status === 409) {
|
|
3164
3321
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3165
3322
|
let result409 = null;
|
|
3166
|
-
result409 = _responseText === "" ? null :
|
|
3323
|
+
result409 = _responseText === "" ? null : _responseText;
|
|
3167
3324
|
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3168
3325
|
}));
|
|
3169
3326
|
}
|