@aurigma/axios-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.
@@ -8,7 +8,7 @@
8
8
  //----------------------
9
9
  // ReSharper disable InconsistentNaming
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ApiException = exports.StorefrontType = exports.OrderDataItemValueType = exports.RenderHiResScenarioOutputRotateMode = exports.RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputColorSpace = exports.RenderHiResScenarioOutputFormat = exports.ProjectItemResourceType = exports.ProjectProcessingStatus = exports.DatePeriod = exports.SurfaceUsageType = exports.ProductVariantMockupType = exports.ProductVariantResourceType = exports.ProductReferenceType = exports.WorkflowType = exports.AppearanceDataType = exports.ConflictType = exports.OptionType = exports.TenantInfoApiClient = exports.StorefrontUsersApiClient = exports.StorefrontsApiClient = exports.ProjectsApiClient = exports.ProductSpecificationsApiClient = exports.ProductsApiClient = exports.ProductReferencesApiClient = exports.ProductLinksApiClient = exports.ProcessingPipelinesApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
11
+ exports.ApiException = exports.StorefrontType = exports.OrderDataItemValueType = exports.RenderHiResScenarioOutputRotateMode = exports.RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputColorSpace = exports.RenderHiResScenarioOutputFormat = exports.ProjectItemProductType = exports.ProjectItemResourceType = exports.ProjectProcessingStatus = exports.DatePeriod = exports.SurfaceUsageType = exports.ProductVariantMockupType = exports.ProductVariantResourceType = exports.ProductReferenceType = exports.OptionType = exports.ProductLinkResourceType = exports.WorkflowType = exports.AppearanceDataType = exports.ConflictType = exports.ProductBundleResourceType = exports.TenantInfoApiClient = exports.StorefrontUsersApiClient = exports.StorefrontsApiClient = exports.ProjectsApiClient = exports.ProductSpecificationsApiClient = exports.ProductsApiClient = exports.ProductReferencesApiClient = exports.ProductLinksApiClient = exports.ProductBundlesApiClient = exports.ProcessingPipelinesApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
12
12
  const axios_1 = require("axios");
13
13
  class ApiClientConfiguration {
14
14
  apiUrl;
@@ -316,6 +316,349 @@ class ProcessingPipelinesApiClient extends ApiClientBase {
316
316
  }
317
317
  }
318
318
  exports.ProcessingPipelinesApiClient = ProcessingPipelinesApiClient;
