@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
|
@@ -49,7 +49,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
49
49
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Returns an assembly build info.
|
|
53
53
|
* @return Success
|
|
54
54
|
*/
|
|
55
55
|
headInfo(cancelToken) {
|
|
@@ -95,7 +95,7 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
95
95
|
return Promise.resolve(null);
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Returns an assembly build info.
|
|
99
99
|
* @return Success
|
|
100
100
|
*/
|
|
101
101
|
getInfo(cancelToken) {
|
|
@@ -156,19 +156,18 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
156
156
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
*
|
|
160
|
-
* @param storefrontId Storefront identifier
|
|
161
|
-
* @param productReference (optional) Product reference filter. Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
162
|
-
* @param productSpecificationId (optional) Cusomer's Canvas product specification filter
|
|
163
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
164
|
-
* @param take (optional) Defines page length (how
|
|
165
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
166
|
-
* @param search (optional) Search string for partial match
|
|
167
|
-
* @param tenantId (optional) Tenant identifier
|
|
168
|
-
* @param userId (optional) User identifier
|
|
159
|
+
* Returns all storefront product references relevant to the specified query parameters.
|
|
160
|
+
* @param storefrontId Storefront identifier.
|
|
161
|
+
* @param productReference (optional) Product reference filter. Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
162
|
+
* @param productSpecificationId (optional) Cusomer's Canvas product specification filter.
|
|
163
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
164
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
165
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
166
|
+
* @param search (optional) Search string for partial match.
|
|
167
|
+
* @param tenantId (optional) Tenant identifier.
|
|
169
168
|
* @return Success
|
|
170
169
|
*/
|
|
171
|
-
getAll(storefrontId, productReference, productSpecificationId, skip, take, sorting, search, tenantId,
|
|
170
|
+
getAll(storefrontId, productReference, productSpecificationId, skip, take, sorting, search, tenantId, cancelToken) {
|
|
172
171
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
173
172
|
if (storefrontId === undefined || storefrontId === null)
|
|
174
173
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -188,8 +187,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
188
187
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
189
188
|
if (tenantId !== undefined && tenantId !== null)
|
|
190
189
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
191
|
-
if (userId !== undefined && userId !== null)
|
|
192
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
193
190
|
url_ = url_.replace(/[?&]$/, "");
|
|
194
191
|
let options_ = {
|
|
195
192
|
method: "GET",
|
|
@@ -244,14 +241,13 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
244
241
|
return Promise.resolve(null);
|
|
245
242
|
}
|
|
246
243
|
/**
|
|
247
|
-
* Creates new storefront product reference
|
|
248
|
-
* @param storefrontId Storefront identifier
|
|
249
|
-
* @param tenantId (optional) Tenant identifier
|
|
250
|
-
* @param
|
|
251
|
-
* @param body (optional) Create operation parameters
|
|
244
|
+
* Creates a new storefront product reference.
|
|
245
|
+
* @param storefrontId Storefront identifier.
|
|
246
|
+
* @param tenantId (optional) Tenant identifier.
|
|
247
|
+
* @param body (optional) Create operation parameters.
|
|
252
248
|
* @return Success
|
|
253
249
|
*/
|
|
254
|
-
create(storefrontId, tenantId,
|
|
250
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
255
251
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references?";
|
|
256
252
|
if (storefrontId === undefined || storefrontId === null)
|
|
257
253
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -259,8 +255,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
259
255
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
260
256
|
if (tenantId !== undefined && tenantId !== null)
|
|
261
257
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
262
|
-
if (userId !== undefined && userId !== null)
|
|
263
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
264
258
|
url_ = url_.replace(/[?&]$/, "");
|
|
265
259
|
const content_ = JSON.stringify(body);
|
|
266
260
|
let options_ = {
|
|
@@ -325,14 +319,13 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
325
319
|
return Promise.resolve(null);
|
|
326
320
|
}
|
|
327
321
|
/**
|
|
328
|
-
*
|
|
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
|
|
332
|
-
* @param userId (optional) User identifier
|
|
322
|
+
* Returns a storefront product reference.
|
|
323
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
324
|
+
* @param storefrontId Storefront identifier.
|
|
325
|
+
* @param tenantId (optional) Tenant identifier.
|
|
333
326
|
* @return Success
|
|
334
327
|
*/
|
|
335
|
-
get(reference, storefrontId, tenantId,
|
|
328
|
+
get(reference, storefrontId, tenantId, cancelToken) {
|
|
336
329
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
337
330
|
if (reference === undefined || reference === null)
|
|
338
331
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -343,8 +336,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
343
336
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
344
337
|
if (tenantId !== undefined && tenantId !== null)
|
|
345
338
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
346
|
-
if (userId !== undefined && userId !== null)
|
|
347
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
348
339
|
url_ = url_.replace(/[?&]$/, "");
|
|
349
340
|
let options_ = {
|
|
350
341
|
method: "GET",
|
|
@@ -406,14 +397,13 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
406
397
|
return Promise.resolve(null);
|
|
407
398
|
}
|
|
408
399
|
/**
|
|
409
|
-
* Deletes storefront product reference
|
|
410
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
411
|
-
* @param storefrontId Storefront identifier
|
|
412
|
-
* @param tenantId (optional) Tenant identifier
|
|
413
|
-
* @param userId (optional) User identifier
|
|
400
|
+
* Deletes the storefront product reference.
|
|
401
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
402
|
+
* @param storefrontId Storefront identifier.
|
|
403
|
+
* @param tenantId (optional) Tenant identifier.
|
|
414
404
|
* @return Success
|
|
415
405
|
*/
|
|
416
|
-
delete(reference, storefrontId, tenantId,
|
|
406
|
+
delete(reference, storefrontId, tenantId, cancelToken) {
|
|
417
407
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}?";
|
|
418
408
|
if (reference === undefined || reference === null)
|
|
419
409
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -424,8 +414,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
424
414
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
425
415
|
if (tenantId !== undefined && tenantId !== null)
|
|
426
416
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
427
|
-
if (userId !== undefined && userId !== null)
|
|
428
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
429
417
|
url_ = url_.replace(/[?&]$/, "");
|
|
430
418
|
let options_ = {
|
|
431
419
|
method: "DELETE",
|
|
@@ -487,14 +475,13 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
487
475
|
return Promise.resolve(null);
|
|
488
476
|
}
|
|
489
477
|
/**
|
|
490
|
-
*
|
|
491
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
492
|
-
* @param storefrontId Storefront identifier
|
|
493
|
-
* @param tenantId (optional) Tenant identifier
|
|
494
|
-
* @param userId (optional) User identifier
|
|
478
|
+
* Returns a product specification by the storefront product reference.
|
|
479
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
480
|
+
* @param storefrontId Storefront identifier.
|
|
481
|
+
* @param tenantId (optional) Tenant identifier.
|
|
495
482
|
* @return Success
|
|
496
483
|
*/
|
|
497
|
-
getProductSpecification(reference, storefrontId, tenantId,
|
|
484
|
+
getProductSpecification(reference, storefrontId, tenantId, cancelToken) {
|
|
498
485
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-specification?";
|
|
499
486
|
if (reference === undefined || reference === null)
|
|
500
487
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -505,8 +492,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
505
492
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
506
493
|
if (tenantId !== undefined && tenantId !== null)
|
|
507
494
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
508
|
-
if (userId !== undefined && userId !== null)
|
|
509
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
510
495
|
url_ = url_.replace(/[?&]$/, "");
|
|
511
496
|
let options_ = {
|
|
512
497
|
method: "GET",
|
|
@@ -568,14 +553,13 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
568
553
|
return Promise.resolve(null);
|
|
569
554
|
}
|
|
570
555
|
/**
|
|
571
|
-
*
|
|
572
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier
|
|
573
|
-
* @param storefrontId Storefront identifier
|
|
574
|
-
* @param tenantId (optional) Tenant identifier
|
|
575
|
-
* @param userId (optional) User identifier
|
|
556
|
+
* Returns a product personalization workflow configuration by storefront product reference.
|
|
557
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
558
|
+
* @param storefrontId Storefront identifier.
|
|
559
|
+
* @param tenantId (optional) Tenant identifier.
|
|
576
560
|
* @return Success
|
|
577
561
|
*/
|
|
578
|
-
getProductConfig(reference, storefrontId, tenantId,
|
|
562
|
+
getProductConfig(reference, storefrontId, tenantId, cancelToken) {
|
|
579
563
|
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
580
564
|
if (reference === undefined || reference === null)
|
|
581
565
|
throw new Error("The parameter 'reference' must be defined.");
|
|
@@ -586,8 +570,6 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
586
570
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
587
571
|
if (tenantId !== undefined && tenantId !== null)
|
|
588
572
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
589
|
-
if (userId !== undefined && userId !== null)
|
|
590
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
591
573
|
url_ = url_.replace(/[?&]$/, "");
|
|
592
574
|
let options_ = {
|
|
593
575
|
method: "GET",
|
|
@@ -659,16 +641,15 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
659
641
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
660
642
|
}
|
|
661
643
|
/**
|
|
662
|
-
*
|
|
663
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
664
|
-
* @param take (optional) Defines page length (how
|
|
665
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
666
|
-
* @param search (optional) Search string for partial match
|
|
667
|
-
* @param tenantId (optional) Tenant identifier
|
|
668
|
-
* @param userId (optional) User identifier
|
|
644
|
+
* Returns all product specifications, relevant to the specified query parameters.
|
|
645
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
646
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
647
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
648
|
+
* @param search (optional) Search string for partial match.
|
|
649
|
+
* @param tenantId (optional) Tenant identifier.
|
|
669
650
|
* @return Success
|
|
670
651
|
*/
|
|
671
|
-
getAll(skip, take, sorting, search, tenantId,
|
|
652
|
+
getAll(skip, take, sorting, search, tenantId, cancelToken) {
|
|
672
653
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications?";
|
|
673
654
|
if (skip !== undefined && skip !== null)
|
|
674
655
|
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
@@ -680,8 +661,6 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
680
661
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
681
662
|
if (tenantId !== undefined && tenantId !== null)
|
|
682
663
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
683
|
-
if (userId !== undefined && userId !== null)
|
|
684
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
685
664
|
url_ = url_.replace(/[?&]$/, "");
|
|
686
665
|
let options_ = {
|
|
687
666
|
method: "GET",
|
|
@@ -736,21 +715,18 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
736
715
|
return Promise.resolve(null);
|
|
737
716
|
}
|
|
738
717
|
/**
|
|
739
|
-
*
|
|
740
|
-
* @param id Product specification identifier
|
|
741
|
-
* @param tenantId (optional) Tenant identifier
|
|
742
|
-
* @param userId (optional) User identifier
|
|
718
|
+
* Returns a product specification by identifier.
|
|
719
|
+
* @param id Product specification identifier.
|
|
720
|
+
* @param tenantId (optional) Tenant identifier.
|
|
743
721
|
* @return Success
|
|
744
722
|
*/
|
|
745
|
-
get(id, tenantId,
|
|
723
|
+
get(id, tenantId, cancelToken) {
|
|
746
724
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}?";
|
|
747
725
|
if (id === undefined || id === null)
|
|
748
726
|
throw new Error("The parameter 'id' must be defined.");
|
|
749
727
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
750
728
|
if (tenantId !== undefined && tenantId !== null)
|
|
751
729
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
752
|
-
if (userId !== undefined && userId !== null)
|
|
753
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
754
730
|
url_ = url_.replace(/[?&]$/, "");
|
|
755
731
|
let options_ = {
|
|
756
732
|
method: "GET",
|
|
@@ -812,21 +788,18 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
812
788
|
return Promise.resolve(null);
|
|
813
789
|
}
|
|
814
790
|
/**
|
|
815
|
-
*
|
|
816
|
-
* @param id Product specification identifier
|
|
817
|
-
* @param tenantId (optional) Tenant identifier
|
|
818
|
-
* @param userId (optional) User identifier
|
|
791
|
+
* Returns a product personlization workflow configuration by product specification identifier.
|
|
792
|
+
* @param id Product specification identifier.
|
|
793
|
+
* @param tenantId (optional) Tenant identifier.
|
|
819
794
|
* @return Success
|
|
820
795
|
*/
|
|
821
|
-
getConfiguration(id, tenantId,
|
|
796
|
+
getConfiguration(id, tenantId, cancelToken) {
|
|
822
797
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
|
|
823
798
|
if (id === undefined || id === null)
|
|
824
799
|
throw new Error("The parameter 'id' must be defined.");
|
|
825
800
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
826
801
|
if (tenantId !== undefined && tenantId !== null)
|
|
827
802
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
828
|
-
if (userId !== undefined && userId !== null)
|
|
829
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
830
803
|
url_ = url_.replace(/[?&]$/, "");
|
|
831
804
|
let options_ = {
|
|
832
805
|
method: "GET",
|
|
@@ -898,21 +871,20 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
898
871
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
899
872
|
}
|
|
900
873
|
/**
|
|
901
|
-
*
|
|
902
|
-
* @param storefrontId Storefront identifier
|
|
903
|
-
* @param ownerId (optional) Project owner (storefront user id) filter
|
|
904
|
-
* @param productReference (optional) Product reference filter
|
|
905
|
-
* @param status (optional) Project status filter
|
|
906
|
-
* @param datePeriod (optional) Project date period filter
|
|
907
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
908
|
-
* @param take (optional) Defines page length (how
|
|
909
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
910
|
-
* @param search (optional) Search string for partial match
|
|
911
|
-
* @param tenantId (optional) Tenant identifier
|
|
912
|
-
* @param userId (optional) User identifier
|
|
874
|
+
* Returns all projects, relevant to the specified query parameters.
|
|
875
|
+
* @param storefrontId Storefront identifier.
|
|
876
|
+
* @param ownerId (optional) Project owner (storefront user id) filter.
|
|
877
|
+
* @param productReference (optional) Product reference filter.
|
|
878
|
+
* @param status (optional) Project status filter.
|
|
879
|
+
* @param datePeriod (optional) Project date period filter.
|
|
880
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
881
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
882
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
883
|
+
* @param search (optional) Search string for partial match.
|
|
884
|
+
* @param tenantId (optional) Tenant identifier.
|
|
913
885
|
* @return Success
|
|
914
886
|
*/
|
|
915
|
-
getAll(storefrontId, ownerId, productReference, status, datePeriod, skip, take, sorting, search, tenantId,
|
|
887
|
+
getAll(storefrontId, ownerId, productReference, status, datePeriod, skip, take, sorting, search, tenantId, cancelToken) {
|
|
916
888
|
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
917
889
|
if (storefrontId === undefined || storefrontId === null)
|
|
918
890
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -938,8 +910,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
938
910
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
939
911
|
if (tenantId !== undefined && tenantId !== null)
|
|
940
912
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
941
|
-
if (userId !== undefined && userId !== null)
|
|
942
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
943
913
|
url_ = url_.replace(/[?&]$/, "");
|
|
944
914
|
let options_ = {
|
|
945
915
|
method: "GET",
|
|
@@ -994,14 +964,13 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
994
964
|
return Promise.resolve(null);
|
|
995
965
|
}
|
|
996
966
|
/**
|
|
997
|
-
* Creates new project
|
|
998
|
-
* @param storefrontId Storefront identifier
|
|
999
|
-
* @param tenantId (optional) Tenant identifier
|
|
1000
|
-
* @param
|
|
1001
|
-
* @param body (optional) Create operation parameters
|
|
967
|
+
* Creates a new project.
|
|
968
|
+
* @param storefrontId Storefront identifier.
|
|
969
|
+
* @param tenantId (optional) Tenant identifier.
|
|
970
|
+
* @param body (optional) Create operation parameters.
|
|
1002
971
|
* @return Success
|
|
1003
972
|
*/
|
|
1004
|
-
create(storefrontId, tenantId,
|
|
973
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
1005
974
|
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
1006
975
|
if (storefrontId === undefined || storefrontId === null)
|
|
1007
976
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -1009,8 +978,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1009
978
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1010
979
|
if (tenantId !== undefined && tenantId !== null)
|
|
1011
980
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1012
|
-
if (userId !== undefined && userId !== null)
|
|
1013
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1014
981
|
url_ = url_.replace(/[?&]$/, "");
|
|
1015
982
|
const content_ = JSON.stringify(body);
|
|
1016
983
|
let options_ = {
|
|
@@ -1075,21 +1042,18 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1075
1042
|
return Promise.resolve(null);
|
|
1076
1043
|
}
|
|
1077
1044
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
* @param id Project identifier
|
|
1080
|
-
* @param tenantId (optional) Tenant identifier
|
|
1081
|
-
* @param userId (optional) User identifier
|
|
1045
|
+
* Returns a project by identifier.
|
|
1046
|
+
* @param id Project identifier.
|
|
1047
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1082
1048
|
* @return Success
|
|
1083
1049
|
*/
|
|
1084
|
-
get(id, tenantId,
|
|
1050
|
+
get(id, tenantId, cancelToken) {
|
|
1085
1051
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}?";
|
|
1086
1052
|
if (id === undefined || id === null)
|
|
1087
1053
|
throw new Error("The parameter 'id' must be defined.");
|
|
1088
1054
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1089
1055
|
if (tenantId !== undefined && tenantId !== null)
|
|
1090
1056
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1091
|
-
if (userId !== undefined && userId !== null)
|
|
1092
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1093
1057
|
url_ = url_.replace(/[?&]$/, "");
|
|
1094
1058
|
let options_ = {
|
|
1095
1059
|
method: "GET",
|
|
@@ -1151,21 +1115,18 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1151
1115
|
return Promise.resolve(null);
|
|
1152
1116
|
}
|
|
1153
1117
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
* @param id Project identifier
|
|
1156
|
-
* @param tenantId (optional) Tenant identifier
|
|
1157
|
-
* @param userId (optional) User identifier
|
|
1118
|
+
* Returns all available status transitions for a project.
|
|
1119
|
+
* @param id Project identifier.
|
|
1120
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1158
1121
|
* @return Success
|
|
1159
1122
|
*/
|
|
1160
|
-
getAvailableTransitions(id, tenantId,
|
|
1123
|
+
getAvailableTransitions(id, tenantId, cancelToken) {
|
|
1161
1124
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/transitions?";
|
|
1162
1125
|
if (id === undefined || id === null)
|
|
1163
1126
|
throw new Error("The parameter 'id' must be defined.");
|
|
1164
1127
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1165
1128
|
if (tenantId !== undefined && tenantId !== null)
|
|
1166
1129
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1167
|
-
if (userId !== undefined && userId !== null)
|
|
1168
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1169
1130
|
url_ = url_.replace(/[?&]$/, "");
|
|
1170
1131
|
let options_ = {
|
|
1171
1132
|
method: "GET",
|
|
@@ -1241,14 +1202,13 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1241
1202
|
return Promise.resolve(null);
|
|
1242
1203
|
}
|
|
1243
1204
|
/**
|
|
1244
|
-
* Changes project status
|
|
1205
|
+
* Changes the project status.
|
|
1245
1206
|
* @param id Project identifier
|
|
1246
|
-
* @param transition Transition identifying name
|
|
1247
|
-
* @param tenantId (optional) Tenant identifier
|
|
1248
|
-
* @param userId (optional) User identifier
|
|
1207
|
+
* @param transition Transition identifying name.
|
|
1208
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1249
1209
|
* @return Success
|
|
1250
1210
|
*/
|
|
1251
|
-
changeStatus(id, transition, tenantId,
|
|
1211
|
+
changeStatus(id, transition, tenantId, cancelToken) {
|
|
1252
1212
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/transitions/{transition}?";
|
|
1253
1213
|
if (id === undefined || id === null)
|
|
1254
1214
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1258,8 +1218,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1258
1218
|
url_ = url_.replace("{transition}", encodeURIComponent("" + transition));
|
|
1259
1219
|
if (tenantId !== undefined && tenantId !== null)
|
|
1260
1220
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1261
|
-
if (userId !== undefined && userId !== null)
|
|
1262
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1263
1221
|
url_ = url_.replace(/[?&]$/, "");
|
|
1264
1222
|
let options_ = {
|
|
1265
1223
|
method: "POST",
|
|
@@ -1335,14 +1293,13 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1335
1293
|
return Promise.resolve(null);
|
|
1336
1294
|
}
|
|
1337
1295
|
/**
|
|
1338
|
-
*
|
|
1339
|
-
* @param id Project identifier
|
|
1340
|
-
* @param status Project status code
|
|
1341
|
-
* @param tenantId (optional) Tenant identifier
|
|
1342
|
-
* @param userId (optional) User identifier
|
|
1296
|
+
* Changes the project status forcibly without a proper transition.
|
|
1297
|
+
* @param id Project identifier.
|
|
1298
|
+
* @param status Project status code.
|
|
1299
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1343
1300
|
* @return Success
|
|
1344
1301
|
*/
|
|
1345
|
-
forceStatus(id, status, tenantId,
|
|
1302
|
+
forceStatus(id, status, tenantId, cancelToken) {
|
|
1346
1303
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/statuses/{status}?";
|
|
1347
1304
|
if (id === undefined || id === null)
|
|
1348
1305
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1352,8 +1309,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1352
1309
|
url_ = url_.replace("{status}", encodeURIComponent("" + status));
|
|
1353
1310
|
if (tenantId !== undefined && tenantId !== null)
|
|
1354
1311
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1355
|
-
if (userId !== undefined && userId !== null)
|
|
1356
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1357
1312
|
url_ = url_.replace(/[?&]$/, "");
|
|
1358
1313
|
let options_ = {
|
|
1359
1314
|
method: "POST",
|
|
@@ -1422,17 +1377,14 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1422
1377
|
return Promise.resolve(null);
|
|
1423
1378
|
}
|
|
1424
1379
|
/**
|
|
1425
|
-
*
|
|
1426
|
-
* @param tenantId (optional) Tenant identifier
|
|
1427
|
-
* @param userId (optional) User identifier
|
|
1380
|
+
* Returns a list of all existing project statuses.
|
|
1381
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1428
1382
|
* @return Success
|
|
1429
1383
|
*/
|
|
1430
|
-
getAllStatuses(tenantId,
|
|
1384
|
+
getAllStatuses(tenantId, cancelToken) {
|
|
1431
1385
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/statuses?";
|
|
1432
1386
|
if (tenantId !== undefined && tenantId !== null)
|
|
1433
1387
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1434
|
-
if (userId !== undefined && userId !== null)
|
|
1435
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1436
1388
|
url_ = url_.replace(/[?&]$/, "");
|
|
1437
1389
|
let options_ = {
|
|
1438
1390
|
method: "GET",
|
|
@@ -1487,17 +1439,14 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1487
1439
|
return Promise.resolve(null);
|
|
1488
1440
|
}
|
|
1489
1441
|
/**
|
|
1490
|
-
*
|
|
1491
|
-
* @param tenantId (optional) Tenant identifier
|
|
1492
|
-
* @param userId (optional) User identifier
|
|
1442
|
+
* Returns a list of all existing project status transitions.
|
|
1443
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1493
1444
|
* @return Success
|
|
1494
1445
|
*/
|
|
1495
|
-
getAllTransitions(tenantId,
|
|
1446
|
+
getAllTransitions(tenantId, cancelToken) {
|
|
1496
1447
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/transitions?";
|
|
1497
1448
|
if (tenantId !== undefined && tenantId !== null)
|
|
1498
1449
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1499
|
-
if (userId !== undefined && userId !== null)
|
|
1500
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1501
1450
|
url_ = url_.replace(/[?&]$/, "");
|
|
1502
1451
|
let options_ = {
|
|
1503
1452
|
method: "GET",
|
|
@@ -1552,15 +1501,14 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1552
1501
|
return Promise.resolve(null);
|
|
1553
1502
|
}
|
|
1554
1503
|
/**
|
|
1555
|
-
*
|
|
1556
|
-
* @param id Project
|
|
1557
|
-
* @param designUserId
|
|
1558
|
-
* @param designId Design identifier
|
|
1559
|
-
* @param tenantId (optional) Tenant identifier
|
|
1560
|
-
* @param userId (optional) User identifier
|
|
1504
|
+
* Returns an url to download project print file.
|
|
1505
|
+
* @param id Project identifier.
|
|
1506
|
+
* @param designUserId Design owner identifier.
|
|
1507
|
+
* @param designId Design identifier.
|
|
1508
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1561
1509
|
* @return Success
|
|
1562
1510
|
*/
|
|
1563
|
-
getProjectPdfUrl(id, designUserId, designId, tenantId,
|
|
1511
|
+
getProjectPdfUrl(id, designUserId, designId, tenantId, cancelToken) {
|
|
1564
1512
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
|
|
1565
1513
|
if (id === undefined || id === null)
|
|
1566
1514
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1575,8 +1523,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1575
1523
|
url_ += "designId=" + encodeURIComponent("" + designId) + "&";
|
|
1576
1524
|
if (tenantId !== undefined && tenantId !== null)
|
|
1577
1525
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1578
|
-
if (userId !== undefined && userId !== null)
|
|
1579
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1580
1526
|
url_ = url_.replace(/[?&]$/, "");
|
|
1581
1527
|
let options_ = {
|
|
1582
1528
|
method: "GET",
|
|
@@ -1631,16 +1577,15 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1631
1577
|
return Promise.resolve(null);
|
|
1632
1578
|
}
|
|
1633
1579
|
/**
|
|
1634
|
-
*
|
|
1635
|
-
* @param id Project
|
|
1636
|
-
* @param designUserId
|
|
1637
|
-
* @param designId Design identifier
|
|
1638
|
-
* @param attachment (optional) If set to 'true', file will be provided as an attachment with proper filename supplied (default value is 'false')
|
|
1639
|
-
* @param tenantId (optional) Tenant identifier
|
|
1640
|
-
* @param userId (optional) User identifier
|
|
1580
|
+
* Returns an archive file, which contains all project print files.
|
|
1581
|
+
* @param id Project identifier.
|
|
1582
|
+
* @param designUserId Design owner identifier.
|
|
1583
|
+
* @param designId Design identifier.
|
|
1584
|
+
* @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
|
|
1585
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1641
1586
|
* @return Success
|
|
1642
1587
|
*/
|
|
1643
|
-
getProjectPdfZip(id, designUserId, designId, attachment, tenantId,
|
|
1588
|
+
getProjectPdfZip(id, designUserId, designId, attachment, tenantId, cancelToken) {
|
|
1644
1589
|
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
|
|
1645
1590
|
if (id === undefined || id === null)
|
|
1646
1591
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -1657,8 +1602,6 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1657
1602
|
url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
|
|
1658
1603
|
if (tenantId !== undefined && tenantId !== null)
|
|
1659
1604
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1660
|
-
if (userId !== undefined && userId !== null)
|
|
1661
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1662
1605
|
url_ = url_.replace(/[?&]$/, "");
|
|
1663
1606
|
let options_ = {
|
|
1664
1607
|
responseType: "blob",
|
|
@@ -1720,15 +1663,18 @@ export class ProjectsApiClient extends ApiClientBase {
|
|
|
1720
1663
|
return Promise.resolve(null);
|
|
1721
1664
|
}
|
|
1722
1665
|
/**
|
|
1723
|
-
*
|
|
1724
|
-
* @param id Project identifier
|
|
1666
|
+
* Returns an order description from the ecommerce system for the specified project.
|
|
1667
|
+
* @param id Project identifier.
|
|
1668
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1725
1669
|
* @return Success
|
|
1726
1670
|
*/
|
|
1727
|
-
getProjectOrder(id, cancelToken) {
|
|
1728
|
-
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/order";
|
|
1671
|
+
getProjectOrder(id, tenantId, cancelToken) {
|
|
1672
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/order?";
|
|
1729
1673
|
if (id === undefined || id === null)
|
|
1730
1674
|
throw new Error("The parameter 'id' must be defined.");
|
|
1731
1675
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1676
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1677
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1732
1678
|
url_ = url_.replace(/[?&]$/, "");
|
|
1733
1679
|
let options_ = {
|
|
1734
1680
|
method: "GET",
|
|
@@ -1800,17 +1746,16 @@ export class StorefrontsApiClient extends ApiClientBase {
|
|
|
1800
1746
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
1801
1747
|
}
|
|
1802
1748
|
/**
|
|
1803
|
-
*
|
|
1804
|
-
* @param types (optional) Storefront type filter
|
|
1805
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
1806
|
-
* @param take (optional) Defines page length (how
|
|
1807
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
1808
|
-
* @param search (optional) Search string for partial match
|
|
1809
|
-
* @param tenantId (optional) Tenant identifier
|
|
1810
|
-
* @param userId (optional) User identifier
|
|
1749
|
+
* Returns all storefronts, relevant to the specified query parameters.
|
|
1750
|
+
* @param types (optional) Storefront type filter.
|
|
1751
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1752
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1753
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1754
|
+
* @param search (optional) Search string for partial match.
|
|
1755
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1811
1756
|
* @return Success
|
|
1812
1757
|
*/
|
|
1813
|
-
getAll(types, skip, take, sorting, search, tenantId,
|
|
1758
|
+
getAll(types, skip, take, sorting, search, tenantId, cancelToken) {
|
|
1814
1759
|
let url_ = this.baseUrl + "/api/storefront/v1/storefronts?";
|
|
1815
1760
|
if (types !== undefined && types !== null)
|
|
1816
1761
|
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
@@ -1824,8 +1769,6 @@ export class StorefrontsApiClient extends ApiClientBase {
|
|
|
1824
1769
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1825
1770
|
if (tenantId !== undefined && tenantId !== null)
|
|
1826
1771
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1827
|
-
if (userId !== undefined && userId !== null)
|
|
1828
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1829
1772
|
url_ = url_.replace(/[?&]$/, "");
|
|
1830
1773
|
let options_ = {
|
|
1831
1774
|
method: "GET",
|
|
@@ -1880,21 +1823,18 @@ export class StorefrontsApiClient extends ApiClientBase {
|
|
|
1880
1823
|
return Promise.resolve(null);
|
|
1881
1824
|
}
|
|
1882
1825
|
/**
|
|
1883
|
-
*
|
|
1884
|
-
* @param id Storefront identifier
|
|
1885
|
-
* @param tenantId (optional) Tenant identifier
|
|
1886
|
-
* @param userId (optional) User identifier
|
|
1826
|
+
* Returns a storefront by identifier.
|
|
1827
|
+
* @param id Storefront identifier.
|
|
1828
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1887
1829
|
* @return Success
|
|
1888
1830
|
*/
|
|
1889
|
-
get(id, tenantId,
|
|
1831
|
+
get(id, tenantId, cancelToken) {
|
|
1890
1832
|
let url_ = this.baseUrl + "/api/storefront/v1/storefronts/{id}?";
|
|
1891
1833
|
if (id === undefined || id === null)
|
|
1892
1834
|
throw new Error("The parameter 'id' must be defined.");
|
|
1893
1835
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1894
1836
|
if (tenantId !== undefined && tenantId !== null)
|
|
1895
1837
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1896
|
-
if (userId !== undefined && userId !== null)
|
|
1897
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
1898
1838
|
url_ = url_.replace(/[?&]$/, "");
|
|
1899
1839
|
let options_ = {
|
|
1900
1840
|
method: "GET",
|
|
@@ -1966,18 +1906,17 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
1966
1906
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
1967
1907
|
}
|
|
1968
1908
|
/**
|
|
1969
|
-
*
|
|
1970
|
-
* @param storefrontId Storefront identifier
|
|
1971
|
-
* @param storefrontUserId (optional) Storefront user identifier
|
|
1972
|
-
* @param skip (optional) Defines page start offset from beginning of sorted result list
|
|
1973
|
-
* @param take (optional) Defines page length (how
|
|
1974
|
-
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC"
|
|
1975
|
-
* @param search (optional) Search string for partial match
|
|
1976
|
-
* @param tenantId (optional) Tenant identifier
|
|
1977
|
-
* @param userId (optional) User identifier
|
|
1909
|
+
* Returns all storefront users, relevant to the specified query parameters.
|
|
1910
|
+
* @param storefrontId Storefront identifier.
|
|
1911
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
1912
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
1913
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
1914
|
+
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1915
|
+
* @param search (optional) Search string for partial match.
|
|
1916
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1978
1917
|
* @return Success
|
|
1979
1918
|
*/
|
|
1980
|
-
getAll(storefrontId, storefrontUserId, skip, take, sorting, search, tenantId,
|
|
1919
|
+
getAll(storefrontId, storefrontUserId, skip, take, sorting, search, tenantId, cancelToken) {
|
|
1981
1920
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users?";
|
|
1982
1921
|
if (storefrontId === undefined || storefrontId === null)
|
|
1983
1922
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -1995,8 +1934,6 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
1995
1934
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1996
1935
|
if (tenantId !== undefined && tenantId !== null)
|
|
1997
1936
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1998
|
-
if (userId !== undefined && userId !== null)
|
|
1999
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2000
1937
|
url_ = url_.replace(/[?&]$/, "");
|
|
2001
1938
|
let options_ = {
|
|
2002
1939
|
method: "GET",
|
|
@@ -2051,14 +1988,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2051
1988
|
return Promise.resolve(null);
|
|
2052
1989
|
}
|
|
2053
1990
|
/**
|
|
2054
|
-
* Creates new storefront user
|
|
2055
|
-
* @param storefrontId Storefront identifier
|
|
2056
|
-
* @param tenantId (optional) Tenant identifier
|
|
2057
|
-
* @param
|
|
2058
|
-
* @param body (optional) Create operation parameters
|
|
1991
|
+
* Creates a new storefront user.
|
|
1992
|
+
* @param storefrontId Storefront identifier.
|
|
1993
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1994
|
+
* @param body (optional) Operation parameters.
|
|
2059
1995
|
* @return Success
|
|
2060
1996
|
*/
|
|
2061
|
-
create(storefrontId, tenantId,
|
|
1997
|
+
create(storefrontId, tenantId, body, cancelToken) {
|
|
2062
1998
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users?";
|
|
2063
1999
|
if (storefrontId === undefined || storefrontId === null)
|
|
2064
2000
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -2066,8 +2002,6 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2066
2002
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2067
2003
|
if (tenantId !== undefined && tenantId !== null)
|
|
2068
2004
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2069
|
-
if (userId !== undefined && userId !== null)
|
|
2070
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2071
2005
|
url_ = url_.replace(/[?&]$/, "");
|
|
2072
2006
|
const content_ = JSON.stringify(body);
|
|
2073
2007
|
let options_ = {
|
|
@@ -2110,6 +2044,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2110
2044
|
result201 = JSON.parse(resultData201);
|
|
2111
2045
|
return result201;
|
|
2112
2046
|
}
|
|
2047
|
+
else if (status === 409) {
|
|
2048
|
+
const _responseText = response.data;
|
|
2049
|
+
let result409 = null;
|
|
2050
|
+
let resultData409 = _responseText;
|
|
2051
|
+
result409 = JSON.parse(resultData409);
|
|
2052
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2053
|
+
}
|
|
2113
2054
|
else if (status === 401) {
|
|
2114
2055
|
const _responseText = response.data;
|
|
2115
2056
|
return throwException("Unauthorized", status, _responseText, _headers);
|
|
@@ -2125,14 +2066,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2125
2066
|
return Promise.resolve(null);
|
|
2126
2067
|
}
|
|
2127
2068
|
/**
|
|
2128
|
-
*
|
|
2129
|
-
* @param id Storefront user identifier
|
|
2130
|
-
* @param storefrontId Storefront identifier
|
|
2131
|
-
* @param tenantId (optional) Tenant identifier
|
|
2132
|
-
* @param userId (optional) User identifier
|
|
2069
|
+
* Returns a storefront user by identifier.
|
|
2070
|
+
* @param id Storefront user identifier.
|
|
2071
|
+
* @param storefrontId Storefront identifier.
|
|
2072
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2133
2073
|
* @return Success
|
|
2134
2074
|
*/
|
|
2135
|
-
get(id, storefrontId, tenantId,
|
|
2075
|
+
get(id, storefrontId, tenantId, cancelToken) {
|
|
2136
2076
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/{id}?";
|
|
2137
2077
|
if (id === undefined || id === null)
|
|
2138
2078
|
throw new Error("The parameter 'id' must be defined.");
|
|
@@ -2143,8 +2083,6 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2143
2083
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2144
2084
|
if (tenantId !== undefined && tenantId !== null)
|
|
2145
2085
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2146
|
-
if (userId !== undefined && userId !== null)
|
|
2147
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2148
2086
|
url_ = url_.replace(/[?&]$/, "");
|
|
2149
2087
|
let options_ = {
|
|
2150
2088
|
method: "GET",
|
|
@@ -2206,14 +2144,91 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2206
2144
|
return Promise.resolve(null);
|
|
2207
2145
|
}
|
|
2208
2146
|
/**
|
|
2209
|
-
*
|
|
2210
|
-
* @param storefrontId Storefront identifier
|
|
2211
|
-
* @param tenantId (optional) Tenant identifier
|
|
2212
|
-
* @param
|
|
2213
|
-
* @
|
|
2147
|
+
* Registers a storefront user with the specified identifier.
|
|
2148
|
+
* @param storefrontId Storefront identifier.
|
|
2149
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2150
|
+
* @param body (optional) Operation parameters.
|
|
2151
|
+
* @return Success
|
|
2152
|
+
*/
|
|
2153
|
+
register(storefrontId, tenantId, body, cancelToken) {
|
|
2154
|
+
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/register?";
|
|
2155
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
2156
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
2157
|
+
else
|
|
2158
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2159
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2160
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2161
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2162
|
+
const content_ = JSON.stringify(body);
|
|
2163
|
+
let options_ = {
|
|
2164
|
+
data: content_,
|
|
2165
|
+
method: "POST",
|
|
2166
|
+
url: url_,
|
|
2167
|
+
headers: {
|
|
2168
|
+
"Content-Type": "application/json-patch+json",
|
|
2169
|
+
"Accept": "text/plain"
|
|
2170
|
+
},
|
|
2171
|
+
cancelToken
|
|
2172
|
+
};
|
|
2173
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2174
|
+
return this.instance.request(transformedOptions_);
|
|
2175
|
+
}).catch((_error) => {
|
|
2176
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2177
|
+
return _error.response;
|
|
2178
|
+
}
|
|
2179
|
+
else {
|
|
2180
|
+
throw _error;
|
|
2181
|
+
}
|
|
2182
|
+
}).then((_response) => {
|
|
2183
|
+
return this.transformResult(url_, _response, (_response) => this.processRegister(_response));
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
processRegister(response) {
|
|
2187
|
+
const status = response.status;
|
|
2188
|
+
let _headers = {};
|
|
2189
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2190
|
+
for (let k in response.headers) {
|
|
2191
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2192
|
+
_headers[k] = response.headers[k];
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
if (status === 200) {
|
|
2197
|
+
const _responseText = response.data;
|
|
2198
|
+
let result200 = null;
|
|
2199
|
+
let resultData200 = _responseText;
|
|
2200
|
+
result200 = JSON.parse(resultData200);
|
|
2201
|
+
return result200;
|
|
2202
|
+
}
|
|
2203
|
+
else if (status === 409) {
|
|
2204
|
+
const _responseText = response.data;
|
|
2205
|
+
let result409 = null;
|
|
2206
|
+
let resultData409 = _responseText;
|
|
2207
|
+
result409 = JSON.parse(resultData409);
|
|
2208
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2209
|
+
}
|
|
2210
|
+
else if (status === 401) {
|
|
2211
|
+
const _responseText = response.data;
|
|
2212
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2213
|
+
}
|
|
2214
|
+
else if (status === 403) {
|
|
2215
|
+
const _responseText = response.data;
|
|
2216
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2217
|
+
}
|
|
2218
|
+
else if (status !== 200 && status !== 204) {
|
|
2219
|
+
const _responseText = response.data;
|
|
2220
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2221
|
+
}
|
|
2222
|
+
return Promise.resolve(null);
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Transfers all existing data for the anonymous storefront user to the selected regular storefront user account.
|
|
2226
|
+
* @param storefrontId Storefront identifier.
|
|
2227
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2228
|
+
* @param body (optional) Operation parameters.
|
|
2214
2229
|
* @return Success
|
|
2215
2230
|
*/
|
|
2216
|
-
mergeAnonymous(storefrontId, tenantId,
|
|
2231
|
+
mergeAnonymous(storefrontId, tenantId, body, cancelToken) {
|
|
2217
2232
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/merge-anonymous?";
|
|
2218
2233
|
if (storefrontId === undefined || storefrontId === null)
|
|
2219
2234
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
@@ -2221,8 +2236,6 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2221
2236
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2222
2237
|
if (tenantId !== undefined && tenantId !== null)
|
|
2223
2238
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2224
|
-
if (userId !== undefined && userId !== null)
|
|
2225
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2226
2239
|
url_ = url_.replace(/[?&]$/, "");
|
|
2227
2240
|
const content_ = JSON.stringify(body);
|
|
2228
2241
|
let options_ = {
|
|
@@ -2290,14 +2303,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2290
2303
|
return Promise.resolve(null);
|
|
2291
2304
|
}
|
|
2292
2305
|
/**
|
|
2293
|
-
*
|
|
2294
|
-
* @param storefrontUserId Storefront user identifier
|
|
2295
|
-
* @param storefrontId Storefront identifier
|
|
2296
|
-
* @param tenantId (optional) Tenant identifier
|
|
2297
|
-
* @param userId (optional) User identifier
|
|
2306
|
+
* Returns an API access token for the specified storefront user.
|
|
2307
|
+
* @param storefrontUserId Storefront user identifier.
|
|
2308
|
+
* @param storefrontId Storefront identifier.
|
|
2309
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2298
2310
|
* @return Success
|
|
2299
2311
|
*/
|
|
2300
|
-
getToken(storefrontUserId, storefrontId, tenantId,
|
|
2312
|
+
getToken(storefrontUserId, storefrontId, tenantId, cancelToken) {
|
|
2301
2313
|
let url_ = this.baseUrl + "/api/storefront/v1/storefront-users/token?";
|
|
2302
2314
|
if (storefrontUserId === undefined || storefrontUserId === null)
|
|
2303
2315
|
throw new Error("The parameter 'storefrontUserId' must be defined and cannot be null.");
|
|
@@ -2309,13 +2321,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2309
2321
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
2310
2322
|
if (tenantId !== undefined && tenantId !== null)
|
|
2311
2323
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2312
|
-
if (userId !== undefined && userId !== null)
|
|
2313
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2314
2324
|
url_ = url_.replace(/[?&]$/, "");
|
|
2315
2325
|
let options_ = {
|
|
2316
2326
|
method: "GET",
|
|
2317
2327
|
url: url_,
|
|
2318
|
-
headers: {
|
|
2328
|
+
headers: {
|
|
2329
|
+
"Accept": "text/plain"
|
|
2330
|
+
},
|
|
2319
2331
|
cancelToken
|
|
2320
2332
|
};
|
|
2321
2333
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -2343,7 +2355,10 @@ export class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2343
2355
|
}
|
|
2344
2356
|
if (status === 201) {
|
|
2345
2357
|
const _responseText = response.data;
|
|
2346
|
-
|
|
2358
|
+
let result201 = null;
|
|
2359
|
+
let resultData201 = _responseText;
|
|
2360
|
+
result201 = JSON.parse(resultData201);
|
|
2361
|
+
return result201;
|
|
2347
2362
|
}
|
|
2348
2363
|
else if (status === 404) {
|
|
2349
2364
|
const _responseText = response.data;
|
|
@@ -2384,17 +2399,14 @@ export class TenantInfoApiClient extends ApiClientBase {
|
|
|
2384
2399
|
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2385
2400
|
}
|
|
2386
2401
|
/**
|
|
2387
|
-
*
|
|
2388
|
-
* @param tenantId (optional) Tenant identifier
|
|
2389
|
-
* @param userId (optional) User identifier
|
|
2402
|
+
* Returns an information about the tenant applications.
|
|
2403
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2390
2404
|
* @return Success
|
|
2391
2405
|
*/
|
|
2392
|
-
getApplicationsInfo(tenantId,
|
|
2406
|
+
getApplicationsInfo(tenantId, cancelToken) {
|
|
2393
2407
|
let url_ = this.baseUrl + "/api/storefront/v1/tenant-info/applications?";
|
|
2394
2408
|
if (tenantId !== undefined && tenantId !== null)
|
|
2395
2409
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2396
|
-
if (userId !== undefined && userId !== null)
|
|
2397
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2398
2410
|
url_ = url_.replace(/[?&]$/, "");
|
|
2399
2411
|
let options_ = {
|
|
2400
2412
|
method: "GET",
|
|
@@ -2449,17 +2461,14 @@ export class TenantInfoApiClient extends ApiClientBase {
|
|
|
2449
2461
|
return Promise.resolve(null);
|
|
2450
2462
|
}
|
|
2451
2463
|
/**
|
|
2452
|
-
*
|
|
2453
|
-
* @param tenantId (optional) Tenant identifier
|
|
2454
|
-
* @param userId (optional) User identifier
|
|
2464
|
+
* Returns an information about the tenant.
|
|
2465
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2455
2466
|
* @return Success
|
|
2456
2467
|
*/
|
|
2457
|
-
getInfo(tenantId,
|
|
2468
|
+
getInfo(tenantId, cancelToken) {
|
|
2458
2469
|
let url_ = this.baseUrl + "/api/storefront/v1/tenant-info?";
|
|
2459
2470
|
if (tenantId !== undefined && tenantId !== null)
|
|
2460
2471
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2461
|
-
if (userId !== undefined && userId !== null)
|
|
2462
|
-
url_ += "userId=" + encodeURIComponent("" + userId) + "&";
|
|
2463
2472
|
url_ = url_.replace(/[?&]$/, "");
|
|
2464
2473
|
let options_ = {
|
|
2465
2474
|
method: "GET",
|
|
@@ -2514,7 +2523,7 @@ export class TenantInfoApiClient extends ApiClientBase {
|
|
|
2514
2523
|
return Promise.resolve(null);
|
|
2515
2524
|
}
|
|
2516
2525
|
}
|
|
2517
|
-
/**
|
|
2526
|
+
/** Defines all available date period filter values for queries. */
|
|
2518
2527
|
export var DatePeriod;
|
|
2519
2528
|
(function (DatePeriod) {
|
|
2520
2529
|
DatePeriod["All"] = "All";
|
|
@@ -2522,7 +2531,7 @@ export var DatePeriod;
|
|
|
2522
2531
|
DatePeriod["Last7Days"] = "Last7Days";
|
|
2523
2532
|
DatePeriod["Last30Days"] = "Last30Days";
|
|
2524
2533
|
})(DatePeriod || (DatePeriod = {}));
|
|
2525
|
-
/** Storefront types */
|
|
2534
|
+
/** Storefront types. */
|
|
2526
2535
|
export var StorefrontType;
|
|
2527
2536
|
(function (StorefrontType) {
|
|
2528
2537
|
StorefrontType["Custom"] = "Custom";
|