@aurigma/axios-storefront-api-client 2.5.1 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/storefront-api-client.d.ts +462 -487
- package/dist/cjs/storefront-api-client.js +253 -244
- package/dist/cjs/storefront-api-client.js.map +1 -1
- package/dist/esm/storefront-api-client.d.ts +462 -487
- package/dist/esm/storefront-api-client.js +253 -244
- package/dist/esm/storefront-api-client.js.map +1 -1
- package/package.json +3 -2
|
@@ -54,7 +54,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
54
54
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Returns an assembly build info.
|
|
58
58
|
* @return Success
|
|
59
59
|
*/
|
|
60
60
|
headInfo(cancelToken) {
|
|
@@ -100,7 +100,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
100
100
|
return Promise.resolve(null);
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Returns an assembly build info.
|
|
104
104
|
* @return Success
|
|
105
105
|
*/
|
|
106
106
|
getInfo(cancelToken) {
|
|
@@ -162,19 +162,18 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
162
162
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
*
|
|
166
|
-
* @param storefrontId Storefront identifier
|
|
167
|
-
* @param productReference (optional) Product reference filter. Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
168
|
-
* @param productSpecificationId (optional) Cusomer's Canvas product specification filter
|
|
169
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
170
|
-
* @param take (optional) Defines page length (how
|
|
171
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
172
|
-
* @param search (optional) Search string for partial match
|
|
173
|
-
* @param tenantId (optional) Tenant identifier
|
|
174
|
-
* @param userId (optional) User identifier
|
|
165
|
+
* Returns all storefront product references relevant to the specified query parameters.
|
|
166
|
+
* @param storefrontId Storefront identifier.
|
|
167
|
+
* @param productReference (optional) Product reference filter. Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
168
|
+
* @param productSpecificationId (optional) Cusomer's Canvas product specification filter.
|
|
169
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
170
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
171
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
172
|
+
* @param search (optional) Search string for partial match.
|
|
173
|
+
* @param tenantId (optional) Tenant identifier.
|
|
175
174
|
* @return Success
|
|
176
175
|
*/
|
|
177
|
-
getAll(storefrontId, productReference, productSpecificationId, skip, take, sorting, search, tenantId,
|
|
176
|
+
getAll(storefrontId, productReference, productSpecificationId, skip, take, sorting, search, tenantId, cancelToken) {
|
|
178
177
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
179
178
|
if (storefrontId === undefined || storefrontId === null)
|
|
180
179
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -194,8 +193,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
194
193
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
195
194
|
if (tenantId !== undefined && tenantId !== null)
|
|
196
195
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
197
|
-
if (userId !== undefined && userId !== null)
|
|
198
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
199
196
|
url_ = url_.replace(/[?&]$/, "");
|
|
200
197
|
let options_ = {
|
|
201
198
|
method: "GET",
|
|
@@ -250,14 +247,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
250
247
|
return Promise.resolve(null);
|
|
251
248
|
}
|
|
252
249
|
/**
|
|
253
|
-
* Creates new storefront product reference
|
|
254
|
-
* @param storefrontId Storefront identifier
|
|
255
|
-
* @param tenantId (optional) Tenant identifier
|
|
256
|
-
* @param
|
|
257
|
-
* @param body (optional) Create operation parameters
|
|
250
|
+
* Creates a new storefront product reference.
|
|
251
|
+
* @param storefrontId Storefront identifier.
|
|
252
|
+
* @param tenantId (optional) Tenant identifier.
|
|
253
|
+
* @param body (optional) Create operation parameters.
|
|
258
254
|
* @return Success
|
|
259
255
|
*/
|
|
260
|
-
create(storefrontId, tenantId,
|
|
256
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
261
257
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
262
258
|
if (storefrontId === undefined || storefrontId === null)
|
|
263
259
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -265,8 +261,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
265
261
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
266
262
|
if (tenantId !== undefined && tenantId !== null)
|
|
267
263
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
268
|
-
if (userId !== undefined && userId !== null)
|
|
269
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
270
264
|
url_ = url_.replace(/[?&]$/, "");
|
|
271
265
|
const content_ = JSON.stringify(body);
|
|
272
266
|
let options_ = {
|
|
@@ -331,14 +325,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
331
325
|
return Promise.resolve(null);
|
|
332
326
|
}
|
|
333
327
|
/**
|
|
334
|
-
*
|
|
335
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
336
|
-
* @param storefrontId Storefront identifier
|
|
337
|
-
* @param tenantId (optional) Tenant identifier
|
|
338
|
-
* @param userId (optional) User identifier
|
|
328
|
+
* Returns a storefront product reference.
|
|
329
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
330
|
+
* @param storefrontId Storefront identifier.
|
|
331
|
+
* @param tenantId (optional) Tenant identifier.
|
|
339
332
|
* @return Success
|
|
340
333
|
*/
|
|
341
|
-
get(reference, storefrontId, tenantId,
|
|
334
|
+
get(reference, storefrontId, tenantId, cancelToken) {
|
|
342
335
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
343
336
|
if (reference === undefined || reference === null)
|
|
344
337
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -349,8 +342,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
349
342
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
350
343
|
if (tenantId !== undefined && tenantId !== null)
|
|
351
344
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
352
|
-
if (userId !== undefined && userId !== null)
|
|
353
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
354
345
|
url_ = url_.replace(/[?&]$/, "");
|
|
355
346
|
let options_ = {
|
|
356
347
|
method: "GET",
|
|
@@ -412,14 +403,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
412
403
|
return Promise.resolve(null);
|
|
413
404
|
}
|
|
414
405
|
/**
|
|
415
|
-
* Deletes storefront product reference
|
|
416
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
417
|
-
* @param storefrontId Storefront identifier
|
|
418
|
-
* @param tenantId (optional) Tenant identifier
|
|
419
|
-
* @param userId (optional) User identifier
|
|
406
|
+
* Deletes the storefront product reference.
|
|
407
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
408
|
+
* @param storefrontId Storefront identifier.
|
|
409
|
+
* @param tenantId (optional) Tenant identifier.
|
|
420
410
|
* @return Success
|
|
421
411
|
*/
|
|
422
|
-
delete(reference, storefrontId, tenantId,
|
|
412
|
+
delete(reference, storefrontId, tenantId, cancelToken) {
|
|
423
413
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
424
414
|
if (reference === undefined || reference === null)
|
|
425
415
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -430,8 +420,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
430
420
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
431
421
|
if (tenantId !== undefined && tenantId !== null)
|
|
432
422
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
433
|
-
if (userId !== undefined && userId !== null)
|
|
434
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
435
423
|
url_ = url_.replace(/[?&]$/, "");
|
|
436
424
|
let options_ = {
|
|
437
425
|
method: "DELETE",
|
|
@@ -493,14 +481,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
493
481
|
return Promise.resolve(null);
|
|
494
482
|
}
|
|
495
483
|
/**
|
|
496
|
-
*
|
|
497
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
498
|
-
* @param storefrontId Storefront identifier
|
|
499
|
-
* @param tenantId (optional) Tenant identifier
|
|
500
|
-
* @param userId (optional) User identifier
|
|
484
|
+
* Returns a product specification by the storefront product reference.
|
|
485
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
486
|
+
* @param storefrontId Storefront identifier.
|
|
487
|
+
* @param tenantId (optional) Tenant identifier.
|
|
501
488
|
* @return Success
|
|
502
489
|
*/
|
|
503
|
-
getProductSpecification(reference, storefrontId, tenantId,
|
|
490
|
+
getProductSpecification(reference, storefrontId, tenantId, cancelToken) {
|
|
504
491
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-specification?";
|
|
505
492
|
if (reference === undefined || reference === null)
|
|
506
493
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -511,8 +498,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
511
498
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
512
499
|
if (tenantId !== undefined && tenantId !== null)
|
|
513
500
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
514
|
-
if (userId !== undefined && userId !== null)
|
|
515
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
516
501
|
url_ = url_.replace(/[?&]$/, "");
|
|
517
502
|
let options_ = {
|
|
518
503
|
method: "GET",
|
|
@@ -574,14 +559,13 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
574
559
|
return Promise.resolve(null);
|
|
575
560
|
}
|
|
576
561
|
/**
|
|
577
|
-
*
|
|
578
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
579
|
-
* @param storefrontId Storefront identifier
|
|
580
|
-
* @param tenantId (optional) Tenant identifier
|
|
581
|
-
* @param userId (optional) User identifier
|
|
562
|
+
* Returns a product personalization workflow configuration by storefront product reference.
|
|
563
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
564
|
+
* @param storefrontId Storefront identifier.
|
|
565
|
+
* @param tenantId (optional) Tenant identifier.
|
|
582
566
|
* @return Success
|
|
583
567
|
*/
|
|
584
|
-
getProductConfig(reference, storefrontId, tenantId,
|
|
568
|
+
getProductConfig(reference, storefrontId, tenantId, cancelToken) {
|
|
585
569
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
586
570
|
if (reference === undefined || reference === null)
|
|
587
571
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -592,8 +576,6 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
592
576
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
593
577
|
if (tenantId !== undefined && tenantId !== null)
|
|
594
578
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
595
|
-
if (userId !== undefined && userId !== null)
|
|
596
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
597
579
|
url_ = url_.replace(/[?&]$/, "");
|
|
598
580
|
let options_ = {
|
|
599
581
|
method: "GET",
|
|
@@ -666,16 +648,15 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
666
648
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
667
649
|
}
|
|
668
650
|
/**
|
|
669
|
-
*
|
|
670
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
671
|
-
* @param take (optional) Defines page length (how
|
|
672
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
673
|
-
* @param search (optional) Search string for partial match
|
|
674
|
-
* @param tenantId (optional) Tenant identifier
|
|
675
|
-
* @param userId (optional) User identifier
|
|
651
|
+
* Returns all product specifications, relevant to the specified query parameters.
|
|
652
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
653
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
654
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
655
|
+
* @param search (optional) Search string for partial match.
|
|
656
|
+
* @param tenantId (optional) Tenant identifier.
|
|
676
657
|
* @return Success
|
|
677
658
|
*/
|
|
678
|
-
getAll(skip, take, sorting, search, tenantId,
|
|
659
|
+
getAll(skip, take, sorting, search, tenantId, cancelToken) {
|
|
679
660
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications?";
|
|
680
661
|
if (skip !== undefined && skip !== null)
|
|
681
662
|
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
@@ -687,8 +668,6 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
687
668
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
688
669
|
if (tenantId !== undefined && tenantId !== null)
|
|
689
670
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
690
|
-
if (userId !== undefined && userId !== null)
|
|
691
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
692
671
|
url_ = url_.replace(/[?&]$/, "");
|
|
693
672
|
let options_ = {
|
|
694
673
|
method: "GET",
|
|
@@ -743,21 +722,18 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
743
722
|
return Promise.resolve(null);
|
|
744
723
|
}
|
|
745
724
|
/**
|
|
746
|
-
*
|
|
747
|
-
* @param id Product specification identifier
|
|
748
|
-
* @param tenantId (optional) Tenant identifier
|
|
749
|
-
* @param userId (optional) User identifier
|
|
725
|
+
* Returns a product specification by identifier.
|
|
726
|
+
* @param id Product specification identifier.
|
|
727
|
+
* @param tenantId (optional) Tenant identifier.
|
|
750
728
|
* @return Success
|
|
751
729
|
*/
|
|
752
|
-
get(id, tenantId,
|
|
730
|
+
get(id, tenantId, cancelToken) {
|
|
753
731
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}?";
|
|
754
732
|
if (id === undefined || id === null)
|
|
755
733
|
throw new Error("The parameter 'id' must be defined.");
|
|
756
734
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
757
735
|
if (tenantId !== undefined && tenantId !== null)
|
|
758
736
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
759
|
-
if (userId !== undefined && userId !== null)
|
|
760
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
761
737
|
url_ = url_.replace(/[?&]$/, "");
|
|
762
738
|
let options_ = {
|
|
763
739
|
method: "GET",
|
|
@@ -819,21 +795,18 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
819
795
|
return Promise.resolve(null);
|
|
820
796
|
}
|
|
821
797
|
/**
|
|
822
|
-
*
|
|
823
|
-
* @param id Product specification identifier
|
|
824
|
-
* @param tenantId (optional) Tenant identifier
|
|
825
|
-
* @param userId (optional) User identifier
|
|
798
|
+
* Returns a product personlization workflow configuration by product specification identifier.
|
|
799
|
+
* @param id Product specification identifier.
|
|
800
|
+
* @param tenantId (optional) Tenant identifier.
|
|
826
801
|
* @return Success
|
|
827
802
|
*/
|
|
828
|
-
getConfiguration(id, tenantId,
|
|
803
|
+
getConfiguration(id, tenantId, cancelToken) {
|
|
829
804
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
|
|
830
805
|
if (id === undefined || id === null)
|
|
831
806
|
throw new Error("The parameter 'id' must be defined.");
|
|
832
807
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
833
808
|
if (tenantId !== undefined && tenantId !== null)
|
|
834
809
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
835
|
-
if (userId !== undefined && userId !== null)
|
|
836
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
837
810
|
url_ = url_.replace(/[?&]$/, "");
|
|
838
811
|
let options_ = {
|
|
839
812
|
method: "GET",
|
|
@@ -906,21 +879,20 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
906
879
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
907
880
|
}
|
|
908
881
|
/**
|
|
909
|
-
*
|
|
910
|
-
* @param storefrontId Storefront identifier
|
|
911
|
-
* @param ownerId (optional) Project owner (storefront user id) filter
|
|
912
|
-
* @param productReference (optional) Product reference filter
|
|
913
|
-
* @param status (optional) Project status filter
|
|
914
|
-
* @param datePeriod (optional) Project date period filter
|
|
915
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
916
|
-
* @param take (optional) Defines page length (how
|
|
917
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
918
|
-
* @param search (optional) Search string for partial match
|
|
919
|
-
* @param tenantId (optional) Tenant identifier
|
|
920
|
-
* @param userId (optional) User identifier
|
|
882
|
+
* Returns all projects, relevant to the specified query parameters.
|
|
883
|
+
* @param storefrontId Storefront identifier.
|
|
884
|
+
* @param ownerId (optional) Project owner (storefront user id) filter.
|
|
885
|
+
* @param productReference (optional) Product reference filter.
|
|
886
|
+
* @param status (optional) Project status filter.
|
|
887
|
+
* @param datePeriod (optional) Project date period filter.
|
|
888
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
889
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
890
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
891
|
+
* @param search (optional) Search string for partial match.
|
|
892
|
+
* @param tenantId (optional) Tenant identifier.
|
|
921
893
|
* @return Success
|
|
922
894
|
*/
|
|
923
|
-
getAll(storefrontId, ownerId, productReference, status, datePeriod, skip, take, sorting, search, tenantId,
|
|
895
|
+
getAll(storefrontId, ownerId, productReference, status, datePeriod, skip, take, sorting, search, tenantId, cancelToken) {
|
|
924
896
|
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
925
897
|
if (storefrontId === undefined || storefrontId === null)
|
|
926
898
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -946,8 +918,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
946
918
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
947
919
|
if (tenantId !== undefined && tenantId !== null)
|
|
948
920
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
949
|
-
if (userId !== undefined && userId !== null)
|
|
950
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
951
921
|
url_ = url_.replace(/[?&]$/, "");
|
|
952
922
|
let options_ = {
|
|
953
923
|
method: "GET",
|
|
@@ -1002,14 +972,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1002
972
|
return Promise.resolve(null);
|
|
1003
973
|
}
|
|
1004
974
|
/**
|
|
1005
|
-
* Creates new project
|
|
1006
|
-
* @param storefrontId Storefront identifier
|
|
1007
|
-
* @param tenantId (optional) Tenant identifier
|
|
1008
|
-
* @param
|
|
1009
|
-
* @param body (optional) Create operation parameters
|
|
975
|
+
* Creates a new project.
|
|
976
|
+
* @param storefrontId Storefront identifier.
|
|
977
|
+
* @param tenantId (optional) Tenant identifier.
|
|
978
|
+
* @param body (optional) Create operation parameters.
|
|
1010
979
|
* @return Success
|
|
1011
980
|
*/
|
|
1012
|
-
create(storefrontId, tenantId,
|
|
981
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
1013
982
|
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
1014
983
|
if (storefrontId === undefined || storefrontId === null)
|
|
1015
984
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -1017,8 +986,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1017
986
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1018
987
|
if (tenantId !== undefined && tenantId !== null)
|
|
1019
988
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1020
|
-
if (userId !== undefined && userId !== null)
|
|
1021
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1022
989
|
url_ = url_.replace(/[?&]$/, "");
|
|
1023
990
|
const content_ = JSON.stringify(body);
|
|
1024
991
|
let options_ = {
|
|
@@ -1083,21 +1050,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1083
1050
|
return Promise.resolve(null);
|
|
1084
1051
|
}
|
|
1085
1052
|
/**
|
|
1086
|
-
*
|
|
1087
|
-
* @param id Project identifier
|
|
1088
|
-
* @param tenantId (optional) Tenant identifier
|
|
1089
|
-
* @param userId (optional) User identifier
|
|
1053
|
+
* Returns a project by identifier.
|
|
1054
|
+
* @param id Project identifier.
|
|
1055
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1090
1056
|
* @return Success
|
|
1091
1057
|
*/
|
|
1092
|
-
get(id, tenantId,
|
|
1058
|
+
get(id, tenantId, cancelToken) {
|
|
1093
1059
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}?";
|
|
1094
1060
|
if (id === undefined || id === null)
|
|
1095
1061
|
throw new Error("The parameter 'id' must be defined.");
|
|
1096
1062
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1097
1063
|
if (tenantId !== undefined && tenantId !== null)
|
|
1098
1064
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1099
|
-
if (userId !== undefined && userId !== null)
|
|
1100
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1101
1065
|
url_ = url_.replace(/[?&]$/, "");
|
|
1102
1066
|
let options_ = {
|
|
1103
1067
|
method: "GET",
|
|
@@ -1159,21 +1123,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1159
1123
|
return Promise.resolve(null);
|
|
1160
1124
|
}
|
|
1161
1125
|
/**
|
|
1162
|
-
*
|
|
1163
|
-
* @param id Project identifier
|
|
1164
|
-
* @param tenantId (optional) Tenant identifier
|
|
1165
|
-
* @param userId (optional) User identifier
|
|
1126
|
+
* Returns all available status transitions for a project.
|
|
1127
|
+
* @param id Project identifier.
|
|
1128
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1166
1129
|
* @return Success
|
|
1167
1130
|
*/
|
|
1168
|
-
getAvailableTransitions(id, tenantId,
|
|
1131
|
+
getAvailableTransitions(id, tenantId, cancelToken) {
|
|
1169
1132
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/transitions?";
|
|
1170
1133
|
if (id === undefined || id === null)
|
|
1171
1134
|
throw new Error("The parameter 'id' must be defined.");
|
|
1172
1135
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1173
1136
|
if (tenantId !== undefined && tenantId !== null)
|
|
1174
1137
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1175
|
-
if (userId !== undefined && userId !== null)
|
|
1176
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1177
1138
|
url_ = url_.replace(/[?&]$/, "");
|
|
1178
1139
|
let options_ = {
|
|
1179
1140
|
method: "GET",
|
|
@@ -1249,14 +1210,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1249
1210
|
return Promise.resolve(null);
|
|
1250
1211
|
}
|
|
1251
1212
|
/**
|
|
1252
|
-
* Changes project status
|
|
1213
|
+
* Changes the project status.
|
|
1253
1214
|
* @param id Project identifier
|
|
1254
|
-
* @param transition Transition identifying name
|
|
1255
|
-
* @param tenantId (optional) Tenant identifier
|
|
1256
|
-
* @param userId (optional) User identifier
|
|
1215
|
+
* @param transition Transition identifying name.
|
|
1216
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1257
1217
|
* @return Success
|
|
1258
1218
|
*/
|
|
1259
|
-
changeStatus(id, transition, tenantId,
|
|
1219
|
+
changeStatus(id, transition, tenantId, cancelToken) {
|
|
1260
1220
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/transitions/{transition}?";
|
|
1261
1221
|
if (id === undefined || id === null)
|
|
1262
1222
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1266,8 +1226,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1266
1226
|
url_ = url_.replace("{transition}", encodeURIComponent("" + transition));
|
|
1267
1227
|
if (tenantId !== undefined && tenantId !== null)
|
|
1268
1228
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1269
|
-
if (userId !== undefined && userId !== null)
|
|
1270
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1271
1229
|
url_ = url_.replace(/[?&]$/, "");
|
|
1272
1230
|
let options_ = {
|
|
1273
1231
|
method: "POST",
|
|
@@ -1343,14 +1301,13 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1343
1301
|
return Promise.resolve(null);
|
|
1344
1302
|
}
|
|
1345
1303
|
/**
|
|
1346
|
-
*
|
|
1347
|
-
* @param id Project identifier
|
|
1348
|
-
* @param status Project status code
|
|
1349
|
-
* @param tenantId (optional) Tenant identifier
|
|
1350
|
-
* @param userId (optional) User identifier
|
|
1304
|
+
* Changes the project status forcibly without a proper transition.
|
|
1305
|
+
* @param id Project identifier.
|
|
1306
|
+
* @param status Project status code.
|
|
1307
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1351
1308
|
* @return Success
|
|
1352
1309
|
*/
|
|
1353
|
-
forceStatus(id, status, tenantId,
|
|
1310
|
+
forceStatus(id, status, tenantId, cancelToken) {
|
|
1354
1311
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/statuses/{status}?";
|
|
1355
1312
|
if (id === undefined || id === null)
|
|
1356
1313
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1360,8 +1317,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1360
1317
|
url_ = url_.replace("{status}", encodeURIComponent("" + status));
|
|
1361
1318
|
if (tenantId !== undefined && tenantId !== null)
|
|
1362
1319
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1363
|
-
if (userId !== undefined && userId !== null)
|
|
1364
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1365
1320
|
url_ = url_.replace(/[?&]$/, "");
|
|
1366
1321
|
let options_ = {
|
|
1367
1322
|
method: "POST",
|
|
@@ -1430,17 +1385,14 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1430
1385
|
return Promise.resolve(null);
|
|
1431
1386
|
}
|
|
1432
1387
|
/**
|
|
1433
|
-
*
|
|
1434
|
-
* @param tenantId (optional) Tenant identifier
|
|
1435
|
-
* @param userId (optional) User identifier
|
|
1388
|
+
* Returns a list of all existing project statuses.
|
|
1389
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1436
1390
|
* @return Success
|
|
1437
1391
|
*/
|
|
1438
|
-
getAllStatuses(tenantId,
|
|
1392
|
+
getAllStatuses(tenantId, cancelToken) {
|
|
1439
1393
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/statuses?";
|
|
1440
1394
|
if (tenantId !== undefined && tenantId !== null)
|
|
1441
1395
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1442
|
-
if (userId !== undefined && userId !== null)
|
|
1443
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1444
1396
|
url_ = url_.replace(/[?&]$/, "");
|
|
1445
1397
|
let options_ = {
|
|
1446
1398
|
method: "GET",
|
|
@@ -1495,17 +1447,14 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1495
1447
|
return Promise.resolve(null);
|
|
1496
1448
|
}
|
|
1497
1449
|
/**
|
|
1498
|
-
*
|
|
1499
|
-
* @param tenantId (optional) Tenant identifier
|
|
1500
|
-
* @param userId (optional) User identifier
|
|
1450
|
+
* Returns a list of all existing project status transitions.
|
|
1451
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1501
1452
|
* @return Success
|
|
1502
1453
|
*/
|
|
1503
|
-
getAllTransitions(tenantId,
|
|
1454
|
+
getAllTransitions(tenantId, cancelToken) {
|
|
1504
1455
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/transitions?";
|
|
1505
1456
|
if (tenantId !== undefined && tenantId !== null)
|
|
1506
1457
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1507
|
-
if (userId !== undefined && userId !== null)
|
|
1508
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1509
1458
|
url_ = url_.replace(/[?&]$/, "");
|
|
1510
1459
|
let options_ = {
|
|
1511
1460
|
method: "GET",
|
|
@@ -1560,15 +1509,14 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1560
1509
|
return Promise.resolve(null);
|
|
1561
1510
|
}
|
|
1562
1511
|
/**
|
|
1563
|
-
*
|
|
1564
|
-
* @param id Project
|
|
1565
|
-
* @param designUserId
|
|
1566
|
-
* @param designId Design identifier
|
|
1567
|
-
* @param tenantId (optional) Tenant identifier
|
|
1568
|
-
* @param userId (optional) User identifier
|
|
1512
|
+
* Returns an url to download project print file.
|
|
1513
|
+
* @param id Project identifier.
|
|
1514
|
+
* @param designUserId Design owner identifier.
|
|
1515
|
+
* @param designId Design identifier.
|
|
1516
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1569
1517
|
* @return Success
|
|
1570
1518
|
*/
|
|
1571
|
-
getProjectPdfUrl(id, designUserId, designId, tenantId,
|
|
1519
|
+
getProjectPdfUrl(id, designUserId, designId, tenantId, cancelToken) {
|
|
1572
1520
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
|
|
1573
1521
|
if (id === undefined || id === null)
|
|
1574
1522
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1583,8 +1531,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1583
1531
|
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
1584
1532
|
if (tenantId !== undefined && tenantId !== null)
|
|
1585
1533
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1586
|
-
if (userId !== undefined && userId !== null)
|
|
1587
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1588
1534
|
url_ = url_.replace(/[?&]$/, "");
|
|
1589
1535
|
let options_ = {
|
|
1590
1536
|
method: "GET",
|
|
@@ -1639,16 +1585,15 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1639
1585
|
return Promise.resolve(null);
|
|
1640
1586
|
}
|
|
1641
1587
|
/**
|
|
1642
|
-
*
|
|
1643
|
-
* @param id Project
|
|
1644
|
-
* @param designUserId
|
|
1645
|
-
* @param designId Design identifier
|
|
1646
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with proper filename supplied (default value is 'false')
|
|
1647
|
-
* @param tenantId (optional) Tenant identifier
|
|
1648
|
-
* @param userId (optional) User identifier
|
|
1588
|
+
* Returns an archive file, which contains all project print files.
|
|
1589
|
+
* @param id Project identifier.
|
|
1590
|
+
* @param designUserId Design owner identifier.
|
|
1591
|
+
* @param designId Design identifier.
|
|
1592
|
+
* @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
|
|
1593
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1649
1594
|
* @return Success
|
|
1650
1595
|
*/
|
|
1651
|
-
getProjectPdfZip(id, designUserId, designId, attachment, tenantId,
|
|
1596
|
+
getProjectPdfZip(id, designUserId, designId, attachment, tenantId, cancelToken) {
|
|
1652
1597
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
|
|
1653
1598
|
if (id === undefined || id === null)
|
|
1654
1599
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1665,8 +1610,6 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1665
1610
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
1666
1611
|
if (tenantId !== undefined && tenantId !== null)
|
|
1667
1612
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1668
|
-
if (userId !== undefined && userId !== null)
|
|
1669
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1670
1613
|
url_ = url_.replace(/[?&]$/, "");
|
|
1671
1614
|
let options_ = {
|
|
1672
1615
|
responseType: "blob",
|
|
@@ -1728,15 +1671,18 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1728
1671
|
return Promise.resolve(null);
|
|
1729
1672
|
}
|
|
1730
1673
|
/**
|
|
1731
|
-
*
|
|
1732
|
-
* @param id Project identifier
|
|
1674
|
+
* Returns an order description from the ecommerce system for the specified project.
|
|
1675
|
+
* @param id Project identifier.
|
|
1676
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1733
1677
|
* @return Success
|
|
1734
1678
|
*/
|
|
1735
|
-
getProjectOrder(id, cancelToken) {
|
|
1736
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/order";
|
|
1679
|
+
getProjectOrder(id, tenantId, cancelToken) {
|
|
1680
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/order?";
|
|
1737
1681
|
if (id === undefined || id === null)
|
|
1738
1682
|
throw new Error("The parameter 'id' must be defined.");
|
|
1739
1683
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1684
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1685
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1740
1686
|
url_ = url_.replace(/[?&]$/, "");
|
|
1741
1687
|
let options_ = {
|
|
1742
1688
|
method: "GET",
|
|
@@ -1809,17 +1755,16 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
1809
1755
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
1810
1756
|
}
|
|
1811
1757
|
/**
|
|
1812
|
-
*
|
|
1813
|
-
* @param types (optional) Storefront type filter
|
|
1814
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
1815
|
-
* @param take (optional) Defines page length (how
|
|
1816
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
1817
|
-
* @param search (optional) Search string for partial match
|
|
1818
|
-
* @param tenantId (optional) Tenant identifier
|
|
1819
|
-
* @param userId (optional) User identifier
|
|
1758
|
+
* Returns all storefronts, relevant to the specified query parameters.
|
|
1759
|
+
* @param types (optional) Storefront type filter.
|
|
1760
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1761
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1762
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1763
|
+
* @param search (optional) Search string for partial match.
|
|
1764
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1820
1765
|
* @return Success
|
|
1821
1766
|
*/
|
|
1822
|
-
getAll(types, skip, take, sorting, search, tenantId,
|
|
1767
|
+
getAll(types, skip, take, sorting, search, tenantId, cancelToken) {
|
|
1823
1768
|
let url_ = this.baseUrl + "/api/storefront/v1/storefronts?";
|
|
1824
1769
|
if (types !== undefined && types !== null)
|
|
1825
1770
|
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
@@ -1833,8 +1778,6 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
1833
1778
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1834
1779
|
if (tenantId !== undefined && tenantId !== null)
|
|
1835
1780
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1836
|
-
if (userId !== undefined && userId !== null)
|
|
1837
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1838
1781
|
url_ = url_.replace(/[?&]$/, "");
|
|
1839
1782
|
let options_ = {
|
|
1840
1783
|
method: "GET",
|
|
@@ -1889,21 +1832,18 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
1889
1832
|
return Promise.resolve(null);
|
|
1890
1833
|
}
|
|
1891
1834
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
* @param id Storefront identifier
|
|
1894
|
-
* @param tenantId (optional) Tenant identifier
|
|
1895
|
-
* @param userId (optional) User identifier
|
|
1835
|
+
* Returns a storefront by identifier.
|
|
1836
|
+
* @param id Storefront identifier.
|
|
1837
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1896
1838
|
* @return Success
|
|
1897
1839
|
*/
|
|
1898
|
-
get(id, tenantId,
|
|
1840
|
+
get(id, tenantId, cancelToken) {
|
|
1899
1841
|
let url_ = this.baseUrl + "/api/storefront/v1/storefronts/{id}?";
|
|
1900
1842
|
if (id === undefined || id === null)
|
|
1901
1843
|
throw new Error("The parameter 'id' must be defined.");
|
|
1902
1844
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1903
1845
|
if (tenantId !== undefined && tenantId !== null)
|
|
1904
1846
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1905
|
-
if (userId !== undefined && userId !== null)
|
|
1906
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1907
1847
|
url_ = url_.replace(/[?&]$/, "");
|
|
1908
1848
|
let options_ = {
|
|
1909
1849
|
method: "GET",
|
|
@@ -1976,18 +1916,17 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
1976
1916
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
1977
1917
|
}
|
|
1978
1918
|
/**
|
|
1979
|
-
*
|
|
1980
|
-
* @param storefrontId Storefront identifier
|
|
1981
|
-
* @param storefrontUserId (optional) Storefront user identifier
|
|
1982
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
1983
|
-
* @param take (optional) Defines page length (how
|
|
1984
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
1985
|
-
* @param search (optional) Search string for partial match
|
|
1986
|
-
* @param tenantId (optional) Tenant identifier
|
|
1987
|
-
* @param userId (optional) User identifier
|
|
1919
|
+
* Returns all storefront users, relevant to the specified query parameters.
|
|
1920
|
+
* @param storefrontId Storefront identifier.
|
|
1921
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
1922
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1923
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1924
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1925
|
+
* @param search (optional) Search string for partial match.
|
|
1926
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1988
1927
|
* @return Success
|
|
1989
1928
|
*/
|
|
1990
|
-
getAll(storefrontId, storefrontUserId, skip, take, sorting, search, tenantId,
|
|
1929
|
+
getAll(storefrontId, storefrontUserId, skip, take, sorting, search, tenantId, cancelToken) {
|
|
1991
1930
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users?";
|
|
1992
1931
|
if (storefrontId === undefined || storefrontId === null)
|
|
1993
1932
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -2005,8 +1944,6 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2005
1944
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
2006
1945
|
if (tenantId !== undefined && tenantId !== null)
|
|
2007
1946
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2008
|
-
if (userId !== undefined && userId !== null)
|
|
2009
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2010
1947
|
url_ = url_.replace(/[?&]$/, "");
|
|
2011
1948
|
let options_ = {
|
|
2012
1949
|
method: "GET",
|
|
@@ -2061,14 +1998,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2061
1998
|
return Promise.resolve(null);
|
|
2062
1999
|
}
|
|
2063
2000
|
/**
|
|
2064
|
-
* Creates new storefront user
|
|
2065
|
-
* @param storefrontId Storefront identifier
|
|
2066
|
-
* @param tenantId (optional) Tenant identifier
|
|
2067
|
-
* @param
|
|
2068
|
-
* @param body (optional) Create operation parameters
|
|
2001
|
+
* Creates a new storefront user.
|
|
2002
|
+
* @param storefrontId Storefront identifier.
|
|
2003
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2004
|
+
* @param body (optional) Operation parameters.
|
|
2069
2005
|
* @return Success
|
|
2070
2006
|
*/
|
|
2071
|
-
create(storefrontId, tenantId,
|
|
2007
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
2072
2008
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users?";
|
|
2073
2009
|
if (storefrontId === undefined || storefrontId === null)
|
|
2074
2010
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -2076,8 +2012,6 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2076
2012
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2077
2013
|
if (tenantId !== undefined && tenantId !== null)
|
|
2078
2014
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2079
|
-
if (userId !== undefined && userId !== null)
|
|
2080
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2081
2015
|
url_ = url_.replace(/[?&]$/, "");
|
|
2082
2016
|
const content_ = JSON.stringify(body);
|
|
2083
2017
|
let options_ = {
|
|
@@ -2120,6 +2054,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2120
2054
|
result201 = JSON.parse(resultData201);
|
|
2121
2055
|
return result201;
|
|
2122
2056
|
}
|
|
2057
|
+
else if (status === 409) {
|
|
2058
|
+
const _responseText = response.data;
|
|
2059
|
+
let result409 = null;
|
|
2060
|
+
let resultData409 = _responseText;
|
|
2061
|
+
result409 = JSON.parse(resultData409);
|
|
2062
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2063
|
+
}
|
|
2123
2064
|
else if (status === 401) {
|
|
2124
2065
|
const _responseText = response.data;
|
|
2125
2066
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2135,14 +2076,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2135
2076
|
return Promise.resolve(null);
|
|
2136
2077
|
}
|
|
2137
2078
|
/**
|
|
2138
|
-
*
|
|
2139
|
-
* @param id Storefront user identifier
|
|
2140
|
-
* @param storefrontId Storefront identifier
|
|
2141
|
-
* @param tenantId (optional) Tenant identifier
|
|
2142
|
-
* @param userId (optional) User identifier
|
|
2079
|
+
* Returns a storefront user by identifier.
|
|
2080
|
+
* @param id Storefront user identifier.
|
|
2081
|
+
* @param storefrontId Storefront identifier.
|
|
2082
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2143
2083
|
* @return Success
|
|
2144
2084
|
*/
|
|
2145
|
-
get(id, storefrontId, tenantId,
|
|
2085
|
+
get(id, storefrontId, tenantId, cancelToken) {
|
|
2146
2086
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/{id}?";
|
|
2147
2087
|
if (id === undefined || id === null)
|
|
2148
2088
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -2153,8 +2093,6 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2153
2093
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2154
2094
|
if (tenantId !== undefined && tenantId !== null)
|
|
2155
2095
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2156
|
-
if (userId !== undefined && userId !== null)
|
|
2157
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2158
2096
|
url_ = url_.replace(/[?&]$/, "");
|
|
2159
2097
|
let options_ = {
|
|
2160
2098
|
method: "GET",
|
|
@@ -2216,14 +2154,91 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2216
2154
|
return Promise.resolve(null);
|
|
2217
2155
|
}
|
|
2218
2156
|
/**
|
|
2219
|
-
*
|
|
2220
|
-
* @param storefrontId Storefront identifier
|
|
2221
|
-
* @param tenantId (optional) Tenant identifier
|
|
2222
|
-
* @param
|
|
2223
|
-
* @
|
|
2157
|
+
* Registers a storefront user with the specified identifier.
|
|
2158
|
+
* @param storefrontId Storefront identifier.
|
|
2159
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2160
|
+
* @param body (optional) Operation parameters.
|
|
2161
|
+
* @return Success
|
|
2162
|
+
*/
|
|
2163
|
+
register(storefrontId, tenantId, body, cancelToken) {
|
|
2164
|
+
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/register?";
|
|
2165
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
2166
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
2167
|
+
else
|
|
2168
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2169
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2170
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2171
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2172
|
+
const content_ = JSON.stringify(body);
|
|
2173
|
+
let options_ = {
|
|
2174
|
+
data: content_,
|
|
2175
|
+
method: "POST",
|
|
2176
|
+
url: url_,
|
|
2177
|
+
headers: {
|
|
2178
|
+
"Content-Type": "application/json-patch+json",
|
|
2179
|
+
"Accept": "text/plain"
|
|
2180
|
+
},
|
|
2181
|
+
cancelToken
|
|
2182
|
+
};
|
|
2183
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2184
|
+
return this.instance.request(transformedOptions_);
|
|
2185
|
+
}).catch((_error) => {
|
|
2186
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2187
|
+
return _error.response;
|
|
2188
|
+
}
|
|
2189
|
+
else {
|
|
2190
|
+
throw _error;
|
|
2191
|
+
}
|
|
2192
|
+
}).then((_response) => {
|
|
2193
|
+
return this.transformResult(url_, _response, (_response) => this.processRegister(_response));
|
|
2194
|
+
});
|
|
2195
|
+
}
|
|
2196
|
+
processRegister(response) {
|
|
2197
|
+
const status = response.status;
|
|
2198
|
+
let _headers = {};
|
|
2199
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2200
|
+
for (let k in response.headers) {
|
|
2201
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2202
|
+
_headers[k] = response.headers[k];
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
if (status === 200) {
|
|
2207
|
+
const _responseText = response.data;
|
|
2208
|
+
let result200 = null;
|
|
2209
|
+
let resultData200 = _responseText;
|
|
2210
|
+
result200 = JSON.parse(resultData200);
|
|
2211
|
+
return result200;
|
|
2212
|
+
}
|
|
2213
|
+
else if (status === 409) {
|
|
2214
|
+
const _responseText = response.data;
|
|
2215
|
+
let result409 = null;
|
|
2216
|
+
let resultData409 = _responseText;
|
|
2217
|
+
result409 = JSON.parse(resultData409);
|
|
2218
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2219
|
+
}
|
|
2220
|
+
else if (status === 401) {
|
|
2221
|
+
const _responseText = response.data;
|
|
2222
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2223
|
+
}
|
|
2224
|
+
else if (status === 403) {
|
|
2225
|
+
const _responseText = response.data;
|
|
2226
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2227
|
+
}
|
|
2228
|
+
else if (status !== 200 && status !== 204) {
|
|
2229
|
+
const _responseText = response.data;
|
|
2230
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2231
|
+
}
|
|
2232
|
+
return Promise.resolve(null);
|
|
2233
|
+
}
|
|
2234
|
+
/**
|
|
2235
|
+
* Transfers all existing data for the anonymous storefront user to the selected regular storefront user account.
|
|
2236
|
+
* @param storefrontId Storefront identifier.
|
|
2237
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2238
|
+
* @param body (optional) Operation parameters.
|
|
2224
2239
|
* @return Success
|
|
2225
2240
|
*/
|
|
2226
|
-
mergeAnonymous(storefrontId, tenantId,
|
|
2241
|
+
mergeAnonymous(storefrontId, tenantId, body, cancelToken) {
|
|
2227
2242
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/merge-anonymous?";
|
|
2228
2243
|
if (storefrontId === undefined || storefrontId === null)
|
|
2229
2244
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -2231,8 +2246,6 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2231
2246
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2232
2247
|
if (tenantId !== undefined && tenantId !== null)
|
|
2233
2248
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2234
|
-
if (userId !== undefined && userId !== null)
|
|
2235
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2236
2249
|
url_ = url_.replace(/[?&]$/, "");
|
|
2237
2250
|
const content_ = JSON.stringify(body);
|
|
2238
2251
|
let options_ = {
|
|
@@ -2300,14 +2313,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2300
2313
|
return Promise.resolve(null);
|
|
2301
2314
|
}
|
|
2302
2315
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
* @param storefrontUserId Storefront user identifier
|
|
2305
|
-
* @param storefrontId Storefront identifier
|
|
2306
|
-
* @param tenantId (optional) Tenant identifier
|
|
2307
|
-
* @param userId (optional) User identifier
|
|
2316
|
+
* Returns an API access token for the specified storefront user.
|
|
2317
|
+
* @param storefrontUserId Storefront user identifier.
|
|
2318
|
+
* @param storefrontId Storefront identifier.
|
|
2319
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2308
2320
|
* @return Success
|
|
2309
2321
|
*/
|
|
2310
|
-
getToken(storefrontUserId, storefrontId, tenantId,
|
|
2322
|
+
getToken(storefrontUserId, storefrontId, tenantId, cancelToken) {
|
|
2311
2323
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/token?";
|
|
2312
2324
|
if (storefrontUserId === undefined || storefrontUserId === null)
|
|
2313
2325
|
throw new Error("The parameter 'storefrontUserId' must be defined and cannot be null.");
|
|
@@ -2319,13 +2331,13 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2319
2331
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2320
2332
|
if (tenantId !== undefined && tenantId !== null)
|
|
2321
2333
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2322
|
-
if (userId !== undefined && userId !== null)
|
|
2323
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2324
2334
|
url_ = url_.replace(/[?&]$/, "");
|
|
2325
2335
|
let options_ = {
|
|
2326
2336
|
method: "GET",
|
|
2327
2337
|
url: url_,
|
|
2328
|
-
headers: {
|
|
2338
|
+
headers: {
|
|
2339
|
+
"Accept": "text/plain"
|
|
2340
|
+
},
|
|
2329
2341
|
cancelToken
|
|
2330
2342
|
};
|
|
2331
2343
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -2353,7 +2365,10 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2353
2365
|
}
|
|
2354
2366
|
if (status === 201) {
|
|
2355
2367
|
const _responseText = response.data;
|
|
2356
|
-
|
|
2368
|
+
let result201 = null;
|
|
2369
|
+
let resultData201 = _responseText;
|
|
2370
|
+
result201 = JSON.parse(resultData201);
|
|
2371
|
+
return result201;
|
|
2357
2372
|
}
|
|
2358
2373
|
else if (status === 404) {
|
|
2359
2374
|
const _responseText = response.data;
|
|
@@ -2395,17 +2410,14 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2395
2410
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2396
2411
|
}
|
|
2397
2412
|
/**
|
|
2398
|
-
*
|
|
2399
|
-
* @param tenantId (optional) Tenant identifier
|
|
2400
|
-
* @param userId (optional) User identifier
|
|
2413
|
+
* Returns an information about the tenant applications.
|
|
2414
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2401
2415
|
* @return Success
|
|
2402
2416
|
*/
|
|
2403
|
-
getApplicationsInfo(tenantId,
|
|
2417
|
+
getApplicationsInfo(tenantId, cancelToken) {
|
|
2404
2418
|
let url_ = this.baseUrl + "/api/storefront/v1/tenant-info/applications?";
|
|
2405
2419
|
if (tenantId !== undefined && tenantId !== null)
|
|
2406
2420
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2407
|
-
if (userId !== undefined && userId !== null)
|
|
2408
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2409
2421
|
url_ = url_.replace(/[?&]$/, "");
|
|
2410
2422
|
let options_ = {
|
|
2411
2423
|
method: "GET",
|
|
@@ -2460,17 +2472,14 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2460
2472
|
return Promise.resolve(null);
|
|
2461
2473
|
}
|
|
2462
2474
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
* @param tenantId (optional) Tenant identifier
|
|
2465
|
-
* @param userId (optional) User identifier
|
|
2475
|
+
* Returns an information about the tenant.
|
|
2476
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2466
2477
|
* @return Success
|
|
2467
2478
|
*/
|
|
2468
|
-
getInfo(tenantId,
|
|
2479
|
+
getInfo(tenantId, cancelToken) {
|
|
2469
2480
|
let url_ = this.baseUrl + "/api/storefront/v1/tenant-info?";
|
|
2470
2481
|
if (tenantId !== undefined && tenantId !== null)
|
|
2471
2482
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2472
|
-
if (userId !== undefined && userId !== null)
|
|
2473
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2474
2483
|
url_ = url_.replace(/[?&]$/, "");
|
|
2475
2484
|
let options_ = {
|
|
2476
2485
|
method: "GET",
|
|
@@ -2526,7 +2535,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2526
2535
|
}
|
|
2527
2536
|
}
|
|
2528
2537
|
exports.TenantInfoApiClient = TenantInfoApiClient;
|
|
2529
|
-
/**
|
|
2538
|
+
/** Defines all available date period filter values for queries. */
|
|
2530
2539
|
var DatePeriod;
|
|
2531
2540
|
(function (DatePeriod) {
|
|
2532
2541
|
DatePeriod["All"] = "All";
|
|
@@ -2534,7 +2543,7 @@ var DatePeriod;
|
|
|
2534
2543
|
DatePeriod["Last7Days"] = "Last7Days";
|
|
2535
2544
|
DatePeriod["Last30Days"] = "Last30Days";
|
|
2536
2545
|
})(DatePeriod = exports.DatePeriod || (exports.DatePeriod = {}));
|
|
2537
|
-
/** Storefront types */
|
|
2546
|
+
/** Storefront types. */
|
|
2538
2547
|
var StorefrontType;
|
|
2539
2548
|
(function (StorefrontType) {
|
|
2540
2549
|
StorefrontType["Custom"] = "Custom";
|