@aurigma/ng-design-atoms-api-client 2.58.2 → 2.60.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 +239 -129
- 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 +98 -1
- 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 +97 -0
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +17 -0
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvQ0NIMDQvX3dvcmsvNi9zL0F1cmlnbWEuRGVzaWduQXRvbXNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbImxpYi9kZXNpZ24tYXRvbXMtYXBpLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXNCLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUM1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pZ25BdG9tc0FwaUNsaWVudC5BUElfQkFTRV9VUkwsXG4gICAgICAgICAgdXNlVmFsdWU6IGFwaVVybFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogRGVzaWduQXRvbXNBcGlDbGllbnQuQXBpQ2xpZW50Q29uZmlndXJhdGlvbixcbiAgICAgICAgICB1c2VGYWN0b3J5OiBDcmVhdGVBcGlDbGllbnRDb25maWd1cmF0aW9uLmJpbmQodGhpcywgdG9rZW4gLCBhcGlVcmwsIGFwaUtleSlcbiAgICAgICAgfSxcbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0=
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy9DQ0gwNC9fd29yay82L3MvQXVyaWdtYS5EZXNpZ25BdG9tc0FwaS5UeXBlU2NyaXB0QXBpQ2xpZW50L0FuZ3VsYXIvYXBpLWNsaWVudC9wcm9qZWN0cy9jbGllbnQvc3JjLyIsInNvdXJjZXMiOlsicHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY2xpZW50XG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGVzaWduLWF0b21zLWFwaS1jbGllbnQnO1xuIl19
|
|
@@ -3287,6 +3287,103 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
3287
3287
|
}
|
|
3288
3288
|
return of(null);
|
|
3289
3289
|
}
|
|
3290
|
+
/**
|
|
3291
|
+
* Loads toggle set from design file taken from storage.
|
|
3292
|
+
* @param id Design identifier.
|
|
3293
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
3294
|
+
* @param tenantId (optional) Tenant identifier
|
|
3295
|
+
* @return Success
|
|
3296
|
+
*/
|
|
3297
|
+
loadToggleSet(id, privateStorageOwner, tenantId) {
|
|
3298
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/toggle-set?";
|
|
3299
|
+
if (id === undefined || id === null)
|
|
3300
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3301
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3302
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
3303
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
3304
|
+
if (tenantId === null)
|
|
3305
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
3306
|
+
else if (tenantId !== undefined)
|
|
3307
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3308
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3309
|
+
let options_ = {
|
|
3310
|
+
observe: "response",
|
|
3311
|
+
responseType: "blob",
|
|
3312
|
+
headers: new HttpHeaders({
|
|
3313
|
+
"Accept": "application/octet-stream"
|
|
3314
|
+
})
|
|
3315
|
+
};
|
|
3316
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3317
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3318
|
+
})).pipe(mergeMap((response_) => {
|
|
3319
|
+
return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
|
|
3320
|
+
})).pipe(catchError((response_) => {
|
|
3321
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3322
|
+
try {
|
|
3323
|
+
return this.transformResult(url_, response_, (r) => this.processLoadToggleSet(r));
|
|
3324
|
+
}
|
|
3325
|
+
catch (e) {
|
|
3326
|
+
return throwError(e);
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
else
|
|
3330
|
+
return throwError(response_);
|
|
3331
|
+
}));
|
|
3332
|
+
}
|
|
3333
|
+
processLoadToggleSet(response) {
|
|
3334
|
+
const status = response.status;
|
|
3335
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3336
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3337
|
+
let _headers = {};
|
|
3338
|
+
if (response.headers) {
|
|
3339
|
+
for (let key of response.headers.keys()) {
|
|
3340
|
+
_headers[key] = response.headers.get(key);
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
if (status === 200 || status === 206) {
|
|
3344
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3345
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3346
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3347
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3348
|
+
}
|
|
3349
|
+
else if (status === 404) {
|
|
3350
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3351
|
+
let result404 = null;
|
|
3352
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3353
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3354
|
+
}));
|
|
3355
|
+
}
|
|
3356
|
+
else if (status === 409) {
|
|
3357
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3358
|
+
let result409 = null;
|
|
3359
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3360
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3361
|
+
}));
|
|
3362
|
+
}
|
|
3363
|
+
else if (status === 401) {
|
|
3364
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3365
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3366
|
+
}));
|
|
3367
|
+
}
|
|
3368
|
+
else if (status === 403) {
|
|
3369
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3370
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3371
|
+
}));
|
|
3372
|
+
}
|
|
3373
|
+
else if (status === 500) {
|
|
3374
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3375
|
+
let result500 = null;
|
|
3376
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3377
|
+
return throwException("Internal server error", status, _responseText, _headers, result500);
|
|
3378
|
+
}));
|
|
3379
|
+
}
|
|
3380
|
+
else if (status !== 200 && status !== 204) {
|
|
3381
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3382
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3383
|
+
}));
|
|
3384
|
+
}
|
|
3385
|
+
return of(null);
|
|
3386
|
+
}
|
|
3290
3387
|
/**
|
|
3291
3388
|
* Gets variable items information for design file taken from storage
|
|
3292
3389
|
* @param id Design identifier
|