@aurigma/ng-backoffice-api-client 2.57.1 → 2.59.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-backoffice-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.js +193 -65
- package/bundles/aurigma-ng-backoffice-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-backoffice-api-client.js +1 -1
- package/esm2015/lib/backoffice-api-client.js +121 -6
- package/esm2015/lib/backoffice.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-backoffice-api-client.js +120 -5
- package/fesm2015/aurigma-ng-backoffice-api-client.js.map +1 -1
- package/lib/backoffice-api-client.d.ts +31 -8
- package/package.json +1 -1
|
@@ -32,4 +32,4 @@ BackOfficeModule.decorators = [
|
|
|
32
32
|
exports: []
|
|
33
33
|
},] }
|
|
34
34
|
];
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFja29mZmljZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDMvX3dvcmsvMS9zL0JhY2tlbmQvc3JjL0JhY2tPZmZpY2UuV2ViLlB1YmxpY0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9iYWNrb2ZmaWNlLWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL2JhY2tvZmZpY2UubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0IsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQ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ZW50LkFQSV9CQVNFX1VSTCxcbiAgICAgICAgICB1c2VWYWx1ZTogYXBpVXJsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBCYWNrT2ZmaWNlQXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/backoffice.module';
|
|
5
5
|
export * from './lib/backoffice-api-client';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwMy9fd29yay8xL3MvQmFja2VuZC9zcmMvQmFja09mZmljZS5XZWIuUHVibGljQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L2JhY2tvZmZpY2UtY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9iYWNrb2ZmaWNlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9iYWNrb2ZmaWNlLWFwaS1jbGllbnQnO1xuIl19
|
|
@@ -671,7 +671,7 @@ class ProductsManagementApiClient extends ApiClientBase {
|
|
|
671
671
|
/**
|
|
672
672
|
* Creates a new product and returns its description.
|
|
673
673
|
* @param tenantId (optional) Tenant identifier.
|
|
674
|
-
* @param body (optional)
|
|
674
|
+
* @param body (optional) Product creation parameters.
|
|
675
675
|
* @return Success
|
|
676
676
|
*/
|
|
677
677
|
createProduct(tenantId, body) {
|
|
@@ -1613,6 +1613,13 @@ class ProductsManagementApiClient extends ApiClientBase {
|
|
|
1613
1613
|
return of(null);
|
|
1614
1614
|
}));
|
|
1615
1615
|
}
|
|
1616
|
+
else if (status === 400) {
|
|
1617
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1618
|
+
let result400 = null;
|
|
1619
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1620
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
1621
|
+
}));
|
|
1622
|
+
}
|
|
1616
1623
|
else if (status === 404) {
|
|
1617
1624
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1618
1625
|
let result404 = null;
|
|
@@ -1700,6 +1707,13 @@ class ProductsManagementApiClient extends ApiClientBase {
|
|
|
1700
1707
|
return of(null);
|
|
1701
1708
|
}));
|
|
1702
1709
|
}
|
|
1710
|
+
else if (status === 400) {
|
|
1711
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1712
|
+
let result400 = null;
|
|
1713
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1714
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
1715
|
+
}));
|
|
1716
|
+
}
|
|
1703
1717
|
else if (status === 404) {
|
|
1704
1718
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1705
1719
|
let result404 = null;
|
|
@@ -1787,6 +1801,13 @@ class ProductsManagementApiClient extends ApiClientBase {
|
|
|
1787
1801
|
return of(null);
|
|
1788
1802
|
}));
|
|
1789
1803
|
}
|
|
1804
|
+
else if (status === 400) {
|
|
1805
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1806
|
+
let result400 = null;
|
|
1807
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1808
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
1809
|
+
}));
|
|
1810
|
+
}
|
|
1790
1811
|
else if (status === 404) {
|
|
1791
1812
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1792
1813
|
let result404 = null;
|
|
@@ -2427,6 +2448,103 @@ class ProductsManagementApiClient extends ApiClientBase {
|
|
|
2427
2448
|
}
|
|
2428
2449
|
return of(null);
|
|
2429
2450
|
}
|
|
2451
|
+
/**
|
|
2452
|
+
* Set a thumbnail image for an existing product.
|
|
2453
|
+
* @param id Product identifier.
|
|
2454
|
+
* @param productVersionId (optional)
|
|
2455
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2456
|
+
* @param file (optional)
|
|
2457
|
+
* @return Success
|
|
2458
|
+
*/
|
|
2459
|
+
setProductImage(id, productVersionId, tenantId, file) {
|
|
2460
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/set-image?";
|
|
2461
|
+
if (id === undefined || id === null)
|
|
2462
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2463
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2464
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2465
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2466
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2467
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2468
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2469
|
+
const content_ = new FormData();
|
|
2470
|
+
if (file !== null && file !== undefined)
|
|
2471
|
+
content_.append("file", file.data, file.fileName ? file.fileName : "file");
|
|
2472
|
+
let options_ = {
|
|
2473
|
+
body: content_,
|
|
2474
|
+
observe: "response",
|
|
2475
|
+
responseType: "blob",
|
|
2476
|
+
headers: new HttpHeaders({})
|
|
2477
|
+
};
|
|
2478
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2479
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
2480
|
+
})).pipe(mergeMap((response_) => {
|
|
2481
|
+
return this.transformResult(url_, response_, (r) => this.processSetProductImage(r));
|
|
2482
|
+
})).pipe(catchError((response_) => {
|
|
2483
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2484
|
+
try {
|
|
2485
|
+
return this.transformResult(url_, response_, (r) => this.processSetProductImage(r));
|
|
2486
|
+
}
|
|
2487
|
+
catch (e) {
|
|
2488
|
+
return throwError(e);
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
else
|
|
2492
|
+
return throwError(response_);
|
|
2493
|
+
}));
|
|
2494
|
+
}
|
|
2495
|
+
processSetProductImage(response) {
|
|
2496
|
+
const status = response.status;
|
|
2497
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2498
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2499
|
+
let _headers = {};
|
|
2500
|
+
if (response.headers) {
|
|
2501
|
+
for (let key of response.headers.keys()) {
|
|
2502
|
+
_headers[key] = response.headers.get(key);
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
if (status === 200) {
|
|
2506
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2507
|
+
return of(null);
|
|
2508
|
+
}));
|
|
2509
|
+
}
|
|
2510
|
+
else if (status === 400) {
|
|
2511
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2512
|
+
let result400 = null;
|
|
2513
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2514
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2515
|
+
}));
|
|
2516
|
+
}
|
|
2517
|
+
else if (status === 404) {
|
|
2518
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2519
|
+
let result404 = null;
|
|
2520
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2521
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2522
|
+
}));
|
|
2523
|
+
}
|
|
2524
|
+
else if (status === 409) {
|
|
2525
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2526
|
+
let result409 = null;
|
|
2527
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2528
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2529
|
+
}));
|
|
2530
|
+
}
|
|
2531
|
+
else if (status === 401) {
|
|
2532
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2533
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2534
|
+
}));
|
|
2535
|
+
}
|
|
2536
|
+
else if (status === 403) {
|
|
2537
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2538
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2539
|
+
}));
|
|
2540
|
+
}
|
|
2541
|
+
else if (status !== 200 && status !== 204) {
|
|
2542
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2543
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2544
|
+
}));
|
|
2545
|
+
}
|
|
2546
|
+
return of(null);
|
|
2547
|
+
}
|
|
2430
2548
|
/**
|
|
2431
2549
|
* Returns all available product personalization workflows.
|
|
2432
2550
|
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
@@ -4169,10 +4287,7 @@ class ApiException extends Error {
|
|
|
4169
4287
|
}
|
|
4170
4288
|
}
|
|
4171
4289
|
function throwException(message, status, response, headers, result) {
|
|
4172
|
-
|
|
4173
|
-
return throwError(result);
|
|
4174
|
-
else
|
|
4175
|
-
return throwError(new ApiException(message, status, response, headers, null));
|
|
4290
|
+
return throwError(new ApiException(message, status, response, headers, result));
|
|
4176
4291
|
}
|
|
4177
4292
|
function blobToText(blob) {
|
|
4178
4293
|
return new Observable((observer) => {
|