@aurigma/ng-backoffice-api-client 2.62.12 → 2.65.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.
@@ -1295,6 +1295,173 @@ class ProductsManagementApiClient extends ApiClientBase {
1295
1295
  }
1296
1296
  return of(null);
1297
1297
  }
1298
+ /**
1299
+ * Updates product variant resources.
1300
+ * @param id Product identifier.
1301
+ * @param productVersionId (optional) Product version identifier.
1302
+ * @param tenantId (optional) Tenant identifier.
1303
+ * @return Success
1304
+ */
1305
+ updateProductVariantResources(id, productVersionId, tenantId) {
1306
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/update-variant-resources?";
1307
+ if (id === undefined || id === null)
1308
+ throw new Error("The parameter 'id' must be defined.");
1309
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
1310
+ if (productVersionId !== undefined && productVersionId !== null)
1311
+ url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
1312
+ if (tenantId !== undefined && tenantId !== null)
1313
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1314
+ url_ = url_.replace(/[?&]$/, "");
1315
+ let options_ = {
1316
+ observe: "response",
1317
+ responseType: "blob",
1318
+ headers: new HttpHeaders({})
1319
+ };
1320
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
1321
+ return this.http.request("post", url_, transformedOptions_);
1322
+ })).pipe(mergeMap((response_) => {
1323
+ return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
1324
+ })).pipe(catchError((response_) => {
1325
+ if (response_ instanceof HttpResponseBase) {
1326
+ try {
1327
+ return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
1328
+ }
1329
+ catch (e) {
1330
+ return throwError(e);
1331
+ }
1332
+ }
1333
+ else
1334
+ return throwError(response_);
1335
+ }));
1336
+ }
1337
+ processUpdateProductVariantResources(response) {
1338
+ const status = response.status;
1339
+ const responseBlob = response instanceof HttpResponse ? response.body :
1340
+ response.error instanceof Blob ? response.error : undefined;
1341
+ let _headers = {};
1342
+ if (response.headers) {
1343
+ for (let key of response.headers.keys()) {
1344
+ _headers[key] = response.headers.get(key);
1345
+ }
1346
+ }
1347
+ if (status === 200) {
1348
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1349
+ return of(null);
1350
+ }));
1351
+ }
1352
+ else if (status === 404) {
1353
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1354
+ let result404 = null;
1355
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1356
+ return throwException("Not Found", status, _responseText, _headers, result404);
1357
+ }));
1358
+ }
1359
+ else if (status === 409) {
1360
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1361
+ let result409 = null;
1362
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1363
+ return throwException("Conflict", status, _responseText, _headers, result409);
1364
+ }));
1365
+ }
1366
+ else if (status === 401) {
1367
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1368
+ return throwException("Unauthorized", status, _responseText, _headers);
1369
+ }));
1370
+ }
1371
+ else if (status === 403) {
1372
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1373
+ return throwException("Forbidden", status, _responseText, _headers);
1374
+ }));
1375
+ }
1376
+ else if (status !== 200 && status !== 204) {
1377
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1378
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1379
+ }));
1380
+ }
1381
+ return of(null);
1382
+ }
1383
+ /**
1384
+ * Validates product variant resources.
1385
+ * @param id Product identifier.
1386
+ * @param tenantId (optional) Tenant identifier.
1387
+ * @return Success
1388
+ */
1389
+ validateProductVariantResources(id, tenantId) {
1390
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/validate-variant-resources?";
1391
+ if (id === undefined || id === null)
1392
+ throw new Error("The parameter 'id' must be defined.");
1393
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
1394
+ if (tenantId !== undefined && tenantId !== null)
1395
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1396
+ url_ = url_.replace(/[?&]$/, "");
1397
+ let options_ = {
1398
+ observe: "response",
1399
+ responseType: "blob",
1400
+ headers: new HttpHeaders({})
1401
+ };
1402
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
1403
+ return this.http.request("post", url_, transformedOptions_);
1404
+ })).pipe(mergeMap((response_) => {
1405
+ return this.transformResult(url_, response_, (r) => this.processValidateProductVariantResources(r));
1406
+ })).pipe(catchError((response_) => {
1407
+ if (response_ instanceof HttpResponseBase) {
1408
+ try {
1409
+ return this.transformResult(url_, response_, (r) => this.processValidateProductVariantResources(r));
1410
+ }
1411
+ catch (e) {
1412
+ return throwError(e);
1413
+ }
1414
+ }
1415
+ else
1416
+ return throwError(response_);
1417
+ }));
1418
+ }
1419
+ processValidateProductVariantResources(response) {
1420
+ const status = response.status;
1421
+ const responseBlob = response instanceof HttpResponse ? response.body :
1422
+ response.error instanceof Blob ? response.error : undefined;
1423
+ let _headers = {};
1424
+ if (response.headers) {
1425
+ for (let key of response.headers.keys()) {
1426
+ _headers[key] = response.headers.get(key);
1427
+ }
1428
+ }
1429
+ if (status === 200) {
1430
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1431
+ return of(null);
1432
+ }));
1433
+ }
1434
+ else if (status === 404) {
1435
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1436
+ let result404 = null;
1437
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1438
+ return throwException("Not Found", status, _responseText, _headers, result404);
1439
+ }));
1440
+ }
1441
+ else if (status === 409) {
1442
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1443
+ let result409 = null;
1444
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1445
+ return throwException("Conflict", status, _responseText, _headers, result409);
1446
+ }));
1447
+ }
1448
+ else if (status === 401) {
1449
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1450
+ return throwException("Unauthorized", status, _responseText, _headers);
1451
+ }));
1452
+ }
1453
+ else if (status === 403) {
1454
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1455
+ return throwException("Forbidden", status, _responseText, _headers);
1456
+ }));
1457
+ }
1458
+ else if (status !== 200 && status !== 204) {
1459
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1460
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1461
+ }));
1462
+ }
1463
+ return of(null);
1464
+ }
1298
1465
  /**
1299
1466
  * Returns a list of product variant designs.
1300
1467
  * @param id Product identifier.
@@ -1746,6 +1913,100 @@ class ProductsManagementApiClient extends ApiClientBase {
1746
1913
  }
1747
1914
  return of(null);
1748
1915
  }
1916
+ /**
1917
+ * Set product variants weight. Variants identifiers will be changed.
1918
+ * @param id Product identifier.
1919
+ * @param tenantId (optional) Tenant identifier.
1920
+ * @param body (optional) Set product variants weight operation parameters.
1921
+ * @return Success
1922
+ */
1923
+ setProductVariantWeight(id, tenantId, body) {
1924
+ let url_ = this.baseUrl + "/api/backoffice/v1/products/{id}/set-variant-weight?";
1925
+ if (id === undefined || id === null)
1926
+ throw new Error("The parameter 'id' must be defined.");
1927
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
1928
+ if (tenantId !== undefined && tenantId !== null)
1929
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1930
+ url_ = url_.replace(/[?&]$/, "");
1931
+ const content_ = JSON.stringify(body);
1932
+ let options_ = {
1933
+ body: content_,
1934
+ observe: "response",
1935
+ responseType: "blob",
1936
+ headers: new HttpHeaders({
1937
+ "Content-Type": "application/json",
1938
+ })
1939
+ };
1940
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
1941
+ return this.http.request("post", url_, transformedOptions_);
1942
+ })).pipe(mergeMap((response_) => {
1943
+ return this.transformResult(url_, response_, (r) => this.processSetProductVariantWeight(r));
1944
+ })).pipe(catchError((response_) => {
1945
+ if (response_ instanceof HttpResponseBase) {
1946
+ try {
1947
+ return this.transformResult(url_, response_, (r) => this.processSetProductVariantWeight(r));
1948
+ }
1949
+ catch (e) {
1950
+ return throwError(e);
1951
+ }
1952
+ }
1953
+ else
1954
+ return throwError(response_);
1955
+ }));
1956
+ }
1957
+ processSetProductVariantWeight(response) {
1958
+ const status = response.status;
1959
+ const responseBlob = response instanceof HttpResponse ? response.body :
1960
+ response.error instanceof Blob ? response.error : undefined;
1961
+ let _headers = {};
1962
+ if (response.headers) {
1963
+ for (let key of response.headers.keys()) {
1964
+ _headers[key] = response.headers.get(key);
1965
+ }
1966
+ }
1967
+ if (status === 200) {
1968
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1969
+ return of(null);
1970
+ }));
1971
+ }
1972
+ else if (status === 400) {
1973
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1974
+ let result400 = null;
1975
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1976
+ return throwException("Bad Request", status, _responseText, _headers, result400);
1977
+ }));
1978
+ }
1979
+ else if (status === 404) {
1980
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1981
+ let result404 = null;
1982
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1983
+ return throwException("Not Found", status, _responseText, _headers, result404);
1984
+ }));
1985
+ }
1986
+ else if (status === 409) {
1987
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1988
+ let result409 = null;
1989
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1990
+ return throwException("Conflict", status, _responseText, _headers, result409);
1991
+ }));
1992
+ }
1993
+ else if (status === 401) {
1994
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1995
+ return throwException("Unauthorized", status, _responseText, _headers);
1996
+ }));
1997
+ }
1998
+ else if (status === 403) {
1999
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2000
+ return throwException("Forbidden", status, _responseText, _headers);
2001
+ }));
2002
+ }
2003
+ else if (status !== 200 && status !== 204) {
2004
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2005
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2006
+ }));
2007
+ }
2008
+ return of(null);
2009
+ }
1749
2010
  /**
1750
2011
  * Set product variants availability. Variants identifiers will be changed.
1751
2012
  * @param id Product identifier.
@@ -2806,6 +3067,869 @@ ProductsManagementApiClient.ctorParameters = () => [
2806
3067
  { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
2807
3068
  { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
2808
3069
  ];
3070
+ class ProjectStatusesManagementApiClient extends ApiClientBase {
3071
+ constructor(configuration, http, baseUrl) {
3072
+ super(configuration);
3073
+ this.jsonParseReviver = undefined;
3074
+ this.http = http;
3075
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
3076
+ }
3077
+ /**
3078
+ * Returns a list of all existing project statuses.
3079
+ * @param tenantId (optional) Tenant identifier.
3080
+ * @return Success
3081
+ */
3082
+ getAll(tenantId) {
3083
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses?";
3084
+ if (tenantId !== undefined && tenantId !== null)
3085
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3086
+ url_ = url_.replace(/[?&]$/, "");
3087
+ let options_ = {
3088
+ observe: "response",
3089
+ responseType: "blob",
3090
+ headers: new HttpHeaders({
3091
+ "Accept": "application/json"
3092
+ })
3093
+ };
3094
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3095
+ return this.http.request("get", url_, transformedOptions_);
3096
+ })).pipe(mergeMap((response_) => {
3097
+ return this.transformResult(url_, response_, (r) => this.processGetAll(r));
3098
+ })).pipe(catchError((response_) => {
3099
+ if (response_ instanceof HttpResponseBase) {
3100
+ try {
3101
+ return this.transformResult(url_, response_, (r) => this.processGetAll(r));
3102
+ }
3103
+ catch (e) {
3104
+ return throwError(e);
3105
+ }
3106
+ }
3107
+ else
3108
+ return throwError(response_);
3109
+ }));
3110
+ }
3111
+ processGetAll(response) {
3112
+ const status = response.status;
3113
+ const responseBlob = response instanceof HttpResponse ? response.body :
3114
+ response.error instanceof Blob ? response.error : undefined;
3115
+ let _headers = {};
3116
+ if (response.headers) {
3117
+ for (let key of response.headers.keys()) {
3118
+ _headers[key] = response.headers.get(key);
3119
+ }
3120
+ }
3121
+ if (status === 200) {
3122
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3123
+ let result200 = null;
3124
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3125
+ return of(result200);
3126
+ }));
3127
+ }
3128
+ else if (status === 401) {
3129
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3130
+ return throwException("Unauthorized", status, _responseText, _headers);
3131
+ }));
3132
+ }
3133
+ else if (status === 403) {
3134
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3135
+ return throwException("Forbidden", status, _responseText, _headers);
3136
+ }));
3137
+ }
3138
+ else if (status !== 200 && status !== 204) {
3139
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3140
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3141
+ }));
3142
+ }
3143
+ return of(null);
3144
+ }
3145
+ /**
3146
+ * Creates a new project status and returns its description.
3147
+ * @param tenantId (optional) Tenant identifier.
3148
+ * @param body (optional) Status creation parameters.
3149
+ * @return Success
3150
+ */
3151
+ create(tenantId, body) {
3152
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses?";
3153
+ if (tenantId !== undefined && tenantId !== null)
3154
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3155
+ url_ = url_.replace(/[?&]$/, "");
3156
+ const content_ = JSON.stringify(body);
3157
+ let options_ = {
3158
+ body: content_,
3159
+ observe: "response",
3160
+ responseType: "blob",
3161
+ headers: new HttpHeaders({
3162
+ "Content-Type": "application/json",
3163
+ "Accept": "application/json"
3164
+ })
3165
+ };
3166
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3167
+ return this.http.request("post", url_, transformedOptions_);
3168
+ })).pipe(mergeMap((response_) => {
3169
+ return this.transformResult(url_, response_, (r) => this.processCreate(r));
3170
+ })).pipe(catchError((response_) => {
3171
+ if (response_ instanceof HttpResponseBase) {
3172
+ try {
3173
+ return this.transformResult(url_, response_, (r) => this.processCreate(r));
3174
+ }
3175
+ catch (e) {
3176
+ return throwError(e);
3177
+ }
3178
+ }
3179
+ else
3180
+ return throwError(response_);
3181
+ }));
3182
+ }
3183
+ processCreate(response) {
3184
+ const status = response.status;
3185
+ const responseBlob = response instanceof HttpResponse ? response.body :
3186
+ response.error instanceof Blob ? response.error : undefined;
3187
+ let _headers = {};
3188
+ if (response.headers) {
3189
+ for (let key of response.headers.keys()) {
3190
+ _headers[key] = response.headers.get(key);
3191
+ }
3192
+ }
3193
+ if (status === 201) {
3194
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3195
+ let result201 = null;
3196
+ result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3197
+ return of(result201);
3198
+ }));
3199
+ }
3200
+ else if (status === 400) {
3201
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3202
+ let result400 = null;
3203
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3204
+ return throwException("Bad Request", status, _responseText, _headers, result400);
3205
+ }));
3206
+ }
3207
+ else if (status === 409) {
3208
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3209
+ let result409 = null;
3210
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3211
+ return throwException("Conflict", status, _responseText, _headers, result409);
3212
+ }));
3213
+ }
3214
+ else if (status === 401) {
3215
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3216
+ return throwException("Unauthorized", status, _responseText, _headers);
3217
+ }));
3218
+ }
3219
+ else if (status === 403) {
3220
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3221
+ return throwException("Forbidden", status, _responseText, _headers);
3222
+ }));
3223
+ }
3224
+ else if (status !== 200 && status !== 204) {
3225
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3226
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3227
+ }));
3228
+ }
3229
+ return of(null);
3230
+ }
3231
+ /**
3232
+ * Returns a project status by its identifier.
3233
+ * @param id Status identifier.
3234
+ * @param tenantId (optional) Tenant identifier.
3235
+ * @return Success
3236
+ */
3237
+ get(id, tenantId) {
3238
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
3239
+ if (id === undefined || id === null)
3240
+ throw new Error("The parameter 'id' must be defined.");
3241
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3242
+ if (tenantId !== undefined && tenantId !== null)
3243
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3244
+ url_ = url_.replace(/[?&]$/, "");
3245
+ let options_ = {
3246
+ observe: "response",
3247
+ responseType: "blob",
3248
+ headers: new HttpHeaders({
3249
+ "Accept": "application/json"
3250
+ })
3251
+ };
3252
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3253
+ return this.http.request("get", url_, transformedOptions_);
3254
+ })).pipe(mergeMap((response_) => {
3255
+ return this.transformResult(url_, response_, (r) => this.processGet(r));
3256
+ })).pipe(catchError((response_) => {
3257
+ if (response_ instanceof HttpResponseBase) {
3258
+ try {
3259
+ return this.transformResult(url_, response_, (r) => this.processGet(r));
3260
+ }
3261
+ catch (e) {
3262
+ return throwError(e);
3263
+ }
3264
+ }
3265
+ else
3266
+ return throwError(response_);
3267
+ }));
3268
+ }
3269
+ processGet(response) {
3270
+ const status = response.status;
3271
+ const responseBlob = response instanceof HttpResponse ? response.body :
3272
+ response.error instanceof Blob ? response.error : undefined;
3273
+ let _headers = {};
3274
+ if (response.headers) {
3275
+ for (let key of response.headers.keys()) {
3276
+ _headers[key] = response.headers.get(key);
3277
+ }
3278
+ }
3279
+ if (status === 200) {
3280
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3281
+ let result200 = null;
3282
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3283
+ return of(result200);
3284
+ }));
3285
+ }
3286
+ else if (status === 404) {
3287
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3288
+ let result404 = null;
3289
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3290
+ return throwException("Not Found", status, _responseText, _headers, result404);
3291
+ }));
3292
+ }
3293
+ else if (status === 401) {
3294
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3295
+ return throwException("Unauthorized", status, _responseText, _headers);
3296
+ }));
3297
+ }
3298
+ else if (status === 403) {
3299
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3300
+ return throwException("Forbidden", status, _responseText, _headers);
3301
+ }));
3302
+ }
3303
+ else if (status !== 200 && status !== 204) {
3304
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3305
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3306
+ }));
3307
+ }
3308
+ return of(null);
3309
+ }
3310
+ /**
3311
+ * Updates an existing project status and returns its description.
3312
+ * @param id Status identifier.
3313
+ * @param tenantId (optional) Tenant identifier.
3314
+ * @param body (optional) Status update parameters.
3315
+ * @return Success
3316
+ */
3317
+ update(id, tenantId, body) {
3318
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
3319
+ if (id === undefined || id === null)
3320
+ throw new Error("The parameter 'id' must be defined.");
3321
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3322
+ if (tenantId !== undefined && tenantId !== null)
3323
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3324
+ url_ = url_.replace(/[?&]$/, "");
3325
+ const content_ = JSON.stringify(body);
3326
+ let options_ = {
3327
+ body: content_,
3328
+ observe: "response",
3329
+ responseType: "blob",
3330
+ headers: new HttpHeaders({
3331
+ "Content-Type": "application/json",
3332
+ "Accept": "application/json"
3333
+ })
3334
+ };
3335
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3336
+ return this.http.request("put", url_, transformedOptions_);
3337
+ })).pipe(mergeMap((response_) => {
3338
+ return this.transformResult(url_, response_, (r) => this.processUpdate(r));
3339
+ })).pipe(catchError((response_) => {
3340
+ if (response_ instanceof HttpResponseBase) {
3341
+ try {
3342
+ return this.transformResult(url_, response_, (r) => this.processUpdate(r));
3343
+ }
3344
+ catch (e) {
3345
+ return throwError(e);
3346
+ }
3347
+ }
3348
+ else
3349
+ return throwError(response_);
3350
+ }));
3351
+ }
3352
+ processUpdate(response) {
3353
+ const status = response.status;
3354
+ const responseBlob = response instanceof HttpResponse ? response.body :
3355
+ response.error instanceof Blob ? response.error : undefined;
3356
+ let _headers = {};
3357
+ if (response.headers) {
3358
+ for (let key of response.headers.keys()) {
3359
+ _headers[key] = response.headers.get(key);
3360
+ }
3361
+ }
3362
+ if (status === 200) {
3363
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3364
+ let result200 = null;
3365
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3366
+ return of(result200);
3367
+ }));
3368
+ }
3369
+ else if (status === 400) {
3370
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3371
+ let result400 = null;
3372
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3373
+ return throwException("Bad Request", status, _responseText, _headers, result400);
3374
+ }));
3375
+ }
3376
+ else if (status === 404) {
3377
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3378
+ let result404 = null;
3379
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3380
+ return throwException("Not Found", status, _responseText, _headers, result404);
3381
+ }));
3382
+ }
3383
+ else if (status === 409) {
3384
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3385
+ let result409 = null;
3386
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3387
+ return throwException("Conflict", status, _responseText, _headers, result409);
3388
+ }));
3389
+ }
3390
+ else if (status === 401) {
3391
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3392
+ return throwException("Unauthorized", status, _responseText, _headers);
3393
+ }));
3394
+ }
3395
+ else if (status === 403) {
3396
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3397
+ return throwException("Forbidden", status, _responseText, _headers);
3398
+ }));
3399
+ }
3400
+ else if (status !== 200 && status !== 204) {
3401
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3402
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3403
+ }));
3404
+ }
3405
+ return of(null);
3406
+ }
3407
+ /**
3408
+ * Deletes an existing project status and returns its description.
3409
+ * @param id Status identifier.
3410
+ * @param tenantId (optional) Tenant identifier.
3411
+ * @return Success
3412
+ */
3413
+ delete(id, tenantId) {
3414
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
3415
+ if (id === undefined || id === null)
3416
+ throw new Error("The parameter 'id' must be defined.");
3417
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3418
+ if (tenantId !== undefined && tenantId !== null)
3419
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3420
+ url_ = url_.replace(/[?&]$/, "");
3421
+ let options_ = {
3422
+ observe: "response",
3423
+ responseType: "blob",
3424
+ headers: new HttpHeaders({
3425
+ "Accept": "application/json"
3426
+ })
3427
+ };
3428
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3429
+ return this.http.request("delete", url_, transformedOptions_);
3430
+ })).pipe(mergeMap((response_) => {
3431
+ return this.transformResult(url_, response_, (r) => this.processDelete(r));
3432
+ })).pipe(catchError((response_) => {
3433
+ if (response_ instanceof HttpResponseBase) {
3434
+ try {
3435
+ return this.transformResult(url_, response_, (r) => this.processDelete(r));
3436
+ }
3437
+ catch (e) {
3438
+ return throwError(e);
3439
+ }
3440
+ }
3441
+ else
3442
+ return throwError(response_);
3443
+ }));
3444
+ }
3445
+ processDelete(response) {
3446
+ const status = response.status;
3447
+ const responseBlob = response instanceof HttpResponse ? response.body :
3448
+ response.error instanceof Blob ? response.error : undefined;
3449
+ let _headers = {};
3450
+ if (response.headers) {
3451
+ for (let key of response.headers.keys()) {
3452
+ _headers[key] = response.headers.get(key);
3453
+ }
3454
+ }
3455
+ if (status === 200) {
3456
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3457
+ let result200 = null;
3458
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3459
+ return of(result200);
3460
+ }));
3461
+ }
3462
+ else if (status === 404) {
3463
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3464
+ let result404 = null;
3465
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3466
+ return throwException("Not Found", status, _responseText, _headers, result404);
3467
+ }));
3468
+ }
3469
+ else if (status === 409) {
3470
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3471
+ let result409 = null;
3472
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3473
+ return throwException("Conflict", status, _responseText, _headers, result409);
3474
+ }));
3475
+ }
3476
+ else if (status === 401) {
3477
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3478
+ return throwException("Unauthorized", status, _responseText, _headers);
3479
+ }));
3480
+ }
3481
+ else if (status === 403) {
3482
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3483
+ return throwException("Forbidden", status, _responseText, _headers);
3484
+ }));
3485
+ }
3486
+ else if (status !== 200 && status !== 204) {
3487
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3488
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3489
+ }));
3490
+ }
3491
+ return of(null);
3492
+ }
3493
+ }
3494
+ ProjectStatusesManagementApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProjectStatusesManagementApiClient_Factory() { return new ProjectStatusesManagementApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProjectStatusesManagementApiClient, providedIn: "root" });
3495
+ ProjectStatusesManagementApiClient.decorators = [
3496
+ { type: Injectable, args: [{
3497
+ providedIn: 'root'
3498
+ },] }
3499
+ ];
3500
+ ProjectStatusesManagementApiClient.ctorParameters = () => [
3501
+ { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
3502
+ { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
3503
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
3504
+ ];
3505
+ class ProjectStatusTransitionsManagementApiClient extends ApiClientBase {
3506
+ constructor(configuration, http, baseUrl) {
3507
+ super(configuration);
3508
+ this.jsonParseReviver = undefined;
3509
+ this.http = http;
3510
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
3511
+ }
3512
+ /**
3513
+ * Returns a list of all existing project status transitions.
3514
+ * @param tenantId (optional) Tenant identifier.
3515
+ * @return Success
3516
+ */
3517
+ getAll(tenantId) {
3518
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions?";
3519
+ if (tenantId !== undefined && tenantId !== null)
3520
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3521
+ url_ = url_.replace(/[?&]$/, "");
3522
+ let options_ = {
3523
+ observe: "response",
3524
+ responseType: "blob",
3525
+ headers: new HttpHeaders({
3526
+ "Accept": "application/json"
3527
+ })
3528
+ };
3529
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3530
+ return this.http.request("get", url_, transformedOptions_);
3531
+ })).pipe(mergeMap((response_) => {
3532
+ return this.transformResult(url_, response_, (r) => this.processGetAll(r));
3533
+ })).pipe(catchError((response_) => {
3534
+ if (response_ instanceof HttpResponseBase) {
3535
+ try {
3536
+ return this.transformResult(url_, response_, (r) => this.processGetAll(r));
3537
+ }
3538
+ catch (e) {
3539
+ return throwError(e);
3540
+ }
3541
+ }
3542
+ else
3543
+ return throwError(response_);
3544
+ }));
3545
+ }
3546
+ processGetAll(response) {
3547
+ const status = response.status;
3548
+ const responseBlob = response instanceof HttpResponse ? response.body :
3549
+ response.error instanceof Blob ? response.error : undefined;
3550
+ let _headers = {};
3551
+ if (response.headers) {
3552
+ for (let key of response.headers.keys()) {
3553
+ _headers[key] = response.headers.get(key);
3554
+ }
3555
+ }
3556
+ if (status === 200) {
3557
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3558
+ let result200 = null;
3559
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3560
+ return of(result200);
3561
+ }));
3562
+ }
3563
+ else if (status === 401) {
3564
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3565
+ return throwException("Unauthorized", status, _responseText, _headers);
3566
+ }));
3567
+ }
3568
+ else if (status === 403) {
3569
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3570
+ return throwException("Forbidden", status, _responseText, _headers);
3571
+ }));
3572
+ }
3573
+ else if (status !== 200 && status !== 204) {
3574
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3575
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3576
+ }));
3577
+ }
3578
+ return of(null);
3579
+ }
3580
+ /**
3581
+ * Returns a project status transition by its identifier.
3582
+ * @param id Status transition identifier.
3583
+ * @param tenantId (optional) Tenant identifier.
3584
+ * @return Success
3585
+ */
3586
+ get(id, tenantId) {
3587
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
3588
+ if (id === undefined || id === null)
3589
+ throw new Error("The parameter 'id' must be defined.");
3590
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3591
+ if (tenantId !== undefined && tenantId !== null)
3592
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3593
+ url_ = url_.replace(/[?&]$/, "");
3594
+ let options_ = {
3595
+ observe: "response",
3596
+ responseType: "blob",
3597
+ headers: new HttpHeaders({
3598
+ "Accept": "application/json"
3599
+ })
3600
+ };
3601
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3602
+ return this.http.request("get", url_, transformedOptions_);
3603
+ })).pipe(mergeMap((response_) => {
3604
+ return this.transformResult(url_, response_, (r) => this.processGet(r));
3605
+ })).pipe(catchError((response_) => {
3606
+ if (response_ instanceof HttpResponseBase) {
3607
+ try {
3608
+ return this.transformResult(url_, response_, (r) => this.processGet(r));
3609
+ }
3610
+ catch (e) {
3611
+ return throwError(e);
3612
+ }
3613
+ }
3614
+ else
3615
+ return throwError(response_);
3616
+ }));
3617
+ }
3618
+ processGet(response) {
3619
+ const status = response.status;
3620
+ const responseBlob = response instanceof HttpResponse ? response.body :
3621
+ response.error instanceof Blob ? response.error : undefined;
3622
+ let _headers = {};
3623
+ if (response.headers) {
3624
+ for (let key of response.headers.keys()) {
3625
+ _headers[key] = response.headers.get(key);
3626
+ }
3627
+ }
3628
+ if (status === 200) {
3629
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3630
+ let result200 = null;
3631
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3632
+ return of(result200);
3633
+ }));
3634
+ }
3635
+ else if (status === 404) {
3636
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3637
+ let result404 = null;
3638
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3639
+ return throwException("Not Found", status, _responseText, _headers, result404);
3640
+ }));
3641
+ }
3642
+ else if (status === 401) {
3643
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3644
+ return throwException("Unauthorized", status, _responseText, _headers);
3645
+ }));
3646
+ }
3647
+ else if (status === 403) {
3648
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3649
+ return throwException("Forbidden", status, _responseText, _headers);
3650
+ }));
3651
+ }
3652
+ else if (status !== 200 && status !== 204) {
3653
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3654
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3655
+ }));
3656
+ }
3657
+ return of(null);
3658
+ }
3659
+ /**
3660
+ * Updates an existing project status transition and returns its description.
3661
+ * @param id Status transition identifier.
3662
+ * @param tenantId (optional) Tenant identifier.
3663
+ * @param body (optional) Status transition update parameters.
3664
+ * @return Success
3665
+ */
3666
+ update(id, tenantId, body) {
3667
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
3668
+ if (id === undefined || id === null)
3669
+ throw new Error("The parameter 'id' must be defined.");
3670
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3671
+ if (tenantId !== undefined && tenantId !== null)
3672
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3673
+ url_ = url_.replace(/[?&]$/, "");
3674
+ const content_ = JSON.stringify(body);
3675
+ let options_ = {
3676
+ body: content_,
3677
+ observe: "response",
3678
+ responseType: "blob",
3679
+ headers: new HttpHeaders({
3680
+ "Content-Type": "application/json",
3681
+ "Accept": "application/json"
3682
+ })
3683
+ };
3684
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3685
+ return this.http.request("put", url_, transformedOptions_);
3686
+ })).pipe(mergeMap((response_) => {
3687
+ return this.transformResult(url_, response_, (r) => this.processUpdate(r));
3688
+ })).pipe(catchError((response_) => {
3689
+ if (response_ instanceof HttpResponseBase) {
3690
+ try {
3691
+ return this.transformResult(url_, response_, (r) => this.processUpdate(r));
3692
+ }
3693
+ catch (e) {
3694
+ return throwError(e);
3695
+ }
3696
+ }
3697
+ else
3698
+ return throwError(response_);
3699
+ }));
3700
+ }
3701
+ processUpdate(response) {
3702
+ const status = response.status;
3703
+ const responseBlob = response instanceof HttpResponse ? response.body :
3704
+ response.error instanceof Blob ? response.error : undefined;
3705
+ let _headers = {};
3706
+ if (response.headers) {
3707
+ for (let key of response.headers.keys()) {
3708
+ _headers[key] = response.headers.get(key);
3709
+ }
3710
+ }
3711
+ if (status === 200) {
3712
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3713
+ let result200 = null;
3714
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3715
+ return of(result200);
3716
+ }));
3717
+ }
3718
+ else if (status === 400) {
3719
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3720
+ let result400 = null;
3721
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3722
+ return throwException("Bad Request", status, _responseText, _headers, result400);
3723
+ }));
3724
+ }
3725
+ else if (status === 404) {
3726
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3727
+ let result404 = null;
3728
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3729
+ return throwException("Not Found", status, _responseText, _headers, result404);
3730
+ }));
3731
+ }
3732
+ else if (status === 409) {
3733
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3734
+ let result409 = null;
3735
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3736
+ return throwException("Conflict", status, _responseText, _headers, result409);
3737
+ }));
3738
+ }
3739
+ else if (status === 401) {
3740
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3741
+ return throwException("Unauthorized", status, _responseText, _headers);
3742
+ }));
3743
+ }
3744
+ else if (status === 403) {
3745
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3746
+ return throwException("Forbidden", status, _responseText, _headers);
3747
+ }));
3748
+ }
3749
+ else if (status !== 200 && status !== 204) {
3750
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3751
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3752
+ }));
3753
+ }
3754
+ return of(null);
3755
+ }
3756
+ /**
3757
+ * Deletes an existing project status transition and returns its description.
3758
+ * @param id Status transition identifier.
3759
+ * @param tenantId (optional) Tenant identifier.
3760
+ * @return Success
3761
+ */
3762
+ delete(id, tenantId) {
3763
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
3764
+ if (id === undefined || id === null)
3765
+ throw new Error("The parameter 'id' must be defined.");
3766
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3767
+ if (tenantId !== undefined && tenantId !== null)
3768
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3769
+ url_ = url_.replace(/[?&]$/, "");
3770
+ let options_ = {
3771
+ observe: "response",
3772
+ responseType: "blob",
3773
+ headers: new HttpHeaders({
3774
+ "Accept": "application/json"
3775
+ })
3776
+ };
3777
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3778
+ return this.http.request("delete", url_, transformedOptions_);
3779
+ })).pipe(mergeMap((response_) => {
3780
+ return this.transformResult(url_, response_, (r) => this.processDelete(r));
3781
+ })).pipe(catchError((response_) => {
3782
+ if (response_ instanceof HttpResponseBase) {
3783
+ try {
3784
+ return this.transformResult(url_, response_, (r) => this.processDelete(r));
3785
+ }
3786
+ catch (e) {
3787
+ return throwError(e);
3788
+ }
3789
+ }
3790
+ else
3791
+ return throwError(response_);
3792
+ }));
3793
+ }
3794
+ processDelete(response) {
3795
+ const status = response.status;
3796
+ const responseBlob = response instanceof HttpResponse ? response.body :
3797
+ response.error instanceof Blob ? response.error : undefined;
3798
+ let _headers = {};
3799
+ if (response.headers) {
3800
+ for (let key of response.headers.keys()) {
3801
+ _headers[key] = response.headers.get(key);
3802
+ }
3803
+ }
3804
+ if (status === 200) {
3805
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3806
+ let result200 = null;
3807
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3808
+ return of(result200);
3809
+ }));
3810
+ }
3811
+ else if (status === 404) {
3812
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3813
+ let result404 = null;
3814
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3815
+ return throwException("Not Found", status, _responseText, _headers, result404);
3816
+ }));
3817
+ }
3818
+ else if (status === 401) {
3819
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3820
+ return throwException("Unauthorized", status, _responseText, _headers);
3821
+ }));
3822
+ }
3823
+ else if (status === 403) {
3824
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3825
+ return throwException("Forbidden", status, _responseText, _headers);
3826
+ }));
3827
+ }
3828
+ else if (status !== 200 && status !== 204) {
3829
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3830
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3831
+ }));
3832
+ }
3833
+ return of(null);
3834
+ }
3835
+ /**
3836
+ * Creates a new project status transition and returns its description.
3837
+ * @param tenantId (optional) Tenant identifier.
3838
+ * @param body (optional) Status transition creation parameters.
3839
+ * @return Success
3840
+ */
3841
+ create(tenantId, body) {
3842
+ let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/transitions?";
3843
+ if (tenantId !== undefined && tenantId !== null)
3844
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3845
+ url_ = url_.replace(/[?&]$/, "");
3846
+ const content_ = JSON.stringify(body);
3847
+ let options_ = {
3848
+ body: content_,
3849
+ observe: "response",
3850
+ responseType: "blob",
3851
+ headers: new HttpHeaders({
3852
+ "Content-Type": "application/json",
3853
+ "Accept": "application/json"
3854
+ })
3855
+ };
3856
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
3857
+ return this.http.request("post", url_, transformedOptions_);
3858
+ })).pipe(mergeMap((response_) => {
3859
+ return this.transformResult(url_, response_, (r) => this.processCreate(r));
3860
+ })).pipe(catchError((response_) => {
3861
+ if (response_ instanceof HttpResponseBase) {
3862
+ try {
3863
+ return this.transformResult(url_, response_, (r) => this.processCreate(r));
3864
+ }
3865
+ catch (e) {
3866
+ return throwError(e);
3867
+ }
3868
+ }
3869
+ else
3870
+ return throwError(response_);
3871
+ }));
3872
+ }
3873
+ processCreate(response) {
3874
+ const status = response.status;
3875
+ const responseBlob = response instanceof HttpResponse ? response.body :
3876
+ response.error instanceof Blob ? response.error : undefined;
3877
+ let _headers = {};
3878
+ if (response.headers) {
3879
+ for (let key of response.headers.keys()) {
3880
+ _headers[key] = response.headers.get(key);
3881
+ }
3882
+ }
3883
+ if (status === 201) {
3884
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3885
+ let result201 = null;
3886
+ result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3887
+ return of(result201);
3888
+ }));
3889
+ }
3890
+ else if (status === 400) {
3891
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3892
+ let result400 = null;
3893
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3894
+ return throwException("Bad Request", status, _responseText, _headers, result400);
3895
+ }));
3896
+ }
3897
+ else if (status === 409) {
3898
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3899
+ let result409 = null;
3900
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3901
+ return throwException("Conflict", status, _responseText, _headers, result409);
3902
+ }));
3903
+ }
3904
+ else if (status === 401) {
3905
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3906
+ return throwException("Unauthorized", status, _responseText, _headers);
3907
+ }));
3908
+ }
3909
+ else if (status === 403) {
3910
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3911
+ return throwException("Forbidden", status, _responseText, _headers);
3912
+ }));
3913
+ }
3914
+ else if (status !== 200 && status !== 204) {
3915
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
3916
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3917
+ }));
3918
+ }
3919
+ return of(null);
3920
+ }
3921
+ }
3922
+ ProjectStatusTransitionsManagementApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProjectStatusTransitionsManagementApiClient_Factory() { return new ProjectStatusTransitionsManagementApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProjectStatusTransitionsManagementApiClient, providedIn: "root" });
3923
+ ProjectStatusTransitionsManagementApiClient.decorators = [
3924
+ { type: Injectable, args: [{
3925
+ providedIn: 'root'
3926
+ },] }
3927
+ ];
3928
+ ProjectStatusTransitionsManagementApiClient.ctorParameters = () => [
3929
+ { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
3930
+ { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
3931
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
3932
+ ];
2809
3933
  class StorefrontsManagementApiClient extends ApiClientBase {
2810
3934
  constructor(configuration, http, baseUrl) {
2811
3935
  super(configuration);
@@ -2820,10 +3944,11 @@ class StorefrontsManagementApiClient extends ApiClientBase {
2820
3944
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
2821
3945
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
2822
3946
  * @param search (optional) Search string for partial match.
3947
+ * @param status (optional) Storefront status.
2823
3948
  * @param tenantId (optional) Tenant identifier.
2824
3949
  * @return Success
2825
3950
  */
2826
- getAll(types, skip, take, sorting, search, tenantId) {
3951
+ getAll(types, skip, take, sorting, search, status, tenantId) {
2827
3952
  let url_ = this.baseUrl + "/api/backoffice/v1/storefronts?";
2828
3953
  if (types !== undefined && types !== null)
2829
3954
  types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
@@ -2835,6 +3960,8 @@ class StorefrontsManagementApiClient extends ApiClientBase {
2835
3960
  url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
2836
3961
  if (search !== undefined && search !== null)
2837
3962
  url_ += "search=" + encodeURIComponent("" + search) + "&";
3963
+ if (status !== undefined && status !== null)
3964
+ url_ += "status=" + encodeURIComponent("" + status) + "&";
2838
3965
  if (tenantId !== undefined && tenantId !== null)
2839
3966
  url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2840
3967
  url_ = url_.replace(/[?&]$/, "");
@@ -4368,6 +5495,12 @@ var StorefrontType;
4368
5495
  StorefrontType["Shopify"] = "Shopify";
4369
5496
  StorefrontType["ShopifyCustom"] = "ShopifyCustom";
4370
5497
  })(StorefrontType || (StorefrontType = {}));
5498
+ /** Storefront status. */
5499
+ var StorefrontStatus;
5500
+ (function (StorefrontStatus) {
5501
+ StorefrontStatus["Dev"] = "Dev";
5502
+ StorefrontStatus["Prod"] = "Prod";
5503
+ })(StorefrontStatus || (StorefrontStatus = {}));
4371
5504
  class ApiException extends Error {
4372
5505
  constructor(message, status, response, headers, result) {
4373
5506
  super();
@@ -4443,5 +5576,5 @@ BackOfficeModule.decorators = [
4443
5576
  * Generated bundle index. Do not edit.
4444
5577
  */
4445
5578
 
4446
- export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BackOfficeModule, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, OptionType, ProductMockupType, ProductReferenceType, ProductReferencesManagementApiClient, ProductVariantMockupType, ProductVariantResourceType, ProductsManagementApiClient, StorefrontType, StorefrontsManagementApiClient, SurfaceUsageType, UsersManagementApiClient, WorkflowType };
5579
+ export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BackOfficeModule, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, OptionType, ProductMockupType, ProductReferenceType, ProductReferencesManagementApiClient, ProductVariantMockupType, ProductVariantResourceType, ProductsManagementApiClient, ProjectStatusTransitionsManagementApiClient, ProjectStatusesManagementApiClient, StorefrontStatus, StorefrontType, StorefrontsManagementApiClient, SurfaceUsageType, UsersManagementApiClient, WorkflowType };
4447
5580
  //# sourceMappingURL=aurigma-ng-backoffice-api-client.js.map