@aurigma/axios-storefront-api-client 2.54.19 → 2.55.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.
@@ -777,91 +777,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
777
777
  }
778
778
  return Promise.resolve(null);
779
779
  }
780
- /**
781
- * Creates a new storefront product reference.
782
- * @param storefrontId Storefront identifier.
783
- * @param tenantId (optional) Tenant identifier.
784
- * @param body (optional) Create operation parameters.
785
- * @return Success
786
- */
787
- create(storefrontId, tenantId, body, cancelToken) {
788
- let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
789
- if (storefrontId === undefined || storefrontId === null)
790
- throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
791
- else
792
- url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
793
- if (tenantId !== undefined && tenantId !== null)
794
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
795
- url_ = url_.replace(/[?&]$/, "");
796
- const content_ = JSON.stringify(body);
797
- let options_ = {
798
- data: content_,
799
- method: "POST",
800
- url: url_,
801
- headers: {
802
- "Content-Type": "application/json",
803
- "Accept": "application/json"
804
- },
805
- cancelToken
806
- };
807
- return this.transformOptions(options_).then(transformedOptions_ => {
808
- return this.instance.request(transformedOptions_);
809
- }).catch((_error) => {
810
- if (isAxiosError(_error) && _error.response) {
811
- return _error.response;
812
- }
813
- else {
814
- throw _error;
815
- }
816
- }).then((_response) => {
817
- return this.transformResult(url_, _response, (_response) => this.processCreate(_response));
818
- });
819
- }
820
- processCreate(response) {
821
- const status = response.status;
822
- let _headers = {};
823
- if (response.headers && typeof response.headers === "object") {
824
- for (let k in response.headers) {
825
- if (response.headers.hasOwnProperty(k)) {
826
- _headers[k] = response.headers[k];
827
- }
828
- }
829
- }
830
- if (status === 201) {
831
- const _responseText = response.data;
832
- let result201 = null;
833
- let resultData201 = _responseText;
834
- result201 = JSON.parse(resultData201);
835
- return Promise.resolve(result201);
836
- }
837
- else if (status === 404) {
838
- const _responseText = response.data;
839
- let result404 = null;
840
- let resultData404 = _responseText;
841
- result404 = JSON.parse(resultData404);
842
- return throwException("Not Found", status, _responseText, _headers, result404);
843
- }
844
- else if (status === 409) {
845
- const _responseText = response.data;
846
- let result409 = null;
847
- let resultData409 = _responseText;
848
- result409 = JSON.parse(resultData409);
849
- return throwException("Conflict", status, _responseText, _headers, result409);
850
- }
851
- else if (status === 401) {
852
- const _responseText = response.data;
853
- return throwException("Unauthorized", status, _responseText, _headers);
854
- }
855
- else if (status === 403) {
856
- const _responseText = response.data;
857
- return throwException("Forbidden", status, _responseText, _headers);
858
- }
859
- else if (status !== 200 && status !== 204) {
860
- const _responseText = response.data;
861
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
862
- }
863
- return Promise.resolve(null);
864
- }
865
780
  /**
866
781
  * Returns a list of product specifications associated with storefront product references relevant to the specified query parameters.
867
782
  * @param storefrontId Storefront identifier.
@@ -1271,91 +1186,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
1271
1186
  }
1272
1187
  return Promise.resolve(null);
1273
1188
  }
1274
- /**
1275
- * Deletes the storefront product reference.
1276
- * @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
1277
- * @param storefrontId Storefront identifier.
1278
- * @param tenantId (optional) Tenant identifier.
1279
- * @return Success
1280
- */
1281
- delete(reference, storefrontId, tenantId, cancelToken) {
1282
- let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
1283
- if (reference === undefined || reference === null)
1284
- throw new Error("The parameter 'reference' must be defined.");
1285
- url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
1286
- if (storefrontId === undefined || storefrontId === null)
1287
- throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1288
- else
1289
- url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1290
- if (tenantId !== undefined && tenantId !== null)
1291
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1292
- url_ = url_.replace(/[?&]$/, "");
1293
- let options_ = {
1294
- method: "DELETE",
1295
- url: url_,
1296
- headers: {
1297
- "Accept": "application/json"
1298
- },
1299
- cancelToken
1300
- };
1301
- return this.transformOptions(options_).then(transformedOptions_ => {
1302
- return this.instance.request(transformedOptions_);
1303
- }).catch((_error) => {
1304
- if (isAxiosError(_error) && _error.response) {
1305
- return _error.response;
1306
- }
1307
- else {
1308
- throw _error;
1309
- }
1310
- }).then((_response) => {
1311
- return this.transformResult(url_, _response, (_response) => this.processDelete(_response));
1312
- });
1313
- }
1314
- processDelete(response) {
1315
- const status = response.status;
1316
- let _headers = {};
1317
- if (response.headers && typeof response.headers === "object") {
1318
- for (let k in response.headers) {
1319
- if (response.headers.hasOwnProperty(k)) {
1320
- _headers[k] = response.headers[k];
1321
- }
1322
- }
1323
- }
1324
- if (status === 200) {
1325
- const _responseText = response.data;
1326
- let result200 = null;
1327
- let resultData200 = _responseText;
1328
- result200 = JSON.parse(resultData200);
1329
- return Promise.resolve(result200);
1330
- }
1331
- else if (status === 404) {
1332
- const _responseText = response.data;
1333
- let result404 = null;
1334
- let resultData404 = _responseText;
1335
- result404 = JSON.parse(resultData404);
1336
- return throwException("Not Found", status, _responseText, _headers, result404);
1337
- }
1338
- else if (status === 409) {
1339
- const _responseText = response.data;
1340
- let result409 = null;
1341
- let resultData409 = _responseText;
1342
- result409 = JSON.parse(resultData409);
1343
- return throwException("Conflict", status, _responseText, _headers, result409);
1344
- }
1345
- else if (status === 401) {
1346
- const _responseText = response.data;
1347
- return throwException("Unauthorized", status, _responseText, _headers);
1348
- }
1349
- else if (status === 403) {
1350
- const _responseText = response.data;
1351
- return throwException("Forbidden", status, _responseText, _headers);
1352
- }
1353
- else if (status !== 200 && status !== 204) {
1354
- const _responseText = response.data;
1355
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1356
- }
1357
- return Promise.resolve(null);
1358
- }
1359
1189
  /**
1360
1190
  * Returns a product specification by the storefront product reference.
1361
1191
  * @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
@@ -1888,92 +1718,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
1888
1718
  }
1889
1719
  return Promise.resolve(null);
1890
1720
  }
1891
- /**
1892
- * Returns a product personalization workflow configuration by storefront product reference.
1893
- * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
1894
- * @param storefrontId Storefront identifier.
1895
- * @param tenantId (optional) Tenant identifier.
1896
- * @return Success
1897
- * @deprecated
1898
- */
1899
- getProductConfig(reference, storefrontId, tenantId, cancelToken) {
1900
- let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
1901
- if (reference === undefined || reference === null)
1902
- throw new Error("The parameter 'reference' must be defined.");
1903
- url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
1904
- if (storefrontId === undefined || storefrontId === null)
1905
- throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1906
- else
1907
- url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1908
- if (tenantId !== undefined && tenantId !== null)
1909
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1910
- url_ = url_.replace(/[?&]$/, "");
1911
- let options_ = {
1912
- method: "GET",
1913
- url: url_,
1914
- headers: {
1915
- "Accept": "text/plain"
1916
- },
1917
- cancelToken
1918
- };
1919
- return this.transformOptions(options_).then(transformedOptions_ => {
1920
- return this.instance.request(transformedOptions_);
1921
- }).catch((_error) => {
1922
- if (isAxiosError(_error) && _error.response) {
1923
- return _error.response;
1924
- }
1925
- else {
1926
- throw _error;
1927
- }
1928
- }).then((_response) => {
1929
- return this.transformResult(url_, _response, (_response) => this.processGetProductConfig(_response));
1930
- });
1931
- }
1932
- processGetProductConfig(response) {
1933
- const status = response.status;
1934
- let _headers = {};
1935
- if (response.headers && typeof response.headers === "object") {
1936
- for (let k in response.headers) {
1937
- if (response.headers.hasOwnProperty(k)) {
1938
- _headers[k] = response.headers[k];
1939
- }
1940
- }
1941
- }
1942
- if (status === 200) {
1943
- const _responseText = response.data;
1944
- let result200 = null;
1945
- let resultData200 = _responseText;
1946
- result200 = resultData200;
1947
- return Promise.resolve(result200);
1948
- }
1949
- else if (status === 404) {
1950
- const _responseText = response.data;
1951
- let result404 = null;
1952
- let resultData404 = _responseText;
1953
- result404 = JSON.parse(resultData404);
1954
- return throwException("Not Found", status, _responseText, _headers, result404);
1955
- }
1956
- else if (status === 409) {
1957
- const _responseText = response.data;
1958
- let result409 = null;
1959
- let resultData409 = _responseText;
1960
- result409 = JSON.parse(resultData409);
1961
- return throwException("Conflict", status, _responseText, _headers, result409);
1962
- }
1963
- else if (status === 401) {
1964
- const _responseText = response.data;
1965
- return throwException("Unauthorized", status, _responseText, _headers);
1966
- }
1967
- else if (status === 403) {
1968
- const _responseText = response.data;
1969
- return throwException("Forbidden", status, _responseText, _headers);
1970
- }
1971
- else if (status !== 200 && status !== 204) {
1972
- const _responseText = response.data;
1973
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1974
- }
1975
- return Promise.resolve(null);
1976
- }
1977
1721
  }
