@aurigma/ng-backoffice-api-client 2.63.14 → 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.
- package/aurigma-ng-backoffice-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.js +1063 -55
- package/bundles/aurigma-ng-backoffice-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-backoffice-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-backoffice-api-client.js +1 -1
- package/esm2015/lib/backoffice-api-client.js +874 -2
- package/esm2015/lib/backoffice.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-backoffice-api-client.js +874 -2
- package/fesm2015/aurigma-ng-backoffice-api-client.js.map +1 -1
- package/lib/backoffice-api-client.d.ts +261 -2
- package/package.json +1 -1
|
@@ -3067,6 +3067,869 @@ ProductsManagementApiClient.ctorParameters = () => [
|
|
|
3067
3067
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
3068
3068
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
3069
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
|
+
];
|
|
3070
3933
|
class StorefrontsManagementApiClient extends ApiClientBase {
|
|
3071
3934
|
constructor(configuration, http, baseUrl) {
|
|
3072
3935
|
super(configuration);
|
|
@@ -3081,10 +3944,11 @@ class StorefrontsManagementApiClient extends ApiClientBase {
|
|
|
3081
3944
|
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
3082
3945
|
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
3083
3946
|
* @param search (optional) Search string for partial match.
|
|
3947
|
+
* @param status (optional) Storefront status.
|
|
3084
3948
|
* @param tenantId (optional) Tenant identifier.
|
|
3085
3949
|
* @return Success
|
|
3086
3950
|
*/
|
|
3087
|
-
getAll(types, skip, take, sorting, search, tenantId) {
|
|
3951
|
+
getAll(types, skip, take, sorting, search, status, tenantId) {
|
|
3088
3952
|
let url_ = this.baseUrl + "/api/backoffice/v1/storefronts?";
|
|
3089
3953
|
if (types !== undefined && types !== null)
|
|
3090
3954
|
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
@@ -3096,6 +3960,8 @@ class StorefrontsManagementApiClient extends ApiClientBase {
|
|
|
3096
3960
|
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
3097
3961
|
if (search !== undefined && search !== null)
|
|
3098
3962
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
3963
|
+
if (status !== undefined && status !== null)
|
|
3964
|
+
url_ += "status=" + encodeURIComponent("" + status) + "&";
|
|
3099
3965
|
if (tenantId !== undefined && tenantId !== null)
|
|
3100
3966
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3101
3967
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -4629,6 +5495,12 @@ var StorefrontType;
|
|
|
4629
5495
|
StorefrontType["Shopify"] = "Shopify";
|
|
4630
5496
|
StorefrontType["ShopifyCustom"] = "ShopifyCustom";
|
|
4631
5497
|
})(StorefrontType || (StorefrontType = {}));
|
|
5498
|
+
/** Storefront status. */
|
|
5499
|
+
var StorefrontStatus;
|
|
5500
|
+
(function (StorefrontStatus) {
|
|
5501
|
+
StorefrontStatus["Dev"] = "Dev";
|
|
5502
|
+
StorefrontStatus["Prod"] = "Prod";
|
|
5503
|
+
})(StorefrontStatus || (StorefrontStatus = {}));
|
|
4632
5504
|
class ApiException extends Error {
|
|
4633
5505
|
constructor(message, status, response, headers, result) {
|
|
4634
5506
|
super();
|
|
@@ -4704,5 +5576,5 @@ BackOfficeModule.decorators = [
|
|
|
4704
5576
|
* Generated bundle index. Do not edit.
|
|
4705
5577
|
*/
|
|
4706
5578
|
|
|
4707
|
-
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 };
|
|
4708
5580
|
//# sourceMappingURL=aurigma-ng-backoffice-api-client.js.map
|