@aurigma/ng-storefront-api-client 2.59.1 → 2.62.12

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.
@@ -344,6 +344,381 @@ 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 ProductBundlesApiClient extends ApiClientBase {
348
+ constructor(configuration, http, baseUrl) {
349
+ super(configuration);
350
+ this.jsonParseReviver = undefined;
351
+ this.http = http;
352
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
353
+ }
354
+ /**
355
+ * Returns all product bundles, relevant to the specified query parameters.
356
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
357
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
358
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
359
+ * @param search (optional) Search string for partial match.
360
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}
361
+ * @param tenantId (optional) Tenant identifier.
362
+ * @return Success
363
+ */
364
+ getAllProductBundles(skip, take, sorting, search, customFields, tenantId) {
365
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles?";
366
+ if (skip !== undefined && skip !== null)
367
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
368
+ if (take !== undefined && take !== null)
369
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
370
+ if (sorting !== undefined && sorting !== null)
371
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
372
+ if (search !== undefined && search !== null)
373
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
374
+ if (customFields !== undefined && customFields !== null)
375
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
376
+ if (tenantId !== undefined && tenantId !== null)
377
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
378
+ url_ = url_.replace(/[?&]$/, "");
379
+ let options_ = {
380
+ observe: "response",
381
+ responseType: "blob",
382
+ headers: new HttpHeaders({
383
+ "Accept": "application/json"
384
+ })
385
+ };
386
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
387
+ return this.http.request("get", url_, transformedOptions_);
388
+ })).pipe(mergeMap((response_) => {
389
+ return this.transformResult(url_, response_, (r) => this.processGetAllProductBundles(r));
390
+ })).pipe(catchError((response_) => {
391
+ if (response_ instanceof HttpResponseBase) {
392
+ try {
393
+ return this.transformResult(url_, response_, (r) => this.processGetAllProductBundles(r));
394
+ }
395
+ catch (e) {
396
+ return throwError(e);
397
+ }
398
+ }
399
+ else
400
+ return throwError(response_);
401
+ }));
402
+ }
403
+ processGetAllProductBundles(response) {
404
+ const status = response.status;
405
+ const responseBlob = response instanceof HttpResponse ? response.body :
406
+ response.error instanceof Blob ? response.error : undefined;
407
+ let _headers = {};
408
+ if (response.headers) {
409
+ for (let key of response.headers.keys()) {
410
+ _headers[key] = response.headers.get(key);
411
+ }
412
+ }
413
+ if (status === 200) {
414
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
415
+ let result200 = null;
416
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
417
+ return of(result200);
418
+ }));
419
+ }
420
+ else if (status === 401) {
421
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
422
+ return throwException("Unauthorized", status, _responseText, _headers);
423
+ }));
424
+ }
425
+ else if (status === 403) {
426
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
427
+ return throwException("Forbidden", status, _responseText, _headers);
428
+ }));
429
+ }
430
+ else if (status !== 200 && status !== 204) {
431
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
432
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
433
+ }));
434
+ }
435
+ return of(null);
436
+ }
437
+ /**
438
+ * Returns a product bundle by its identifier.
439
+ * @param id Product identifier.
440
+ * @param productBundleVersionId (optional) Product bundle version identifier. Optional
441
+ * @param tenantId (optional) Tenant identifier.
442
+ * @return Success
443
+ */
444
+ getProductBundle(id, productBundleVersionId, tenantId) {
445
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}?";
446
+ if (id === undefined || id === null)
447
+ throw new Error("The parameter 'id' must be defined.");
448
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
449
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
450
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
451
+ if (tenantId !== undefined && tenantId !== null)
452
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
453
+ url_ = url_.replace(/[?&]$/, "");
454
+ let options_ = {
455
+ observe: "response",
456
+ responseType: "blob",
457
+ headers: new HttpHeaders({
458
+ "Accept": "application/json"
459
+ })
460
+ };
461
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
462
+ return this.http.request("get", url_, transformedOptions_);
463
+ })).pipe(mergeMap((response_) => {
464
+ return this.transformResult(url_, response_, (r) => this.processGetProductBundle(r));
465
+ })).pipe(catchError((response_) => {
466
+ if (response_ instanceof HttpResponseBase) {
467
+ try {
468
+ return this.transformResult(url_, response_, (r) => this.processGetProductBundle(r));
469
+ }
470
+ catch (e) {
471
+ return throwError(e);
472
+ }
473
+ }
474
+ else
475
+ return throwError(response_);
476
+ }));
477
+ }
478
+ processGetProductBundle(response) {
479
+ const status = response.status;
480
+ const responseBlob = response instanceof HttpResponse ? response.body :
481
+ response.error instanceof Blob ? response.error : undefined;
482
+ let _headers = {};
483
+ if (response.headers) {
484
+ for (let key of response.headers.keys()) {
485
+ _headers[key] = response.headers.get(key);
486
+ }
487
+ }
488
+ if (status === 200) {
489
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
490
+ let result200 = null;
491
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
492
+ return of(result200);
493
+ }));
494
+ }
495
+ else if (status === 404) {
496
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
497
+ let result404 = null;
498
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
499
+ return throwException("Not Found", status, _responseText, _headers, result404);
500
+ }));
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
+ }
509
+ else if (status === 401) {
510
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
511
+ return throwException("Unauthorized", status, _responseText, _headers);
512
+ }));
513
+ }
514
+ else if (status === 403) {
515
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
516
+ return throwException("Forbidden", status, _responseText, _headers);
517
+ }));
518
+ }
519
+ else if (status !== 200 && status !== 204) {
520
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
521
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
522
+ }));
523
+ }
524
+ return of(null);
525
+ }
526
+ /**
527
+ * Returns a product bundle summary by product bundle identifier.
528
+ * @param id Product bundle identifier.
529
+ * @param productBundleVersionId (optional) Product bundle version identifier.
530
+ * @param productVariantId (optional) Product variant identifier.
531
+ * @param sku (optional) Product variant SKU.
532
+ * @param tenantId (optional) Tenant identifier.
533
+ * @return Success
534
+ */
535
+ getProductSummary(id, productBundleVersionId, productVariantId, sku, tenantId) {
536
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/summary?";
537
+ if (id === undefined || id === null)
538
+ throw new Error("The parameter 'id' must be defined.");
539
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
540
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
541
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
542
+ if (productVariantId !== undefined && productVariantId !== null)
543
+ url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
544
+ if (sku !== undefined && sku !== null)
545
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
546
+ if (tenantId !== undefined && tenantId !== null)
547
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
548
+ url_ = url_.replace(/[?&]$/, "");
549
+ let options_ = {
550
+ observe: "response",
551
+ responseType: "blob",
552
+ headers: new HttpHeaders({
553
+ "Accept": "application/json"
554
+ })
555
+ };
556
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
557
+ return this.http.request("get", url_, transformedOptions_);
558
+ })).pipe(mergeMap((response_) => {
559
+ return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
560
+ })).pipe(catchError((response_) => {
561
+ if (response_ instanceof HttpResponseBase) {
562
+ try {
563
+ return this.transformResult(url_, response_, (r) => this.processGetProductSummary(r));
564
+ }
565
+ catch (e) {
566
+ return throwError(e);
567
+ }
568
+ }
569
+ else
570
+ return throwError(response_);
571
+ }));
572
+ }
573
+ processGetProductSummary(response) {
574
+ const status = response.status;
575
+ const responseBlob = response instanceof HttpResponse ? response.body :
576
+ response.error instanceof Blob ? response.error : undefined;
577
+ let _headers = {};
578
+ if (response.headers) {
579
+ for (let key of response.headers.keys()) {
580
+ _headers[key] = response.headers.get(key);
581
+ }
582
+ }
583
+ if (status === 200) {
584
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
585
+ let result200 = null;
586
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
587
+ return of(result200);
588
+ }));
589
+ }
590
+ else if (status === 404) {
591
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
592
+ let result404 = null;
593
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
594
+ return throwException("Not Found", status, _responseText, _headers, result404);
595
+ }));
596
+ }
597
+ else if (status === 409) {
598
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
599
+ let result409 = null;
600
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
601
+ return throwException("Conflict", status, _responseText, _headers, result409);
602
+ }));
603
+ }
604
+ else if (status === 401) {
605
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
606
+ return throwException("Unauthorized", status, _responseText, _headers);
607
+ }));
608
+ }
609
+ else if (status === 403) {
610
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
611
+ return throwException("Forbidden", status, _responseText, _headers);
612
+ }));
613
+ }
614
+ else if (status !== 200 && status !== 204) {
615
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
616
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
617
+ }));
618
+ }
619
+ return of(null);
620
+ }
621
+ /**
622
+ * Returns a product bundle personalization workflow description by product bundle identifier.
623
+ * @param id Product bundle identifier.
624
+ * @param productBundleVersionId (optional) Product bundle version identifier.
625
+ * @param tenantId (optional) Tenant identifier.
626
+ * @return Success
627
+ */
628
+ getPersonalizationWorkflow(id, productBundleVersionId, tenantId) {
629
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/personalization-workflow?";
630
+ if (id === undefined || id === null)
631
+ throw new Error("The parameter 'id' must be defined.");
632
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
633
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
634
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
635
+ if (tenantId !== undefined && tenantId !== null)
636
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
637
+ url_ = url_.replace(/[?&]$/, "");
638
+ let options_ = {
639
+ observe: "response",
640
+ responseType: "blob",
641
+ headers: new HttpHeaders({
642
+ "Accept": "application/json"
643
+ })
644
+ };
645
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
646
+ return this.http.request("get", url_, transformedOptions_);
647
+ })).pipe(mergeMap((response_) => {
648
+ return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
649
+ })).pipe(catchError((response_) => {
650
+ if (response_ instanceof HttpResponseBase) {
651
+ try {
652
+ return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
653
+ }
654
+ catch (e) {
655
+ return throwError(e);
656
+ }
657
+ }
658
+ else
659
+ return throwError(response_);
660
+ }));
661
+ }
662
+ processGetPersonalizationWorkflow(response) {
663
+ const status = response.status;
664
+ const responseBlob = response instanceof HttpResponse ? response.body :
665
+ response.error instanceof Blob ? response.error : undefined;
666
+ let _headers = {};
667
+ if (response.headers) {
668
+ for (let key of response.headers.keys()) {
669
+ _headers[key] = response.headers.get(key);
670
+ }
671
+ }
672
+ if (status === 200) {
673
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
674
+ let result200 = null;
675
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
676
+ return of(result200);
677
+ }));
678
+ }
679
+ else if (status === 404) {
680
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
681
+ let result404 = null;
682
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
683
+ return throwException("Not Found", status, _responseText, _headers, result404);
684
+ }));
685
+ }
686
+ else if (status === 409) {
687
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
688
+ let result409 = null;
689
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
690
+ return throwException("Conflict", status, _responseText, _headers, result409);
691
+ }));
692
+ }
693
+ else if (status === 401) {
694
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
695
+ return throwException("Unauthorized", status, _responseText, _headers);
696
+ }));
697
+ }
698
+ else if (status === 403) {
699
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
700
+ return throwException("Forbidden", status, _responseText, _headers);
701
+ }));
702
+ }
703
+ else if (status !== 200 && status !== 204) {
704
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
705
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
706
+ }));
707
+ }
708
+ return of(null);
709
+ }
710
+ }
711
+ ProductBundlesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProductBundlesApiClient_Factory() { return new ProductBundlesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProductBundlesApiClient, providedIn: "root" });
712
+ ProductBundlesApiClient.decorators = [
713
+ { type: Injectable, args: [{
714
+ providedIn: 'root'
715
+ },] }
716
+ ];
717
+ ProductBundlesApiClient.ctorParameters = () => [
718
+ { type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
719
+ { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
720
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
721
+ ];
347
722
  class ProductLinksApiClient extends ApiClientBase {
348
723
  constructor(configuration, http, baseUrl) {
349
724
  super(configuration);
@@ -743,6 +1118,7 @@ class ProductReferencesApiClient extends ApiClientBase {
743
1118
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
744
1119
  * @param productId (optional) Customer's Canvas product filter.
745
1120
  * @param productLinkId (optional) Customer's Canvas product link filter.
1121
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
746
1122
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
747
1123
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
748
1124
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -753,7 +1129,7 @@ class ProductReferencesApiClient extends ApiClientBase {
753
1129
  * @param tenantId (optional) Tenant identifier.
754
1130
  * @return Success
755
1131
  */
756
- getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1132
+ getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
757
1133
  let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
758
1134
  if (storefrontId === undefined || storefrontId === null)
759
1135
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -767,6 +1143,8 @@ class ProductReferencesApiClient extends ApiClientBase {
767
1143
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
768
1144
  if (productLinkId !== undefined && productLinkId !== null)
769
1145
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1146
+ if (productBundleId !== undefined && productBundleId !== null)
1147
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
770
1148
  if (skip !== undefined && skip !== null)
771
1149
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
772
1150
  if (take !== undefined && take !== null)
@@ -857,6 +1235,7 @@ class ProductReferencesApiClient extends ApiClientBase {
857
1235
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
858
1236
  * @param productId (optional) Customer's Canvas product filter.
859
1237
  * @param productLinkId (optional) Customer's Canvas product link filter.
1238
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
860
1239
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
861
1240
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
862
1241
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -867,7 +1246,7 @@ class ProductReferencesApiClient extends ApiClientBase {
867
1246
  * @param tenantId (optional) Tenant identifier.
868
1247
  * @return Success
869
1248
  */
870
- getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1249
+ getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
871
1250
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-specifications?";
872
1251
  if (storefrontId === undefined || storefrontId === null)
873
1252
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -881,6 +1260,8 @@ class ProductReferencesApiClient extends ApiClientBase {
881
1260
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
882
1261
  if (productLinkId !== undefined && productLinkId !== null)
883
1262
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1263
+ if (productBundleId !== undefined && productBundleId !== null)
1264
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
884
1265
  if (skip !== undefined && skip !== null)
885
1266
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
886
1267
  if (take !== undefined && take !== null)
@@ -971,6 +1352,7 @@ class ProductReferencesApiClient extends ApiClientBase {
971
1352
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
972
1353
  * @param productId (optional) Customer's Canvas product filter.
973
1354
  * @param productLinkId (optional) Customer's Canvas product link filter.
1355
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
974
1356
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
975
1357
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
976
1358
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -981,7 +1363,7 @@ class ProductReferencesApiClient extends ApiClientBase {
981
1363
  * @param tenantId (optional) Tenant identifier.
982
1364
  * @return Success
983
1365
  */
984
- getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1366
+ getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
985
1367
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/products?";
986
1368
  if (storefrontId === undefined || storefrontId === null)
987
1369
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -995,6 +1377,8 @@ class ProductReferencesApiClient extends ApiClientBase {
995
1377
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
996
1378
  if (productLinkId !== undefined && productLinkId !== null)
997
1379
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1380
+ if (productBundleId !== undefined && productBundleId !== null)
1381
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
998
1382
  if (skip !== undefined && skip !== null)
999
1383
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1000
1384
  if (take !== undefined && take !== null)
@@ -1085,6 +1469,7 @@ class ProductReferencesApiClient extends ApiClientBase {
1085
1469
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1086
1470
  * @param productId (optional) Customer's Canvas product filter.
1087
1471
  * @param productLinkId (optional) Customer's Canvas product link filter.
1472
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1088
1473
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
1089
1474
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1090
1475
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -1095,7 +1480,7 @@ class ProductReferencesApiClient extends ApiClientBase {
1095
1480
  * @param tenantId (optional) Tenant identifier.
1096
1481
  * @return Success
1097
1482
  */
1098
- getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1483
+ getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1099
1484
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-links?";
1100
1485
  if (storefrontId === undefined || storefrontId === null)
1101
1486
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -1109,6 +1494,8 @@ class ProductReferencesApiClient extends ApiClientBase {
1109
1494
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1110
1495
  if (productLinkId !== undefined && productLinkId !== null)
1111
1496
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1497
+ if (productBundleId !== undefined && productBundleId !== null)
1498
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1112
1499
  if (skip !== undefined && skip !== null)
1113
1500
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1114
1501
  if (take !== undefined && take !== null)
@@ -1191,6 +1578,123 @@ class ProductReferencesApiClient extends ApiClientBase {
1191
1578
  }
1192
1579
  return of(null);
1193
1580
  }
1581
+ /**
1582
+ * Returns a list of product bundles associated with storefront product references relevant to the specified query parameters.
1583
+ * @param storefrontId Storefront identifier.
1584
+ * @param productReference (optional) Product reference filter.
1585
+ Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
1586
+ * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1587
+ * @param productId (optional) Customer's Canvas product filter.
1588
+ * @param productLinkId (optional) Customer's Canvas product link filter.
1589
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1590
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
1591
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1592
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
1593
+ * @param search (optional) Search string for partial match.
1594
+ * @param sku (optional) SKU filter.
1595
+ * @param tags (optional) List of tags that product should have.
1596
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
1597
+ * @param tenantId (optional) Tenant identifier.
1598
+ * @return Success
1599
+ */
1600
+ getAllProductBundles(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId) {
1601
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-bundles?";
1602
+ if (storefrontId === undefined || storefrontId === null)
1603
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1604
+ else
1605
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1606
+ if (productReference !== undefined && productReference !== null)
1607
+ url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
1608
+ if (productSpecificationId !== undefined && productSpecificationId !== null)
1609
+ url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
1610
+ if (productId !== undefined && productId !== null)
1611
+ url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1612
+ if (productLinkId !== undefined && productLinkId !== null)
1613
+ url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1614
+ if (productBundleId !== undefined && productBundleId !== null)
1615
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1616
+ if (skip !== undefined && skip !== null)
1617
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1618
+ if (take !== undefined && take !== null)
1619
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
1620
+ if (sorting !== undefined && sorting !== null)
1621
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
1622
+ if (search !== undefined && search !== null)
1623
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
1624
+ if (sku !== undefined && sku !== null)
1625
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
1626
+ if (tags !== undefined && tags !== null)
1627
+ tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
1628
+ if (customFields !== undefined && customFields !== null)
1629
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
1630
+ if (tenantId !== undefined && tenantId !== null)
1631
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1632
+ url_ = url_.replace(/[?&]$/, "");
1633
+ let options_ = {
1634
+ observe: "response",
1635
+ responseType: "blob",
1636
+ headers: new HttpHeaders({
1637
+ "Accept": "application/json"
1638
+ })
1639
+ };
1640
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
1641
+ return this.http.request("get", url_, transformedOptions_);
1642
+ })).pipe(mergeMap((response_) => {
1643
+ return this.transformResult(url_, response_, (r) => this.processGetAllProductBundles(r));
1644
+ })).pipe(catchError((response_) => {
1645
+ if (response_ instanceof HttpResponseBase) {
1646
+ try {
1647
+ return this.transformResult(url_, response_, (r) => this.processGetAllProductBundles(r));
1648
+ }
1649
+ catch (e) {
1650
+ return throwError(e);
1651
+ }
1652
+ }
1653
+ else
1654
+ return throwError(response_);
1655
+ }));
1656
+ }
1657
+ processGetAllProductBundles(response) {
1658
+ const status = response.status;
1659
+ const responseBlob = response instanceof HttpResponse ? response.body :
1660
+ response.error instanceof Blob ? response.error : undefined;
1661
+ let _headers = {};
1662
+ if (response.headers) {
1663
+ for (let key of response.headers.keys()) {
1664
+ _headers[key] = response.headers.get(key);
1665
+ }
1666
+ }
1667
+ if (status === 200) {
1668
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1669
+ let result200 = null;
1670
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1671
+ return of(result200);
1672
+ }));
1673
+ }
1674
+ else if (status === 409) {
1675
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1676
+ let result409 = null;
1677
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1678
+ return throwException("Conflict", status, _responseText, _headers, result409);
1679
+ }));
1680
+ }
1681
+ else if (status === 401) {
1682
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1683
+ return throwException("Unauthorized", status, _responseText, _headers);
1684
+ }));
1685
+ }
1686
+ else if (status === 403) {
1687
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1688
+ return throwException("Forbidden", status, _responseText, _headers);
1689
+ }));
1690
+ }
1691
+ else if (status !== 200 && status !== 204) {
1692
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1693
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1694
+ }));
1695
+ }
1696
+ return of(null);
1697
+ }
1194
1698
  /**
1195
1699
  * Returns a storefront product reference.
1196
1700
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -1652,6 +2156,97 @@ class ProductReferencesApiClient extends ApiClientBase {
1652
2156
  }
1653
2157
  return of(null);
1654
2158
  }
2159
+ /**
2160
+ * Returns a product bundle by storefront product reference.
2161
+ * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
2162
+ * @param storefrontId Storefront identifier.
2163
+ * @param tenantId (optional) Tenant identifier.
2164
+ * @return Success
2165
+ */
2166
+ getProductBundle(reference, storefrontId, tenantId) {
2167
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-bundle?";
2168
+ if (reference === undefined || reference === null)
2169
+ throw new Error("The parameter 'reference' must be defined.");
2170
+ url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
2171
+ if (storefrontId === undefined || storefrontId === null)
2172
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
2173
+ else
2174
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
2175
+ if (tenantId !== undefined && tenantId !== null)
2176
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2177
+ url_ = url_.replace(/[?&]$/, "");
2178
+ let options_ = {
2179
+ observe: "response",
2180
+ responseType: "blob",
2181
+ headers: new HttpHeaders({
2182
+ "Accept": "application/json"
2183
+ })
2184
+ };
2185
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2186
+ return this.http.request("get", url_, transformedOptions_);
2187
+ })).pipe(mergeMap((response_) => {
2188
+ return this.transformResult(url_, response_, (r) => this.processGetProductBundle(r));
2189
+ })).pipe(catchError((response_) => {
2190
+ if (response_ instanceof HttpResponseBase) {
2191
+ try {
2192
+ return this.transformResult(url_, response_, (r) => this.processGetProductBundle(r));
2193
+ }
2194
+ catch (e) {
2195
+ return throwError(e);
2196
+ }
2197
+ }
2198
+ else
2199
+ return throwError(response_);
2200
+ }));
2201
+ }
2202
+ processGetProductBundle(response) {
2203
+ const status = response.status;
2204
+ const responseBlob = response instanceof HttpResponse ? response.body :
2205
+ response.error instanceof Blob ? response.error : undefined;
2206
+ let _headers = {};
2207
+ if (response.headers) {
2208
+ for (let key of response.headers.keys()) {
2209
+ _headers[key] = response.headers.get(key);
2210
+ }
2211
+ }
2212
+ if (status === 200) {
2213
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2214
+ let result200 = null;
2215
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2216
+ return of(result200);
2217
+ }));
2218
+ }
2219
+ else if (status === 404) {
2220
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2221
+ let result404 = null;
2222
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2223
+ return throwException("Not Found", status, _responseText, _headers, result404);
2224
+ }));
2225
+ }
2226
+ else if (status === 409) {
2227
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2228
+ let result409 = null;
2229
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2230
+ return throwException("Conflict", status, _responseText, _headers, result409);
2231
+ }));
2232
+ }
2233
+ else if (status === 401) {
2234
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2235
+ return throwException("Unauthorized", status, _responseText, _headers);
2236
+ }));
2237
+ }
2238
+ else if (status === 403) {
2239
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2240
+ return throwException("Forbidden", status, _responseText, _headers);
2241
+ }));
2242
+ }
2243
+ else if (status !== 200 && status !== 204) {
2244
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2245
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2246
+ }));
2247
+ }
2248
+ return of(null);
2249
+ }
1655
2250
  /**
1656
2251
  * Returns a product cost details from ecommerce system.
1657
2252
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -2305,7 +2900,7 @@ class ProductsApiClient extends ApiClientBase {
2305
2900
  /**
2306
2901
  * Returns a list of product links.
2307
2902
  * @param id Product identifier.
2308
- * @param productVersionId (optional)
2903
+ * @param productVersionId (optional) Product version identifier.
2309
2904
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
2310
2905
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
2311
2906
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -2407,7 +3002,7 @@ class ProductsApiClient extends ApiClientBase {
2407
3002
  * Returns a product link.
2408
3003
  * @param id Product identifier.
2409
3004
  * @param productLinkId Product link identifier.
2410
- * @param productVersionId (optional)
3005
+ * @param productVersionId (optional) Product version identifier.
2411
3006
  * @param tenantId (optional) Tenant identifier.
2412
3007
  * @return Success
2413
3008
  */