1978
1722
  export class ProductsApiClient extends ApiClientBase {
1979
1723
  instance;
@@ -3175,91 +2919,8 @@ export class ProductsApiClient extends ApiClientBase {
3175
2919
  return Promise.resolve(null);
3176
2920
  }
3177
2921
  /**
3178
- * Set product variant price.
3179
- * @param id Product identifier.
3180
- * @param productVersionId (optional) Product version identifier.
3181
- * @param tenantId (optional) Tenant identifier.
3182
- * @param body (optional) Set product variant price operation parameters.
3183
- * @return Success
3184
- */
3185
- setProductVariantPrice(id, productVersionId, tenantId, body, cancelToken) {
3186
- let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/set-variant-price?";
3187
- if (id === undefined || id === null)
3188
- throw new Error("The parameter 'id' must be defined.");
3189
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3190
- if (productVersionId !== undefined && productVersionId !== null)
3191
- url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
3192
- if (tenantId !== undefined && tenantId !== null)
3193
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3194
- url_ = url_.replace(/[?&]$/, "");
3195
- const content_ = JSON.stringify(body);
3196
- let options_ = {
3197
- data: content_,
3198
- method: "POST",
3199
- url: url_,
3200
- headers: {
3201
- "Content-Type": "application/json",
3202
- },
3203
- cancelToken
3204
- };
3205
- return this.transformOptions(options_).then(transformedOptions_ => {
3206
- return this.instance.request(transformedOptions_);
3207
- }).catch((_error) => {
3208
- if (isAxiosError(_error) && _error.response) {
3209
- return _error.response;
3210
- }
3211
- else {
3212
- throw _error;
3213
- }
3214
- }).then((_response) => {
3215
- return this.transformResult(url_, _response, (_response) => this.processSetProductVariantPrice(_response));
3216
- });
3217
- }
3218
- processSetProductVariantPrice(response) {
3219
- const status = response.status;
3220
- let _headers = {};
3221
- if (response.headers && typeof response.headers === "object") {
3222
- for (let k in response.headers) {
3223
- if (response.headers.hasOwnProperty(k)) {
3224
- _headers[k] = response.headers[k];
3225
- }
3226
- }
3227
- }
3228
- if (status === 200) {
3229
- const _responseText = response.data;
3230
- return Promise.resolve(null);
3231
- }
3232
- else if (status === 404) {
3233
- const _responseText = response.data;
3234
- let result404 = null;
3235
- let resultData404 = _responseText;
3236
- result404 = JSON.parse(resultData404);
3237
- return throwException("Not Found", status, _responseText, _headers, result404);
3238
- }
3239
- else if (status === 409) {
3240
- const _responseText = response.data;
3241
- let result409 = null;
3242
- let resultData409 = _responseText;
3243
- result409 = JSON.parse(resultData409);
3244
- return throwException("Conflict", status, _responseText, _headers, result409);
3245
- }
3246
- else if (status === 401) {
3247
- const _responseText = response.data;
3248
- return throwException("Unauthorized", status, _responseText, _headers);
3249
- }
3250
- else if (status === 403) {
3251
- const _responseText = response.data;
3252
- return throwException("Forbidden", status, _responseText, _headers);
3253
- }
3254
- else if (status !== 200 && status !== 204) {
3255
- const _responseText = response.data;
3256
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3257
- }
3258
- return Promise.resolve(null);
3259
- }
3260
- /**
3261
- * Returns a list of all available product tags.
3262
- * @param search (optional) Search string for partial match.
2922
+ * Returns a list of all available product tags.
2923
+ * @param search (optional) Search string for partial match.
3263
2924
  * @param tenantId (optional) Tenant identifier.
3264
2925
  * @return Success
3265
2926
  */
@@ -3641,80 +3302,6 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
3641
3302
  }
