@aurigma/ng-storefront-api-client 2.52.2 → 2.53.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-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +3347 -322
- package/bundles/aurigma-ng-storefront-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js +2 -2
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-storefront-api-client.js +1 -1
- package/esm2015/lib/storefront-api-client.js +2914 -224
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +2914 -224
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +1275 -47
- package/package.json +1 -1
|
@@ -113,7 +113,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
113
113
|
observe: "response",
|
|
114
114
|
responseType: "blob",
|
|
115
115
|
headers: new HttpHeaders({
|
|
116
|
-
"Accept": "
|
|
116
|
+
"Accept": "application/json"
|
|
117
117
|
})
|
|
118
118
|
};
|
|
119
119
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -199,7 +199,7 @@ class ProcessingPipelinesApiClient extends ApiClientBase {
|
|
|
199
199
|
observe: "response",
|
|
200
200
|
responseType: "blob",
|
|
201
201
|
headers: new HttpHeaders({
|
|
202
|
-
"Accept": "
|
|
202
|
+
"Accept": "application/json"
|
|
203
203
|
})
|
|
204
204
|
};
|
|
205
205
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -271,7 +271,7 @@ class ProcessingPipelinesApiClient extends ApiClientBase {
|
|
|
271
271
|
observe: "response",
|
|
272
272
|
responseType: "blob",
|
|
273
273
|
headers: new HttpHeaders({
|
|
274
|
-
"Accept": "
|
|
274
|
+
"Accept": "application/json"
|
|
275
275
|
})
|
|
276
276
|
};
|
|
277
277
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -344,7 +344,7 @@ ProcessingPipelinesApiClient.ctorParameters = () => [
|
|
|
344
344
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
345
345
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
346
346
|
];
|
|
347
|
-
class
|
|
347
|
+
class ProductLinksApiClient extends ApiClientBase {
|
|
348
348
|
constructor(configuration, http, baseUrl) {
|
|
349
349
|
super(configuration);
|
|
350
350
|
this.jsonParseReviver = undefined;
|
|
@@ -352,10 +352,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
352
352
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
355
|
-
* Returns all
|
|
356
|
-
* @param storefrontId Storefront identifier.
|
|
357
|
-
* @param productReference (optional) Product reference filter. Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
358
|
-
* @param productSpecificationId (optional) Cusomer's Canvas product specification filter.
|
|
355
|
+
* Returns all product links, relevant to the specified query parameters.
|
|
359
356
|
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
360
357
|
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
361
358
|
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
@@ -363,16 +360,8 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
363
360
|
* @param tenantId (optional) Tenant identifier.
|
|
364
361
|
* @return Success
|
|
365
362
|
*/
|
|
366
|
-
|
|
367
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-
|
|
368
|
-
if (storefrontId === undefined || storefrontId === null)
|
|
369
|
-
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
370
|
-
else
|
|
371
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
372
|
-
if (productReference !== undefined && productReference !== null)
|
|
373
|
-
url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
|
|
374
|
-
if (productSpecificationId !== undefined && productSpecificationId !== null)
|
|
375
|
-
url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
|
|
363
|
+
getAllProductLinks(skip, take, sorting, search, tenantId) {
|
|
364
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links?";
|
|
376
365
|
if (skip !== undefined && skip !== null)
|
|
377
366
|
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
378
367
|
if (take !== undefined && take !== null)
|
|
@@ -388,17 +377,17 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
388
377
|
observe: "response",
|
|
389
378
|
responseType: "blob",
|
|
390
379
|
headers: new HttpHeaders({
|
|
391
|
-
"Accept": "
|
|
380
|
+
"Accept": "application/json"
|
|
392
381
|
})
|
|
393
382
|
};
|
|
394
383
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
395
384
|
return this.http.request("get", url_, transformedOptions_);
|
|
396
385
|
})).pipe(mergeMap((response_) => {
|
|
397
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
386
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductLinks(r));
|
|
398
387
|
})).pipe(catchError((response_) => {
|
|
399
388
|
if (response_ instanceof HttpResponseBase) {
|
|
400
389
|
try {
|
|
401
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
390
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductLinks(r));
|
|
402
391
|
}
|
|
403
392
|
catch (e) {
|
|
404
393
|
return throwError(e);
|
|
@@ -408,7 +397,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
408
397
|
return throwError(response_);
|
|
409
398
|
}));
|
|
410
399
|
}
|
|
411
|
-
|
|
400
|
+
processGetAllProductLinks(response) {
|
|
412
401
|
const status = response.status;
|
|
413
402
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
414
403
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -443,39 +432,40 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
443
432
|
return of(null);
|
|
444
433
|
}
|
|
445
434
|
/**
|
|
446
|
-
*
|
|
447
|
-
* @param
|
|
435
|
+
* Returns a product link by its identifier.
|
|
436
|
+
* @param id Product identifier.
|
|
437
|
+
* @param productLinkVersionId (optional) Product link version identifier. Optional
|
|
438
|
+
* @param productVersionId (optional) Product version identifier which represents linked product version. Optional
|
|
448
439
|
* @param tenantId (optional) Tenant identifier.
|
|
449
|
-
* @param body (optional) Create operation parameters.
|
|
450
440
|
* @return Success
|
|
451
441
|
*/
|
|
452
|
-
|
|
453
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-
|
|
454
|
-
if (
|
|
455
|
-
throw new Error("The parameter '
|
|
456
|
-
|
|
457
|
-
|
|
442
|
+
getProductLink(id, productLinkVersionId, productVersionId, tenantId) {
|
|
443
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links/{id}?";
|
|
444
|
+
if (id === undefined || id === null)
|
|
445
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
446
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
447
|
+
if (productLinkVersionId !== undefined && productLinkVersionId !== null)
|
|
448
|
+
url_ += "productLinkVersionId=" + encodeURIComponent("" + productLinkVersionId) + "&";
|
|
449
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
450
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
458
451
|
if (tenantId !== undefined && tenantId !== null)
|
|
459
452
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
460
453
|
url_ = url_.replace(/[?&]$/, "");
|
|
461
|
-
const content_ = JSON.stringify(body);
|
|
462
454
|
let options_ = {
|
|
463
|
-
body: content_,
|
|
464
455
|
observe: "response",
|
|
465
456
|
responseType: "blob",
|
|
466
457
|
headers: new HttpHeaders({
|
|
467
|
-
"
|
|
468
|
-
"Accept": "text/plain"
|
|
458
|
+
"Accept": "application/json"
|
|
469
459
|
})
|
|
470
460
|
};
|
|
471
461
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
472
|
-
return this.http.request("
|
|
462
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
473
463
|
})).pipe(mergeMap((response_) => {
|
|
474
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
464
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
475
465
|
})).pipe(catchError((response_) => {
|
|
476
466
|
if (response_ instanceof HttpResponseBase) {
|
|
477
467
|
try {
|
|
478
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
468
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
479
469
|
}
|
|
480
470
|
catch (e) {
|
|
481
471
|
return throwError(e);
|
|
@@ -485,7 +475,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
485
475
|
return throwError(response_);
|
|
486
476
|
}));
|
|
487
477
|
}
|
|
488
|
-
|
|
478
|
+
processGetProductLink(response) {
|
|
489
479
|
const status = response.status;
|
|
490
480
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
491
481
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -495,11 +485,11 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
495
485
|
_headers[key] = response.headers.get(key);
|
|
496
486
|
}
|
|
497
487
|
}
|
|
498
|
-
if (status ===
|
|
488
|
+
if (status === 200) {
|
|
499
489
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
500
|
-
let
|
|
501
|
-
|
|
502
|
-
return of(
|
|
490
|
+
let result200 = null;
|
|
491
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
492
|
+
return of(result200);
|
|
503
493
|
}));
|
|
504
494
|
}
|
|
505
495
|
else if (status === 404) {
|
|
@@ -509,6 +499,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
509
499
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
510
500
|
}));
|
|
511
501
|
}
|
|
502
|
+
else if (status === 409) {
|
|
503
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
504
|
+
let result409 = null;
|
|
505
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
506
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
507
|
+
}));
|
|
508
|
+
}
|
|
512
509
|
else if (status === 401) {
|
|
513
510
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
514
511
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -527,21 +524,28 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
527
524
|
return of(null);
|
|
528
525
|
}
|
|
529
526
|
/**
|
|
530
|
-
* Returns a
|
|
531
|
-
* @param
|
|
532
|
-
* @param
|
|
527
|
+
* Returns a product link summary by product link identifier.
|
|
528
|
+
* @param id Product link identifier.
|
|
529
|
+
* @param productLinkVersionId (optional) Product link version identifier.
|
|
530
|
+
* @param productVersionId (optional) Product link identifier.
|
|
531
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
532
|
+
* @param sku (optional) Product variant SKU.
|
|
533
533
|
* @param tenantId (optional) Tenant identifier.
|
|
534
534
|
* @return Success
|
|
535
535
|
*/
|
|
536
|
-
|
|
537
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-
|
|
538
|
-
if (
|
|
539
|
-
throw new Error("The parameter '
|
|
540
|
-
url_ = url_.replace("{
|
|
541
|
-
if (
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
url_ += "
|
|
536
|
+
getProductSummary(id, productLinkVersionId, productVersionId, productVariantId, sku, tenantId) {
|
|
537
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links/{id}/summary?";
|
|
538
|
+
if (id === undefined || id === null)
|
|
539
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
540
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
541
|
+
if (productLinkVersionId !== undefined && productLinkVersionId !== null)
|
|
542
|
+
url_ += "productLinkVersionId=" + encodeURIComponent("" + productLinkVersionId) + "&";
|
|
543
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
544
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
545
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
546
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
547
|
+
if (sku !== undefined && sku !== null)
|
|
548
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
545
549
|
if (tenantId !== undefined && tenantId !== null)
|
|
546
550
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
547
551
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -549,17 +553,17 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
549
553
|
observe: "response",
|
|
550
554
|
responseType: "blob",
|
|
551
555
|
headers: new HttpHeaders({
|
|
552
|
-
"Accept": "
|
|
556
|
+
"Accept": "application/json"
|
|
553
557
|
})
|
|
554
558
|
};
|
|
555
559
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
556
560
|
return this.http.request("get", url_, transformedOptions_);
|
|
557
561
|
})).pipe(mergeMap((response_) => {
|
|
558
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
562
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
559
563
|
})).pipe(catchError((response_) => {
|
|
560
564
|
if (response_ instanceof HttpResponseBase) {
|
|
561
565
|
try {
|
|
562
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
566
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
563
567
|
}
|
|
564
568
|
catch (e) {
|
|
565
569
|
return throwError(e);
|
|
@@ -569,7 +573,102 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
569
573
|
return throwError(response_);
|
|
570
574
|
}));
|
|
571
575
|
}
|
|
572
|
-
|
|
576
|
+
processGetProductSummary(response) {
|
|
577
|
+
const status = response.status;
|
|
578
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
579
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
580
|
+
let _headers = {};
|
|
581
|
+
if (response.headers) {
|
|
582
|
+
for (let key of response.headers.keys()) {
|
|
583
|
+
_headers[key] = response.headers.get(key);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
if (status === 200) {
|
|
587
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
588
|
+
let result200 = null;
|
|
589
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
590
|
+
return of(result200);
|
|
591
|
+
}));
|
|
592
|
+
}
|
|
593
|
+
else if (status === 404) {
|
|
594
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
595
|
+
let result404 = null;
|
|
596
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
597
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
598
|
+
}));
|
|
599
|
+
}
|
|
600
|
+
else if (status === 409) {
|
|
601
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
602
|
+
let result409 = null;
|
|
603
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
604
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
605
|
+
}));
|
|
606
|
+
}
|
|
607
|
+
else if (status === 401) {
|
|
608
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
609
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
610
|
+
}));
|
|
611
|
+
}
|
|
612
|
+
else if (status === 403) {
|
|
613
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
614
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
615
|
+
}));
|
|
616
|
+
}
|
|
617
|
+
else if (status !== 200 && status !== 204) {
|
|
618
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
619
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
620
|
+
}));
|
|
621
|
+
}
|
|
622
|
+
return of(null);
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Returns a product link personalization workflow description by product link identifier.
|
|
626
|
+
* @param id Product link identifier.
|
|
627
|
+
* @param productLinkVersionId (optional) Product link version identifier.
|
|
628
|
+
* @param productVersionId (optional) Product version identifier.
|
|
629
|
+
* @param productFilterId (optional) Product filter identifier.
|
|
630
|
+
* @param tenantId (optional) Tenant identifier.
|
|
631
|
+
* @return Success
|
|
632
|
+
*/
|
|
633
|
+
getPersonalizationWorkflow(id, productLinkVersionId, productVersionId, productFilterId, tenantId) {
|
|
634
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-links/{id}/personalization-workflow?";
|
|
635
|
+
if (id === undefined || id === null)
|
|
636
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
637
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
638
|
+
if (productLinkVersionId !== undefined && productLinkVersionId !== null)
|
|
639
|
+
url_ += "productLinkVersionId=" + encodeURIComponent("" + productLinkVersionId) + "&";
|
|
640
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
641
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
642
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
643
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
644
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
645
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
646
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
647
|
+
let options_ = {
|
|
648
|
+
observe: "response",
|
|
649
|
+
responseType: "blob",
|
|
650
|
+
headers: new HttpHeaders({
|
|
651
|
+
"Accept": "application/json"
|
|
652
|
+
})
|
|
653
|
+
};
|
|
654
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
655
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
656
|
+
})).pipe(mergeMap((response_) => {
|
|
657
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
658
|
+
})).pipe(catchError((response_) => {
|
|
659
|
+
if (response_ instanceof HttpResponseBase) {
|
|
660
|
+
try {
|
|
661
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
662
|
+
}
|
|
663
|
+
catch (e) {
|
|
664
|
+
return throwError(e);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
else
|
|
668
|
+
return throwError(response_);
|
|
669
|
+
}));
|
|
670
|
+
}
|
|
671
|
+
processGetPersonalizationWorkflow(response) {
|
|
573
672
|
const status = response.status;
|
|
574
673
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
575
674
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -593,6 +692,2505 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
593
692
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
594
693
|
}));
|
|
595
694
|
}
|
|
695
|
+
else if (status === 409) {
|
|
696
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
697
|
+
let result409 = null;
|
|
698
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
699
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
700
|
+
}));
|
|
701
|
+
}
|
|
702
|
+
else if (status === 401) {
|
|
703
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
704
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
705
|
+
}));
|
|
706
|
+
}
|
|
707
|
+
else if (status === 403) {
|
|
708
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
709
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
710
|
+
}));
|
|
711
|
+
}
|
|
712
|
+
else if (status !== 200 && status !== 204) {
|
|
713
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
714
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
715
|
+
}));
|
|
716
|
+
}
|
|
717
|
+
return of(null);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
ProductLinksApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductLinksApiClient_Factory() { return new ProductLinksApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductLinksApiClient, providedIn: "root" });
|
|
721
|
+
ProductLinksApiClient.decorators = [
|
|
722
|
+
{ type: Injectable, args: [{
|
|
723
|
+
providedIn: 'root'
|
|
724
|
+
},] }
|
|
725
|
+
];
|
|
726
|
+
ProductLinksApiClient.ctorParameters = () => [
|
|
727
|
+
{ type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
|
|
728
|
+
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
729
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
730
|
+
];
|
|
731
|
+
class ProductReferencesApiClient extends ApiClientBase {
|
|
732
|
+
constructor(configuration, http, baseUrl) {
|
|
733
|
+
super(configuration);
|
|
734
|
+
this.jsonParseReviver = undefined;
|
|
735
|
+
this.http = http;
|
|
736
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Returns all storefront product references relevant to the specified query parameters.
|
|
740
|
+
* @param storefrontId Storefront identifier.
|
|
741
|
+
* @param productReference (optional) Product reference filter.
|
|
742
|
+
Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
743
|
+
* @param productSpecificationId (optional) Customer's Canvas product specification filter.
|
|
744
|
+
* @param productId (optional) Customer's Canvas product filter.
|
|
745
|
+
* @param productLinkId (optional) Customer's Canvas product link filter.
|
|
746
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
747
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
748
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
749
|
+
* @param search (optional) Search string for partial match.
|
|
750
|
+
* @param sku (optional) SKU filter.
|
|
751
|
+
* @param tags (optional) List of tags that product should have.
|
|
752
|
+
* @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
|
|
753
|
+
* @param tenantId (optional) Tenant identifier.
|
|
754
|
+
* @return Success
|
|
755
|
+
*/
|
|
756
|
+
getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
|
|
757
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
758
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
759
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
760
|
+
else
|
|
761
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
762
|
+
if (productReference !== undefined && productReference !== null)
|
|
763
|
+
url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
|
|
764
|
+
if (productSpecificationId !== undefined && productSpecificationId !== null)
|
|
765
|
+
url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
|
|
766
|
+
if (productId !== undefined && productId !== null)
|
|
767
|
+
url_ += "productId=" + encodeURIComponent("" + productId) + "&";
|
|
768
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
769
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
770
|
+
if (skip !== undefined && skip !== null)
|
|
771
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
772
|
+
if (take !== undefined && take !== null)
|
|
773
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
774
|
+
if (sorting !== undefined && sorting !== null)
|
|
775
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
776
|
+
if (search !== undefined && search !== null)
|
|
777
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
778
|
+
if (sku !== undefined && sku !== null)
|
|
779
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
780
|
+
if (tags !== undefined && tags !== null)
|
|
781
|
+
tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
|
|
782
|
+
if (customFields !== undefined && customFields !== null)
|
|
783
|
+
url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
|
|
784
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
785
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
786
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
787
|
+
let options_ = {
|
|
788
|
+
observe: "response",
|
|
789
|
+
responseType: "blob",
|
|
790
|
+
headers: new HttpHeaders({
|
|
791
|
+
"Accept": "application/json"
|
|
792
|
+
})
|
|
793
|
+
};
|
|
794
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
795
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
796
|
+
})).pipe(mergeMap((response_) => {
|
|
797
|
+
return this.transformResult(url_, response_, (r) => this.processGetAll(r));
|
|
798
|
+
})).pipe(catchError((response_) => {
|
|
799
|
+
if (response_ instanceof HttpResponseBase) {
|
|
800
|
+
try {
|
|
801
|
+
return this.transformResult(url_, response_, (r) => this.processGetAll(r));
|
|
802
|
+
}
|
|
803
|
+
catch (e) {
|
|
804
|
+
return throwError(e);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
else
|
|
808
|
+
return throwError(response_);
|
|
809
|
+
}));
|
|
810
|
+
}
|
|
811
|
+
processGetAll(response) {
|
|
812
|
+
const status = response.status;
|
|
813
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
814
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
815
|
+
let _headers = {};
|
|
816
|
+
if (response.headers) {
|
|
817
|
+
for (let key of response.headers.keys()) {
|
|
818
|
+
_headers[key] = response.headers.get(key);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (status === 200) {
|
|
822
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
823
|
+
let result200 = null;
|
|
824
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
825
|
+
return of(result200);
|
|
826
|
+
}));
|
|
827
|
+
}
|
|
828
|
+
else if (status === 409) {
|
|
829
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
830
|
+
let result409 = null;
|
|
831
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
832
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
833
|
+
}));
|
|
834
|
+
}
|
|
835
|
+
else if (status === 401) {
|
|
836
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
837
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
838
|
+
}));
|
|
839
|
+
}
|
|
840
|
+
else if (status === 403) {
|
|
841
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
842
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
843
|
+
}));
|
|
844
|
+
}
|
|
845
|
+
else if (status !== 200 && status !== 204) {
|
|
846
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
847
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
848
|
+
}));
|
|
849
|
+
}
|
|
850
|
+
return of(null);
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Creates a new storefront product reference.
|
|
854
|
+
* @param storefrontId Storefront identifier.
|
|
855
|
+
* @param tenantId (optional) Tenant identifier.
|
|
856
|
+
* @param body (optional) Create operation parameters.
|
|
857
|
+
* @return Success
|
|
858
|
+
*/
|
|
859
|
+
create(storefrontId, tenantId, body) {
|
|
860
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
861
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
862
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
863
|
+
else
|
|
864
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
865
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
866
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
867
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
868
|
+
const content_ = JSON.stringify(body);
|
|
869
|
+
let options_ = {
|
|
870
|
+
body: content_,
|
|
871
|
+
observe: "response",
|
|
872
|
+
responseType: "blob",
|
|
873
|
+
headers: new HttpHeaders({
|
|
874
|
+
"Content-Type": "application/json",
|
|
875
|
+
"Accept": "application/json"
|
|
876
|
+
})
|
|
877
|
+
};
|
|
878
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
879
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
880
|
+
})).pipe(mergeMap((response_) => {
|
|
881
|
+
return this.transformResult(url_, response_, (r) => this.processCreate(r));
|
|
882
|
+
})).pipe(catchError((response_) => {
|
|
883
|
+
if (response_ instanceof HttpResponseBase) {
|
|
884
|
+
try {
|
|
885
|
+
return this.transformResult(url_, response_, (r) => this.processCreate(r));
|
|
886
|
+
}
|
|
887
|
+
catch (e) {
|
|
888
|
+
return throwError(e);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
else
|
|
892
|
+
return throwError(response_);
|
|
893
|
+
}));
|
|
894
|
+
}
|
|
895
|
+
processCreate(response) {
|
|
896
|
+
const status = response.status;
|
|
897
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
898
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
899
|
+
let _headers = {};
|
|
900
|
+
if (response.headers) {
|
|
901
|
+
for (let key of response.headers.keys()) {
|
|
902
|
+
_headers[key] = response.headers.get(key);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
if (status === 201) {
|
|
906
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
907
|
+
let result201 = null;
|
|
908
|
+
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
909
|
+
return of(result201);
|
|
910
|
+
}));
|
|
911
|
+
}
|
|
912
|
+
else if (status === 404) {
|
|
913
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
914
|
+
let result404 = null;
|
|
915
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
916
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
917
|
+
}));
|
|
918
|
+
}
|
|
919
|
+
else if (status === 409) {
|
|
920
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
921
|
+
let result409 = null;
|
|
922
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
923
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
924
|
+
}));
|
|
925
|
+
}
|
|
926
|
+
else if (status === 401) {
|
|
927
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
928
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
929
|
+
}));
|
|
930
|
+
}
|
|
931
|
+
else if (status === 403) {
|
|
932
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
933
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
934
|
+
}));
|
|
935
|
+
}
|
|
936
|
+
else if (status !== 200 && status !== 204) {
|
|
937
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
938
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
939
|
+
}));
|
|
940
|
+
}
|
|
941
|
+
return of(null);
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Returns a list of product specifications associated with storefront product references relevant to the specified query parameters.
|
|
945
|
+
* @param storefrontId Storefront identifier.
|
|
946
|
+
* @param productReference (optional) Product reference filter.
|
|
947
|
+
Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
948
|
+
* @param productSpecificationId (optional) Customer's Canvas product specification filter.
|
|
949
|
+
* @param productId (optional) Customer's Canvas product filter.
|
|
950
|
+
* @param productLinkId (optional) Customer's Canvas product link filter.
|
|
951
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
952
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
953
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
954
|
+
* @param search (optional) Search string for partial match.
|
|
955
|
+
* @param sku (optional) SKU filter.
|
|
956
|
+
* @param tags (optional) List of tags that product should have.
|
|
957
|
+
* @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
|
|
958
|
+
* @param tenantId (optional) Tenant identifier.
|
|
959
|
+
* @return Success
|
|
960
|
+
*/
|
|
961
|
+
getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
|
|
962
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-specifications?";
|
|
963
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
964
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
965
|
+
else
|
|
966
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
967
|
+
if (productReference !== undefined && productReference !== null)
|
|
968
|
+
url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
|
|
969
|
+
if (productSpecificationId !== undefined && productSpecificationId !== null)
|
|
970
|
+
url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
|
|
971
|
+
if (productId !== undefined && productId !== null)
|
|
972
|
+
url_ += "productId=" + encodeURIComponent("" + productId) + "&";
|
|
973
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
974
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
975
|
+
if (skip !== undefined && skip !== null)
|
|
976
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
977
|
+
if (take !== undefined && take !== null)
|
|
978
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
979
|
+
if (sorting !== undefined && sorting !== null)
|
|
980
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
981
|
+
if (search !== undefined && search !== null)
|
|
982
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
983
|
+
if (sku !== undefined && sku !== null)
|
|
984
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
985
|
+
if (tags !== undefined && tags !== null)
|
|
986
|
+
tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
|
|
987
|
+
if (customFields !== undefined && customFields !== null)
|
|
988
|
+
url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
|
|
989
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
990
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
991
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
992
|
+
let options_ = {
|
|
993
|
+
observe: "response",
|
|
994
|
+
responseType: "blob",
|
|
995
|
+
headers: new HttpHeaders({
|
|
996
|
+
"Accept": "application/json"
|
|
997
|
+
})
|
|
998
|
+
};
|
|
999
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1000
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1001
|
+
})).pipe(mergeMap((response_) => {
|
|
1002
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductSpecifications(r));
|
|
1003
|
+
})).pipe(catchError((response_) => {
|
|
1004
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1005
|
+
try {
|
|
1006
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductSpecifications(r));
|
|
1007
|
+
}
|
|
1008
|
+
catch (e) {
|
|
1009
|
+
return throwError(e);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
else
|
|
1013
|
+
return throwError(response_);
|
|
1014
|
+
}));
|
|
1015
|
+
}
|
|
1016
|
+
processGetAllProductSpecifications(response) {
|
|
1017
|
+
const status = response.status;
|
|
1018
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1019
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1020
|
+
let _headers = {};
|
|
1021
|
+
if (response.headers) {
|
|
1022
|
+
for (let key of response.headers.keys()) {
|
|
1023
|
+
_headers[key] = response.headers.get(key);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
if (status === 200) {
|
|
1027
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1028
|
+
let result200 = null;
|
|
1029
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1030
|
+
return of(result200);
|
|
1031
|
+
}));
|
|
1032
|
+
}
|
|
1033
|
+
else if (status === 409) {
|
|
1034
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1035
|
+
let result409 = null;
|
|
1036
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1037
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1038
|
+
}));
|
|
1039
|
+
}
|
|
1040
|
+
else if (status === 401) {
|
|
1041
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1042
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1043
|
+
}));
|
|
1044
|
+
}
|
|
1045
|
+
else if (status === 403) {
|
|
1046
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1047
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1048
|
+
}));
|
|
1049
|
+
}
|
|
1050
|
+
else if (status !== 200 && status !== 204) {
|
|
1051
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1052
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1053
|
+
}));
|
|
1054
|
+
}
|
|
1055
|
+
return of(null);
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Returns a list of products associated with storefront product references relevant to the specified query parameters.
|
|
1059
|
+
* @param storefrontId Storefront identifier.
|
|
1060
|
+
* @param productReference (optional) Product reference filter.
|
|
1061
|
+
Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1062
|
+
* @param productSpecificationId (optional) Customer's Canvas product specification filter.
|
|
1063
|
+
* @param productId (optional) Customer's Canvas product filter.
|
|
1064
|
+
* @param productLinkId (optional) Customer's Canvas product link filter.
|
|
1065
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1066
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1067
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1068
|
+
* @param search (optional) Search string for partial match.
|
|
1069
|
+
* @param sku (optional) SKU filter.
|
|
1070
|
+
* @param tags (optional) List of tags that product should have.
|
|
1071
|
+
* @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
|
|
1072
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1073
|
+
* @return Success
|
|
1074
|
+
*/
|
|
1075
|
+
getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
|
|
1076
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/products?";
|
|
1077
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1078
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1079
|
+
else
|
|
1080
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1081
|
+
if (productReference !== undefined && productReference !== null)
|
|
1082
|
+
url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
|
|
1083
|
+
if (productSpecificationId !== undefined && productSpecificationId !== null)
|
|
1084
|
+
url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
|
|
1085
|
+
if (productId !== undefined && productId !== null)
|
|
1086
|
+
url_ += "productId=" + encodeURIComponent("" + productId) + "&";
|
|
1087
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
1088
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
1089
|
+
if (skip !== undefined && skip !== null)
|
|
1090
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
1091
|
+
if (take !== undefined && take !== null)
|
|
1092
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
1093
|
+
if (sorting !== undefined && sorting !== null)
|
|
1094
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
1095
|
+
if (search !== undefined && search !== null)
|
|
1096
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1097
|
+
if (sku !== undefined && sku !== null)
|
|
1098
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
1099
|
+
if (tags !== undefined && tags !== null)
|
|
1100
|
+
tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
|
|
1101
|
+
if (customFields !== undefined && customFields !== null)
|
|
1102
|
+
url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
|
|
1103
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1104
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1105
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1106
|
+
let options_ = {
|
|
1107
|
+
observe: "response",
|
|
1108
|
+
responseType: "blob",
|
|
1109
|
+
headers: new HttpHeaders({
|
|
1110
|
+
"Accept": "application/json"
|
|
1111
|
+
})
|
|
1112
|
+
};
|
|
1113
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1114
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1115
|
+
})).pipe(mergeMap((response_) => {
|
|
1116
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProducts(r));
|
|
1117
|
+
})).pipe(catchError((response_) => {
|
|
1118
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1119
|
+
try {
|
|
1120
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProducts(r));
|
|
1121
|
+
}
|
|
1122
|
+
catch (e) {
|
|
1123
|
+
return throwError(e);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
else
|
|
1127
|
+
return throwError(response_);
|
|
1128
|
+
}));
|
|
1129
|
+
}
|
|
1130
|
+
processGetAllProducts(response) {
|
|
1131
|
+
const status = response.status;
|
|
1132
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1133
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1134
|
+
let _headers = {};
|
|
1135
|
+
if (response.headers) {
|
|
1136
|
+
for (let key of response.headers.keys()) {
|
|
1137
|
+
_headers[key] = response.headers.get(key);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
if (status === 200) {
|
|
1141
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1142
|
+
let result200 = null;
|
|
1143
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1144
|
+
return of(result200);
|
|
1145
|
+
}));
|
|
1146
|
+
}
|
|
1147
|
+
else if (status === 409) {
|
|
1148
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1149
|
+
let result409 = null;
|
|
1150
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1151
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1152
|
+
}));
|
|
1153
|
+
}
|
|
1154
|
+
else if (status === 401) {
|
|
1155
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1156
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1157
|
+
}));
|
|
1158
|
+
}
|
|
1159
|
+
else if (status === 403) {
|
|
1160
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1161
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1162
|
+
}));
|
|
1163
|
+
}
|
|
1164
|
+
else if (status !== 200 && status !== 204) {
|
|
1165
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1166
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1167
|
+
}));
|
|
1168
|
+
}
|
|
1169
|
+
return of(null);
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Returns a list of product links associated with storefront product references relevant to the specified query parameters.
|
|
1173
|
+
* @param storefrontId Storefront identifier.
|
|
1174
|
+
* @param productReference (optional) Product reference filter.
|
|
1175
|
+
Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1176
|
+
* @param productSpecificationId (optional) Customer's Canvas product specification filter.
|
|
1177
|
+
* @param productId (optional) Customer's Canvas product filter.
|
|
1178
|
+
* @param productLinkId (optional) Customer's Canvas product link filter.
|
|
1179
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1180
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1181
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1182
|
+
* @param search (optional) Search string for partial match.
|
|
1183
|
+
* @param sku (optional) SKU filter.
|
|
1184
|
+
* @param tags (optional) List of tags that product should have.
|
|
1185
|
+
* @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
|
|
1186
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1187
|
+
* @return Success
|
|
1188
|
+
*/
|
|
1189
|
+
getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
|
|
1190
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-links?";
|
|
1191
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1192
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1193
|
+
else
|
|
1194
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1195
|
+
if (productReference !== undefined && productReference !== null)
|
|
1196
|
+
url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
|
|
1197
|
+
if (productSpecificationId !== undefined && productSpecificationId !== null)
|
|
1198
|
+
url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
|
|
1199
|
+
if (productId !== undefined && productId !== null)
|
|
1200
|
+
url_ += "productId=" + encodeURIComponent("" + productId) + "&";
|
|
1201
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
1202
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
1203
|
+
if (skip !== undefined && skip !== null)
|
|
1204
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
1205
|
+
if (take !== undefined && take !== null)
|
|
1206
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
1207
|
+
if (sorting !== undefined && sorting !== null)
|
|
1208
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
1209
|
+
if (search !== undefined && search !== null)
|
|
1210
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1211
|
+
if (sku !== undefined && sku !== null)
|
|
1212
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
1213
|
+
if (tags !== undefined && tags !== null)
|
|
1214
|
+
tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
|
|
1215
|
+
if (customFields !== undefined && customFields !== null)
|
|
1216
|
+
url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
|
|
1217
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1218
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1219
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1220
|
+
let options_ = {
|
|
1221
|
+
observe: "response",
|
|
1222
|
+
responseType: "blob",
|
|
1223
|
+
headers: new HttpHeaders({
|
|
1224
|
+
"Accept": "application/json"
|
|
1225
|
+
})
|
|
1226
|
+
};
|
|
1227
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1228
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1229
|
+
})).pipe(mergeMap((response_) => {
|
|
1230
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductLinks(r));
|
|
1231
|
+
})).pipe(catchError((response_) => {
|
|
1232
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1233
|
+
try {
|
|
1234
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductLinks(r));
|
|
1235
|
+
}
|
|
1236
|
+
catch (e) {
|
|
1237
|
+
return throwError(e);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
else
|
|
1241
|
+
return throwError(response_);
|
|
1242
|
+
}));
|
|
1243
|
+
}
|
|
1244
|
+
processGetAllProductLinks(response) {
|
|
1245
|
+
const status = response.status;
|
|
1246
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1247
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1248
|
+
let _headers = {};
|
|
1249
|
+
if (response.headers) {
|
|
1250
|
+
for (let key of response.headers.keys()) {
|
|
1251
|
+
_headers[key] = response.headers.get(key);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
if (status === 200) {
|
|
1255
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1256
|
+
let result200 = null;
|
|
1257
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1258
|
+
return of(result200);
|
|
1259
|
+
}));
|
|
1260
|
+
}
|
|
1261
|
+
else if (status === 409) {
|
|
1262
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1263
|
+
let result409 = null;
|
|
1264
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1265
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1266
|
+
}));
|
|
1267
|
+
}
|
|
1268
|
+
else if (status === 401) {
|
|
1269
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1270
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1271
|
+
}));
|
|
1272
|
+
}
|
|
1273
|
+
else if (status === 403) {
|
|
1274
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1275
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1276
|
+
}));
|
|
1277
|
+
}
|
|
1278
|
+
else if (status !== 200 && status !== 204) {
|
|
1279
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1280
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1281
|
+
}));
|
|
1282
|
+
}
|
|
1283
|
+
return of(null);
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Returns a storefront product reference.
|
|
1287
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1288
|
+
* @param storefrontId Storefront identifier.
|
|
1289
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1290
|
+
* @return Success
|
|
1291
|
+
*/
|
|
1292
|
+
get(reference, storefrontId, tenantId) {
|
|
1293
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
1294
|
+
if (reference === undefined || reference === null)
|
|
1295
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1296
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1297
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1298
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1299
|
+
else
|
|
1300
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1301
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1302
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1303
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1304
|
+
let options_ = {
|
|
1305
|
+
observe: "response",
|
|
1306
|
+
responseType: "blob",
|
|
1307
|
+
headers: new HttpHeaders({
|
|
1308
|
+
"Accept": "application/json"
|
|
1309
|
+
})
|
|
1310
|
+
};
|
|
1311
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1312
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1313
|
+
})).pipe(mergeMap((response_) => {
|
|
1314
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
1315
|
+
})).pipe(catchError((response_) => {
|
|
1316
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1317
|
+
try {
|
|
1318
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
1319
|
+
}
|
|
1320
|
+
catch (e) {
|
|
1321
|
+
return throwError(e);
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
else
|
|
1325
|
+
return throwError(response_);
|
|
1326
|
+
}));
|
|
1327
|
+
}
|
|
1328
|
+
processGet(response) {
|
|
1329
|
+
const status = response.status;
|
|
1330
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1331
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1332
|
+
let _headers = {};
|
|
1333
|
+
if (response.headers) {
|
|
1334
|
+
for (let key of response.headers.keys()) {
|
|
1335
|
+
_headers[key] = response.headers.get(key);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
if (status === 200) {
|
|
1339
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1340
|
+
let result200 = null;
|
|
1341
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1342
|
+
return of(result200);
|
|
1343
|
+
}));
|
|
1344
|
+
}
|
|
1345
|
+
else if (status === 409) {
|
|
1346
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1347
|
+
let result409 = null;
|
|
1348
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1349
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
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 === 401) {
|
|
1360
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1361
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1362
|
+
}));
|
|
1363
|
+
}
|
|
1364
|
+
else if (status === 403) {
|
|
1365
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1366
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1367
|
+
}));
|
|
1368
|
+
}
|
|
1369
|
+
else if (status !== 200 && status !== 204) {
|
|
1370
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1371
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1372
|
+
}));
|
|
1373
|
+
}
|
|
1374
|
+
return of(null);
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Deletes the storefront product reference.
|
|
1378
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
1379
|
+
* @param storefrontId Storefront identifier.
|
|
1380
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1381
|
+
* @return Success
|
|
1382
|
+
*/
|
|
1383
|
+
delete(reference, storefrontId, tenantId) {
|
|
1384
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
1385
|
+
if (reference === undefined || reference === null)
|
|
1386
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1387
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1388
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1389
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1390
|
+
else
|
|
1391
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1392
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1393
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1394
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1395
|
+
let options_ = {
|
|
1396
|
+
observe: "response",
|
|
1397
|
+
responseType: "blob",
|
|
1398
|
+
headers: new HttpHeaders({
|
|
1399
|
+
"Accept": "application/json"
|
|
1400
|
+
})
|
|
1401
|
+
};
|
|
1402
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1403
|
+
return this.http.request("delete", url_, transformedOptions_);
|
|
1404
|
+
})).pipe(mergeMap((response_) => {
|
|
1405
|
+
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1406
|
+
})).pipe(catchError((response_) => {
|
|
1407
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1408
|
+
try {
|
|
1409
|
+
return this.transformResult(url_, response_, (r) => this.processDelete(r));
|
|
1410
|
+
}
|
|
1411
|
+
catch (e) {
|
|
1412
|
+
return throwError(e);
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
else
|
|
1416
|
+
return throwError(response_);
|
|
1417
|
+
}));
|
|
1418
|
+
}
|
|
1419
|
+
processDelete(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
|
+
let result200 = null;
|
|
1432
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1433
|
+
return of(result200);
|
|
1434
|
+
}));
|
|
1435
|
+
}
|
|
1436
|
+
else if (status === 404) {
|
|
1437
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1438
|
+
let result404 = null;
|
|
1439
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1440
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1441
|
+
}));
|
|
1442
|
+
}
|
|
1443
|
+
else if (status === 409) {
|
|
1444
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1445
|
+
let result409 = null;
|
|
1446
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1447
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1448
|
+
}));
|
|
1449
|
+
}
|
|
1450
|
+
else if (status === 401) {
|
|
1451
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1452
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1453
|
+
}));
|
|
1454
|
+
}
|
|
1455
|
+
else if (status === 403) {
|
|
1456
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1457
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1458
|
+
}));
|
|
1459
|
+
}
|
|
1460
|
+
else if (status !== 200 && status !== 204) {
|
|
1461
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1462
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1463
|
+
}));
|
|
1464
|
+
}
|
|
1465
|
+
return of(null);
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Returns a product specification by the storefront product reference.
|
|
1469
|
+
* @param reference Product reference - external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1470
|
+
* @param storefrontId Storefront identifier.
|
|
1471
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1472
|
+
* @return Success
|
|
1473
|
+
*/
|
|
1474
|
+
getProductSpecification(reference, storefrontId, tenantId) {
|
|
1475
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-specification?";
|
|
1476
|
+
if (reference === undefined || reference === null)
|
|
1477
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1478
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1479
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1480
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1481
|
+
else
|
|
1482
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1483
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1484
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1485
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1486
|
+
let options_ = {
|
|
1487
|
+
observe: "response",
|
|
1488
|
+
responseType: "blob",
|
|
1489
|
+
headers: new HttpHeaders({
|
|
1490
|
+
"Accept": "application/json"
|
|
1491
|
+
})
|
|
1492
|
+
};
|
|
1493
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1494
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1495
|
+
})).pipe(mergeMap((response_) => {
|
|
1496
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSpecification(r));
|
|
1497
|
+
})).pipe(catchError((response_) => {
|
|
1498
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1499
|
+
try {
|
|
1500
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSpecification(r));
|
|
1501
|
+
}
|
|
1502
|
+
catch (e) {
|
|
1503
|
+
return throwError(e);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
else
|
|
1507
|
+
return throwError(response_);
|
|
1508
|
+
}));
|
|
1509
|
+
}
|
|
1510
|
+
processGetProductSpecification(response) {
|
|
1511
|
+
const status = response.status;
|
|
1512
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1513
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1514
|
+
let _headers = {};
|
|
1515
|
+
if (response.headers) {
|
|
1516
|
+
for (let key of response.headers.keys()) {
|
|
1517
|
+
_headers[key] = response.headers.get(key);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
if (status === 200) {
|
|
1521
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1522
|
+
let result200 = null;
|
|
1523
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1524
|
+
return of(result200);
|
|
1525
|
+
}));
|
|
1526
|
+
}
|
|
1527
|
+
else if (status === 404) {
|
|
1528
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1529
|
+
let result404 = null;
|
|
1530
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1531
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1532
|
+
}));
|
|
1533
|
+
}
|
|
1534
|
+
else if (status === 409) {
|
|
1535
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1536
|
+
let result409 = null;
|
|
1537
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1538
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1539
|
+
}));
|
|
1540
|
+
}
|
|
1541
|
+
else if (status === 401) {
|
|
1542
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1543
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1544
|
+
}));
|
|
1545
|
+
}
|
|
1546
|
+
else if (status === 403) {
|
|
1547
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1548
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1549
|
+
}));
|
|
1550
|
+
}
|
|
1551
|
+
else if (status !== 200 && status !== 204) {
|
|
1552
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1553
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1554
|
+
}));
|
|
1555
|
+
}
|
|
1556
|
+
return of(null);
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Returns a product by storefront product reference.
|
|
1560
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1561
|
+
* @param storefrontId Storefront identifier.
|
|
1562
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1563
|
+
* @return Success
|
|
1564
|
+
*/
|
|
1565
|
+
getProduct(reference, storefrontId, tenantId) {
|
|
1566
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product?";
|
|
1567
|
+
if (reference === undefined || reference === null)
|
|
1568
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1569
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1570
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1571
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1572
|
+
else
|
|
1573
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1574
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1575
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1576
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1577
|
+
let options_ = {
|
|
1578
|
+
observe: "response",
|
|
1579
|
+
responseType: "blob",
|
|
1580
|
+
headers: new HttpHeaders({
|
|
1581
|
+
"Accept": "application/json"
|
|
1582
|
+
})
|
|
1583
|
+
};
|
|
1584
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1585
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1586
|
+
})).pipe(mergeMap((response_) => {
|
|
1587
|
+
return this.transformResult(url_, response_, (r) => this.processGetProduct(r));
|
|
1588
|
+
})).pipe(catchError((response_) => {
|
|
1589
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1590
|
+
try {
|
|
1591
|
+
return this.transformResult(url_, response_, (r) => this.processGetProduct(r));
|
|
1592
|
+
}
|
|
1593
|
+
catch (e) {
|
|
1594
|
+
return throwError(e);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
else
|
|
1598
|
+
return throwError(response_);
|
|
1599
|
+
}));
|
|
1600
|
+
}
|
|
1601
|
+
processGetProduct(response) {
|
|
1602
|
+
const status = response.status;
|
|
1603
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1604
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1605
|
+
let _headers = {};
|
|
1606
|
+
if (response.headers) {
|
|
1607
|
+
for (let key of response.headers.keys()) {
|
|
1608
|
+
_headers[key] = response.headers.get(key);
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
if (status === 200) {
|
|
1612
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1613
|
+
let result200 = null;
|
|
1614
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1615
|
+
return of(result200);
|
|
1616
|
+
}));
|
|
1617
|
+
}
|
|
1618
|
+
else if (status === 404) {
|
|
1619
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1620
|
+
let result404 = null;
|
|
1621
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1622
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1623
|
+
}));
|
|
1624
|
+
}
|
|
1625
|
+
else if (status === 409) {
|
|
1626
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1627
|
+
let result409 = null;
|
|
1628
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1629
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1630
|
+
}));
|
|
1631
|
+
}
|
|
1632
|
+
else if (status === 401) {
|
|
1633
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1634
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1635
|
+
}));
|
|
1636
|
+
}
|
|
1637
|
+
else if (status === 403) {
|
|
1638
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1639
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1640
|
+
}));
|
|
1641
|
+
}
|
|
1642
|
+
else if (status !== 200 && status !== 204) {
|
|
1643
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1644
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1645
|
+
}));
|
|
1646
|
+
}
|
|
1647
|
+
return of(null);
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* Returns a product summary by storefront product reference.
|
|
1651
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1652
|
+
* @param storefrontId Storefront identifier.
|
|
1653
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
1654
|
+
* @param sku (optional) Product variant SKU.
|
|
1655
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1656
|
+
* @return Success
|
|
1657
|
+
*/
|
|
1658
|
+
getProductSummary(reference, storefrontId, productVariantId, sku, tenantId) {
|
|
1659
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-summary?";
|
|
1660
|
+
if (reference === undefined || reference === null)
|
|
1661
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1662
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1663
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1664
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1665
|
+
else
|
|
1666
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1667
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
1668
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
1669
|
+
if (sku !== undefined && sku !== null)
|
|
1670
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
1671
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1672
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1673
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1674
|
+
let options_ = {
|
|
1675
|
+
observe: "response",
|
|
1676
|
+
responseType: "blob",
|
|
1677
|
+
headers: new HttpHeaders({
|
|
1678
|
+
"Accept": "application/json"
|
|
1679
|
+
})
|
|
1680
|
+
};
|
|
1681
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1682
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1683
|
+
})).pipe(mergeMap((response_) => {
|
|
1684
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
1685
|
+
})).pipe(catchError((response_) => {
|
|
1686
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1687
|
+
try {
|
|
1688
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
1689
|
+
}
|
|
1690
|
+
catch (e) {
|
|
1691
|
+
return throwError(e);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
else
|
|
1695
|
+
return throwError(response_);
|
|
1696
|
+
}));
|
|
1697
|
+
}
|
|
1698
|
+
processGetProductSummary(response) {
|
|
1699
|
+
const status = response.status;
|
|
1700
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1701
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1702
|
+
let _headers = {};
|
|
1703
|
+
if (response.headers) {
|
|
1704
|
+
for (let key of response.headers.keys()) {
|
|
1705
|
+
_headers[key] = response.headers.get(key);
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
if (status === 200) {
|
|
1709
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1710
|
+
let result200 = null;
|
|
1711
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1712
|
+
return of(result200);
|
|
1713
|
+
}));
|
|
1714
|
+
}
|
|
1715
|
+
else if (status === 404) {
|
|
1716
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1717
|
+
let result404 = null;
|
|
1718
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1719
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1720
|
+
}));
|
|
1721
|
+
}
|
|
1722
|
+
else if (status === 409) {
|
|
1723
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1724
|
+
let result409 = null;
|
|
1725
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1726
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1727
|
+
}));
|
|
1728
|
+
}
|
|
1729
|
+
else if (status === 401) {
|
|
1730
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1731
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1732
|
+
}));
|
|
1733
|
+
}
|
|
1734
|
+
else if (status === 403) {
|
|
1735
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1736
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1737
|
+
}));
|
|
1738
|
+
}
|
|
1739
|
+
else if (status !== 200 && status !== 204) {
|
|
1740
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1741
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1742
|
+
}));
|
|
1743
|
+
}
|
|
1744
|
+
return of(null);
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Returns a product link by storefront product reference.
|
|
1748
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1749
|
+
* @param storefrontId Storefront identifier.
|
|
1750
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1751
|
+
* @return Success
|
|
1752
|
+
*/
|
|
1753
|
+
getProductLink(reference, storefrontId, tenantId) {
|
|
1754
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-link?";
|
|
1755
|
+
if (reference === undefined || reference === null)
|
|
1756
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1757
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1758
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1759
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1760
|
+
else
|
|
1761
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1762
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1763
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1764
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1765
|
+
let options_ = {
|
|
1766
|
+
observe: "response",
|
|
1767
|
+
responseType: "blob",
|
|
1768
|
+
headers: new HttpHeaders({
|
|
1769
|
+
"Accept": "application/json"
|
|
1770
|
+
})
|
|
1771
|
+
};
|
|
1772
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1773
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1774
|
+
})).pipe(mergeMap((response_) => {
|
|
1775
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
1776
|
+
})).pipe(catchError((response_) => {
|
|
1777
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1778
|
+
try {
|
|
1779
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
1780
|
+
}
|
|
1781
|
+
catch (e) {
|
|
1782
|
+
return throwError(e);
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
else
|
|
1786
|
+
return throwError(response_);
|
|
1787
|
+
}));
|
|
1788
|
+
}
|
|
1789
|
+
processGetProductLink(response) {
|
|
1790
|
+
const status = response.status;
|
|
1791
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1792
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1793
|
+
let _headers = {};
|
|
1794
|
+
if (response.headers) {
|
|
1795
|
+
for (let key of response.headers.keys()) {
|
|
1796
|
+
_headers[key] = response.headers.get(key);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
if (status === 200) {
|
|
1800
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1801
|
+
let result200 = null;
|
|
1802
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1803
|
+
return of(result200);
|
|
1804
|
+
}));
|
|
1805
|
+
}
|
|
1806
|
+
else if (status === 404) {
|
|
1807
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1808
|
+
let result404 = null;
|
|
1809
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1810
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1811
|
+
}));
|
|
1812
|
+
}
|
|
1813
|
+
else if (status === 409) {
|
|
1814
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1815
|
+
let result409 = null;
|
|
1816
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1817
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1818
|
+
}));
|
|
1819
|
+
}
|
|
1820
|
+
else if (status === 401) {
|
|
1821
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1822
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1823
|
+
}));
|
|
1824
|
+
}
|
|
1825
|
+
else if (status === 403) {
|
|
1826
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1827
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1828
|
+
}));
|
|
1829
|
+
}
|
|
1830
|
+
else if (status !== 200 && status !== 204) {
|
|
1831
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1832
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1833
|
+
}));
|
|
1834
|
+
}
|
|
1835
|
+
return of(null);
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Returns a product cost details from ecommerce system.
|
|
1839
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1840
|
+
* @param sku Product SKU.
|
|
1841
|
+
* @param storefrontId Storefront identifier.
|
|
1842
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
1843
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
1844
|
+
* @param quantity (optional) Product quantity.
|
|
1845
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1846
|
+
* @return Success
|
|
1847
|
+
*/
|
|
1848
|
+
getProductCostDetails(reference, sku, storefrontId, storefrontUserId, currencyCode, quantity, tenantId) {
|
|
1849
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-cost-details?";
|
|
1850
|
+
if (reference === undefined || reference === null)
|
|
1851
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1852
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1853
|
+
if (sku === undefined || sku === null)
|
|
1854
|
+
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
1855
|
+
else
|
|
1856
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
1857
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1858
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1859
|
+
else
|
|
1860
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1861
|
+
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
1862
|
+
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
1863
|
+
if (currencyCode !== undefined && currencyCode !== null)
|
|
1864
|
+
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
1865
|
+
if (quantity === null)
|
|
1866
|
+
throw new Error("The parameter 'quantity' cannot be null.");
|
|
1867
|
+
else if (quantity !== undefined)
|
|
1868
|
+
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
1869
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1870
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1871
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1872
|
+
let options_ = {
|
|
1873
|
+
observe: "response",
|
|
1874
|
+
responseType: "blob",
|
|
1875
|
+
headers: new HttpHeaders({
|
|
1876
|
+
"Accept": "application/json"
|
|
1877
|
+
})
|
|
1878
|
+
};
|
|
1879
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1880
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1881
|
+
})).pipe(mergeMap((response_) => {
|
|
1882
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
1883
|
+
})).pipe(catchError((response_) => {
|
|
1884
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1885
|
+
try {
|
|
1886
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
1887
|
+
}
|
|
1888
|
+
catch (e) {
|
|
1889
|
+
return throwError(e);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
else
|
|
1893
|
+
return throwError(response_);
|
|
1894
|
+
}));
|
|
1895
|
+
}
|
|
1896
|
+
processGetProductCostDetails(response) {
|
|
1897
|
+
const status = response.status;
|
|
1898
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1899
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1900
|
+
let _headers = {};
|
|
1901
|
+
if (response.headers) {
|
|
1902
|
+
for (let key of response.headers.keys()) {
|
|
1903
|
+
_headers[key] = response.headers.get(key);
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
if (status === 200) {
|
|
1907
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1908
|
+
let result200 = null;
|
|
1909
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1910
|
+
return of(result200);
|
|
1911
|
+
}));
|
|
1912
|
+
}
|
|
1913
|
+
else if (status === 404) {
|
|
1914
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1915
|
+
let result404 = null;
|
|
1916
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1917
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1918
|
+
}));
|
|
1919
|
+
}
|
|
1920
|
+
else if (status === 409) {
|
|
1921
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1922
|
+
let result409 = null;
|
|
1923
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1924
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1925
|
+
}));
|
|
1926
|
+
}
|
|
1927
|
+
else if (status === 401) {
|
|
1928
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1929
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1930
|
+
}));
|
|
1931
|
+
}
|
|
1932
|
+
else if (status === 403) {
|
|
1933
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1934
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1935
|
+
}));
|
|
1936
|
+
}
|
|
1937
|
+
else if (status !== 200 && status !== 204) {
|
|
1938
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1939
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1940
|
+
}));
|
|
1941
|
+
}
|
|
1942
|
+
return of(null);
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Returns a product personalization workflow.
|
|
1946
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1947
|
+
* @param storefrontId (optional) Storefront identifier.
|
|
1948
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1949
|
+
* @return Success
|
|
1950
|
+
*/
|
|
1951
|
+
getPersonalizationWorkflow(reference, storefrontId, tenantId) {
|
|
1952
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/personalization-workflow?";
|
|
1953
|
+
if (reference === undefined || reference === null)
|
|
1954
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
1955
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
1956
|
+
if (storefrontId === null)
|
|
1957
|
+
throw new Error("The parameter 'storefrontId' cannot be null.");
|
|
1958
|
+
else if (storefrontId !== undefined)
|
|
1959
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1960
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1961
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1962
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1963
|
+
let options_ = {
|
|
1964
|
+
observe: "response",
|
|
1965
|
+
responseType: "blob",
|
|
1966
|
+
headers: new HttpHeaders({
|
|
1967
|
+
"Accept": "application/json"
|
|
1968
|
+
})
|
|
1969
|
+
};
|
|
1970
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1971
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1972
|
+
})).pipe(mergeMap((response_) => {
|
|
1973
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
1974
|
+
})).pipe(catchError((response_) => {
|
|
1975
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1976
|
+
try {
|
|
1977
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
1978
|
+
}
|
|
1979
|
+
catch (e) {
|
|
1980
|
+
return throwError(e);
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
else
|
|
1984
|
+
return throwError(response_);
|
|
1985
|
+
}));
|
|
1986
|
+
}
|
|
1987
|
+
processGetPersonalizationWorkflow(response) {
|
|
1988
|
+
const status = response.status;
|
|
1989
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1990
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1991
|
+
let _headers = {};
|
|
1992
|
+
if (response.headers) {
|
|
1993
|
+
for (let key of response.headers.keys()) {
|
|
1994
|
+
_headers[key] = response.headers.get(key);
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
if (status === 200) {
|
|
1998
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1999
|
+
let result200 = null;
|
|
2000
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2001
|
+
return of(result200);
|
|
2002
|
+
}));
|
|
2003
|
+
}
|
|
2004
|
+
else if (status === 404) {
|
|
2005
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2006
|
+
let result404 = null;
|
|
2007
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2008
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2009
|
+
}));
|
|
2010
|
+
}
|
|
2011
|
+
else if (status === 409) {
|
|
2012
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2013
|
+
let result409 = null;
|
|
2014
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2015
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2016
|
+
}));
|
|
2017
|
+
}
|
|
2018
|
+
else if (status === 401) {
|
|
2019
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2020
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2021
|
+
}));
|
|
2022
|
+
}
|
|
2023
|
+
else if (status === 403) {
|
|
2024
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2025
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2026
|
+
}));
|
|
2027
|
+
}
|
|
2028
|
+
else if (status !== 200 && status !== 204) {
|
|
2029
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2030
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2031
|
+
}));
|
|
2032
|
+
}
|
|
2033
|
+
return of(null);
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* Returns a product personalization workflow configuration by storefront product reference.
|
|
2037
|
+
* @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
|
|
2038
|
+
* @param storefrontId Storefront identifier.
|
|
2039
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2040
|
+
* @return Success
|
|
2041
|
+
* @deprecated
|
|
2042
|
+
*/
|
|
2043
|
+
getProductConfig(reference, storefrontId, tenantId) {
|
|
2044
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
2045
|
+
if (reference === undefined || reference === null)
|
|
2046
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
2047
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
2048
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
2049
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
2050
|
+
else
|
|
2051
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2052
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2053
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2054
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2055
|
+
let options_ = {
|
|
2056
|
+
observe: "response",
|
|
2057
|
+
responseType: "blob",
|
|
2058
|
+
headers: new HttpHeaders({
|
|
2059
|
+
"Accept": "text/plain"
|
|
2060
|
+
})
|
|
2061
|
+
};
|
|
2062
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2063
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2064
|
+
})).pipe(mergeMap((response_) => {
|
|
2065
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
2066
|
+
})).pipe(catchError((response_) => {
|
|
2067
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2068
|
+
try {
|
|
2069
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
2070
|
+
}
|
|
2071
|
+
catch (e) {
|
|
2072
|
+
return throwError(e);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
else
|
|
2076
|
+
return throwError(response_);
|
|
2077
|
+
}));
|
|
2078
|
+
}
|
|
2079
|
+
processGetProductConfig(response) {
|
|
2080
|
+
const status = response.status;
|
|
2081
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2082
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2083
|
+
let _headers = {};
|
|
2084
|
+
if (response.headers) {
|
|
2085
|
+
for (let key of response.headers.keys()) {
|
|
2086
|
+
_headers[key] = response.headers.get(key);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
if (status === 200) {
|
|
2090
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2091
|
+
let result200 = null;
|
|
2092
|
+
result200 = _responseText === "" ? null : _responseText;
|
|
2093
|
+
return of(result200);
|
|
2094
|
+
}));
|
|
2095
|
+
}
|
|
2096
|
+
else if (status === 404) {
|
|
2097
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2098
|
+
let result404 = null;
|
|
2099
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2100
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2101
|
+
}));
|
|
2102
|
+
}
|
|
2103
|
+
else if (status === 409) {
|
|
2104
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2105
|
+
let result409 = null;
|
|
2106
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2107
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2108
|
+
}));
|
|
2109
|
+
}
|
|
2110
|
+
else if (status === 401) {
|
|
2111
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2112
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2113
|
+
}));
|
|
2114
|
+
}
|
|
2115
|
+
else if (status === 403) {
|
|
2116
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2117
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2118
|
+
}));
|
|
2119
|
+
}
|
|
2120
|
+
else if (status !== 200 && status !== 204) {
|
|
2121
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2122
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2123
|
+
}));
|
|
2124
|
+
}
|
|
2125
|
+
return of(null);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
ProductReferencesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductReferencesApiClient_Factory() { return new ProductReferencesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductReferencesApiClient, providedIn: "root" });
|
|
2129
|
+
ProductReferencesApiClient.decorators = [
|
|
2130
|
+
{ type: Injectable, args: [{
|
|
2131
|
+
providedIn: 'root'
|
|
2132
|
+
},] }
|
|
2133
|
+
];
|
|
2134
|
+
ProductReferencesApiClient.ctorParameters = () => [
|
|
2135
|
+
{ type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
|
|
2136
|
+
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
2137
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
2138
|
+
];
|
|
2139
|
+
class ProductsApiClient extends ApiClientBase {
|
|
2140
|
+
constructor(configuration, http, baseUrl) {
|
|
2141
|
+
super(configuration);
|
|
2142
|
+
this.jsonParseReviver = undefined;
|
|
2143
|
+
this.http = http;
|
|
2144
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Returns all products, relevant to the specified query parameters.
|
|
2148
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
2149
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
2150
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
2151
|
+
* @param search (optional) Search string for partial match.
|
|
2152
|
+
* @param sku (optional) SKU of linked ecommerce product.
|
|
2153
|
+
* @param tags (optional) List of tags that product should have.
|
|
2154
|
+
* @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
|
|
2155
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2156
|
+
* @return Success
|
|
2157
|
+
*/
|
|
2158
|
+
getAllProducts(skip, take, sorting, search, sku, tags, customFields, tenantId) {
|
|
2159
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products?";
|
|
2160
|
+
if (skip !== undefined && skip !== null)
|
|
2161
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
2162
|
+
if (take !== undefined && take !== null)
|
|
2163
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
2164
|
+
if (sorting !== undefined && sorting !== null)
|
|
2165
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
2166
|
+
if (search !== undefined && search !== null)
|
|
2167
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
2168
|
+
if (sku !== undefined && sku !== null)
|
|
2169
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
2170
|
+
if (tags !== undefined && tags !== null)
|
|
2171
|
+
tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
|
|
2172
|
+
if (customFields !== undefined && customFields !== null)
|
|
2173
|
+
url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
|
|
2174
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2175
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2176
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2177
|
+
let options_ = {
|
|
2178
|
+
observe: "response",
|
|
2179
|
+
responseType: "blob",
|
|
2180
|
+
headers: new HttpHeaders({
|
|
2181
|
+
"Accept": "application/json"
|
|
2182
|
+
})
|
|
2183
|
+
};
|
|
2184
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2185
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2186
|
+
})).pipe(mergeMap((response_) => {
|
|
2187
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProducts(r));
|
|
2188
|
+
})).pipe(catchError((response_) => {
|
|
2189
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2190
|
+
try {
|
|
2191
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProducts(r));
|
|
2192
|
+
}
|
|
2193
|
+
catch (e) {
|
|
2194
|
+
return throwError(e);
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
else
|
|
2198
|
+
return throwError(response_);
|
|
2199
|
+
}));
|
|
2200
|
+
}
|
|
2201
|
+
processGetAllProducts(response) {
|
|
2202
|
+
const status = response.status;
|
|
2203
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2204
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2205
|
+
let _headers = {};
|
|
2206
|
+
if (response.headers) {
|
|
2207
|
+
for (let key of response.headers.keys()) {
|
|
2208
|
+
_headers[key] = response.headers.get(key);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
if (status === 200) {
|
|
2212
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2213
|
+
let result200 = null;
|
|
2214
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2215
|
+
return of(result200);
|
|
2216
|
+
}));
|
|
2217
|
+
}
|
|
2218
|
+
else if (status === 401) {
|
|
2219
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2220
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2221
|
+
}));
|
|
2222
|
+
}
|
|
2223
|
+
else if (status === 403) {
|
|
2224
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2225
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2226
|
+
}));
|
|
2227
|
+
}
|
|
2228
|
+
else if (status !== 200 && status !== 204) {
|
|
2229
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2230
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2231
|
+
}));
|
|
2232
|
+
}
|
|
2233
|
+
return of(null);
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Returns a product by identifier.
|
|
2237
|
+
* @param id Product identifier.
|
|
2238
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2239
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2240
|
+
* @return Success
|
|
2241
|
+
*/
|
|
2242
|
+
getProduct(id, productVersionId, tenantId) {
|
|
2243
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}?";
|
|
2244
|
+
if (id === undefined || id === null)
|
|
2245
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2246
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2247
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2248
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2249
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2250
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2251
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2252
|
+
let options_ = {
|
|
2253
|
+
observe: "response",
|
|
2254
|
+
responseType: "blob",
|
|
2255
|
+
headers: new HttpHeaders({
|
|
2256
|
+
"Accept": "application/json"
|
|
2257
|
+
})
|
|
2258
|
+
};
|
|
2259
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2260
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2261
|
+
})).pipe(mergeMap((response_) => {
|
|
2262
|
+
return this.transformResult(url_, response_, (r) => this.processGetProduct(r));
|
|
2263
|
+
})).pipe(catchError((response_) => {
|
|
2264
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2265
|
+
try {
|
|
2266
|
+
return this.transformResult(url_, response_, (r) => this.processGetProduct(r));
|
|
2267
|
+
}
|
|
2268
|
+
catch (e) {
|
|
2269
|
+
return throwError(e);
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
else
|
|
2273
|
+
return throwError(response_);
|
|
2274
|
+
}));
|
|
2275
|
+
}
|
|
2276
|
+
processGetProduct(response) {
|
|
2277
|
+
const status = response.status;
|
|
2278
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2279
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2280
|
+
let _headers = {};
|
|
2281
|
+
if (response.headers) {
|
|
2282
|
+
for (let key of response.headers.keys()) {
|
|
2283
|
+
_headers[key] = response.headers.get(key);
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
if (status === 200) {
|
|
2287
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2288
|
+
let result200 = null;
|
|
2289
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2290
|
+
return of(result200);
|
|
2291
|
+
}));
|
|
2292
|
+
}
|
|
2293
|
+
else if (status === 404) {
|
|
2294
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2295
|
+
let result404 = null;
|
|
2296
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2297
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2298
|
+
}));
|
|
2299
|
+
}
|
|
2300
|
+
else if (status === 409) {
|
|
2301
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2302
|
+
let result409 = null;
|
|
2303
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2304
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2305
|
+
}));
|
|
2306
|
+
}
|
|
2307
|
+
else if (status === 401) {
|
|
2308
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2309
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2310
|
+
}));
|
|
2311
|
+
}
|
|
2312
|
+
else if (status === 403) {
|
|
2313
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2314
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2315
|
+
}));
|
|
2316
|
+
}
|
|
2317
|
+
else if (status !== 200 && status !== 204) {
|
|
2318
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2319
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2320
|
+
}));
|
|
2321
|
+
}
|
|
2322
|
+
return of(null);
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Returns a product summary by product identifier.
|
|
2326
|
+
* @param id Product identifier.
|
|
2327
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2328
|
+
* @param productLinkId (optional) Product link identifier.
|
|
2329
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
2330
|
+
* @param sku (optional) Product variant SKU.
|
|
2331
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2332
|
+
* @return Success
|
|
2333
|
+
*/
|
|
2334
|
+
getProductSummary(id, productVersionId, productLinkId, productVariantId, sku, tenantId) {
|
|
2335
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/summary?";
|
|
2336
|
+
if (id === undefined || id === null)
|
|
2337
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2338
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2339
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2340
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2341
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
2342
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
2343
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
2344
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
2345
|
+
if (sku !== undefined && sku !== null)
|
|
2346
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
2347
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2348
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2349
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2350
|
+
let options_ = {
|
|
2351
|
+
observe: "response",
|
|
2352
|
+
responseType: "blob",
|
|
2353
|
+
headers: new HttpHeaders({
|
|
2354
|
+
"Accept": "application/json"
|
|
2355
|
+
})
|
|
2356
|
+
};
|
|
2357
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2358
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2359
|
+
})).pipe(mergeMap((response_) => {
|
|
2360
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
2361
|
+
})).pipe(catchError((response_) => {
|
|
2362
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2363
|
+
try {
|
|
2364
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
|
|
2365
|
+
}
|
|
2366
|
+
catch (e) {
|
|
2367
|
+
return throwError(e);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
else
|
|
2371
|
+
return throwError(response_);
|
|
2372
|
+
}));
|
|
2373
|
+
}
|
|
2374
|
+
processGetProductSummary(response) {
|
|
2375
|
+
const status = response.status;
|
|
2376
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2377
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2378
|
+
let _headers = {};
|
|
2379
|
+
if (response.headers) {
|
|
2380
|
+
for (let key of response.headers.keys()) {
|
|
2381
|
+
_headers[key] = response.headers.get(key);
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
if (status === 200) {
|
|
2385
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2386
|
+
let result200 = null;
|
|
2387
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2388
|
+
return of(result200);
|
|
2389
|
+
}));
|
|
2390
|
+
}
|
|
2391
|
+
else if (status === 404) {
|
|
2392
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2393
|
+
let result404 = null;
|
|
2394
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2395
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2396
|
+
}));
|
|
2397
|
+
}
|
|
2398
|
+
else if (status === 409) {
|
|
2399
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2400
|
+
let result409 = null;
|
|
2401
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2402
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2403
|
+
}));
|
|
2404
|
+
}
|
|
2405
|
+
else if (status === 401) {
|
|
2406
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2407
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2408
|
+
}));
|
|
2409
|
+
}
|
|
2410
|
+
else if (status === 403) {
|
|
2411
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2412
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2413
|
+
}));
|
|
2414
|
+
}
|
|
2415
|
+
else if (status !== 200 && status !== 204) {
|
|
2416
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2417
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2418
|
+
}));
|
|
2419
|
+
}
|
|
2420
|
+
return of(null);
|
|
2421
|
+
}
|
|
2422
|
+
/**
|
|
2423
|
+
* Returns a list of product options.
|
|
2424
|
+
* @param id Product identifier.
|
|
2425
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2426
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2427
|
+
* @return Success
|
|
2428
|
+
*/
|
|
2429
|
+
getProductOptions(id, productVersionId, tenantId) {
|
|
2430
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/options?";
|
|
2431
|
+
if (id === undefined || id === null)
|
|
2432
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2433
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2434
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2435
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2436
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2437
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2438
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2439
|
+
let options_ = {
|
|
2440
|
+
observe: "response",
|
|
2441
|
+
responseType: "blob",
|
|
2442
|
+
headers: new HttpHeaders({
|
|
2443
|
+
"Accept": "application/json"
|
|
2444
|
+
})
|
|
2445
|
+
};
|
|
2446
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2447
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2448
|
+
})).pipe(mergeMap((response_) => {
|
|
2449
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductOptions(r));
|
|
2450
|
+
})).pipe(catchError((response_) => {
|
|
2451
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2452
|
+
try {
|
|
2453
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductOptions(r));
|
|
2454
|
+
}
|
|
2455
|
+
catch (e) {
|
|
2456
|
+
return throwError(e);
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
else
|
|
2460
|
+
return throwError(response_);
|
|
2461
|
+
}));
|
|
2462
|
+
}
|
|
2463
|
+
processGetProductOptions(response) {
|
|
2464
|
+
const status = response.status;
|
|
2465
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2466
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2467
|
+
let _headers = {};
|
|
2468
|
+
if (response.headers) {
|
|
2469
|
+
for (let key of response.headers.keys()) {
|
|
2470
|
+
_headers[key] = response.headers.get(key);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
if (status === 200) {
|
|
2474
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2475
|
+
let result200 = null;
|
|
2476
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2477
|
+
return of(result200);
|
|
2478
|
+
}));
|
|
2479
|
+
}
|
|
2480
|
+
else if (status === 404) {
|
|
2481
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2482
|
+
let result404 = null;
|
|
2483
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2484
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2485
|
+
}));
|
|
2486
|
+
}
|
|
2487
|
+
else if (status === 409) {
|
|
2488
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2489
|
+
let result409 = null;
|
|
2490
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2491
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2492
|
+
}));
|
|
2493
|
+
}
|
|
2494
|
+
else if (status === 401) {
|
|
2495
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2496
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2497
|
+
}));
|
|
2498
|
+
}
|
|
2499
|
+
else if (status === 403) {
|
|
2500
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2501
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2502
|
+
}));
|
|
2503
|
+
}
|
|
2504
|
+
else if (status !== 200 && status !== 204) {
|
|
2505
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2506
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2507
|
+
}));
|
|
2508
|
+
}
|
|
2509
|
+
return of(null);
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Returns a list of product options for all products.
|
|
2513
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2514
|
+
* @return Success
|
|
2515
|
+
*/
|
|
2516
|
+
getAllProductOptions(tenantId) {
|
|
2517
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/options?";
|
|
2518
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2519
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2520
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2521
|
+
let options_ = {
|
|
2522
|
+
observe: "response",
|
|
2523
|
+
responseType: "blob",
|
|
2524
|
+
headers: new HttpHeaders({
|
|
2525
|
+
"Accept": "application/json"
|
|
2526
|
+
})
|
|
2527
|
+
};
|
|
2528
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2529
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2530
|
+
})).pipe(mergeMap((response_) => {
|
|
2531
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductOptions(r));
|
|
2532
|
+
})).pipe(catchError((response_) => {
|
|
2533
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2534
|
+
try {
|
|
2535
|
+
return this.transformResult(url_, response_, (r) => this.processGetAllProductOptions(r));
|
|
2536
|
+
}
|
|
2537
|
+
catch (e) {
|
|
2538
|
+
return throwError(e);
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
else
|
|
2542
|
+
return throwError(response_);
|
|
2543
|
+
}));
|
|
2544
|
+
}
|
|
2545
|
+
processGetAllProductOptions(response) {
|
|
2546
|
+
const status = response.status;
|
|
2547
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2548
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2549
|
+
let _headers = {};
|
|
2550
|
+
if (response.headers) {
|
|
2551
|
+
for (let key of response.headers.keys()) {
|
|
2552
|
+
_headers[key] = response.headers.get(key);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
if (status === 200) {
|
|
2556
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2557
|
+
let result200 = null;
|
|
2558
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2559
|
+
return of(result200);
|
|
2560
|
+
}));
|
|
2561
|
+
}
|
|
2562
|
+
else if (status === 401) {
|
|
2563
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2564
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2565
|
+
}));
|
|
2566
|
+
}
|
|
2567
|
+
else if (status === 403) {
|
|
2568
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2569
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2570
|
+
}));
|
|
2571
|
+
}
|
|
2572
|
+
else if (status !== 200 && status !== 204) {
|
|
2573
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2574
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2575
|
+
}));
|
|
2576
|
+
}
|
|
2577
|
+
return of(null);
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Returns a list of product links.
|
|
2581
|
+
* @param id Product identifier.
|
|
2582
|
+
* @param productVersionId (optional)
|
|
2583
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
2584
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
2585
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
2586
|
+
* @param search (optional) Search string for partial match.
|
|
2587
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2588
|
+
* @return Success
|
|
2589
|
+
*/
|
|
2590
|
+
getProductLinks(id, productVersionId, skip, take, sorting, search, tenantId) {
|
|
2591
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/links?";
|
|
2592
|
+
if (id === undefined || id === null)
|
|
2593
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2594
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2595
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2596
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2597
|
+
if (skip !== undefined && skip !== null)
|
|
2598
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
2599
|
+
if (take !== undefined && take !== null)
|
|
2600
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
2601
|
+
if (sorting !== undefined && sorting !== null)
|
|
2602
|
+
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
2603
|
+
if (search !== undefined && search !== null)
|
|
2604
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
2605
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2606
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2607
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2608
|
+
let options_ = {
|
|
2609
|
+
observe: "response",
|
|
2610
|
+
responseType: "blob",
|
|
2611
|
+
headers: new HttpHeaders({
|
|
2612
|
+
"Accept": "application/json"
|
|
2613
|
+
})
|
|
2614
|
+
};
|
|
2615
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2616
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2617
|
+
})).pipe(mergeMap((response_) => {
|
|
2618
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLinks(r));
|
|
2619
|
+
})).pipe(catchError((response_) => {
|
|
2620
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2621
|
+
try {
|
|
2622
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLinks(r));
|
|
2623
|
+
}
|
|
2624
|
+
catch (e) {
|
|
2625
|
+
return throwError(e);
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
else
|
|
2629
|
+
return throwError(response_);
|
|
2630
|
+
}));
|
|
2631
|
+
}
|
|
2632
|
+
processGetProductLinks(response) {
|
|
2633
|
+
const status = response.status;
|
|
2634
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2635
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2636
|
+
let _headers = {};
|
|
2637
|
+
if (response.headers) {
|
|
2638
|
+
for (let key of response.headers.keys()) {
|
|
2639
|
+
_headers[key] = response.headers.get(key);
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
if (status === 200) {
|
|
2643
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2644
|
+
let result200 = null;
|
|
2645
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2646
|
+
return of(result200);
|
|
2647
|
+
}));
|
|
2648
|
+
}
|
|
2649
|
+
else if (status === 404) {
|
|
2650
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2651
|
+
let result404 = null;
|
|
2652
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2653
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2654
|
+
}));
|
|
2655
|
+
}
|
|
2656
|
+
else if (status === 409) {
|
|
2657
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2658
|
+
let result409 = null;
|
|
2659
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2660
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2661
|
+
}));
|
|
2662
|
+
}
|
|
2663
|
+
else if (status === 401) {
|
|
2664
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2665
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2666
|
+
}));
|
|
2667
|
+
}
|
|
2668
|
+
else if (status === 403) {
|
|
2669
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2670
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2671
|
+
}));
|
|
2672
|
+
}
|
|
2673
|
+
else if (status !== 200 && status !== 204) {
|
|
2674
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2675
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2676
|
+
}));
|
|
2677
|
+
}
|
|
2678
|
+
return of(null);
|
|
2679
|
+
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Returns a product link.
|
|
2682
|
+
* @param id Product identifier.
|
|
2683
|
+
* @param productLinkId Product link identifier.
|
|
2684
|
+
* @param productVersionId (optional)
|
|
2685
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2686
|
+
* @return Success
|
|
2687
|
+
*/
|
|
2688
|
+
getProductLink(id, productLinkId, productVersionId, tenantId) {
|
|
2689
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/links/{productLinkId}?";
|
|
2690
|
+
if (id === undefined || id === null)
|
|
2691
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2692
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2693
|
+
if (productLinkId === undefined || productLinkId === null)
|
|
2694
|
+
throw new Error("The parameter 'productLinkId' must be defined.");
|
|
2695
|
+
url_ = url_.replace("{productLinkId}", encodeURIComponent("" + productLinkId));
|
|
2696
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2697
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2698
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2699
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2700
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2701
|
+
let options_ = {
|
|
2702
|
+
observe: "response",
|
|
2703
|
+
responseType: "blob",
|
|
2704
|
+
headers: new HttpHeaders({
|
|
2705
|
+
"Accept": "application/json"
|
|
2706
|
+
})
|
|
2707
|
+
};
|
|
2708
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2709
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2710
|
+
})).pipe(mergeMap((response_) => {
|
|
2711
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
2712
|
+
})).pipe(catchError((response_) => {
|
|
2713
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2714
|
+
try {
|
|
2715
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductLink(r));
|
|
2716
|
+
}
|
|
2717
|
+
catch (e) {
|
|
2718
|
+
return throwError(e);
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
else
|
|
2722
|
+
return throwError(response_);
|
|
2723
|
+
}));
|
|
2724
|
+
}
|
|
2725
|
+
processGetProductLink(response) {
|
|
2726
|
+
const status = response.status;
|
|
2727
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2728
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2729
|
+
let _headers = {};
|
|
2730
|
+
if (response.headers) {
|
|
2731
|
+
for (let key of response.headers.keys()) {
|
|
2732
|
+
_headers[key] = response.headers.get(key);
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
if (status === 200) {
|
|
2736
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2737
|
+
let result200 = null;
|
|
2738
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2739
|
+
return of(result200);
|
|
2740
|
+
}));
|
|
2741
|
+
}
|
|
2742
|
+
else if (status === 404) {
|
|
2743
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2744
|
+
let result404 = null;
|
|
2745
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2746
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2747
|
+
}));
|
|
2748
|
+
}
|
|
2749
|
+
else if (status === 409) {
|
|
2750
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2751
|
+
let result409 = null;
|
|
2752
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2753
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2754
|
+
}));
|
|
2755
|
+
}
|
|
2756
|
+
else if (status === 401) {
|
|
2757
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2758
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2759
|
+
}));
|
|
2760
|
+
}
|
|
2761
|
+
else if (status === 403) {
|
|
2762
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2763
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2764
|
+
}));
|
|
2765
|
+
}
|
|
2766
|
+
else if (status !== 200 && status !== 204) {
|
|
2767
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2768
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2769
|
+
}));
|
|
2770
|
+
}
|
|
2771
|
+
return of(null);
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Returns a list of product variants.
|
|
2775
|
+
* @param id Product identifier.
|
|
2776
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2777
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
2778
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
2779
|
+
* @param options (optional) Defines options filter e.g.: "{ "opt1_id": "opt1_val1_id, opt1_val2_id", "opt2_id": "opt2_val1_id" }".
|
|
2780
|
+
* @param productFilterId (optional) Defines special filter based on product filter with specified identifier.
|
|
2781
|
+
* @param takeAvailableOnly (optional) Defines special filter for available product variants.
|
|
2782
|
+
* @param sku (optional) SKU of linked ecommerce product.
|
|
2783
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2784
|
+
* @return Success
|
|
2785
|
+
*/
|
|
2786
|
+
getProductVariants(id, productVersionId, skip, take, options, productFilterId, takeAvailableOnly, sku, tenantId) {
|
|
2787
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/variants?";
|
|
2788
|
+
if (id === undefined || id === null)
|
|
2789
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2790
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2791
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2792
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2793
|
+
if (skip !== undefined && skip !== null)
|
|
2794
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
2795
|
+
if (take !== undefined && take !== null)
|
|
2796
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
2797
|
+
if (options !== undefined && options !== null)
|
|
2798
|
+
url_ += "options=" + encodeURIComponent("" + options) + "&";
|
|
2799
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
2800
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
2801
|
+
if (takeAvailableOnly !== undefined && takeAvailableOnly !== null)
|
|
2802
|
+
url_ += "takeAvailableOnly=" + encodeURIComponent("" + takeAvailableOnly) + "&";
|
|
2803
|
+
if (sku !== undefined && sku !== null)
|
|
2804
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
2805
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2806
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2807
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2808
|
+
let options_ = {
|
|
2809
|
+
observe: "response",
|
|
2810
|
+
responseType: "blob",
|
|
2811
|
+
headers: new HttpHeaders({
|
|
2812
|
+
"Accept": "application/json"
|
|
2813
|
+
})
|
|
2814
|
+
};
|
|
2815
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2816
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2817
|
+
})).pipe(mergeMap((response_) => {
|
|
2818
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariants(r));
|
|
2819
|
+
})).pipe(catchError((response_) => {
|
|
2820
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2821
|
+
try {
|
|
2822
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariants(r));
|
|
2823
|
+
}
|
|
2824
|
+
catch (e) {
|
|
2825
|
+
return throwError(e);
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
else
|
|
2829
|
+
return throwError(response_);
|
|
2830
|
+
}));
|
|
2831
|
+
}
|
|
2832
|
+
processGetProductVariants(response) {
|
|
2833
|
+
const status = response.status;
|
|
2834
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2835
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2836
|
+
let _headers = {};
|
|
2837
|
+
if (response.headers) {
|
|
2838
|
+
for (let key of response.headers.keys()) {
|
|
2839
|
+
_headers[key] = response.headers.get(key);
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
if (status === 200) {
|
|
2843
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2844
|
+
let result200 = null;
|
|
2845
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2846
|
+
return of(result200);
|
|
2847
|
+
}));
|
|
2848
|
+
}
|
|
2849
|
+
else if (status === 404) {
|
|
2850
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2851
|
+
let result404 = null;
|
|
2852
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2853
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2854
|
+
}));
|
|
2855
|
+
}
|
|
2856
|
+
else if (status === 409) {
|
|
2857
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2858
|
+
let result409 = null;
|
|
2859
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2860
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2861
|
+
}));
|
|
2862
|
+
}
|
|
2863
|
+
else if (status === 401) {
|
|
2864
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2865
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2866
|
+
}));
|
|
2867
|
+
}
|
|
2868
|
+
else if (status === 403) {
|
|
2869
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2870
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2871
|
+
}));
|
|
2872
|
+
}
|
|
2873
|
+
else if (status !== 200 && status !== 204) {
|
|
2874
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2875
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2876
|
+
}));
|
|
2877
|
+
}
|
|
2878
|
+
return of(null);
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2881
|
+
* Returns a product variant.
|
|
2882
|
+
* @param id Product identifier.
|
|
2883
|
+
* @param productVariantId Product variant identifier.
|
|
2884
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2885
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2886
|
+
* @return Success
|
|
2887
|
+
*/
|
|
2888
|
+
getProductVariant(id, productVariantId, productVersionId, tenantId) {
|
|
2889
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/variants/{productVariantId}?";
|
|
2890
|
+
if (id === undefined || id === null)
|
|
2891
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2892
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2893
|
+
if (productVariantId === undefined || productVariantId === null)
|
|
2894
|
+
throw new Error("The parameter 'productVariantId' must be defined.");
|
|
2895
|
+
url_ = url_.replace("{productVariantId}", encodeURIComponent("" + productVariantId));
|
|
2896
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2897
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2898
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2899
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2900
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2901
|
+
let options_ = {
|
|
2902
|
+
observe: "response",
|
|
2903
|
+
responseType: "blob",
|
|
2904
|
+
headers: new HttpHeaders({
|
|
2905
|
+
"Accept": "application/json"
|
|
2906
|
+
})
|
|
2907
|
+
};
|
|
2908
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2909
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
2910
|
+
})).pipe(mergeMap((response_) => {
|
|
2911
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariant(r));
|
|
2912
|
+
})).pipe(catchError((response_) => {
|
|
2913
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2914
|
+
try {
|
|
2915
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariant(r));
|
|
2916
|
+
}
|
|
2917
|
+
catch (e) {
|
|
2918
|
+
return throwError(e);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
else
|
|
2922
|
+
return throwError(response_);
|
|
2923
|
+
}));
|
|
2924
|
+
}
|
|
2925
|
+
processGetProductVariant(response) {
|
|
2926
|
+
const status = response.status;
|
|
2927
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2928
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2929
|
+
let _headers = {};
|
|
2930
|
+
if (response.headers) {
|
|
2931
|
+
for (let key of response.headers.keys()) {
|
|
2932
|
+
_headers[key] = response.headers.get(key);
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
if (status === 200) {
|
|
2936
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2937
|
+
let result200 = null;
|
|
2938
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2939
|
+
return of(result200);
|
|
2940
|
+
}));
|
|
2941
|
+
}
|
|
2942
|
+
else if (status === 404) {
|
|
2943
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2944
|
+
let result404 = null;
|
|
2945
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2946
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
2947
|
+
}));
|
|
2948
|
+
}
|
|
2949
|
+
else if (status === 409) {
|
|
2950
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2951
|
+
let result409 = null;
|
|
2952
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2953
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2954
|
+
}));
|
|
2955
|
+
}
|
|
2956
|
+
else if (status === 401) {
|
|
2957
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2958
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2959
|
+
}));
|
|
2960
|
+
}
|
|
2961
|
+
else if (status === 403) {
|
|
2962
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2963
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2964
|
+
}));
|
|
2965
|
+
}
|
|
2966
|
+
else if (status !== 200 && status !== 204) {
|
|
2967
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2968
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2969
|
+
}));
|
|
2970
|
+
}
|
|
2971
|
+
return of(null);
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Returns a list of product variant designs.
|
|
2975
|
+
* @param id Product identifier.
|
|
2976
|
+
* @param productVersionId (optional) Product version identifier.
|
|
2977
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
2978
|
+
* @param search (optional) Search string for design name partial match.
|
|
2979
|
+
* @param designCustomFields (optional) Custom attributes dictionary filter for designs. For example: {"public":"true","name":"my item"}
|
|
2980
|
+
* @param designPath (optional) Path filter for designs. Subfolders included by default.
|
|
2981
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
2982
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
2983
|
+
* @param options (optional) Defines options filter e.g.: "{ "opt1_id": "opt1_val1_id, opt1_val2_id", "opt2_id": "opt2_val1_id" }".
|
|
2984
|
+
* @param productFilterId (optional) Defines special filter based on product filter with specified identifier.
|
|
2985
|
+
* @param takeAvailableOnly (optional) Defines special filter for available product variants.
|
|
2986
|
+
* @param sku (optional) SKU of linked ecommerce product.
|
|
2987
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2988
|
+
* @return Success
|
|
2989
|
+
*/
|
|
2990
|
+
getProductVariantDesigns(id, productVersionId, productVariantId, search, designCustomFields, designPath, skip, take, options, productFilterId, takeAvailableOnly, sku, tenantId) {
|
|
2991
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/variant-designs?";
|
|
2992
|
+
if (id === undefined || id === null)
|
|
2993
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
2994
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
2995
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
2996
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
2997
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
2998
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
2999
|
+
if (search !== undefined && search !== null)
|
|
3000
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
3001
|
+
if (designCustomFields !== undefined && designCustomFields !== null)
|
|
3002
|
+
url_ += "designCustomFields=" + encodeURIComponent("" + designCustomFields) + "&";
|
|
3003
|
+
if (designPath !== undefined && designPath !== null)
|
|
3004
|
+
url_ += "designPath=" + encodeURIComponent("" + designPath) + "&";
|
|
3005
|
+
if (skip !== undefined && skip !== null)
|
|
3006
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
3007
|
+
if (take !== undefined && take !== null)
|
|
3008
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
3009
|
+
if (options !== undefined && options !== null)
|
|
3010
|
+
url_ += "options=" + encodeURIComponent("" + options) + "&";
|
|
3011
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
3012
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
3013
|
+
if (takeAvailableOnly !== undefined && takeAvailableOnly !== null)
|
|
3014
|
+
url_ += "takeAvailableOnly=" + encodeURIComponent("" + takeAvailableOnly) + "&";
|
|
3015
|
+
if (sku !== undefined && sku !== null)
|
|
3016
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
3017
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3018
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3019
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3020
|
+
let options_ = {
|
|
3021
|
+
observe: "response",
|
|
3022
|
+
responseType: "blob",
|
|
3023
|
+
headers: new HttpHeaders({
|
|
3024
|
+
"Accept": "application/json"
|
|
3025
|
+
})
|
|
3026
|
+
};
|
|
3027
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3028
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3029
|
+
})).pipe(mergeMap((response_) => {
|
|
3030
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDesigns(r));
|
|
3031
|
+
})).pipe(catchError((response_) => {
|
|
3032
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3033
|
+
try {
|
|
3034
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDesigns(r));
|
|
3035
|
+
}
|
|
3036
|
+
catch (e) {
|
|
3037
|
+
return throwError(e);
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
else
|
|
3041
|
+
return throwError(response_);
|
|
3042
|
+
}));
|
|
3043
|
+
}
|
|
3044
|
+
processGetProductVariantDesigns(response) {
|
|
3045
|
+
const status = response.status;
|
|
3046
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3047
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3048
|
+
let _headers = {};
|
|
3049
|
+
if (response.headers) {
|
|
3050
|
+
for (let key of response.headers.keys()) {
|
|
3051
|
+
_headers[key] = response.headers.get(key);
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
if (status === 200) {
|
|
3055
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3056
|
+
let result200 = null;
|
|
3057
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3058
|
+
return of(result200);
|
|
3059
|
+
}));
|
|
3060
|
+
}
|
|
3061
|
+
else if (status === 404) {
|
|
3062
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3063
|
+
let result404 = null;
|
|
3064
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3065
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3066
|
+
}));
|
|
3067
|
+
}
|
|
3068
|
+
else if (status === 409) {
|
|
3069
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3070
|
+
let result409 = null;
|
|
3071
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3072
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3073
|
+
}));
|
|
3074
|
+
}
|
|
3075
|
+
else if (status === 401) {
|
|
3076
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3077
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3078
|
+
}));
|
|
3079
|
+
}
|
|
3080
|
+
else if (status === 403) {
|
|
3081
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3082
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3083
|
+
}));
|
|
3084
|
+
}
|
|
3085
|
+
else if (status !== 200 && status !== 204) {
|
|
3086
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3087
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3088
|
+
}));
|
|
3089
|
+
}
|
|
3090
|
+
return of(null);
|
|
3091
|
+
}
|
|
3092
|
+
/**
|
|
3093
|
+
* Returns a list of product variant mockups.
|
|
3094
|
+
* @param id Product identifier.
|
|
3095
|
+
* @param productVersionId (optional) Product version identifier.
|
|
3096
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
3097
|
+
* @param search (optional) Search string for design name partial match.
|
|
3098
|
+
* @param mockupCustomFields (optional) Custom attributes dictionary filter for mockups. For example: {"public":"true","name":"my item"}
|
|
3099
|
+
* @param mockupPath (optional) Path filter for mockups. Subfolders included by default.
|
|
3100
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
3101
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
3102
|
+
* @param options (optional) Defines options filter e.g.: "{ "opt1_id": "opt1_val1_id, opt1_val2_id", "opt2_id": "opt2_val1_id" }".
|
|
3103
|
+
* @param productFilterId (optional) Defines special filter based on product filter with specified identifier.
|
|
3104
|
+
* @param takeAvailableOnly (optional) Defines special filter for available product variants.
|
|
3105
|
+
* @param sku (optional) SKU of linked ecommerce product.
|
|
3106
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3107
|
+
* @return Success
|
|
3108
|
+
*/
|
|
3109
|
+
getProductVariantMockups(id, productVersionId, productVariantId, search, mockupCustomFields, mockupPath, skip, take, options, productFilterId, takeAvailableOnly, sku, tenantId) {
|
|
3110
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/variant-mockups?";
|
|
3111
|
+
if (id === undefined || id === null)
|
|
3112
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3113
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3114
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
3115
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
3116
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
3117
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
3118
|
+
if (search !== undefined && search !== null)
|
|
3119
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
3120
|
+
if (mockupCustomFields !== undefined && mockupCustomFields !== null)
|
|
3121
|
+
url_ += "mockupCustomFields=" + encodeURIComponent("" + mockupCustomFields) + "&";
|
|
3122
|
+
if (mockupPath !== undefined && mockupPath !== null)
|
|
3123
|
+
url_ += "mockupPath=" + encodeURIComponent("" + mockupPath) + "&";
|
|
3124
|
+
if (skip !== undefined && skip !== null)
|
|
3125
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
3126
|
+
if (take !== undefined && take !== null)
|
|
3127
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
3128
|
+
if (options !== undefined && options !== null)
|
|
3129
|
+
url_ += "options=" + encodeURIComponent("" + options) + "&";
|
|
3130
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
3131
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
3132
|
+
if (takeAvailableOnly !== undefined && takeAvailableOnly !== null)
|
|
3133
|
+
url_ += "takeAvailableOnly=" + encodeURIComponent("" + takeAvailableOnly) + "&";
|
|
3134
|
+
if (sku !== undefined && sku !== null)
|
|
3135
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
3136
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3137
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3138
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3139
|
+
let options_ = {
|
|
3140
|
+
observe: "response",
|
|
3141
|
+
responseType: "blob",
|
|
3142
|
+
headers: new HttpHeaders({
|
|
3143
|
+
"Accept": "application/json"
|
|
3144
|
+
})
|
|
3145
|
+
};
|
|
3146
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
3147
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
3148
|
+
})).pipe(mergeMap((response_) => {
|
|
3149
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantMockups(r));
|
|
3150
|
+
})).pipe(catchError((response_) => {
|
|
3151
|
+
if (response_ instanceof HttpResponseBase) {
|
|
3152
|
+
try {
|
|
3153
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantMockups(r));
|
|
3154
|
+
}
|
|
3155
|
+
catch (e) {
|
|
3156
|
+
return throwError(e);
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
else
|
|
3160
|
+
return throwError(response_);
|
|
3161
|
+
}));
|
|
3162
|
+
}
|
|
3163
|
+
processGetProductVariantMockups(response) {
|
|
3164
|
+
const status = response.status;
|
|
3165
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
3166
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
3167
|
+
let _headers = {};
|
|
3168
|
+
if (response.headers) {
|
|
3169
|
+
for (let key of response.headers.keys()) {
|
|
3170
|
+
_headers[key] = response.headers.get(key);
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
if (status === 200) {
|
|
3174
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3175
|
+
let result200 = null;
|
|
3176
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3177
|
+
return of(result200);
|
|
3178
|
+
}));
|
|
3179
|
+
}
|
|
3180
|
+
else if (status === 404) {
|
|
3181
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3182
|
+
let result404 = null;
|
|
3183
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3184
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3185
|
+
}));
|
|
3186
|
+
}
|
|
3187
|
+
else if (status === 409) {
|
|
3188
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3189
|
+
let result409 = null;
|
|
3190
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3191
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3192
|
+
}));
|
|
3193
|
+
}
|
|
596
3194
|
else if (status === 401) {
|
|
597
3195
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
598
3196
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -611,21 +3209,49 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
611
3209
|
return of(null);
|
|
612
3210
|
}
|
|
613
3211
|
/**
|
|
614
|
-
*
|
|
615
|
-
* @param
|
|
616
|
-
* @param
|
|
3212
|
+
* Returns a list of product variant documents.
|
|
3213
|
+
* @param id Product identifier.
|
|
3214
|
+
* @param productVersionId (optional) Product version identifier.
|
|
3215
|
+
* @param productVariantId (optional) Product variant identifier.
|
|
3216
|
+
* @param search (optional) Search string for document name partial match.
|
|
3217
|
+
* @param documentCustomFields (optional) Custom attributes dictionary filter for documents. For example: {"public":"true","name":"my item"}
|
|
3218
|
+
* @param documentPath (optional) Path filter for documents. Subfolders included by default.
|
|
3219
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
3220
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
3221
|
+
* @param options (optional) Defines options filter e.g.: "{ "opt1_id": "opt1_val1_id, opt1_val2_id", "opt2_id": "opt2_val1_id" }".
|
|
3222
|
+
* @param productFilterId (optional) Defines special filter based on product filter with specified identifier.
|
|
3223
|
+
* @param takeAvailableOnly (optional) Defines special filter for available product variants.
|
|
3224
|
+
* @param sku (optional) SKU of linked ecommerce product.
|
|
617
3225
|
* @param tenantId (optional) Tenant identifier.
|
|
618
3226
|
* @return Success
|
|
619
3227
|
*/
|
|
620
|
-
|
|
621
|
-
let url_ = this.baseUrl + "/api/storefront/v1/
|
|
622
|
-
if (
|
|
623
|
-
throw new Error("The parameter '
|
|
624
|
-
url_ = url_.replace("{
|
|
625
|
-
if (
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
url_ += "
|
|
3228
|
+
getProductVariantDocuments(id, productVersionId, productVariantId, search, documentCustomFields, documentPath, skip, take, options, productFilterId, takeAvailableOnly, sku, tenantId) {
|
|
3229
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/variant-documents?";
|
|
3230
|
+
if (id === undefined || id === null)
|
|
3231
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3232
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3233
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
3234
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
3235
|
+
if (productVariantId !== undefined && productVariantId !== null)
|
|
3236
|
+
url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
|
|
3237
|
+
if (search !== undefined && search !== null)
|
|
3238
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
3239
|
+
if (documentCustomFields !== undefined && documentCustomFields !== null)
|
|
3240
|
+
url_ += "documentCustomFields=" + encodeURIComponent("" + documentCustomFields) + "&";
|
|
3241
|
+
if (documentPath !== undefined && documentPath !== null)
|
|
3242
|
+
url_ += "documentPath=" + encodeURIComponent("" + documentPath) + "&";
|
|
3243
|
+
if (skip !== undefined && skip !== null)
|
|
3244
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
3245
|
+
if (take !== undefined && take !== null)
|
|
3246
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
3247
|
+
if (options !== undefined && options !== null)
|
|
3248
|
+
url_ += "options=" + encodeURIComponent("" + options) + "&";
|
|
3249
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
3250
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
3251
|
+
if (takeAvailableOnly !== undefined && takeAvailableOnly !== null)
|
|
3252
|
+
url_ += "takeAvailableOnly=" + encodeURIComponent("" + takeAvailableOnly) + "&";
|
|
3253
|
+
if (sku !== undefined && sku !== null)
|
|
3254
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
629
3255
|
if (tenantId !== undefined && tenantId !== null)
|
|
630
3256
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
631
3257
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -633,17 +3259,17 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
633
3259
|
observe: "response",
|
|
634
3260
|
responseType: "blob",
|
|
635
3261
|
headers: new HttpHeaders({
|
|
636
|
-
"Accept": "
|
|
3262
|
+
"Accept": "application/json"
|
|
637
3263
|
})
|
|
638
3264
|
};
|
|
639
3265
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
640
|
-
return this.http.request("
|
|
3266
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
641
3267
|
})).pipe(mergeMap((response_) => {
|
|
642
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3268
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
643
3269
|
})).pipe(catchError((response_) => {
|
|
644
3270
|
if (response_ instanceof HttpResponseBase) {
|
|
645
3271
|
try {
|
|
646
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3272
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductVariantDocuments(r));
|
|
647
3273
|
}
|
|
648
3274
|
catch (e) {
|
|
649
3275
|
return throwError(e);
|
|
@@ -653,7 +3279,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
653
3279
|
return throwError(response_);
|
|
654
3280
|
}));
|
|
655
3281
|
}
|
|
656
|
-
|
|
3282
|
+
processGetProductVariantDocuments(response) {
|
|
657
3283
|
const status = response.status;
|
|
658
3284
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
659
3285
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -677,6 +3303,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
677
3303
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
678
3304
|
}));
|
|
679
3305
|
}
|
|
3306
|
+
else if (status === 409) {
|
|
3307
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3308
|
+
let result409 = null;
|
|
3309
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3310
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3311
|
+
}));
|
|
3312
|
+
}
|
|
680
3313
|
else if (status === 401) {
|
|
681
3314
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
682
3315
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -695,39 +3328,35 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
695
3328
|
return of(null);
|
|
696
3329
|
}
|
|
697
3330
|
/**
|
|
698
|
-
*
|
|
699
|
-
* @param
|
|
700
|
-
* @param
|
|
3331
|
+
* Updates product variant resources.
|
|
3332
|
+
* @param id Product identifier.
|
|
3333
|
+
* @param productVersionId (optional) Product version identifier.
|
|
701
3334
|
* @param tenantId (optional) Tenant identifier.
|
|
702
3335
|
* @return Success
|
|
703
3336
|
*/
|
|
704
|
-
|
|
705
|
-
let url_ = this.baseUrl + "/api/storefront/v1/
|
|
706
|
-
if (
|
|
707
|
-
throw new Error("The parameter '
|
|
708
|
-
url_ = url_.replace("{
|
|
709
|
-
if (
|
|
710
|
-
|
|
711
|
-
else
|
|
712
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
3337
|
+
updateProductVariantResources(id, productVersionId, tenantId) {
|
|
3338
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/update-variant-resources?";
|
|
3339
|
+
if (id === undefined || id === null)
|
|
3340
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3341
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3342
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
3343
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
713
3344
|
if (tenantId !== undefined && tenantId !== null)
|
|
714
3345
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
715
3346
|
url_ = url_.replace(/[?&]$/, "");
|
|
716
3347
|
let options_ = {
|
|
717
3348
|
observe: "response",
|
|
718
3349
|
responseType: "blob",
|
|
719
|
-
headers: new HttpHeaders({
|
|
720
|
-
"Accept": "text/plain"
|
|
721
|
-
})
|
|
3350
|
+
headers: new HttpHeaders({})
|
|
722
3351
|
};
|
|
723
3352
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
724
|
-
return this.http.request("
|
|
3353
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
725
3354
|
})).pipe(mergeMap((response_) => {
|
|
726
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3355
|
+
return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
|
|
727
3356
|
})).pipe(catchError((response_) => {
|
|
728
3357
|
if (response_ instanceof HttpResponseBase) {
|
|
729
3358
|
try {
|
|
730
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3359
|
+
return this.transformResult(url_, response_, (r) => this.processUpdateProductVariantResources(r));
|
|
731
3360
|
}
|
|
732
3361
|
catch (e) {
|
|
733
3362
|
return throwError(e);
|
|
@@ -737,7 +3366,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
737
3366
|
return throwError(response_);
|
|
738
3367
|
}));
|
|
739
3368
|
}
|
|
740
|
-
|
|
3369
|
+
processUpdateProductVariantResources(response) {
|
|
741
3370
|
const status = response.status;
|
|
742
3371
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
743
3372
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -749,9 +3378,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
749
3378
|
}
|
|
750
3379
|
if (status === 200) {
|
|
751
3380
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
752
|
-
|
|
753
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
754
|
-
return of(result200);
|
|
3381
|
+
return of(null);
|
|
755
3382
|
}));
|
|
756
3383
|
}
|
|
757
3384
|
else if (status === 404) {
|
|
@@ -761,6 +3388,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
761
3388
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
762
3389
|
}));
|
|
763
3390
|
}
|
|
3391
|
+
else if (status === 409) {
|
|
3392
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3393
|
+
let result409 = null;
|
|
3394
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3395
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3396
|
+
}));
|
|
3397
|
+
}
|
|
764
3398
|
else if (status === 401) {
|
|
765
3399
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
766
3400
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -779,55 +3413,40 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
779
3413
|
return of(null);
|
|
780
3414
|
}
|
|
781
3415
|
/**
|
|
782
|
-
*
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
785
|
-
* @param storefrontId Storefront identifier.
|
|
786
|
-
* @param storefrontUserId (optional) Storefront user identifier.
|
|
787
|
-
* @param currencyCode (optional) Product cost currency code.
|
|
788
|
-
* @param quantity (optional) Product quantity.
|
|
3416
|
+
* Set product variant price.
|
|
3417
|
+
* @param id Product identifier.
|
|
3418
|
+
* @param productVersionId (optional) Product version identifier.
|
|
789
3419
|
* @param tenantId (optional) Tenant identifier.
|
|
3420
|
+
* @param body (optional) Set product variant price operation parameters.
|
|
790
3421
|
* @return Success
|
|
791
3422
|
*/
|
|
792
|
-
|
|
793
|
-
let url_ = this.baseUrl + "/api/storefront/v1/
|
|
794
|
-
if (
|
|
795
|
-
throw new Error("The parameter '
|
|
796
|
-
url_ = url_.replace("{
|
|
797
|
-
if (
|
|
798
|
-
|
|
799
|
-
else
|
|
800
|
-
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
801
|
-
if (storefrontId === undefined || storefrontId === null)
|
|
802
|
-
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
803
|
-
else
|
|
804
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
805
|
-
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
806
|
-
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
807
|
-
if (currencyCode !== undefined && currencyCode !== null)
|
|
808
|
-
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
809
|
-
if (quantity === null)
|
|
810
|
-
throw new Error("The parameter 'quantity' cannot be null.");
|
|
811
|
-
else if (quantity !== undefined)
|
|
812
|
-
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
3423
|
+
setProductVariantPrice(id, productVersionId, tenantId, body) {
|
|
3424
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/set-variant-price?";
|
|
3425
|
+
if (id === undefined || id === null)
|
|
3426
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3427
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3428
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
3429
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
813
3430
|
if (tenantId !== undefined && tenantId !== null)
|
|
814
3431
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
815
3432
|
url_ = url_.replace(/[?&]$/, "");
|
|
3433
|
+
const content_ = JSON.stringify(body);
|
|
816
3434
|
let options_ = {
|
|
3435
|
+
body: content_,
|
|
817
3436
|
observe: "response",
|
|
818
3437
|
responseType: "blob",
|
|
819
3438
|
headers: new HttpHeaders({
|
|
820
|
-
"
|
|
3439
|
+
"Content-Type": "application/json",
|
|
821
3440
|
})
|
|
822
3441
|
};
|
|
823
3442
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
824
|
-
return this.http.request("
|
|
3443
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
825
3444
|
})).pipe(mergeMap((response_) => {
|
|
826
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3445
|
+
return this.transformResult(url_, response_, (r) => this.processSetProductVariantPrice(r));
|
|
827
3446
|
})).pipe(catchError((response_) => {
|
|
828
3447
|
if (response_ instanceof HttpResponseBase) {
|
|
829
3448
|
try {
|
|
830
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3449
|
+
return this.transformResult(url_, response_, (r) => this.processSetProductVariantPrice(r));
|
|
831
3450
|
}
|
|
832
3451
|
catch (e) {
|
|
833
3452
|
return throwError(e);
|
|
@@ -837,7 +3456,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
837
3456
|
return throwError(response_);
|
|
838
3457
|
}));
|
|
839
3458
|
}
|
|
840
|
-
|
|
3459
|
+
processSetProductVariantPrice(response) {
|
|
841
3460
|
const status = response.status;
|
|
842
3461
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
843
3462
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -849,9 +3468,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
849
3468
|
}
|
|
850
3469
|
if (status === 200) {
|
|
851
3470
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
852
|
-
|
|
853
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
854
|
-
return of(result200);
|
|
3471
|
+
return of(null);
|
|
855
3472
|
}));
|
|
856
3473
|
}
|
|
857
3474
|
else if (status === 404) {
|
|
@@ -861,6 +3478,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
861
3478
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
862
3479
|
}));
|
|
863
3480
|
}
|
|
3481
|
+
else if (status === 409) {
|
|
3482
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3483
|
+
let result409 = null;
|
|
3484
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3485
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3486
|
+
}));
|
|
3487
|
+
}
|
|
864
3488
|
else if (status === 401) {
|
|
865
3489
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
866
3490
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -879,21 +3503,15 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
879
3503
|
return of(null);
|
|
880
3504
|
}
|
|
881
3505
|
/**
|
|
882
|
-
* Returns a
|
|
883
|
-
* @param
|
|
884
|
-
* @param storefrontId (optional) Storefront identifier.
|
|
3506
|
+
* Returns a list of all available product tags.
|
|
3507
|
+
* @param search (optional) Search string for partial match.
|
|
885
3508
|
* @param tenantId (optional) Tenant identifier.
|
|
886
3509
|
* @return Success
|
|
887
3510
|
*/
|
|
888
|
-
|
|
889
|
-
let url_ = this.baseUrl + "/api/storefront/v1/
|
|
890
|
-
if (
|
|
891
|
-
|
|
892
|
-
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
893
|
-
if (storefrontId === null)
|
|
894
|
-
throw new Error("The parameter 'storefrontId' cannot be null.");
|
|
895
|
-
else if (storefrontId !== undefined)
|
|
896
|
-
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
3511
|
+
getAvailableProductTags(search, tenantId) {
|
|
3512
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/available-tags?";
|
|
3513
|
+
if (search !== undefined && search !== null)
|
|
3514
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
897
3515
|
if (tenantId !== undefined && tenantId !== null)
|
|
898
3516
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
899
3517
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -901,17 +3519,17 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
901
3519
|
observe: "response",
|
|
902
3520
|
responseType: "blob",
|
|
903
3521
|
headers: new HttpHeaders({
|
|
904
|
-
"Accept": "
|
|
3522
|
+
"Accept": "application/json"
|
|
905
3523
|
})
|
|
906
3524
|
};
|
|
907
3525
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
908
3526
|
return this.http.request("get", url_, transformedOptions_);
|
|
909
3527
|
})).pipe(mergeMap((response_) => {
|
|
910
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3528
|
+
return this.transformResult(url_, response_, (r) => this.processGetAvailableProductTags(r));
|
|
911
3529
|
})).pipe(catchError((response_) => {
|
|
912
3530
|
if (response_ instanceof HttpResponseBase) {
|
|
913
3531
|
try {
|
|
914
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3532
|
+
return this.transformResult(url_, response_, (r) => this.processGetAvailableProductTags(r));
|
|
915
3533
|
}
|
|
916
3534
|
catch (e) {
|
|
917
3535
|
return throwError(e);
|
|
@@ -921,7 +3539,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
921
3539
|
return throwError(response_);
|
|
922
3540
|
}));
|
|
923
3541
|
}
|
|
924
|
-
|
|
3542
|
+
processGetAvailableProductTags(response) {
|
|
925
3543
|
const status = response.status;
|
|
926
3544
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
927
3545
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -938,13 +3556,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
938
3556
|
return of(result200);
|
|
939
3557
|
}));
|
|
940
3558
|
}
|
|
941
|
-
else if (status === 404) {
|
|
942
|
-
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
943
|
-
let result404 = null;
|
|
944
|
-
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
945
|
-
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
946
|
-
}));
|
|
947
|
-
}
|
|
948
3559
|
else if (status === 401) {
|
|
949
3560
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
950
3561
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -963,22 +3574,25 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
963
3574
|
return of(null);
|
|
964
3575
|
}
|
|
965
3576
|
/**
|
|
966
|
-
* Returns a product personalization workflow
|
|
967
|
-
* @param
|
|
968
|
-
* @param
|
|
3577
|
+
* Returns a product personalization workflow description by product identifier.
|
|
3578
|
+
* @param id Product identifier.
|
|
3579
|
+
* @param productVersionId (optional) Product version identifier.
|
|
3580
|
+
* @param productLinkId (optional) Product link identifier.
|
|
3581
|
+
* @param productFilterId (optional) Product filter identifier.
|
|
969
3582
|
* @param tenantId (optional) Tenant identifier.
|
|
970
3583
|
* @return Success
|
|
971
|
-
* @deprecated
|
|
972
3584
|
*/
|
|
973
|
-
|
|
974
|
-
let url_ = this.baseUrl + "/api/storefront/v1/
|
|
975
|
-
if (
|
|
976
|
-
throw new Error("The parameter '
|
|
977
|
-
url_ = url_.replace("{
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
url_ += "
|
|
3585
|
+
getPersonalizationWorkflow(id, productVersionId, productLinkId, productFilterId, tenantId) {
|
|
3586
|
+
let url_ = this.baseUrl + "/api/storefront/v1/products/{id}/personalization-workflow?";
|
|
3587
|
+
if (id === undefined || id === null)
|
|
3588
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3589
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3590
|
+
if (productVersionId !== undefined && productVersionId !== null)
|
|
3591
|
+
url_ += "productVersionId=" + encodeURIComponent("" + productVersionId) + "&";
|
|
3592
|
+
if (productLinkId !== undefined && productLinkId !== null)
|
|
3593
|
+
url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
|
|
3594
|
+
if (productFilterId !== undefined && productFilterId !== null)
|
|
3595
|
+
url_ += "productFilterId=" + encodeURIComponent("" + productFilterId) + "&";
|
|
982
3596
|
if (tenantId !== undefined && tenantId !== null)
|
|
983
3597
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
984
3598
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -986,17 +3600,17 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
986
3600
|
observe: "response",
|
|
987
3601
|
responseType: "blob",
|
|
988
3602
|
headers: new HttpHeaders({
|
|
989
|
-
"Accept": "
|
|
3603
|
+
"Accept": "application/json"
|
|
990
3604
|
})
|
|
991
3605
|
};
|
|
992
3606
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
993
3607
|
return this.http.request("get", url_, transformedOptions_);
|
|
994
3608
|
})).pipe(mergeMap((response_) => {
|
|
995
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3609
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
996
3610
|
})).pipe(catchError((response_) => {
|
|
997
3611
|
if (response_ instanceof HttpResponseBase) {
|
|
998
3612
|
try {
|
|
999
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
3613
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
1000
3614
|
}
|
|
1001
3615
|
catch (e) {
|
|
1002
3616
|
return throwError(e);
|
|
@@ -1006,7 +3620,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1006
3620
|
return throwError(response_);
|
|
1007
3621
|
}));
|
|
1008
3622
|
}
|
|
1009
|
-
|
|
3623
|
+
processGetPersonalizationWorkflow(response) {
|
|
1010
3624
|
const status = response.status;
|
|
1011
3625
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1012
3626
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -1019,17 +3633,24 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1019
3633
|
if (status === 200) {
|
|
1020
3634
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1021
3635
|
let result200 = null;
|
|
1022
|
-
result200 = _responseText === "" ? null : _responseText;
|
|
3636
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1023
3637
|
return of(result200);
|
|
1024
3638
|
}));
|
|
1025
3639
|
}
|
|
1026
3640
|
else if (status === 404) {
|
|
1027
3641
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1028
3642
|
let result404 = null;
|
|
1029
|
-
result404 = _responseText === "" ? null : _responseText;
|
|
3643
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1030
3644
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1031
3645
|
}));
|
|
1032
3646
|
}
|
|
3647
|
+
else if (status === 409) {
|
|
3648
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3649
|
+
let result409 = null;
|
|
3650
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3651
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3652
|
+
}));
|
|
3653
|
+
}
|
|
1033
3654
|
else if (status === 401) {
|
|
1034
3655
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1035
3656
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -1048,13 +3669,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
1048
3669
|
return of(null);
|
|
1049
3670
|
}
|
|
1050
3671
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
3672
|
+
ProductsApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductsApiClient_Factory() { return new ProductsApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductsApiClient, providedIn: "root" });
|
|
3673
|
+
ProductsApiClient.decorators = [
|
|
1053
3674
|
{ type: Injectable, args: [{
|
|
1054
3675
|
providedIn: 'root'
|
|
1055
3676
|
},] }
|
|
1056
3677
|
];
|
|
1057
|
-
|
|
3678
|
+
ProductsApiClient.ctorParameters = () => [
|
|
1058
3679
|
{ type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
|
|
1059
3680
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
1060
3681
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
@@ -1092,7 +3713,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
1092
3713
|
observe: "response",
|
|
1093
3714
|
responseType: "blob",
|
|
1094
3715
|
headers: new HttpHeaders({
|
|
1095
|
-
"Accept": "
|
|
3716
|
+
"Accept": "application/json"
|
|
1096
3717
|
})
|
|
1097
3718
|
};
|
|
1098
3719
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1164,7 +3785,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
1164
3785
|
observe: "response",
|
|
1165
3786
|
responseType: "blob",
|
|
1166
3787
|
headers: new HttpHeaders({
|
|
1167
|
-
"Accept": "
|
|
3788
|
+
"Accept": "application/json"
|
|
1168
3789
|
})
|
|
1169
3790
|
};
|
|
1170
3791
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1243,7 +3864,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
1243
3864
|
observe: "response",
|
|
1244
3865
|
responseType: "blob",
|
|
1245
3866
|
headers: new HttpHeaders({
|
|
1246
|
-
"Accept": "
|
|
3867
|
+
"Accept": "application/json"
|
|
1247
3868
|
})
|
|
1248
3869
|
};
|
|
1249
3870
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1363,7 +3984,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
1363
3984
|
else if (status === 404) {
|
|
1364
3985
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1365
3986
|
let result404 = null;
|
|
1366
|
-
result404 = _responseText === "" ? null : _responseText;
|
|
3987
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1367
3988
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1368
3989
|
}));
|
|
1369
3990
|
}
|
|
@@ -1457,7 +4078,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1457
4078
|
observe: "response",
|
|
1458
4079
|
responseType: "blob",
|
|
1459
4080
|
headers: new HttpHeaders({
|
|
1460
|
-
"Accept": "
|
|
4081
|
+
"Accept": "application/json"
|
|
1461
4082
|
})
|
|
1462
4083
|
};
|
|
1463
4084
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1529,7 +4150,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1529
4150
|
observe: "response",
|
|
1530
4151
|
responseType: "blob",
|
|
1531
4152
|
headers: new HttpHeaders({
|
|
1532
|
-
"Accept": "
|
|
4153
|
+
"Accept": "application/json"
|
|
1533
4154
|
})
|
|
1534
4155
|
};
|
|
1535
4156
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1697,7 +4318,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1697
4318
|
observe: "response",
|
|
1698
4319
|
responseType: "blob",
|
|
1699
4320
|
headers: new HttpHeaders({
|
|
1700
|
-
"Accept": "
|
|
4321
|
+
"Accept": "application/octet-stream"
|
|
1701
4322
|
})
|
|
1702
4323
|
};
|
|
1703
4324
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1822,14 +4443,14 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1822
4443
|
else if (status === 404) {
|
|
1823
4444
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1824
4445
|
let result404 = null;
|
|
1825
|
-
result404 = _responseText === "" ? null : _responseText;
|
|
4446
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1826
4447
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1827
4448
|
}));
|
|
1828
4449
|
}
|
|
1829
4450
|
else if (status === 409) {
|
|
1830
4451
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1831
4452
|
let result409 = null;
|
|
1832
|
-
result409 = _responseText === "" ? null : _responseText;
|
|
4453
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1833
4454
|
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
1834
4455
|
}));
|
|
1835
4456
|
}
|
|
@@ -1872,8 +4493,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1872
4493
|
observe: "response",
|
|
1873
4494
|
responseType: "blob",
|
|
1874
4495
|
headers: new HttpHeaders({
|
|
1875
|
-
"Content-Type": "application/json
|
|
1876
|
-
"Accept": "
|
|
4496
|
+
"Content-Type": "application/json",
|
|
4497
|
+
"Accept": "application/json"
|
|
1877
4498
|
})
|
|
1878
4499
|
};
|
|
1879
4500
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -1963,8 +4584,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1963
4584
|
observe: "response",
|
|
1964
4585
|
responseType: "blob",
|
|
1965
4586
|
headers: new HttpHeaders({
|
|
1966
|
-
"Content-Type": "application/json
|
|
1967
|
-
"Accept": "
|
|
4587
|
+
"Content-Type": "application/json",
|
|
4588
|
+
"Accept": "application/json"
|
|
1968
4589
|
})
|
|
1969
4590
|
};
|
|
1970
4591
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2054,8 +4675,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2054
4675
|
observe: "response",
|
|
2055
4676
|
responseType: "blob",
|
|
2056
4677
|
headers: new HttpHeaders({
|
|
2057
|
-
"Content-Type": "application/json
|
|
2058
|
-
"Accept": "
|
|
4678
|
+
"Content-Type": "application/json",
|
|
4679
|
+
"Accept": "application/json"
|
|
2059
4680
|
})
|
|
2060
4681
|
};
|
|
2061
4682
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2145,8 +4766,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2145
4766
|
observe: "response",
|
|
2146
4767
|
responseType: "blob",
|
|
2147
4768
|
headers: new HttpHeaders({
|
|
2148
|
-
"Content-Type": "application/json
|
|
2149
|
-
"Accept": "
|
|
4769
|
+
"Content-Type": "application/json",
|
|
4770
|
+
"Accept": "application/json"
|
|
2150
4771
|
})
|
|
2151
4772
|
};
|
|
2152
4773
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2232,7 +4853,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2232
4853
|
observe: "response",
|
|
2233
4854
|
responseType: "blob",
|
|
2234
4855
|
headers: new HttpHeaders({
|
|
2235
|
-
"Accept": "
|
|
4856
|
+
"Accept": "application/json"
|
|
2236
4857
|
})
|
|
2237
4858
|
};
|
|
2238
4859
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2329,7 +4950,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2329
4950
|
observe: "response",
|
|
2330
4951
|
responseType: "blob",
|
|
2331
4952
|
headers: new HttpHeaders({
|
|
2332
|
-
"Accept": "
|
|
4953
|
+
"Accept": "application/json"
|
|
2333
4954
|
})
|
|
2334
4955
|
};
|
|
2335
4956
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2426,7 +5047,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2426
5047
|
observe: "response",
|
|
2427
5048
|
responseType: "blob",
|
|
2428
5049
|
headers: new HttpHeaders({
|
|
2429
|
-
"Accept": "
|
|
5050
|
+
"Accept": "application/json"
|
|
2430
5051
|
})
|
|
2431
5052
|
};
|
|
2432
5053
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2505,7 +5126,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2505
5126
|
* Deletes specified projects.
|
|
2506
5127
|
These projects will be hide from projects list immediately, but complete projects data cleaning will take some additional time.
|
|
2507
5128
|
* @param tenantId (optional) Tenant identifier.
|
|
2508
|
-
* @param body (optional)
|
|
5129
|
+
* @param body (optional) Operation parameters.
|
|
2509
5130
|
* @return Success
|
|
2510
5131
|
*/
|
|
2511
5132
|
batchDelete(tenantId, body) {
|
|
@@ -2519,8 +5140,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2519
5140
|
observe: "response",
|
|
2520
5141
|
responseType: "blob",
|
|
2521
5142
|
headers: new HttpHeaders({
|
|
2522
|
-
"Content-Type": "application/json
|
|
2523
|
-
"Accept": "
|
|
5143
|
+
"Content-Type": "application/json",
|
|
5144
|
+
"Accept": "application/json"
|
|
2524
5145
|
})
|
|
2525
5146
|
};
|
|
2526
5147
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2588,7 +5209,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2588
5209
|
observe: "response",
|
|
2589
5210
|
responseType: "blob",
|
|
2590
5211
|
headers: new HttpHeaders({
|
|
2591
|
-
"Accept": "
|
|
5212
|
+
"Accept": "application/json"
|
|
2592
5213
|
})
|
|
2593
5214
|
};
|
|
2594
5215
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2656,7 +5277,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2656
5277
|
observe: "response",
|
|
2657
5278
|
responseType: "blob",
|
|
2658
5279
|
headers: new HttpHeaders({
|
|
2659
|
-
"Accept": "
|
|
5280
|
+
"Accept": "application/json"
|
|
2660
5281
|
})
|
|
2661
5282
|
};
|
|
2662
5283
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2739,7 +5360,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2739
5360
|
observe: "response",
|
|
2740
5361
|
responseType: "blob",
|
|
2741
5362
|
headers: new HttpHeaders({
|
|
2742
|
-
"Accept": "
|
|
5363
|
+
"Accept": "application/json"
|
|
2743
5364
|
})
|
|
2744
5365
|
};
|
|
2745
5366
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -2920,7 +5541,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
2920
5541
|
observe: "response",
|
|
2921
5542
|
responseType: "blob",
|
|
2922
5543
|
headers: new HttpHeaders({
|
|
2923
|
-
"Accept": "
|
|
5544
|
+
"Accept": "application/json"
|
|
2924
5545
|
})
|
|
2925
5546
|
};
|
|
2926
5547
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3247,7 +5868,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
3247
5868
|
/**
|
|
3248
5869
|
* Attachs the specified data to the project's order in ecommerce system.
|
|
3249
5870
|
* @param id Project identifier.
|
|
3250
|
-
* @param itemId (optional)
|
|
5871
|
+
* @param itemId (optional) Project item identifier.
|
|
3251
5872
|
* @param tenantId (optional) Tenant identifier.
|
|
3252
5873
|
* @param body (optional) A list of data items, which should be attached to project's order.
|
|
3253
5874
|
* @return Success
|
|
@@ -3268,7 +5889,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
3268
5889
|
observe: "response",
|
|
3269
5890
|
responseType: "blob",
|
|
3270
5891
|
headers: new HttpHeaders({
|
|
3271
|
-
"Content-Type": "application/json
|
|
5892
|
+
"Content-Type": "application/json",
|
|
3272
5893
|
})
|
|
3273
5894
|
};
|
|
3274
5895
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3382,7 +6003,7 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
3382
6003
|
observe: "response",
|
|
3383
6004
|
responseType: "blob",
|
|
3384
6005
|
headers: new HttpHeaders({
|
|
3385
|
-
"Accept": "
|
|
6006
|
+
"Accept": "application/json"
|
|
3386
6007
|
})
|
|
3387
6008
|
};
|
|
3388
6009
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3454,7 +6075,7 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
3454
6075
|
observe: "response",
|
|
3455
6076
|
responseType: "blob",
|
|
3456
6077
|
headers: new HttpHeaders({
|
|
3457
|
-
"Accept": "
|
|
6078
|
+
"Accept": "application/json"
|
|
3458
6079
|
})
|
|
3459
6080
|
};
|
|
3460
6081
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3575,7 +6196,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3575
6196
|
observe: "response",
|
|
3576
6197
|
responseType: "blob",
|
|
3577
6198
|
headers: new HttpHeaders({
|
|
3578
|
-
"Accept": "
|
|
6199
|
+
"Accept": "application/json"
|
|
3579
6200
|
})
|
|
3580
6201
|
};
|
|
3581
6202
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3612,6 +6233,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3612
6233
|
return of(result200);
|
|
3613
6234
|
}));
|
|
3614
6235
|
}
|
|
6236
|
+
else if (status === 409) {
|
|
6237
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
6238
|
+
let result409 = null;
|
|
6239
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6240
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6241
|
+
}));
|
|
6242
|
+
}
|
|
3615
6243
|
else if (status === 401) {
|
|
3616
6244
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
3617
6245
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -3651,8 +6279,8 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3651
6279
|
observe: "response",
|
|
3652
6280
|
responseType: "blob",
|
|
3653
6281
|
headers: new HttpHeaders({
|
|
3654
|
-
"Content-Type": "application/json
|
|
3655
|
-
"Accept": "
|
|
6282
|
+
"Content-Type": "application/json",
|
|
6283
|
+
"Accept": "application/json"
|
|
3656
6284
|
})
|
|
3657
6285
|
};
|
|
3658
6286
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3736,7 +6364,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3736
6364
|
observe: "response",
|
|
3737
6365
|
responseType: "blob",
|
|
3738
6366
|
headers: new HttpHeaders({
|
|
3739
|
-
"Accept": "
|
|
6367
|
+
"Accept": "application/json"
|
|
3740
6368
|
})
|
|
3741
6369
|
};
|
|
3742
6370
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3826,8 +6454,8 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3826
6454
|
observe: "response",
|
|
3827
6455
|
responseType: "blob",
|
|
3828
6456
|
headers: new HttpHeaders({
|
|
3829
|
-
"Content-Type": "application/json
|
|
3830
|
-
"Accept": "
|
|
6457
|
+
"Content-Type": "application/json",
|
|
6458
|
+
"Accept": "application/json"
|
|
3831
6459
|
})
|
|
3832
6460
|
};
|
|
3833
6461
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -3910,7 +6538,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
3910
6538
|
observe: "response",
|
|
3911
6539
|
responseType: "blob",
|
|
3912
6540
|
headers: new HttpHeaders({
|
|
3913
|
-
"Content-Type": "application/json
|
|
6541
|
+
"Content-Type": "application/json",
|
|
3914
6542
|
})
|
|
3915
6543
|
};
|
|
3916
6544
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4040,14 +6668,14 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
4040
6668
|
else if (status === 404) {
|
|
4041
6669
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4042
6670
|
let result404 = null;
|
|
4043
|
-
result404 = _responseText === "" ? null : _responseText;
|
|
6671
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4044
6672
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
4045
6673
|
}));
|
|
4046
6674
|
}
|
|
4047
6675
|
else if (status === 409) {
|
|
4048
6676
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
4049
6677
|
let result409 = null;
|
|
4050
|
-
result409 = _responseText === "" ? null : _responseText;
|
|
6678
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4051
6679
|
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
4052
6680
|
}));
|
|
4053
6681
|
}
|
|
@@ -4101,7 +6729,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
4101
6729
|
observe: "response",
|
|
4102
6730
|
responseType: "blob",
|
|
4103
6731
|
headers: new HttpHeaders({
|
|
4104
|
-
"Accept": "
|
|
6732
|
+
"Accept": "application/json"
|
|
4105
6733
|
})
|
|
4106
6734
|
};
|
|
4107
6735
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4169,7 +6797,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
4169
6797
|
observe: "response",
|
|
4170
6798
|
responseType: "blob",
|
|
4171
6799
|
headers: new HttpHeaders({
|
|
4172
|
-
"Accept": "
|
|
6800
|
+
"Accept": "application/json"
|
|
4173
6801
|
})
|
|
4174
6802
|
};
|
|
4175
6803
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4237,7 +6865,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
4237
6865
|
observe: "response",
|
|
4238
6866
|
responseType: "blob",
|
|
4239
6867
|
headers: new HttpHeaders({
|
|
4240
|
-
"Accept": "
|
|
6868
|
+
"Accept": "application/json"
|
|
4241
6869
|
})
|
|
4242
6870
|
};
|
|
4243
6871
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4305,7 +6933,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
4305
6933
|
observe: "response",
|
|
4306
6934
|
responseType: "blob",
|
|
4307
6935
|
headers: new HttpHeaders({
|
|
4308
|
-
"Accept": "
|
|
6936
|
+
"Accept": "application/json"
|
|
4309
6937
|
})
|
|
4310
6938
|
};
|
|
4311
6939
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
@@ -4371,6 +6999,32 @@ TenantInfoApiClient.ctorParameters = () => [
|
|
|
4371
6999
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
4372
7000
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
4373
7001
|
];
|
|
7002
|
+
/** Available option types. */
|
|
7003
|
+
var OptionType;
|
|
7004
|
+
(function (OptionType) {
|
|
7005
|
+
OptionType["Simple"] = "Simple";
|
|
7006
|
+
OptionType["Size"] = "Size";
|
|
7007
|
+
OptionType["PageCount"] = "PageCount";
|
|
7008
|
+
})(OptionType || (OptionType = {}));
|
|
7009
|
+
/** Conflict types. */
|
|
7010
|
+
var ConflictType;
|
|
7011
|
+
(function (ConflictType) {
|
|
7012
|
+
ConflictType["NameConflict"] = "NameConflict";
|
|
7013
|
+
ConflictType["FolderOverwriteConflict"] = "FolderOverwriteConflict";
|
|
7014
|
+
ConflictType["IdConflict"] = "IdConflict";
|
|
7015
|
+
ConflictType["GeneralConflict"] = "GeneralConflict";
|
|
7016
|
+
})(ConflictType || (ConflictType = {}));
|
|
7017
|
+
/** Available appearance types. */
|
|
7018
|
+
var AppearanceDataType;
|
|
7019
|
+
(function (AppearanceDataType) {
|
|
7020
|
+
AppearanceDataType["Radio"] = "Radio";
|
|
7021
|
+
AppearanceDataType["Dropdown"] = "Dropdown";
|
|
7022
|
+
AppearanceDataType["Chips"] = "Chips";
|
|
7023
|
+
AppearanceDataType["ColorGrid"] = "ColorGrid";
|
|
7024
|
+
AppearanceDataType["ColorList"] = "ColorList";
|
|
7025
|
+
AppearanceDataType["ImageGrid"] = "ImageGrid";
|
|
7026
|
+
AppearanceDataType["ImageList"] = "ImageList";
|
|
7027
|
+
})(AppearanceDataType || (AppearanceDataType = {}));
|
|
4374
7028
|
/** Type of editor that should be configured by workflow. */
|
|
4375
7029
|
var WorkflowType;
|
|
4376
7030
|
(function (WorkflowType) {
|
|
@@ -4379,6 +7033,34 @@ var WorkflowType;
|
|
|
4379
7033
|
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
4380
7034
|
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
4381
7035
|
})(WorkflowType || (WorkflowType = {}));
|
|
7036
|
+
/** Available product reference target types. */
|
|
7037
|
+
var ProductReferenceType;
|
|
7038
|
+
(function (ProductReferenceType) {
|
|
7039
|
+
ProductReferenceType["ProductSpecification"] = "ProductSpecification";
|
|
7040
|
+
ProductReferenceType["Product"] = "Product";
|
|
7041
|
+
ProductReferenceType["ProductLink"] = "ProductLink";
|
|
7042
|
+
})(ProductReferenceType || (ProductReferenceType = {}));
|
|
7043
|
+
/** Available product variant resource types. */
|
|
7044
|
+
var ProductVariantResourceType;
|
|
7045
|
+
(function (ProductVariantResourceType) {
|
|
7046
|
+
ProductVariantResourceType["Preview"] = "Preview";
|
|
7047
|
+
ProductVariantResourceType["EditorModel"] = "EditorModel";
|
|
7048
|
+
ProductVariantResourceType["Custom"] = "Custom";
|
|
7049
|
+
})(ProductVariantResourceType || (ProductVariantResourceType = {}));
|
|
7050
|
+
/** Available mockup types. */
|
|
7051
|
+
var ProductVariantMockupType;
|
|
7052
|
+
(function (ProductVariantMockupType) {
|
|
7053
|
+
ProductVariantMockupType["Thumbnail"] = "Thumbnail";
|
|
7054
|
+
ProductVariantMockupType["Editor"] = "Editor";
|
|
7055
|
+
ProductVariantMockupType["Preview"] = "Preview";
|
|
7056
|
+
})(ProductVariantMockupType || (ProductVariantMockupType = {}));
|
|
7057
|
+
/** Available surface usage types. */
|
|
7058
|
+
var SurfaceUsageType;
|
|
7059
|
+
(function (SurfaceUsageType) {
|
|
7060
|
+
SurfaceUsageType["Individual"] = "Individual";
|
|
7061
|
+
SurfaceUsageType["Custom"] = "Custom";
|
|
7062
|
+
SurfaceUsageType["All"] = "All";
|
|
7063
|
+
})(SurfaceUsageType || (SurfaceUsageType = {}));
|
|
4382
7064
|
/** Defines all available date period filter values for queries. */
|
|
4383
7065
|
var DatePeriod;
|
|
4384
7066
|
(function (DatePeriod) {
|
|
@@ -4423,6 +7105,14 @@ var RenderHiResScenarioOutputFlipMode;
|
|
|
4423
7105
|
RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
|
|
4424
7106
|
RenderHiResScenarioOutputFlipMode["Both"] = "Both";
|
|
4425
7107
|
})(RenderHiResScenarioOutputFlipMode || (RenderHiResScenarioOutputFlipMode = {}));
|
|
7108
|
+
var RenderHiResScenarioOutputRotateMode;
|
|
7109
|
+
(function (RenderHiResScenarioOutputRotateMode) {
|
|
7110
|
+
RenderHiResScenarioOutputRotateMode["None"] = "None";
|
|
7111
|
+
RenderHiResScenarioOutputRotateMode["Rotate90"] = "Rotate90";
|
|
7112
|
+
RenderHiResScenarioOutputRotateMode["Rotate180"] = "Rotate180";
|
|
7113
|
+
RenderHiResScenarioOutputRotateMode["Rotate270"] = "Rotate270";
|
|
7114
|
+
RenderHiResScenarioOutputRotateMode["Auto"] = "Auto";
|
|
7115
|
+
})(RenderHiResScenarioOutputRotateMode || (RenderHiResScenarioOutputRotateMode = {}));
|
|
4426
7116
|
/** Available value types for order data item. */
|
|
4427
7117
|
var OrderDataItemValueType;
|
|
4428
7118
|
(function (OrderDataItemValueType) {
|
|
@@ -4522,5 +7212,5 @@ StorefrontModule.decorators = [
|
|
|
4522
7212
|
* Generated bundle index. Do not edit.
|
|
4523
7213
|
*/
|
|
4524
7214
|
|
|
4525
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient, WorkflowType };
|
|
7215
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DatePeriod, OptionType, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductLinksApiClient, ProductReferenceType, ProductReferencesApiClient, ProductSpecificationsApiClient, ProductVariantMockupType, ProductVariantResourceType, ProductsApiClient, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, RenderHiResScenarioOutputRotateMode, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, SurfaceUsageType, TenantInfoApiClient, WorkflowType };
|
|
4526
7216
|
//# sourceMappingURL=aurigma-ng-storefront-api-client.js.map
|