@aurigma/ng-design-atoms-api-client 2.28.1 → 2.30.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-design-atoms-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js +176 -78
- package/bundles/aurigma-ng-design-atoms-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-design-atoms-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-design-atoms-api-client.js +1 -1
- package/esm2015/lib/design-atoms-api-client.js +92 -7
- package/esm2015/lib/design-atoms-api.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-design-atoms-api-client.js +91 -6
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +40 -8
- package/package.json +1 -1
|
@@ -32,4 +32,4 @@ DesignAtomsApiModule.decorators = [
|
|
|
32
32
|
exports: []
|
|
33
33
|
},] }
|
|
34
34
|
];
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvMDEvX3dvcmsvMTA0L3MvQXVyaWdtYS5EZXNpZ25BdG9tc0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL2Rlc2lnbi1hdG9tcy1hcGkubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0IsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzV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ZW50LkFQSV9CQVNFX1VSTCxcbiAgICAgICAgICB1c2VWYWx1ZTogYXBpVXJsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBEZXNpZ25BdG9tc0FwaUNsaWVudC5BcGlDbGllbnRDb25maWd1cmF0aW9uLFxuICAgICAgICAgIHVzZUZhY3Rvcnk6IENyZWF0ZUFwaUNsaWVudENvbmZpZ3VyYXRpb24uYmluZCh0aGlzLCB0b2tlbiAsIGFwaVVybCwgYXBpS2V5KVxuICAgICAgICB9LFxuICAgICAgXVxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/design-atoms-api.module';
|
|
5
5
|
export * from './lib/design-atoms-api-client';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy8wMS9fd29yay8xMDQvcy9BdXJpZ21hLkRlc2lnbkF0b21zQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLCtCQUErQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9kZXNpZ24tYXRvbXMtYXBpLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9kZXNpZ24tYXRvbXMtYXBpLWNsaWVudCc7XG4iXX0=
|
|
@@ -3363,13 +3363,14 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3363
3363
|
return of(null);
|
|
3364
3364
|
}
|
|
3365
3365
|
/**
|
|
3366
|
-
* Renders a design with the specified parameters.
|
|
3367
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
3366
|
+
* Renders a design preview with the specified parameters.
|
|
3367
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
3368
|
+
(default value is 'false').
|
|
3368
3369
|
* @param tenantId (optional) Tenant identifier
|
|
3369
3370
|
* @param body (optional) Render model with preview parameters.
|
|
3370
3371
|
* @return Success
|
|
3371
3372
|
*/
|
|
3372
|
-
|
|
3373
|
+
renderDesignPreview(attachment, tenantId, body) {
|
|
3373
3374
|
let url_ = this.baseUrl + "/api/atoms/v1/render-design-preview?";
|
|
3374
3375
|
if (attachment !== undefined && attachment !== null)
|
|
3375
3376
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
@@ -3391,11 +3392,95 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3391
3392
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3392
3393
|
return this.http.request("post", url_, transformedOptions_);
|
|
3393
3394
|
})).pipe(mergeMap((response_) => {
|
|
3394
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3395
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesignPreview(r));
|
|
3396
|
+
})).pipe(catchError((response_) => {
|
|
3397
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3398
|
+
try {
|
|
3399
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesignPreview(r));
|
|
3400
|
+
}
|
|
3401
|
+
catch (e) {
|
|
3402
|
+
return throwError(e);
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
else
|
|
3406
|
+
return throwError(response_);
|
|
3407
|
+
}));
|
|
3408
|
+
}
|
|
3409
|
+
processRenderDesignPreview(response) {
|
|
3410
|
+
const status = response.status;
|
|
3411
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3412
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3413
|
+
let _headers = {};
|
|
3414
|
+
if (response.headers) {
|
|
3415
|
+
for (let key of response.headers.keys()) {
|
|
3416
|
+
_headers[key] = response.headers.get(key);
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
if (status === 200 || status === 206) {
|
|
3420
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3421
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3422
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3423
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3424
|
+
}
|
|
3425
|
+
else if (status === 401) {
|
|
3426
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3427
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3428
|
+
}));
|
|
3429
|
+
}
|
|
3430
|
+
else if (status === 403) {
|
|
3431
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3432
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3433
|
+
}));
|
|
3434
|
+
}
|
|
3435
|
+
else if (status === 500) {
|
|
3436
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3437
|
+
let result500 = null;
|
|
3438
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3439
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3440
|
+
}));
|
|
3441
|
+
}
|
|
3442
|
+
else if (status !== 200 && status !== 204) {
|
|
3443
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3444
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3445
|
+
}));
|
|
3446
|
+
}
|
|
3447
|
+
return of(null);
|
|
3448
|
+
}
|
|
3449
|
+
/**
|
|
3450
|
+
* Renders a design proof with the specified parameters.
|
|
3451
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
|
|
3452
|
+
(default value is 'false').
|
|
3453
|
+
* @param tenantId (optional) Tenant identifier
|
|
3454
|
+
* @param body (optional) Render model with proof parameters.
|
|
3455
|
+
* @return Success
|
|
3456
|
+
*/
|
|
3457
|
+
renderDesignProof(attachment, tenantId, body) {
|
|
3458
|
+
let url_ = this.baseUrl + "/api/atoms/v1/render-design-proof?";
|
|
3459
|
+
if (attachment !== undefined && attachment !== null)
|
|
3460
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
3461
|
+
if (tenantId === null)
|
|
3462
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3463
|
+
else if (tenantId !== undefined)
|
|
3464
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3465
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3466
|
+
const content_ = JSON.stringify(body);
|
|
3467
|
+
let options_ = {
|
|
3468
|
+
body: content_,
|
|
3469
|
+
observe: "response",
|
|
3470
|
+
responseType: "blob",
|
|
3471
|
+
headers: new HttpHeaders({
|
|
3472
|
+
"Content-Type": "application/json",
|
|
3473
|
+
"Accept": "application/octet-stream"
|
|
3474
|
+
})
|
|
3475
|
+
};
|
|
3476
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3477
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
3478
|
+
})).pipe(mergeMap((response_) => {
|
|
3479
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesignProof(r));
|
|
3395
3480
|
})).pipe(catchError((response_) => {
|
|
3396
3481
|
if (response_ instanceof HttpResponseBase) {
|
|
3397
3482
|
try {
|
|
3398
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3483
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesignProof(r));
|
|
3399
3484
|
}
|
|
3400
3485
|
catch (e) {
|
|
3401
3486
|
return throwError(e);
|
|
@@ -3405,7 +3490,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3405
3490
|
return throwError(response_);
|
|
3406
3491
|
}));
|
|
3407
3492
|
}
|
|
3408
|
-
|
|
3493
|
+
processRenderDesignProof(response) {
|
|
3409
3494
|
const status = response.status;
|
|
3410
3495
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3411
3496
|
response.error instanceof Blob ? response.error : undefined;
|