3642
3303
  return Promise.resolve(null);
3643
3304
  }
3644
- /**
3645
- * Returns a product personalization workflow configuration by product specification identifier.
3646
- * @param id Product specification identifier.
3647
- * @param tenantId (optional) Tenant identifier.
3648
- * @return Success
3649
- * @deprecated
3650
- */
3651
- getConfiguration(id, tenantId, cancelToken) {
3652
- let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
3653
- if (id === undefined || id === null)
3654
- throw new Error("The parameter 'id' must be defined.");
3655
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
3656
- if (tenantId !== undefined && tenantId !== null)
3657
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3658
- url_ = url_.replace(/[?&]$/, "");
3659
- let options_ = {
3660
- method: "GET",
3661
- url: url_,
3662
- headers: {
3663
- "Accept": "text/plain"
3664
- },
3665
- cancelToken
3666
- };
3667
- return this.transformOptions(options_).then(transformedOptions_ => {
3668
- return this.instance.request(transformedOptions_);
3669
- }).catch((_error) => {
3670
- if (isAxiosError(_error) && _error.response) {
3671
- return _error.response;
3672
- }
3673
- else {
3674
- throw _error;
3675
- }
3676
- }).then((_response) => {
3677
- return this.transformResult(url_, _response, (_response) => this.processGetConfiguration(_response));
3678
- });
3679
- }
3680
- processGetConfiguration(response) {
3681
- const status = response.status;
3682
- let _headers = {};
3683
- if (response.headers && typeof response.headers === "object") {
3684
- for (let k in response.headers) {
3685
- if (response.headers.hasOwnProperty(k)) {
3686
- _headers[k] = response.headers[k];
3687
- }
3688
- }
3689
- }
3690
- if (status === 200) {
3691
- const _responseText = response.data;
3692
- let result200 = null;
3693
- let resultData200 = _responseText;
3694
- result200 = resultData200;
3695
- return Promise.resolve(result200);
3696
- }
3697
- else if (status === 404) {
3698
- const _responseText = response.data;
3699
- let result404 = null;
3700
- let resultData404 = _responseText;
3701
- result404 = JSON.parse(resultData404);
3702
- return throwException("Not Found", status, _responseText, _headers, result404);
3703
- }
3704
- else if (status === 401) {
3705
- const _responseText = response.data;
3706
- return throwException("Unauthorized", status, _responseText, _headers);
3707
- }
3708
- else if (status === 403) {
3709
- const _responseText = response.data;
3710
- return throwException("Forbidden", status, _responseText, _headers);
3711
- }
3712
- else if (status !== 200 && status !== 204) {
3713
- const _responseText = response.data;
3714
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3715
- }
3716
- return Promise.resolve(null);
3717
- }
3718
3305
  }