319
+ class ProductBundlesApiClient extends ApiClientBase {
320
+ instance;
321
+ baseUrl;
322
+ jsonParseReviver = undefined;
323
+ constructor(configuration, baseUrl, instance) {
324
+ super(configuration);
325
+ this.instance = instance ? instance : axios_1.create();
326
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
327
+ }
328
+ /**
329
+ * Returns all product bundles, relevant to the specified query parameters.
330
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
331
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
332
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
333
+ * @param search (optional) Search string for partial match.
334
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}
335
+ * @param tenantId (optional) Tenant identifier.
336
+ * @return Success
337
+ */
338
+ getAllProductBundles(skip, take, sorting, search, customFields, tenantId, cancelToken) {
339
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles?";
340
+ if (skip !== undefined && skip !== null)
341
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
342
+ if (take !== undefined && take !== null)
343
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
344
+ if (sorting !== undefined && sorting !== null)
345
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
346
+ if (search !== undefined && search !== null)
347
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
348
+ if (customFields !== undefined && customFields !== null)
349
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
350
+ if (tenantId !== undefined && tenantId !== null)
351
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
352
+ url_ = url_.replace(/[?&]$/, "");
353
+ let options_ = {
354
+ method: "GET",
355
+ url: url_,
356
+ headers: {
357
+ "Accept": "application/json"
358
+ },
359
+ cancelToken
360
+ };
361
+ return this.transformOptions(options_).then(transformedOptions_ => {
362
+ return this.instance.request(transformedOptions_);
363
+ }).catch((_error) => {
364
+ if (isAxiosError(_error) && _error.response) {
365
+ return _error.response;
366
+ }
367
+ else {
368
+ throw _error;
369
+ }
370
+ }).then((_response) => {
371
+ return this.transformResult(url_, _response, (_response) => this.processGetAllProductBundles(_response));
372
+ });
373
+ }
374
+ processGetAllProductBundles(response) {
375
+ const status = response.status;
376
+ let _headers = {};
377
+ if (response.headers && typeof response.headers === "object") {
378
+ for (let k in response.headers) {
379
+ if (response.headers.hasOwnProperty(k)) {
380
+ _headers[k] = response.headers[k];
381
+ }
382
+ }
383
+ }
384
+ if (status === 200) {
385
+ const _responseText = response.data;
386
+ let result200 = null;
387
+ let resultData200 = _responseText;
388
+ result200 = JSON.parse(resultData200);
389
+ return Promise.resolve(result200);
390
+ }
391
+ else if (status === 401) {
392
+ const _responseText = response.data;
393
+ return throwException("Unauthorized", status, _responseText, _headers);
394
+ }
395
+ else if (status === 403) {
396
+ const _responseText = response.data;
397
+ return throwException("Forbidden", status, _responseText, _headers);
398
+ }
399
+ else if (status !== 200 && status !== 204) {
400
+ const _responseText = response.data;
401
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
402
+ }
403
+ return Promise.resolve(null);
404
+ }
405
+ /**
406
+ * Returns a product bundle by its identifier.
407
+ * @param id Product identifier.
408
+ * @param productBundleVersionId (optional) Product bundle version identifier. Optional
409
+ * @param tenantId (optional) Tenant identifier.
410
+ * @return Success
411
+ */
412
+ getProductBundle(id, productBundleVersionId, tenantId, cancelToken) {
413
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}?";
414
+ if (id === undefined || id === null)
415
+ throw new Error("The parameter 'id' must be defined.");
416
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
417
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
418
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
419
+ if (tenantId !== undefined && tenantId !== null)
420
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
421
+ url_ = url_.replace(/[?&]$/, "");
422
+ let options_ = {
423
+ method: "GET",
424
+ url: url_,
425
+ headers: {
426
+ "Accept": "application/json"
427
+ },
428
+ cancelToken
429
+ };
430
+ return this.transformOptions(options_).then(transformedOptions_ => {
431
+ return this.instance.request(transformedOptions_);
432
+ }).catch((_error) => {
433
+ if (isAxiosError(_error) && _error.response) {
434
+ return _error.response;
435
+ }
436
+ else {
437
+ throw _error;
438
+ }
439
+ }).then((_response) => {
440
+ return this.transformResult(url_, _response, (_response) => this.processGetProductBundle(_response));
441
+ });
442
+ }
443
+ processGetProductBundle(response) {
444
+ const status = response.status;
445
+ let _headers = {};
446
+ if (response.headers && typeof response.headers === "object") {
447
+ for (let k in response.headers) {
448
+ if (response.headers.hasOwnProperty(k)) {
449
+ _headers[k] = response.headers[k];
450
+ }
451
+ }
452
+ }
453
+ if (status === 200) {
454
+ const _responseText = response.data;
455
+ let result200 = null;
456
+ let resultData200 = _responseText;
457
+ result200 = JSON.parse(resultData200);
458
+ return Promise.resolve(result200);
459
+ }
460
+ else if (status === 404) {
461
+ const _responseText = response.data;
462
+ let result404 = null;
463
+ let resultData404 = _responseText;
464
+ result404 = JSON.parse(resultData404);
465
+ return throwException("Not Found", status, _responseText, _headers, result404);
466
+ }
467
+ else if (status === 409) {
468
+ const _responseText = response.data;
469
+ let result409 = null;
470
+ let resultData409 = _responseText;
471
+ result409 = JSON.parse(resultData409);
472
+ return throwException("Conflict", status, _responseText, _headers, result409);
473
+ }
474
+ else if (status === 401) {
475
+ const _responseText = response.data;
476
+ return throwException("Unauthorized", status, _responseText, _headers);
477
+ }
478
+ else if (status === 403) {
479
+ const _responseText = response.data;
480
+ return throwException("Forbidden", status, _responseText, _headers);
481
+ }
482
+ else if (status !== 200 && status !== 204) {
483
+ const _responseText = response.data;
484
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
485
+ }
486
+ return Promise.resolve(null);
487
+ }
488
+ /**
489
+ * Returns a product bundle summary by product bundle identifier.
490
+ * @param id Product bundle identifier.
491
+ * @param productBundleVersionId (optional) Product bundle version identifier.
492
+ * @param productVariantId (optional) Product variant identifier.
493
+ * @param sku (optional) Product variant SKU.
494
+ * @param tenantId (optional) Tenant identifier.
495
+ * @return Success
496
+ */
497
+ getProductSummary(id, productBundleVersionId, productVariantId, sku, tenantId, cancelToken) {
498
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/summary?";
499
+ if (id === undefined || id === null)
500
+ throw new Error("The parameter 'id' must be defined.");
501
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
502
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
503
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
504
+ if (productVariantId !== undefined && productVariantId !== null)
505
+ url_ += "productVariantId=" + encodeURIComponent("" + productVariantId) + "&";
506
+ if (sku !== undefined && sku !== null)
507
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
508
+ if (tenantId !== undefined && tenantId !== null)
509
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
510
+ url_ = url_.replace(/[?&]$/, "");
511
+ let options_ = {
512
+ method: "GET",
513
+ url: url_,
514
+ headers: {
515
+ "Accept": "application/json"
516
+ },
517
+ cancelToken
518
+ };
519
+ return this.transformOptions(options_).then(transformedOptions_ => {
520
+ return this.instance.request(transformedOptions_);
521
+ }).catch((_error) => {
522
+ if (isAxiosError(_error) && _error.response) {
523
+ return _error.response;
524
+ }
525
+ else {
526
+ throw _error;
527
+ }
528
+ }).then((_response) => {
529
+ return this.transformResult(url_, _response, (_response) => this.processGetProductSummary(_response));
530
+ });
531
+ }
532
+ processGetProductSummary(response) {
533
+ const status = response.status;
534
+ let _headers = {};
535
+ if (response.headers && typeof response.headers === "object") {
536
+ for (let k in response.headers) {
537
+ if (response.headers.hasOwnProperty(k)) {
538
+ _headers[k] = response.headers[k];
539
+ }
540
+ }
541
+ }
542
+ if (status === 200) {
543
+ const _responseText = response.data;
544
+ let result200 = null;
545
+ let resultData200 = _responseText;
546
+ result200 = JSON.parse(resultData200);
547
+ return Promise.resolve(result200);
548
+ }
549
+ else if (status === 404) {
550
+ const _responseText = response.data;
551
+ let result404 = null;
552
+ let resultData404 = _responseText;
553
+ result404 = JSON.parse(resultData404);
554
+ return throwException("Not Found", status, _responseText, _headers, result404);
555
+ }
556
+ else if (status === 409) {
557
+ const _responseText = response.data;
558
+ let result409 = null;
559
+ let resultData409 = _responseText;
560
+ result409 = JSON.parse(resultData409);
561
+ return throwException("Conflict", status, _responseText, _headers, result409);
562
+ }
563
+ else if (status === 401) {
564
+ const _responseText = response.data;
565
+ return throwException("Unauthorized", status, _responseText, _headers);
566
+ }
567
+ else if (status === 403) {
568
+ const _responseText = response.data;
569
+ return throwException("Forbidden", status, _responseText, _headers);
570
+ }
571
+ else if (status !== 200 && status !== 204) {
572
+ const _responseText = response.data;
573
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
574
+ }
575
+ return Promise.resolve(null);
576
+ }
577
+ /**
578
+ * Returns a product bundle personalization workflow description by product bundle identifier.
579
+ * @param id Product bundle identifier.
580
+ * @param productBundleVersionId (optional) Product bundle version identifier.
581
+ * @param tenantId (optional) Tenant identifier.
582
+ * @return Success
583
+ */
584
+ getPersonalizationWorkflow(id, productBundleVersionId, tenantId, cancelToken) {
585
+ let url_ = this.baseUrl + "/api/storefront/v1/product-bundles/{id}/personalization-workflow?";
586
+ if (id === undefined || id === null)
587
+ throw new Error("The parameter 'id' must be defined.");
588
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
589
+ if (productBundleVersionId !== undefined && productBundleVersionId !== null)
590
+ url_ += "productBundleVersionId=" + encodeURIComponent("" + productBundleVersionId) + "&";
591
+ if (tenantId !== undefined && tenantId !== null)
592
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
593
+ url_ = url_.replace(/[?&]$/, "");
594
+ let options_ = {
595
+ method: "GET",
596
+ url: url_,
597
+ headers: {
598
+ "Accept": "application/json"
599
+ },
600
+ cancelToken
601
+ };
602
+ return this.transformOptions(options_).then(transformedOptions_ => {
603
+ return this.instance.request(transformedOptions_);
604
+ }).catch((_error) => {
605
+ if (isAxiosError(_error) && _error.response) {
606
+ return _error.response;
607
+ }
608
+ else {
609
+ throw _error;
610
+ }
611
+ }).then((_response) => {
612
+ return this.transformResult(url_, _response, (_response) => this.processGetPersonalizationWorkflow(_response));
613
+ });
614
+ }
615
+ processGetPersonalizationWorkflow(response) {
616
+ const status = response.status;
617
+ let _headers = {};
618
+ if (response.headers && typeof response.headers === "object") {
619
+ for (let k in response.headers) {
620
+ if (response.headers.hasOwnProperty(k)) {
621
+ _headers[k] = response.headers[k];
622
+ }
623
+ }
624
+ }
625
+ if (status === 200) {
626
+ const _responseText = response.data;
627
+ let result200 = null;
628
+ let resultData200 = _responseText;
629
+ result200 = JSON.parse(resultData200);
630
+ return Promise.resolve(result200);
631
+ }
632
+ else if (status === 404) {
633
+ const _responseText = response.data;
634
+ let result404 = null;
635
+ let resultData404 = _responseText;
636
+ result404 = JSON.parse(resultData404);
637
+ return throwException("Not Found", status, _responseText, _headers, result404);
638
+ }
639
+ else if (status === 409) {
640
+ const _responseText = response.data;
641
+ let result409 = null;
642
+ let resultData409 = _responseText;
643
+ result409 = JSON.parse(resultData409);
644
+ return throwException("Conflict", status, _responseText, _headers, result409);
645
+ }
646
+ else if (status === 401) {
647
+ const _responseText = response.data;
648
+ return throwException("Unauthorized", status, _responseText, _headers);
649
+ }
650
+ else if (status === 403) {
651
+ const _responseText = response.data;
652
+ return throwException("Forbidden", status, _responseText, _headers);
653
+ }
654
+ else if (status !== 200 && status !== 204) {
655
+ const _responseText = response.data;
656
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
657
+ }
658
+ return Promise.resolve(null);
659
+ }
660
+ }
661
+ exports.ProductBundlesApiClient = ProductBundlesApiClient;
319
662
  class ProductLinksApiClient extends ApiClientBase {
320
663
  instance;
321
664
  baseUrl;
@@ -685,6 +1028,7 @@ class ProductReferencesApiClient extends ApiClientBase {
685
1028
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
686
1029
  * @param productId (optional) Customer's Canvas product filter.
687
1030
  * @param productLinkId (optional) Customer's Canvas product link filter.
1031
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
688
1032
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
689
1033
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
690
1034
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -695,7 +1039,7 @@ class ProductReferencesApiClient extends ApiClientBase {
695
1039
  * @param tenantId (optional) Tenant identifier.
696
1040
  * @return Success
697
1041
  */
698
- getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1042
+ getAll(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
699
1043
  let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
700
1044
  if (storefrontId === undefined || storefrontId === null)
701
1045
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -709,6 +1053,8 @@ class ProductReferencesApiClient extends ApiClientBase {
709
1053
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
710
1054
  if (productLinkId !== undefined && productLinkId !== null)
711
1055
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1056
+ if (productBundleId !== undefined && productBundleId !== null)
1057
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
712
1058
  if (skip !== undefined && skip !== null)
713
1059
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
714
1060
  if (take !== undefined && take !== null)
@@ -793,6 +1139,7 @@ class ProductReferencesApiClient extends ApiClientBase {
793
1139
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
794
1140
  * @param productId (optional) Customer's Canvas product filter.
795
1141
  * @param productLinkId (optional) Customer's Canvas product link filter.
1142
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
796
1143
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
797
1144
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
798
1145
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -803,7 +1150,7 @@ class ProductReferencesApiClient extends ApiClientBase {
803
1150
  * @param tenantId (optional) Tenant identifier.
804
1151
  * @return Success
805
1152
  */
806
- getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1153
+ getAllProductSpecifications(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
807
1154
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-specifications?";
808
1155
  if (storefrontId === undefined || storefrontId === null)
809
1156
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -817,6 +1164,8 @@ class ProductReferencesApiClient extends ApiClientBase {
817
1164
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
818
1165
  if (productLinkId !== undefined && productLinkId !== null)
819
1166
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1167
+ if (productBundleId !== undefined && productBundleId !== null)
1168
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
820
1169
  if (skip !== undefined && skip !== null)
821
1170
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
822
1171
  if (take !== undefined && take !== null)
@@ -901,6 +1250,7 @@ class ProductReferencesApiClient extends ApiClientBase {
901
1250
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
902
1251
  * @param productId (optional) Customer's Canvas product filter.
903
1252
  * @param productLinkId (optional) Customer's Canvas product link filter.
1253
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
904
1254
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
905
1255
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
906
1256
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -911,7 +1261,7 @@ class ProductReferencesApiClient extends ApiClientBase {
911
1261
  * @param tenantId (optional) Tenant identifier.
912
1262
  * @return Success
913
1263
  */
914
- getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1264
+ getAllProducts(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
915
1265
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/products?";
916
1266
  if (storefrontId === undefined || storefrontId === null)
917
1267
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -925,6 +1275,8 @@ class ProductReferencesApiClient extends ApiClientBase {
925
1275
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
926
1276
  if (productLinkId !== undefined && productLinkId !== null)
927
1277
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1278
+ if (productBundleId !== undefined && productBundleId !== null)
1279
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
928
1280
  if (skip !== undefined && skip !== null)
929
1281
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
930
1282
  if (take !== undefined && take !== null)
@@ -1009,6 +1361,7 @@ class ProductReferencesApiClient extends ApiClientBase {
1009
1361
  * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1010
1362
  * @param productId (optional) Customer's Canvas product filter.
1011
1363
  * @param productLinkId (optional) Customer's Canvas product link filter.
1364
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1012
1365
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
1013
1366
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1014
1367
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -1019,7 +1372,7 @@ class ProductReferencesApiClient extends ApiClientBase {
1019
1372
  * @param tenantId (optional) Tenant identifier.
1020
1373
  * @return Success
1021
1374
  */
1022
- getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1375
+ getAllProductLinks(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1023
1376
  let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-links?";
1024
1377
  if (storefrontId === undefined || storefrontId === null)
1025
1378
  throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
@@ -1033,6 +1386,8 @@ class ProductReferencesApiClient extends ApiClientBase {
1033
1386
  url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1034
1387
  if (productLinkId !== undefined && productLinkId !== null)
1035
1388
  url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1389
+ if (productBundleId !== undefined && productBundleId !== null)
1390
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1036
1391
  if (skip !== undefined && skip !== null)
1037
1392
  url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1038
1393
  if (take !== undefined && take !== null)
@@ -1109,6 +1464,117 @@ class ProductReferencesApiClient extends ApiClientBase {
1109
1464
  }
1110
1465
  return Promise.resolve(null);
1111
1466
  }
1467
+ /**
1468
+ * Returns a list of product bundles associated with storefront product references relevant to the specified query parameters.
1469
+ * @param storefrontId Storefront identifier.
1470
+ * @param productReference (optional) Product reference filter.
1471
+ Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
1472
+ * @param productSpecificationId (optional) Customer's Canvas product specification filter.
1473
+ * @param productId (optional) Customer's Canvas product filter.
1474
+ * @param productLinkId (optional) Customer's Canvas product link filter.
1475
+ * @param productBundleId (optional) Customer's Canvas product bundle filter.
1476
+ * @param skip (optional) Defines page start offset from beginning of sorted result list.
1477
+ * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
1478
+ * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
1479
+ * @param search (optional) Search string for partial match.
1480
+ * @param sku (optional) SKU filter.
1481
+ * @param tags (optional) List of tags that product should have.
1482
+ * @param customFields (optional) Serialized custom fields dictionary filter. For example: {"public":"true","name":"my item"}.
1483
+ * @param tenantId (optional) Tenant identifier.
1484
+ * @return Success
1485
+ */
1486
+ getAllProductBundles(storefrontId, productReference, productSpecificationId, productId, productLinkId, productBundleId, skip, take, sorting, search, sku, tags, customFields, tenantId, cancelToken) {
1487
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/product-bundles?";
1488
+ if (storefrontId === undefined || storefrontId === null)
1489
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1490
+ else
1491
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1492
+ if (productReference !== undefined && productReference !== null)
1493
+ url_ += "productReference=" + encodeURIComponent("" + productReference) + "&";
1494
+ if (productSpecificationId !== undefined && productSpecificationId !== null)
1495
+ url_ += "productSpecificationId=" + encodeURIComponent("" + productSpecificationId) + "&";
1496
+ if (productId !== undefined && productId !== null)
1497
+ url_ += "productId=" + encodeURIComponent("" + productId) + "&";
1498
+ if (productLinkId !== undefined && productLinkId !== null)
1499
+ url_ += "productLinkId=" + encodeURIComponent("" + productLinkId) + "&";
1500
+ if (productBundleId !== undefined && productBundleId !== null)
1501
+ url_ += "productBundleId=" + encodeURIComponent("" + productBundleId) + "&";
1502
+ if (skip !== undefined && skip !== null)
1503
+ url_ += "skip=" + encodeURIComponent("" + skip) + "&";
1504
+ if (take !== undefined && take !== null)
1505
+ url_ += "take=" + encodeURIComponent("" + take) + "&";
1506
+ if (sorting !== undefined && sorting !== null)
1507
+ url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
1508
+ if (search !== undefined && search !== null)
1509
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
1510
+ if (sku !== undefined && sku !== null)
1511
+ url_ += "sku=" + encodeURIComponent("" + sku) + "&";
1512
+ if (tags !== undefined && tags !== null)
1513
+ tags && tags.forEach(item => { url_ += "tags=" + encodeURIComponent("" + item) + "&"; });
1514
+ if (customFields !== undefined && customFields !== null)
1515
+ url_ += "customFields=" + encodeURIComponent("" + customFields) + "&";
1516
+ if (tenantId !== undefined && tenantId !== null)
1517
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1518
+ url_ = url_.replace(/[?&]$/, "");
1519
+ let options_ = {
1520
+ method: "GET",
1521
+ url: url_,
1522
+ headers: {
1523
+ "Accept": "application/json"
1524
+ },
1525
+ cancelToken
1526
+ };
1527
+ return this.transformOptions(options_).then(transformedOptions_ => {
1528
+ return this.instance.request(transformedOptions_);
1529
+ }).catch((_error) => {
1530
+ if (isAxiosError(_error) && _error.response) {
1531
+ return _error.response;
1532
+ }
1533
+ else {
1534
+ throw _error;
1535
+ }
1536
+ }).then((_response) => {
1537
+ return this.transformResult(url_, _response, (_response) => this.processGetAllProductBundles(_response));
1538
+ });
1539
+ }
1540
+ processGetAllProductBundles(response) {
1541
+ const status = response.status;
1542
+ let _headers = {};
1543
+ if (response.headers && typeof response.headers === "object") {
1544
+ for (let k in response.headers) {
1545
+ if (response.headers.hasOwnProperty(k)) {
1546
+ _headers[k] = response.headers[k];
1547
+ }
1548
+ }
1549
+ }
1550
+ if (status === 200) {
1551
+ const _responseText = response.data;
1552
+ let result200 = null;
1553
+ let resultData200 = _responseText;
1554
+ result200 = JSON.parse(resultData200);
1555
+ return Promise.resolve(result200);
1556
+ }
1557
+ else if (status === 409) {
1558
+ const _responseText = response.data;
1559
+ let result409 = null;
1560
+ let resultData409 = _responseText;
1561
+ result409 = JSON.parse(resultData409);
1562
+ return throwException("Conflict", status, _responseText, _headers, result409);
1563
+ }
1564
+ else if (status === 401) {
1565
+ const _responseText = response.data;
1566
+ return throwException("Unauthorized", status, _responseText, _headers);
1567
+ }
1568
+ else if (status === 403) {
1569
+ const _responseText = response.data;
1570
+ return throwException("Forbidden", status, _responseText, _headers);
1571
+ }
1572
+ else if (status !== 200 && status !== 204) {
1573
+ const _responseText = response.data;
1574
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1575
+ }
1576
+ return Promise.resolve(null);
1577
+ }
1112
1578
  /**
1113
1579
  * Returns a storefront product reference.
1114
1580
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -1540,6 +2006,91 @@ class ProductReferencesApiClient extends ApiClientBase {
1540
2006
  }
1541
2007
  return Promise.resolve(null);
1542
2008
  }
2009
+ /**
2010
+ * Returns a product bundle by storefront product reference.
2011
+ * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
2012
+ * @param storefrontId Storefront identifier.
2013
+ * @param tenantId (optional) Tenant identifier.
2014
+ * @return Success
2015
+ */
2016
+ getProductBundle(reference, storefrontId, tenantId, cancelToken) {
2017
+ let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-bundle?";
2018
+ if (reference === undefined || reference === null)
2019
+ throw new Error("The parameter 'reference' must be defined.");
2020
+ url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
2021
+ if (storefrontId === undefined || storefrontId === null)
2022
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
2023
+ else
2024
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
2025
+ if (tenantId !== undefined && tenantId !== null)
2026
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2027
+ url_ = url_.replace(/[?&]$/, "");
2028
+ let options_ = {
2029
+ method: "GET",
2030
+ url: url_,
2031
+ headers: {
2032
+ "Accept": "application/json"
2033
+ },
2034
+ cancelToken
2035
+ };
2036
+ return this.transformOptions(options_).then(transformedOptions_ => {
2037
+ return this.instance.request(transformedOptions_);
2038
+ }).catch((_error) => {
2039
+ if (isAxiosError(_error) && _error.response) {
2040
+ return _error.response;
2041
+ }
2042
+ else {
2043
+ throw _error;
2044
+ }
2045
+ }).then((_response) => {
2046
+ return this.transformResult(url_, _response, (_response) => this.processGetProductBundle(_response));
2047
+ });
2048
+ }
2049
+ processGetProductBundle(response) {
2050
+ const status = response.status;
2051
+ let _headers = {};
2052
+ if (response.headers && typeof response.headers === "object") {
2053
+ for (let k in response.headers) {
2054
+ if (response.headers.hasOwnProperty(k)) {
2055
+ _headers[k] = response.headers[k];
2056
+ }
2057
+ }
2058
+ }
2059
+ if (status === 200) {
2060
+ const _responseText = response.data;
2061
+ let result200 = null;
2062
+ let resultData200 = _responseText;
2063
+ result200 = JSON.parse(resultData200);
2064
+ return Promise.resolve(result200);
2065
+ }
2066
+ else if (status === 404) {
2067
+ const _responseText = response.data;
2068
+ let result404 = null;
2069
+ let resultData404 = _responseText;
2070
+ result404 = JSON.parse(resultData404);
2071
+ return throwException("Not Found", status, _responseText, _headers, result404);
2072
+ }
2073
+ else if (status === 409) {
2074
+ const _responseText = response.data;
2075
+ let result409 = null;
2076
+ let resultData409 = _responseText;
2077
+ result409 = JSON.parse(resultData409);
2078
+ return throwException("Conflict", status, _responseText, _headers, result409);
2079
+ }
2080
+ else if (status === 401) {
2081
+ const _responseText = response.data;
2082
+ return throwException("Unauthorized", status, _responseText, _headers);
2083
+ }
2084
+ else if (status === 403) {
2085
+ const _responseText = response.data;
2086
+ return throwException("Forbidden", status, _responseText, _headers);
2087
+ }
2088
+ else if (status !== 200 && status !== 204) {
2089
+ const _responseText = response.data;
2090
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2091
+ }
2092
+ return Promise.resolve(null);
2093
+ }
1543
2094
  /**
1544
2095
  * Returns a product cost details from ecommerce system.
1545
2096
  * @param reference An external reference to Customer's Canvas product, e.g online store product identifier.
@@ -2143,7 +2694,7 @@ class ProductsApiClient extends ApiClientBase {
2143
2694
  /**
2144
2695
  * Returns a list of product links.
2145
2696
  * @param id Product identifier.
2146
- * @param productVersionId (optional)
2697
+ * @param productVersionId (optional) Product version identifier.
2147
2698
  * @param skip (optional) Defines page start offset from beginning of sorted result list.
2148
2699
  * @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
2149
2700
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
@@ -2239,7 +2790,7 @@ class ProductsApiClient extends ApiClientBase {
2239
2790
  * Returns a product link.
2240
2791
  * @param id Product identifier.
2241
2792
  * @param productLinkId Product link identifier.
2242
- * @param productVersionId (optional)
2793
+ * @param productVersionId (optional) Product version identifier.
2243
2794
  * @param tenantId (optional) Tenant identifier.
2244
2795
  * @return Success
2245
2796
  */
@@ -4402,6 +4953,13 @@ class ProjectsApiClient extends ApiClientBase {
4402
4953
  result200 = JSON.parse(resultData200);
4403
4954
  return Promise.resolve(result200);
4404
4955
  }
4956
+ else if (status === 404) {
4957
+ const _responseText = response.data;
4958
+ let result404 = null;
4959
+ let resultData404 = _responseText;
4960
+ result404 = JSON.parse(resultData404);
4961
+ return throwException("Not Found", status, _responseText, _headers, result404);
4962
+ }
4405
4963
  else if (status === 401) {
4406
4964
  const _responseText = response.data;
4407
4965
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -5882,13 +6440,12 @@ class TenantInfoApiClient extends ApiClientBase {
5882
6440
  }
5883
6441
  }
5884
6442
  exports.TenantInfoApiClient = TenantInfoApiClient;
5885
- /** Available option types. */
5886
- var OptionType;
5887
- (function (OptionType) {
5888
- OptionType["Simple"] = "Simple";
5889
- OptionType["Size"] = "Size";
5890
- OptionType["PageCount"] = "PageCount";
5891
- })(OptionType = exports.OptionType || (exports.OptionType = {}));
6443
+ /** Product bundle resource type. */
6444
+ var ProductBundleResourceType;
6445
+ (function (ProductBundleResourceType) {
6446
+ ProductBundleResourceType["Custom"] = "Custom";
6447
+ ProductBundleResourceType["Preview"] = "Preview";
6448
+ })(ProductBundleResourceType = exports.ProductBundleResourceType || (exports.ProductBundleResourceType = {}));
5892
6449
  /** Conflict types. */
5893
6450
  var ConflictType;
5894
6451
  (function (ConflictType) {
@@ -5916,12 +6473,26 @@ var WorkflowType;
5916
6473
  WorkflowType["DesignEditor"] = "DesignEditor";
5917
6474
  WorkflowType["WorkflowElements"] = "WorkflowElements";
5918
6475
  })(WorkflowType = exports.WorkflowType || (exports.WorkflowType = {}));
6476
+ /** Product link resource type. */
6477
+ var ProductLinkResourceType;
6478
+ (function (ProductLinkResourceType) {
6479
+ ProductLinkResourceType["Preview"] = "Preview";
6480
+ ProductLinkResourceType["Custom"] = "Custom";
6481
+ })(ProductLinkResourceType = exports.ProductLinkResourceType || (exports.ProductLinkResourceType = {}));
6482
+ /** Available option types. */
6483
+ var OptionType;
6484
+ (function (OptionType) {
6485
+ OptionType["Simple"] = "Simple";
6486
+ OptionType["Size"] = "Size";
6487
+ OptionType["PageCount"] = "PageCount";
6488
+ })(OptionType = exports.OptionType || (exports.OptionType = {}));
5919
6489
  /** Available product reference target types. */
5920
6490
  var ProductReferenceType;
5921
6491
  (function (ProductReferenceType) {
5922
6492
  ProductReferenceType["ProductSpecification"] = "ProductSpecification";
5923
6493
  ProductReferenceType["Product"] = "Product";
5924
6494
  ProductReferenceType["ProductLink"] = "ProductLink";
6495
+ ProductReferenceType["ProductBundle"] = "ProductBundle";
5925
6496
  })(ProductReferenceType = exports.ProductReferenceType || (exports.ProductReferenceType = {}));
5926
6497
  /** Available product variant resource types. */
5927
6498
  var ProductVariantResourceType;
@@ -5967,6 +6538,12 @@ var ProjectItemResourceType;
5967
6538
  ProjectItemResourceType["Preview"] = "Preview";
5968
6539
  ProjectItemResourceType["Hires"] = "Hires";
5969
6540
  })(ProjectItemResourceType = exports.ProjectItemResourceType || (exports.ProjectItemResourceType = {}));
6541
+ var ProjectItemProductType;
6542
+ (function (ProjectItemProductType) {
6543
+ ProjectItemProductType["ProductSpecification"] = "ProductSpecification";
6544
+ ProjectItemProductType["Product"] = "Product";
6545
+ ProjectItemProductType["ProductLink"] = "ProductLink";
6546
+ })(ProjectItemProductType = exports.ProjectItemProductType || (exports.ProjectItemProductType = {}));
5970
6547
  var RenderHiResScenarioOutputFormat;
5971
6548
  (function (RenderHiResScenarioOutputFormat) {
5972
6549
  RenderHiResScenarioOutputFormat["Pdf"] = "Pdf";