@aurigma/axios-storefront-api-client 2.59.1 → 2.60.2

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.
@@ -309,6 +309,348 @@ export class ProcessingPipelinesApiClient extends ApiClientBase {
309
309
  return Promise.resolve(null);
310
310
  }
311
311
  }
312
+ export class ProductBundlesApiClient extends ApiClientBase {
313
+ instance;
314
+ baseUrl;
315
+ jsonParseReviver = undefined;
316
+ constructor(configuration, baseUrl, instance) {
317
+ super(configuration);
318
+ this.instance = instance ? instance : axios.create();
319
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
320
+ }
321
+ /**
322
+ * Returns all product bundles, relevant to the specified query parameters.
323
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
324
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
325
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
326
+ * @param search (optional) Search string for partial match.
327
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}
328
+ * @param tenantId (optional) Tenant identifier.
329
+ * @return Success
330
+ */
331
+ getAllProductBundles(skip, take, sorting, search, customFields, tenantId, cancelToken) {
332
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles?";
333
+ if (skip !== undefined && skip !== null)
334
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
335
+ if (take !== undefined && take !== null)
336
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
337
+ if (sorting !== undefined && sorting !== null)
338
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
339
+ if (search !== undefined && search !== null)
340
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
341
+ if (customFields !== undefined && customFields !== null)
342
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
343
+ if (tenantId !== undefined && tenantId !== null)
344
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
345
+ url_ = url_.replace(/[?&]$/, "");
346
+ let options_ = {
347
+ method: "GET",
348
+ url: url_,
349
+ headers: {
350
+ "Accept": "application/json"
351
+ },
352
+ cancelToken
353
+ };
354
+ return this.transformOptions(options_).then(transformedOptions_ => {
355
+ return this.instance.request(transformedOptions_);
356
+ }).catch((_error) => {
357
+ if (isAxiosError(_error) && _error.response) {
358
+ return _error.response;
359
+ }
360
+ else {
361
+ throw _error;
362
+ }
363
+ }).then((_response) => {
364
+ return this.transformResult(url_, _response, (_response) => this.processGetAllProductBundles(_response));
365
+ });
366
+ }
367
+ processGetAllProductBundles(response) {
368
+ const status = response.status;
369
+ let _headers = {};
370
+ if (response.headers && typeof response.headers === "object") {
371
+ for (let k in response.headers) {
372
+ if (response.headers.hasOwnProperty(k)) {
373
+ _headers[k] = response.headers[k];
374
+ }
375
+ }
376
+ }
377
+ if (status === 200) {
378
+ const _responseText = response.data;
379
+ let result200 = null;
380
+ let resultData200 = _responseText;
381
+ result200 = JSON.parse(resultData200);
382
+ return Promise.resolve(result200);
383
+ }
384
+ else if (status === 401) {
385
+ const _responseText = response.data;
386
+ return throwException("Unauthorized", status, _responseText, _headers);
387
+ }
388
+ else if (status === 403) {
389
+ const _responseText = response.data;
390
+ return throwException("Forbidden", status, _responseText, _headers);
391
+ }
392
+ else if (status !== 200 && status !== 204) {
393
+ const _responseText = response.data;
394
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
395
+ }
396
+ return Promise.resolve(null);
397
+ }
398
+ /**
399
+ * Returns a product bundle by its identifier.
400
+ * @param id Product identifier.
401
+ * @param productBundleVersionId (optional) Product bundle version identifier. Optional
402
+ * @param tenantId (optional) Tenant identifier.
403
+ * @return Success
404
+ */
405
+ getProductBundle(id, productBundleVersionId, tenantId, cancelToken) {
406
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}?";
407
+ if (id === undefined || id === null)
408
+ throw new Error("The parameter 'id' must be defined.");
409
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
410
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
411
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
412
+ if (tenantId !== undefined && tenantId !== null)
413
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
414
+ url_ = url_.replace(/[?&]$/, "");
415
+ let options_ = {
416
+ method: "GET",
417
+ url: url_,
418
+ headers: {
419
+ "Accept": "application/json"
420
+ },
421
+ cancelToken
422
+ };
423
+ return this.transformOptions(options_).then(transformedOptions_ => {
424
+ return this.instance.request(transformedOptions_);
425
+ }).catch((_error) => {
426
+ if (isAxiosError(_error) && _error.response) {
427
+ return _error.response;
428
+ }
429
+ else {
430
+ throw _error;
431
+ }
432
+ }).then((_response) => {
433
+ return this.transformResult(url_, _response, (_response) => this.processGetProductBundle(_response));
434
+ });
435
+ }
436
+ processGetProductBundle(response) {
437
+ const status = response.status;
438
+ let _headers = {};
439
+ if (response.headers && typeof response.headers === "object") {
440
+ for (let k in response.headers) {
441
+ if (response.headers.hasOwnProperty(k)) {
442
+ _headers[k] = response.headers[k];
443
+ }
444
+ }
445
+ }
446
+ if (status === 200) {
447
+ const _responseText = response.data;
448
+ let result200 = null;
449
+ let resultData200 = _responseText;
450
+ result200 = JSON.parse(resultData200);
451
+ return Promise.resolve(result200);
452
+ }
453
+ else if (status === 404) {
454
+ const _responseText = response.data;
455
+ let result404 = null;
456
+ let resultData404 = _responseText;
457
+ result404 = JSON.parse(resultData404);
458
+ return throwException("Not Found", status, _responseText, _headers, result404);
459
+ }
460
+ else if (status === 409) {
461
+ const _responseText = response.data;
462
+ let result409 = null;
463
+ let resultData409 = _responseText;
464
+ result409 = JSON.parse(resultData409);
465
+ return throwException("Conflict", status, _responseText, _headers, result409);
466
+ }
467
+ else if (status === 401) {
468
+ const _responseText = response.data;
469
+ return throwException("Unauthorized", status, _responseText, _headers);
470
+ }
471
+ else if (status === 403) {
472
+ const _responseText = response.data;
473
+ return throwException("Forbidden", status, _responseText, _headers);
474
+ }
475
+ else if (status !== 200 && status !== 204) {
476
+ const _responseText = response.data;
477
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
478
+ }
479
+ return Promise.resolve(null);
480
+ }
481
+ /**
482
+ * Returns a product bundle summary by product bundle identifier.
483
+ * @param id Product bundle identifier.
484
+ * @param productBundleVersionId (optional) Product bundle version identifier.
485
+ * @param productVariantId (optional) Product variant identifier.
486
+ * @param sku (optional) Product variant SKU.
487
+ * @param tenantId (optional) Tenant identifier.
488
+ * @return Success
489
+ */
490
+ getProductSummary(id, productBundleVersionId, productVariantId, sku, tenantId, cancelToken) {
491
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/summary?";
492
+ if (id === undefined || id === null)
493
+ throw new Error("The parameter 'id' must be defined.");
494
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
495
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
496
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
497
+ if (productVariantId !== undefined && productVariantId !== null)
498
+ url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
499
+ if (sku !== undefined && sku !== null)
500
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
501
+ if (tenantId !== undefined && tenantId !== null)
502
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
503
+ url_ = url_.replace(/[?&]$/, "");
504
+ let options_ = {
505
+ method: "GET",
506
+ url: url_,
507
+ headers: {
508
+ "Accept": "application/json"
509
+ },
510
+ cancelToken
511
+ };
512
+ return this.transformOptions(options_).then(transformedOptions_ => {
513
+ return this.instance.request(transformedOptions_);
514
+ }).catch((_error) => {
515
+ if (isAxiosError(_error) && _error.response) {
516
+ return _error.response;
517
+ }
518
+ else {
519
+ throw _error;
520
+ }
521
+ }).then((_response) => {
522
+ return this.transformResult(url_, _response, (_response) => this.processGetProductSummary(_response));
523
+ });
524
+ }
525
+ processGetProductSummary(response) {
526
+ const status = response.status;
527
+ let _headers = {};
528
+ if (response.headers && typeof response.headers === "object") {
529
+ for (let k in response.headers) {
530
+ if (response.headers.hasOwnProperty(k)) {
531
+ _headers[k] = response.headers[k];
532
+ }
533
+ }
534
+ }
535
+ if (status === 200) {
536
+ const _responseText = response.data;
537
+ let result200 = null;
538
+ let resultData200 = _responseText;
539
+ result200 = JSON.parse(resultData200);
540
+ return Promise.resolve(result200);
541
+ }
542
+ else if (status === 404) {
543
+ const _responseText = response.data;
544
+ let result404 = null;
545
+ let resultData404 = _responseText;
546
+ result404 = JSON.parse(resultData404);
547
+ return throwException("Not Found", status, _responseText, _headers, result404);
548
+ }
549
+ else if (status === 409) {
550
+ const _responseText = response.data;
551
+ let result409 = null;
552
+ let resultData409 = _responseText;
553
+ result409 = JSON.parse(resultData409);
554
+ return throwException("Conflict", status, _responseText, _headers, result409);
555
+ }
556
+ else if (status === 401) {
557
+ const _responseText = response.data;
558
+ return throwException("Unauthorized", status, _responseText, _headers);
559
+ }
560
+ else if (status === 403) {
561
+ const _responseText = response.data;
562
+ return throwException("Forbidden", status, _responseText, _headers);
563
+ }
564
+ else if (status !== 200 && status !== 204) {
565
+ const _responseText = response.data;
566
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
567
+ }
568
+ return Promise.resolve(null);
569
+ }
570
+ /**
571
+ * Returns a product bundle personalization workflow description by product bundle identifier.
572
+ * @param id Product bundle identifier.
573
+ * @param productBundleVersionId (optional) Product bundle version identifier.
574
+ * @param tenantId (optional) Tenant identifier.
575
+ * @return Success
576
+ */
577
+ getPersonalizationWorkflow(id, productBundleVersionId, tenantId, cancelToken) {
578
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/personalization-workflow?";
579
+ if (id === undefined || id === null)
580
+ throw new Error("The parameter 'id' must be defined.");
581
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
582
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
583
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
584
+ if (tenantId !== undefined && tenantId !== null)
585
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
586
+ url_ = url_.replace(/[?&]$/, "");
587
+ let options_ = {
588
+ method: "GET",
589
+ url: url_,
590
+ headers: {
591
+ "Accept": "application/json"
592
+ },
593
+ cancelToken
594
+ };
595
+ return this.transformOptions(options_).then(transformedOptions_ => {
596
+ return this.instance.request(transformedOptions_);
597
+ }).catch((_error) => {
598
+ if (isAxiosError(_error) && _error.response) {
599
+ return _error.response;
600
+ }
601
+ else {
602
+ throw _error;
603
+ }
604
+ }).then((_response) => {
605
+ return this.transformResult(url_, _response, (_response) => this.processGetPersonalizationWorkflow(_response));
606
+ });
607
+ }
608
+ processGetPersonalizationWorkflow(response) {
609
+ const status = response.status;
610
+ let _headers = {};
611
+ if (response.headers && typeof response.headers === "object") {
612
+ for (let k in response.headers) {
613
+ if (response.headers.hasOwnProperty(k)) {
614
+ _headers[k] = response.headers[k];
615
+ }
616
+ }
617
+ }
618
+ if (status === 200) {
619
+ const _responseText = response.data;
620
+ let result200 = null;
621
+ let resultData200 = _responseText;
622
+ result200 = JSON.parse(resultData200);
623
+ return Promise.resolve(result200);
624
+ }
625
+ else if (status === 404) {
626
+ const _responseText = response.data;
627
+ let result404 = null;
628
+ let resultData404 = _responseText;
629
+ result404 = JSON.parse(resultData404);
630
+ return throwException("Not Found", status, _responseText, _headers, result404);
631
+ }
632
+ else if (status === 409) {
633
+ const _responseText = response.data;
634
+ let result409 = null;
635
+ let resultData409 = _responseText;
636
+ result409 = JSON.parse(resultData409);
637
+ return throwException("Conflict", status, _responseText, _headers, result409);
638
+ }
639
+ else if (status === 401) {
640
+ const _responseText = response.data;
641
+ return throwException("Unauthorized", status, _responseText, _headers);
642
+ }
643
+ else if (status === 403) {
644
+ const _responseText = response.data;
645
+ return throwException("Forbidden", status, _responseText, _headers);
646
+ }
647
+ else if (status !== 200 && status !== 204) {
648
+ const _responseText = response.data;
649
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
650
+ }
651
+ return Promise.resolve(null);
652
+ }
653
+ }
312
654
  export class ProductLinksApiClient extends ApiClientBase {
313
655
  instance;
314
656
  baseUrl;
@@ -677,6 +1019,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
677
1019
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
678
1020
  * @param productId (optional) Customer's Canvas product filter.
679
1021
  * @param productLinkId (optional) Customer's Canvas product link filter.
1022
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
680
1023
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
681
1024
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
682
1025
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -687,7 +1030,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
687
1030
  * @param tenantId (optional) Tenant identifier.
688
1031
  * @return Success
689
1032
  */
690
- getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1033
+ getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
691
1034
  let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
692
1035
  if (storefrontId === undefined || storefrontId === null)
693
1036
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -701,6 +1044,8 @@ export class ProductReferencesApiClient extends ApiClientBase {
701
1044
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
702
1045
  if (productLinkId !== undefined && productLinkId !== null)
703
1046
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1047
+ if (productBundleId !== undefined && productBundleId !== null)
1048
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
704
1049
  if (skip !== undefined && skip !== null)
705
1050
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
706
1051
  if (take !== undefined && take !== null)
@@ -785,6 +1130,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
785
1130
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
786
1131
  * @param productId (optional) Customer's Canvas product filter.
787
1132
  * @param productLinkId (optional) Customer's Canvas product link filter.
1133
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
788
1134
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
789
1135
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
790
1136
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -795,7 +1141,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
795
1141
  * @param tenantId (optional) Tenant identifier.
796
1142
  * @return Success
797
1143
  */
798
- getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1144
+ getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
799
1145
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-specifications?";
800
1146
  if (storefrontId === undefined || storefrontId === null)
801
1147
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -809,6 +1155,8 @@ export class ProductReferencesApiClient extends ApiClientBase {
809
1155
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
810
1156
  if (productLinkId !== undefined && productLinkId !== null)
811
1157
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1158
+ if (productBundleId !== undefined && productBundleId !== null)
1159
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
812
1160
  if (skip !== undefined && skip !== null)
813
1161
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
814
1162
  if (take !== undefined && take !== null)
@@ -893,6 +1241,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
893
1241
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
894
1242
  * @param productId (optional) Customer's Canvas product filter.
895
1243
  * @param productLinkId (optional) Customer's Canvas product link filter.
1244
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
896
1245
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
897
1246
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
898
1247
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -903,7 +1252,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
903
1252
  * @param tenantId (optional) Tenant identifier.
904
1253
  * @return Success
905
1254
  */
906
- getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1255
+ getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
907
1256
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/products?";
908
1257
  if (storefrontId === undefined || storefrontId === null)
909
1258
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -917,6 +1266,8 @@ export class ProductReferencesApiClient extends ApiClientBase {
917
1266
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
918
1267
  if (productLinkId !== undefined && productLinkId !== null)
919
1268
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1269
+ if (productBundleId !== undefined && productBundleId !== null)
1270
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
920
1271
  if (skip !== undefined && skip !== null)
921
1272
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
922
1273
  if (take !== undefined && take !== null)
@@ -1001,6 +1352,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
1001
1352
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1002
1353
  * @param productId (optional) Customer's Canvas product filter.
1003
1354
  * @param productLinkId (optional) Customer's Canvas product link filter.
1355
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1004
1356
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
1005
1357
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1006
1358
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -1011,7 +1363,7 @@ export class ProductReferencesApiClient extends ApiClientBase {
1011
1363
  * @param tenantId (optional) Tenant identifier.
1012
1364
  * @return Success
1013
1365
  */
1014
- getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1366
+ getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1015
1367
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-links?";
1016
1368
  if (storefrontId === undefined || storefrontId === null)
1017
1369
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -1025,6 +1377,8 @@ export class ProductReferencesApiClient extends ApiClientBase {
1025
1377
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1026
1378
  if (productLinkId !== undefined && productLinkId !== null)
1027
1379
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1380
+ if (productBundleId !== undefined && productBundleId !== null)
1381
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1028
1382
  if (skip !== undefined && skip !== null)
1029
1383
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1030
1384
  if (take !== undefined && take !== null)
@@ -1101,6 +1455,117 @@ export class ProductReferencesApiClient extends ApiClientBase {
1101
1455
  }
1102
1456
  return Promise.resolve(null);
1103
1457
  }
1458
+ /**
1459
+ * Returns a list of product bundles associated with storefront product references relevant to the specified query parameters.
1460
+ * @param storefrontId Storefront identifier.
1461
+ * @param productReference (optional) Product reference filter.
1462
+ Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
1463
+ * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1464
+ * @param productId (optional) Customer's Canvas product filter.
1465
+ * @param productLinkId (optional) Customer's Canvas product link filter.
1466
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1467
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
1468
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1469
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
1470
+ * @param search (optional) Search string for partial match.
1471
+ * @param sku (optional) SKU filter.
1472
+ * @param tags (optional) List of tags that product should have.
1473
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
1474
+ * @param tenantId (optional) Tenant identifier.
1475
+ * @return Success
1476
+ */
1477
+ getAllProductBundles(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1478
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-bundles?";
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 (productReference !== undefined && productReference !== null)
1484
+ url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
1485
+ if (productSpecificationId !== undefined && productSpecificationId !== null)
1486
+ url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
1487
+ if (productId !== undefined && productId !== null)
1488
+ url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1489
+ if (productLinkId !== undefined && productLinkId !== null)
1490
+ url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1491
+ if (productBundleId !== undefined && productBundleId !== null)
1492
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1493
+ if (skip !== undefined && skip !== null)
1494
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1495
+ if (take !== undefined && take !== null)
1496
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
1497
+ if (sorting !== undefined && sorting !== null)
1498
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
1499
+ if (search !== undefined && search !== null)
1500
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
1501
+ if (sku !== undefined && sku !== null)
1502
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
1503
+ if (tags !== undefined && tags !== null)
1504
+ tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
1505
+ if (customFields !== undefined && customFields !== null)
1506
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
1507
+ if (tenantId !== undefined && tenantId !== null)
1508
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1509
+ url_ = url_.replace(/[?&]$/, "");
1510
+ let options_ = {
1511
+ method: "GET",
1512
+ url: url_,
1513
+ headers: {
1514
+ "Accept": "application/json"
1515
+ },
1516
+ cancelToken
1517
+ };
1518
+ return this.transformOptions(options_).then(transformedOptions_ => {
1519
+ return this.instance.request(transformedOptions_);
1520
+ }).catch((_error) => {
1521
+ if (isAxiosError(_error) && _error.response) {
1522
+ return _error.response;
1523
+ }
1524
+ else {
1525
+ throw _error;
1526
+ }
1527
+ }).then((_response) => {
1528
+ return this.transformResult(url_, _response, (_response) => this.processGetAllProductBundles(_response));
1529
+ });
1530
+ }
1531
+ processGetAllProductBundles(response) {
1532
+ const status = response.status;
1533
+ let _headers = {};
1534
+ if (response.headers && typeof response.headers === "object") {
1535
+ for (let k in response.headers) {
1536
+ if (response.headers.hasOwnProperty(k)) {
1537
+ _headers[k] = response.headers[k];
1538
+ }
1539
+ }
1540
+ }
1541
+ if (status === 200) {
1542
+ const _responseText = response.data;
1543
+ let result200 = null;
1544
+ let resultData200 = _responseText;
1545
+ result200 = JSON.parse(resultData200);
1546
+ return Promise.resolve(result200);
1547
+ }
1548
+ else if (status === 409) {
1549
+ const _responseText = response.data;
1550
+ let result409 = null;
1551
+ let resultData409 = _responseText;
1552
+ result409 = JSON.parse(resultData409);
1553
+ return throwException("Conflict", status, _responseText, _headers, result409);
1554
+ }
1555
+ else if (status === 401) {
1556
+ const _responseText = response.data;
1557
+ return throwException("Unauthorized", status, _responseText, _headers);
1558
+ }
1559
+ else if (status === 403) {
1560
+ const _responseText = response.data;
1561
+ return throwException("Forbidden", status, _responseText, _headers);
1562
+ }
1563
+ else if (status !== 200 && status !== 204) {
1564
+ const _responseText = response.data;
1565
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1566
+ }
1567
+ return Promise.resolve(null);
1568
+ }
1104
1569
  /**
1105
1570
  * Returns a storefront product reference.
1106
1571
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -1532,6 +1997,91 @@ export class ProductReferencesApiClient extends ApiClientBase {
1532
1997
  }
1533
1998
  return Promise.resolve(null);
1534
1999
  }
2000
+ /**
2001
+ * Returns a product bundle by storefront product reference.
2002
+ * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
2003
+ * @param storefrontId Storefront identifier.
2004
+ * @param tenantId (optional) Tenant identifier.
2005
+ * @return Success
2006
+ */
2007
+ getProductBundle(reference, storefrontId, tenantId, cancelToken) {
2008
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-bundle?";
2009
+ if (reference === undefined || reference === null)
2010
+ throw new Error("The parameter 'reference' must be defined.");
2011
+ url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
2012
+ if (storefrontId === undefined || storefrontId === null)
2013
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
2014
+ else
2015
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
2016
+ if (tenantId !== undefined && tenantId !== null)
2017
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2018
+ url_ = url_.replace(/[?&]$/, "");
2019
+ let options_ = {
2020
+ method: "GET",
2021
+ url: url_,
2022
+ headers: {
2023
+ "Accept": "application/json"
2024
+ },
2025
+ cancelToken
2026
+ };
2027
+ return this.transformOptions(options_).then(transformedOptions_ => {
2028
+ return this.instance.request(transformedOptions_);
2029
+ }).catch((_error) => {
2030
+ if (isAxiosError(_error) && _error.response) {
2031
+ return _error.response;
2032
+ }
2033
+ else {
2034
+ throw _error;
2035
+ }
2036
+ }).then((_response) => {
2037
+ return this.transformResult(url_, _response, (_response) => this.processGetProductBundle(_response));
2038
+ });
2039
+ }
2040
+ processGetProductBundle(response) {
2041
+ const status = response.status;
2042
+ let _headers = {};
2043
+ if (response.headers && typeof response.headers === "object") {
2044
+ for (let k in response.headers) {
2045
+ if (response.headers.hasOwnProperty(k)) {
2046
+ _headers[k] = response.headers[k];
2047
+ }
2048
+ }
2049
+ }
2050
+ if (status === 200) {
2051
+ const _responseText = response.data;
2052
+ let result200 = null;
2053
+ let resultData200 = _responseText;
2054
+ result200 = JSON.parse(resultData200);
2055
+ return Promise.resolve(result200);
2056
+ }
2057
+ else if (status === 404) {
2058
+ const _responseText = response.data;
2059
+ let result404 = null;
2060
+ let resultData404 = _responseText;
2061
+ result404 = JSON.parse(resultData404);
2062
+ return throwException("Not Found", status, _responseText, _headers, result404);
2063
+ }
2064
+ else if (status === 409) {
2065
+ const _responseText = response.data;
2066
+ let result409 = null;
2067
+ let resultData409 = _responseText;
2068
+ result409 = JSON.parse(resultData409);
2069
+ return throwException("Conflict", status, _responseText, _headers, result409);
2070
+ }
2071
+ else if (status === 401) {
2072
+ const _responseText = response.data;
2073
+ return throwException("Unauthorized", status, _responseText, _headers);
2074
+ }
2075
+ else if (status === 403) {
2076
+ const _responseText = response.data;
2077
+ return throwException("Forbidden", status, _responseText, _headers);
2078
+ }
2079
+ else if (status !== 200 && status !== 204) {
2080
+ const _responseText = response.data;
2081
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2082
+ }
2083
+ return Promise.resolve(null);
2084
+ }
1535
2085
  /**
1536
2086
  * Returns a product cost details from ecommerce system.
1537
2087
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -5867,13 +6417,12 @@ export class TenantInfoApiClient extends ApiClientBase {
5867
6417
  return Promise.resolve(null);
5868
6418
  }
5869
6419
  }
5870
- /** Available option types. */
5871
- export var OptionType;
5872
- (function (OptionType) {
5873
- OptionType["Simple"] = "Simple";
5874
- OptionType["Size"] = "Size";
5875
- OptionType["PageCount"] = "PageCount";
5876
- })(OptionType || (OptionType = {}));
6420
+ /** Product bundle resource type. */
6421
+ export var ProductBundleResourceType;
6422
+ (function (ProductBundleResourceType) {
6423
+ ProductBundleResourceType["Custom"] = "Custom";
6424
+ ProductBundleResourceType["Preview"] = "Preview";
6425
+ })(ProductBundleResourceType || (ProductBundleResourceType = {}));
5877
6426
  /** Conflict types. */
5878
6427
  export var ConflictType;
5879
6428
  (function (ConflictType) {
@@ -5901,12 +6450,26 @@ export var WorkflowType;
5901
6450
  WorkflowType["DesignEditor"] = "DesignEditor";
5902
6451
  WorkflowType["WorkflowElements"] = "WorkflowElements";
5903
6452
  })(WorkflowType || (WorkflowType = {}));
6453
+ /** Product link resource type. */
6454
+ export var ProductLinkResourceType;
6455
+ (function (ProductLinkResourceType) {
6456
+ ProductLinkResourceType["Preview"] = "Preview";
6457
+ ProductLinkResourceType["Custom"] = "Custom";
6458
+ })(ProductLinkResourceType || (ProductLinkResourceType = {}));
6459
+ /** Available option types. */
6460
+ export var OptionType;
6461
+ (function (OptionType) {
6462
+ OptionType["Simple"] = "Simple";
6463
+ OptionType["Size"] = "Size";
6464
+ OptionType["PageCount"] = "PageCount";
6465
+ })(OptionType || (OptionType = {}));
5904
6466
  /** Available product reference target types. */
5905
6467
  export var ProductReferenceType;
5906
6468
  (function (ProductReferenceType) {
5907
6469
  ProductReferenceType["ProductSpecification"] = "ProductSpecification";
5908
6470
  ProductReferenceType["Product"] = "Product";
5909
6471
  ProductReferenceType["ProductLink"] = "ProductLink";
6472
+ ProductReferenceType["ProductBundle"] = "ProductBundle";
5910
6473
  })(ProductReferenceType || (ProductReferenceType = {}));
5911
6474
  /** Available product variant resource types. */
5912
6475
  export var ProductVariantResourceType;
@@ -5952,6 +6515,12 @@ export var ProjectItemResourceType;
5952
6515
  ProjectItemResourceType["Preview"] = "Preview";
5953
6516
  ProjectItemResourceType["Hires"] = "Hires";
5954
6517
  })(ProjectItemResourceType || (ProjectItemResourceType = {}));
6518
+ export var ProjectItemProductType;
6519
+ (function (ProjectItemProductType) {
6520
+ ProjectItemProductType["ProductSpecification"] = "ProductSpecification";
6521
+ ProjectItemProductType["Product"] = "Product";
6522
+ ProjectItemProductType["ProductLink"] = "ProductLink";
6523
+ })(ProjectItemProductType || (ProjectItemProductType = {}));
5955
6524
  export var RenderHiResScenarioOutputFormat;
5956
6525
  (function (RenderHiResScenarioOutputFormat) {
5957
6526
  RenderHiResScenarioOutputFormat["Pdf"] = "Pdf";