3719
3306
  export class ProjectsApiClient extends ApiClientBase {
3720
3307
  instance;
@@ -4942,184 +4529,6 @@ export class ProjectsApiClient extends ApiClientBase {
4942
4529
  }
4943
4530
  return Promise.resolve(null);
4944
4531
  }
4945
- /**
4946
- * Returns an url to download project print file.
4947
- * @param id Project identifier.
4948
- * @param designUserId Design owner identifier.
4949
- * @param designId Design identifier.
4950
- * @param tenantId (optional) Tenant identifier.
4951
- * @return Success
4952
- * @deprecated
4953
- */
4954
- getProjectPdfUrl(id, designUserId, designId, tenantId, cancelToken) {
4955
- let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
4956
- if (id === undefined || id === null)
4957
- throw new Error("The parameter 'id' must be defined.");
4958
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
4959
- if (designUserId === undefined || designUserId === null)
4960
- throw new Error("The parameter 'designUserId' must be defined and cannot be null.");
4961
- else
4962
- url_ += "designUserId=" + encodeURIComponent("" + designUserId) + "&";
4963
- if (designId === undefined || designId === null)
4964
- throw new Error("The parameter 'designId' must be defined and cannot be null.");
4965
- else
4966
- url_ += "designId=" + encodeURIComponent("" + designId) + "&";
4967
- if (tenantId !== undefined && tenantId !== null)
4968
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4969
- url_ = url_.replace(/[?&]$/, "");
4970
- let options_ = {
4971
- method: "GET",
4972
- url: url_,
4973
- headers: {
4974
- "Accept": "application/json"
4975
- },
4976
- cancelToken
4977
- };
4978
- return this.transformOptions(options_).then(transformedOptions_ => {
4979
- return this.instance.request(transformedOptions_);
4980
- }).catch((_error) => {
4981
- if (isAxiosError(_error) && _error.response) {
4982
- return _error.response;
4983
- }
4984
- else {
4985
- throw _error;
4986
- }
4987
- }).then((_response) => {
4988
- return this.transformResult(url_, _response, (_response) => this.processGetProjectPdfUrl(_response));
4989
- });
4990
- }
4991
- processGetProjectPdfUrl(response) {
4992
- const status = response.status;
4993
- let _headers = {};
4994
- if (response.headers && typeof response.headers === "object") {
4995
- for (let k in response.headers) {
4996
- if (response.headers.hasOwnProperty(k)) {
4997
- _headers[k] = response.headers[k];
4998
- }
4999
- }
5000
- }
5001
- if (status === 200) {
5002
- const _responseText = response.data;
5003
- let result200 = null;
5004
- let resultData200 = _responseText;
5005
- result200 = JSON.parse(resultData200);
5006
- return Promise.resolve(result200);
5007
- }
5008
- else if (status === 409) {
5009
- const _responseText = response.data;
5010
- let result409 = null;
5011
- let resultData409 = _responseText;
5012
- result409 = JSON.parse(resultData409);
5013
- return throwException("Conflict", status, _responseText, _headers, result409);
5014
- }
5015
- else if (status === 401) {
5016
- const _responseText = response.data;
5017
- return throwException("Unauthorized", status, _responseText, _headers);
5018
- }
5019
- else if (status === 403) {
5020
- const _responseText = response.data;
5021
- return throwException("Forbidden", status, _responseText, _headers);
5022
- }
5023
- else if (status !== 200 && status !== 204) {
5024
- const _responseText = response.data;
5025
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5026
- }
5027
- return Promise.resolve(null);
5028
- }
5029
- /**
5030
- * Returns an archive file, which contains all project print files.
5031
- * @param id Project identifier.
5032
- * @param designUserId Design owner identifier.
5033
- * @param designId Design identifier.
5034
- * @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
5035
- * @param tenantId (optional) Tenant identifier.
5036
- * @return Success
5037
- * @deprecated
5038
- */
5039
- getProjectPdfZip(id, designUserId, designId, attachment, tenantId, cancelToken) {
5040
- let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
5041
- if (id === undefined || id === null)
5042
- throw new Error("The parameter 'id' must be defined.");
5043
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
5044
- if (designUserId === undefined || designUserId === null)
5045
- throw new Error("The parameter 'designUserId' must be defined and cannot be null.");
5046
- else
5047
- url_ += "designUserId=" + encodeURIComponent("" + designUserId) + "&";
5048
- if (designId === undefined || designId === null)
5049
- throw new Error("The parameter 'designId' must be defined and cannot be null.");
5050
- else
5051
- url_ += "designId=" + encodeURIComponent("" + designId) + "&";
5052
- if (attachment !== undefined && attachment !== null)
5053
- url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
5054
- if (tenantId !== undefined && tenantId !== null)
5055
- url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
5056
- url_ = url_.replace(/[?&]$/, "");
5057
- let options_ = {
5058
- responseType: "blob",
5059
- method: "GET",
5060
- url: url_,
5061
- headers: {
5062
- "Accept": "application/octet-stream"
5063
- },
5064
- cancelToken
5065
- };
5066
- return this.transformOptions(options_).then(transformedOptions_ => {
5067
- return this.instance.request(transformedOptions_);
5068
- }).catch((_error) => {
5069
- if (isAxiosError(_error) && _error.response) {
5070
- return _error.response;
5071
- }
5072
- else {
5073
- throw _error;
5074
- }
5075
- }).then((_response) => {
5076
- return this.transformResult(url_, _response, (_response) => this.processGetProjectPdfZip(_response));
5077
- });
5078
- }
5079
- processGetProjectPdfZip(response) {
5080
- const status = response.status;
5081
- let _headers = {};
5082
- if (response.headers && typeof response.headers === "object") {
5083
- for (let k in response.headers) {
5084
- if (response.headers.hasOwnProperty(k)) {
5085
- _headers[k] = response.headers[k];
5086
- }
5087
- }
5088
- }
5089
- if (status === 200 || status === 206) {
5090
- const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
5091
- const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5092
- const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5093
- return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
5094
- }
5095
- else if (status === 404) {
5096
- const _responseText = response.data;
5097
- let result404 = null;
5098
- let resultData404 = _responseText;
5099
- result404 = JSON.parse(resultData404);
5100
- return throwException("Not Found", status, _responseText, _headers, result404);
5101
- }
5102
- else if (status === 409) {
5103
- const _responseText = response.data;
5104
- let result409 = null;
5105
- let resultData409 = _responseText;
5106
- result409 = JSON.parse(resultData409);
5107
- return throwException("Conflict", status, _responseText, _headers, result409);
5108
- }
5109
- else if (status === 401) {
5110
- const _responseText = response.data;
5111
- return throwException("Unauthorized", status, _responseText, _headers);
5112
- }
5113
- else if (status === 403) {
5114
- const _responseText = response.data;
5115
- return throwException("Forbidden", status, _responseText, _headers);
5116
- }
5117
- else if (status !== 200 && status !== 204) {
5118
- const _responseText = response.data;
5119
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5120
- }
5121
- return Promise.resolve(null);
5122
- }
5123
4532
  /**
5124
4533
  * Returns a project processing results.
5125
4534
  * @param id Project identifier.