@aurigma/ng-design-atoms-api-client 2.21.1 → 2.26.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 +346 -81
- 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 +241 -10
- 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 +241 -10
- package/fesm2015/aurigma-ng-design-atoms-api-client.js.map +1 -1
- package/lib/design-atoms-api-client.d.ts +97 -15
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLWF0b21zLWFwaS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL2hvbWUvYXVyaWdtYS9hZ2VudHMvMDUvX3dvcmsvOTYvcy9BdXJpZ21hLkRlc2lnbkF0b21zQXBpLlR5cGVTY3JpcHRBcGlDbGllbnQvQW5ndWxhci9hcGktY2xpZW50L3Byb2plY3RzL2NsaWVudC9zcmMvIiwic291cmNlcyI6WyJsaWIvZGVzaWduLWF0b21zLWFwaS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFzQixRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxLQUF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VVJMLFxuICAgICAgICAgIHVzZVZhbHVlOiBhcGlVcmxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IERlc2lnbkF0b21zQXBpQ2xpZW50LkFwaUNsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgICAgICAgdXNlRmFjdG9yeTogQ3JlYXRlQXBpQ2xpZW50Q29uZmlndXJhdGlvbi5iaW5kKHRoaXMsIHRva2VuICwgYXBpVXJsLCBhcGlLZXkpXG4gICAgICAgIH0sXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9hdXJpZ21hL2FnZW50cy8wNS9fd29yay85Ni9zL0F1cmlnbWEuRGVzaWduQXRvbXNBcGkuVHlwZVNjcmlwdEFwaUNsaWVudC9Bbmd1bGFyL2FwaS1jbGllbnQvcHJvamVjdHMvY2xpZW50L3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGNsaWVudFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGkubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1hdG9tcy1hcGktY2xpZW50JztcbiJdfQ==
|
|
@@ -2334,7 +2334,6 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2334
2334
|
responseType: "blob",
|
|
2335
2335
|
headers: new HttpHeaders({
|
|
2336
2336
|
"Content-Type": "application/json",
|
|
2337
|
-
"Accept": "application/json"
|
|
2338
2337
|
})
|
|
2339
2338
|
};
|
|
2340
2339
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2366,9 +2365,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2366
2365
|
}
|
|
2367
2366
|
if (status === 200) {
|
|
2368
2367
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2369
|
-
|
|
2370
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2371
|
-
return of(result200);
|
|
2368
|
+
return of(null);
|
|
2372
2369
|
}));
|
|
2373
2370
|
}
|
|
2374
2371
|
else if (status === 404) {
|
|
@@ -2668,9 +2665,9 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2668
2665
|
return of(null);
|
|
2669
2666
|
}
|
|
2670
2667
|
/**
|
|
2671
|
-
* Flatten items
|
|
2668
|
+
* Flatten items.
|
|
2672
2669
|
* @param tenantId (optional) Tenant identifier
|
|
2673
|
-
* @param body (optional) Items to flatten
|
|
2670
|
+
* @param body (optional) Items to flatten.
|
|
2674
2671
|
* @return Success
|
|
2675
2672
|
*/
|
|
2676
2673
|
flattenItems(tenantId, body) {
|
|
@@ -2835,11 +2832,237 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2835
2832
|
}
|
|
2836
2833
|
return of(null);
|
|
2837
2834
|
}
|
|
2835
|
+
/**
|
|
2836
|
+
* Creates a private design from a public design.
|
|
2837
|
+
* @param designId (optional) Public design ID.
|
|
2838
|
+
* @param privateDesignId (optional) Private design ID.
|
|
2839
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
2840
|
+
* @param tenantId (optional) Tenant identifier
|
|
2841
|
+
* @return Success
|
|
2842
|
+
*/
|
|
2843
|
+
createPrivateDesignFromDesign(designId, privateDesignId, privateStorageOwner, tenantId) {
|
|
2844
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-design?";
|
|
2845
|
+
if (designId !== undefined && designId !== null)
|
|
2846
|
+
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
2847
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
2848
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
2849
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2850
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2851
|
+
if (tenantId === null)
|
|
2852
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2853
|
+
else if (tenantId !== undefined)
|
|
2854
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2855
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2856
|
+
let options_ = {
|
|
2857
|
+
observe: "response",
|
|
2858
|
+
responseType: "blob",
|
|
2859
|
+
headers: new HttpHeaders({})
|
|
2860
|
+
};
|
|
2861
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2862
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
2863
|
+
})).pipe(mergeMap((response_) => {
|
|
2864
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromDesign(r));
|
|
2865
|
+
})).pipe(catchError((response_) => {
|
|
2866
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2867
|
+
try {
|
|
2868
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromDesign(r));
|
|
2869
|
+
}
|
|
2870
|
+
catch (e) {
|
|
2871
|
+
return throwError(e);
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
else
|
|
2875
|
+
return throwError(response_);
|
|
2876
|
+
}));
|
|
2877
|
+
}
|
|
2878
|
+
processCreatePrivateDesignFromDesign(response) {
|
|
2879
|
+
const status = response.status;
|
|
2880
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2881
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2882
|
+
let _headers = {};
|
|
2883
|
+
if (response.headers) {
|
|
2884
|
+
for (let key of response.headers.keys()) {
|
|
2885
|
+
_headers[key] = response.headers.get(key);
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
if (status === 201) {
|
|
2889
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2890
|
+
return of(null);
|
|
2891
|
+
}));
|
|
2892
|
+
}
|
|
2893
|
+
else if (status === 401) {
|
|
2894
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2895
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2896
|
+
}));
|
|
2897
|
+
}
|
|
2898
|
+
else if (status === 403) {
|
|
2899
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2900
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2901
|
+
}));
|
|
2902
|
+
}
|
|
2903
|
+
else if (status !== 200 && status !== 204) {
|
|
2904
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2905
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2906
|
+
}));
|
|
2907
|
+
}
|
|
2908
|
+
return of(null);
|
|
2909
|
+
}
|
|
2910
|
+
/**
|
|
2911
|
+
* Creates a private design from a public resource.
|
|
2912
|
+
* @param resourceId (optional) Resource ID.
|
|
2913
|
+
* @param privateDesignId (optional) Private design ID.
|
|
2914
|
+
* @param privateStorageOwner (optional) Private storage owner ID.
|
|
2915
|
+
* @param tenantId (optional) Tenant identifier
|
|
2916
|
+
* @return Success
|
|
2917
|
+
*/
|
|
2918
|
+
createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId) {
|
|
2919
|
+
let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
|
|
2920
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
2921
|
+
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
2922
|
+
if (privateDesignId !== undefined && privateDesignId !== null)
|
|
2923
|
+
url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
|
|
2924
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
2925
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
2926
|
+
if (tenantId === null)
|
|
2927
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2928
|
+
else if (tenantId !== undefined)
|
|
2929
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2930
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2931
|
+
let options_ = {
|
|
2932
|
+
observe: "response",
|
|
2933
|
+
responseType: "blob",
|
|
2934
|
+
headers: new HttpHeaders({})
|
|
2935
|
+
};
|
|
2936
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2937
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
2938
|
+
})).pipe(mergeMap((response_) => {
|
|
2939
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromResource(r));
|
|
2940
|
+
})).pipe(catchError((response_) => {
|
|
2941
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2942
|
+
try {
|
|
2943
|
+
return this.transformResult(url_, response_, (r) => this.processCreatePrivateDesignFromResource(r));
|
|
2944
|
+
}
|
|
2945
|
+
catch (e) {
|
|
2946
|
+
return throwError(e);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
else
|
|
2950
|
+
return throwError(response_);
|
|
2951
|
+
}));
|
|
2952
|
+
}
|
|
2953
|
+
processCreatePrivateDesignFromResource(response) {
|
|
2954
|
+
const status = response.status;
|
|
2955
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2956
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2957
|
+
let _headers = {};
|
|
2958
|
+
if (response.headers) {
|
|
2959
|
+
for (let key of response.headers.keys()) {
|
|
2960
|
+
_headers[key] = response.headers.get(key);
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
if (status === 201) {
|
|
2964
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2965
|
+
return of(null);
|
|
2966
|
+
}));
|
|
2967
|
+
}
|
|
2968
|
+
else if (status === 401) {
|
|
2969
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2970
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2971
|
+
}));
|
|
2972
|
+
}
|
|
2973
|
+
else if (status === 403) {
|
|
2974
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2975
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2976
|
+
}));
|
|
2977
|
+
}
|
|
2978
|
+
else if (status !== 200 && status !== 204) {
|
|
2979
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2980
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2981
|
+
}));
|
|
2982
|
+
}
|
|
2983
|
+
return of(null);
|
|
2984
|
+
}
|
|
2985
|
+
/**
|
|
2986
|
+
* Renders a design with the specified parameters.
|
|
2987
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
|
|
2988
|
+
* @param tenantId (optional) Tenant identifier
|
|
2989
|
+
* @param body (optional) Render model with preview parameters.
|
|
2990
|
+
* @return Success
|
|
2991
|
+
*/
|
|
2992
|
+
renderDesign(attachment, tenantId, body) {
|
|
2993
|
+
let url_ = this.baseUrl + "/api/atoms/v1/render-design-preview?";
|
|
2994
|
+
if (attachment !== undefined && attachment !== null)
|
|
2995
|
+
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
2996
|
+
if (tenantId === null)
|
|
2997
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
2998
|
+
else if (tenantId !== undefined)
|
|
2999
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3000
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3001
|
+
const content_ = JSON.stringify(body);
|
|
3002
|
+
let options_ = {
|
|
3003
|
+
body: content_,
|
|
3004
|
+
observe: "response",
|
|
3005
|
+
responseType: "blob",
|
|
3006
|
+
headers: new HttpHeaders({
|
|
3007
|
+
"Content-Type": "application/json",
|
|
3008
|
+
"Accept": "application/octet-stream"
|
|
3009
|
+
})
|
|
3010
|
+
};
|
|
3011
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3012
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
3013
|
+
})).pipe(mergeMap((response_) => {
|
|
3014
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesign(r));
|
|
3015
|
+
})).pipe(catchError((response_) => {
|
|
3016
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3017
|
+
try {
|
|
3018
|
+
return this.transformResult(url_, response_, (r) => this.processRenderDesign(r));
|
|
3019
|
+
}
|
|
3020
|
+
catch (e) {
|
|
3021
|
+
return throwError(e);
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
else
|
|
3025
|
+
return throwError(response_);
|
|
3026
|
+
}));
|
|
3027
|
+
}
|
|
3028
|
+
processRenderDesign(response) {
|
|
3029
|
+
const status = response.status;
|
|
3030
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3031
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3032
|
+
let _headers = {};
|
|
3033
|
+
if (response.headers) {
|
|
3034
|
+
for (let key of response.headers.keys()) {
|
|
3035
|
+
_headers[key] = response.headers.get(key);
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
if (status === 200 || status === 206) {
|
|
3039
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
3040
|
+
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
3041
|
+
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
3042
|
+
return of({ fileName: fileName, data: responseBlob, status: status, headers: _headers });
|
|
3043
|
+
}
|
|
3044
|
+
else if (status === 401) {
|
|
3045
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3046
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3047
|
+
}));
|
|
3048
|
+
}
|
|
3049
|
+
else if (status === 403) {
|
|
3050
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3051
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3052
|
+
}));
|
|
3053
|
+
}
|
|
3054
|
+
else if (status !== 200 && status !== 204) {
|
|
3055
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3056
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3057
|
+
}));
|
|
3058
|
+
}
|
|
3059
|
+
return of(null);
|
|
3060
|
+
}
|
|
2838
3061
|
/**
|
|
2839
3062
|
* Render product proof image with specified parameters.
|
|
2840
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false')
|
|
3063
|
+
* @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied (default value is 'false').
|
|
2841
3064
|
* @param tenantId (optional) Tenant identifier
|
|
2842
|
-
* @param body (optional) Preview parameters
|
|
3065
|
+
* @param body (optional) Preview parameters.
|
|
2843
3066
|
* @return Success
|
|
2844
3067
|
*/
|
|
2845
3068
|
renderProduct(attachment, tenantId, body) {
|
|
@@ -2858,7 +3081,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
|
|
|
2858
3081
|
responseType: "blob",
|
|
2859
3082
|
headers: new HttpHeaders({
|
|
2860
3083
|
"Content-Type": "application/json",
|
|
2861
|
-
"Accept": "application/
|
|
3084
|
+
"Accept": "application/octet-stream"
|
|
2862
3085
|
})
|
|
2863
3086
|
};
|
|
2864
3087
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4507,6 +4730,14 @@ var ItemSourceType;
|
|
|
4507
4730
|
ItemSourceType["ImageStorage"] = "ImageStorage";
|
|
4508
4731
|
ItemSourceType["PrivateImageStorage"] = "PrivateImageStorage";
|
|
4509
4732
|
})(ItemSourceType || (ItemSourceType = {}));
|
|
4733
|
+
/** Product preview file format. */
|
|
4734
|
+
var ProductPreviewFormat;
|
|
4735
|
+
(function (ProductPreviewFormat) {
|
|
4736
|
+
ProductPreviewFormat["Jpeg"] = "Jpeg";
|
|
4737
|
+
ProductPreviewFormat["Png"] = "Png";
|
|
4738
|
+
ProductPreviewFormat["Tiff"] = "Tiff";
|
|
4739
|
+
ProductPreviewFormat["Pdf"] = "Pdf";
|
|
4740
|
+
})(ProductPreviewFormat || (ProductPreviewFormat = {}));
|
|
4510
4741
|
var ProductProofFormat;
|
|
4511
4742
|
(function (ProductProofFormat) {
|
|
4512
4743
|
ProductProofFormat["Jpeg"] = "Jpeg";
|
|
@@ -4606,5 +4837,5 @@ DesignAtomsApiModule.decorators = [
|
|
|
4606
4837
|
* Generated bundle index. Do not edit.
|
|
4607
4838
|
*/
|
|
4608
4839
|
|
|
4609
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, ItemSourceType, ItemType, ProductPatchType, ProductProofFormat, ProductProofInterpolationMode };
|
|
4840
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DesignAtomsApiModule, DesignAtomsCompatibilityApiClient, DesignAtomsServiceApiClient, DesignAtomsViewerApiClient, ItemSourceType, ItemType, ProductPatchType, ProductPreviewFormat, ProductProofFormat, ProductProofInterpolationMode };
|
|
4610
4841
|
//# sourceMappingURL=aurigma-ng-design-atoms-api-client.js.map
|