@@ -4734,6 +5329,13 @@ class ProjectsApiClient extends ApiClientBase {
4734
5329
  return of(result200);
4735
5330
  }));
4736
5331
  }
5332
+ else if (status === 404) {
5333
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
5334
+ let result404 = null;
5335
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5336
+ return throwException("Not Found", status, _responseText, _headers, result404);
5337
+ }));
5338
+ }
4737
5339
  else if (status === 401) {
4738
5340
  return blobToText(responseBlob).pipe(mergeMap(_responseText => {
4739
5341
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -6369,13 +6971,12 @@ TenantInfoApiClient.ctorParameters = () => [
6369
6971
  { type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
6370
6972
  { type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
6371
6973
  ];
6372
- /** Available option types. */
6373
- var OptionType;
6374
- (function (OptionType) {
6375
- OptionType["Simple"] = "Simple";
6376
- OptionType["Size"] = "Size";
6377
- OptionType["PageCount"] = "PageCount";
6378
- })(OptionType || (OptionType = {}));
6974
+ /** Product bundle resource type. */
6975
+ var ProductBundleResourceType;
6976
+ (function (ProductBundleResourceType) {
6977
+ ProductBundleResourceType["Custom"] = "Custom";
6978
+ ProductBundleResourceType["Preview"] = "Preview";
6979
+ })(ProductBundleResourceType || (ProductBundleResourceType = {}));
6379
6980
  /** Conflict types. */
6380
6981
  var ConflictType;
6381
6982
  (function (ConflictType) {
@@ -6403,12 +7004,26 @@ var WorkflowType;
6403
7004
  WorkflowType["DesignEditor"] = "DesignEditor";
6404
7005
  WorkflowType["WorkflowElements"] = "WorkflowElements";
6405
7006
  })(WorkflowType || (WorkflowType = {}));
7007
+ /** Product link resource type. */
7008
+ var ProductLinkResourceType;
7009
+ (function (ProductLinkResourceType) {
7010
+ ProductLinkResourceType["Preview"] = "Preview";
7011
+ ProductLinkResourceType["Custom"] = "Custom";
7012
+ })(ProductLinkResourceType || (ProductLinkResourceType = {}));
7013
+ /** Available option types. */
7014
+ var OptionType;
7015
+ (function (OptionType) {
7016
+ OptionType["Simple"] = "Simple";
7017
+ OptionType["Size"] = "Size";
7018
+ OptionType["PageCount"] = "PageCount";
7019
+ })(OptionType || (OptionType = {}));
6406
7020
  /** Available product reference target types. */
6407
7021
  var ProductReferenceType;
6408
7022
  (function (ProductReferenceType) {
6409
7023
  ProductReferenceType["ProductSpecification"] = "ProductSpecification";
6410
7024
  ProductReferenceType["Product"] = "Product";
6411
7025
  ProductReferenceType["ProductLink"] = "ProductLink";
7026
+ ProductReferenceType["ProductBundle"] = "ProductBundle";
6412
7027
  })(ProductReferenceType || (ProductReferenceType = {}));
6413
7028
  /** Available product variant resource types. */
6414
7029
  var ProductVariantResourceType;
@@ -6454,6 +7069,12 @@ var ProjectItemResourceType;
6454
7069
  ProjectItemResourceType["Preview"] = "Preview";
6455
7070
  ProjectItemResourceType["Hires"] = "Hires";
6456
7071
  })(ProjectItemResourceType || (ProjectItemResourceType = {}));
7072
+ var ProjectItemProductType;
7073
+ (function (ProjectItemProductType) {
7074
+ ProjectItemProductType["ProductSpecification"] = "ProductSpecification";
7075
+ ProjectItemProductType["Product"] = "Product";
7076
+ ProjectItemProductType["ProductLink"] = "ProductLink";
7077
+ })(ProjectItemProductType || (ProjectItemProductType = {}));
6457
7078
  var RenderHiResScenarioOutputFormat;
6458
7079
  (function (RenderHiResScenarioOutputFormat) {
6459
7080
  RenderHiResScenarioOutputFormat["Pdf"] = "Pdf";
@@ -6519,10 +7140,7 @@ class ApiException extends Error {
6519
7140
  }
6520
7141
  }
6521
7142
  function throwException(message, status, response, headers, result) {
6522
- if (result !== null && result !== undefined)
6523
- return throwError(result);
6524
- else
6525
- return throwError(new ApiException(message, status, response, headers, null));
7143
+ return throwError(new ApiException(message, status, response, headers, result));
6526
7144
  }
6527
7145
  function blobToText(blob) {
6528
7146
  return new Observable((observer) => {
@@ -6582,5 +7200,5 @@ StorefrontModule.decorators = [
6582
7200
  * Generated bundle index. Do not edit.
6583
7201
  */
6584
7202
 
6585
- 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 };
7203
+ export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, AppearanceDataType, BuildInfoApiClient, ConflictType, CreateApiClientConfiguration, DatePeriod, OptionType, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductBundleResourceType, ProductBundlesApiClient, ProductLinkResourceType, ProductLinksApiClient, ProductReferenceType, ProductReferencesApiClient, ProductSpecificationsApiClient, ProductVariantMockupType, ProductVariantResourceType, ProductsApiClient, ProjectItemProductType, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, RenderHiResScenarioOutputRotateMode, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, SurfaceUsageType, TenantInfoApiClient, WorkflowType };
6586
7204
  //# sourceMappingURL=aurigma-ng-storefront-api-client.js.map