@aurigma/axios-storefront-api-client 2.15.1 → 2.17.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 +90 -2
- package/dist/cjs/storefront-api-client.js +134 -33
- package/dist/cjs/storefront-api-client.js.map +1 -1
- package/dist/esm/storefront-api-client.d.ts +90 -2
- package/dist/esm/storefront-api-client.js +133 -32
- package/dist/esm/storefront-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios';
|
|
3
2
|
export declare class ApiClientConfiguration {
|
|
4
3
|
apiUrl: string;
|
|
@@ -98,6 +97,18 @@ export interface IProductReferencesApiClient {
|
|
|
98
97
|
* @return Success
|
|
99
98
|
*/
|
|
100
99
|
getProductConfig(reference: string | null, storefrontId: number, tenantId?: number | null | undefined): Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Returns a product cost details from ecommerce system.
|
|
102
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
103
|
+
* @param sku Product SKU.
|
|
104
|
+
* @param storefrontId Storefront identifier.
|
|
105
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
106
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
107
|
+
* @param quantity (optional) Product quantity.
|
|
108
|
+
* @param tenantId (optional) Tenant identifier.
|
|
109
|
+
* @return Success
|
|
110
|
+
*/
|
|
111
|
+
getProductCostDetails(reference: string | null, sku: string, storefrontId: number, storefrontUserId?: string | null | undefined, currencyCode?: string | null | undefined, quantity?: number | undefined, tenantId?: number | null | undefined): Promise<ProductCostDetailsDto>;
|
|
101
112
|
}
|
|
102
113
|
export declare class ProductReferencesApiClient extends ApiClientBase implements IProductReferencesApiClient {
|
|
103
114
|
private instance;
|
|
@@ -163,6 +174,19 @@ export declare class ProductReferencesApiClient extends ApiClientBase implements
|
|
|
163
174
|
*/
|
|
164
175
|
getProductConfig(reference: string | null, storefrontId: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<string>;
|
|
165
176
|
protected processGetProductConfig(response: AxiosResponse): Promise<string>;
|
|
177
|
+
/**
|
|
178
|
+
* Returns a product cost details from ecommerce system.
|
|
179
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
180
|
+
* @param sku Product SKU.
|
|
181
|
+
* @param storefrontId Storefront identifier.
|
|
182
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
183
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
184
|
+
* @param quantity (optional) Product quantity.
|
|
185
|
+
* @param tenantId (optional) Tenant identifier.
|
|
186
|
+
* @return Success
|
|
187
|
+
*/
|
|
188
|
+
getProductCostDetails(reference: string | null, sku: string, storefrontId: number, storefrontUserId?: string | null | undefined, currencyCode?: string | null | undefined, quantity?: number | undefined, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProductCostDetailsDto>;
|
|
189
|
+
protected processGetProductCostDetails(response: AxiosResponse): Promise<ProductCostDetailsDto>;
|
|
166
190
|
}
|
|
167
191
|
export interface IProductSpecificationsApiClient {
|
|
168
192
|
/**
|
|
@@ -704,6 +728,25 @@ export interface ProductSpecificationDto {
|
|
|
704
728
|
/** Product specification modification time. */
|
|
705
729
|
lastModified?: string | null;
|
|
706
730
|
}
|
|
731
|
+
/** Dto class, containing information about storefront product cost details. */
|
|
732
|
+
export interface ProductCostDetailsDto {
|
|
733
|
+
/** Product reference is an external reference to Customer's Canvas product specification, e.g online store product identifier. */
|
|
734
|
+
productReference?: string | null;
|
|
735
|
+
/** Product SKU. */
|
|
736
|
+
productSku?: string | null;
|
|
737
|
+
/** Product quantity. */
|
|
738
|
+
productQuantity?: number;
|
|
739
|
+
/** Product price. */
|
|
740
|
+
productPrice?: number;
|
|
741
|
+
/** Product cost. */
|
|
742
|
+
productCost?: number;
|
|
743
|
+
/** Product discount. */
|
|
744
|
+
productDiscount?: number;
|
|
745
|
+
/** Currency code. */
|
|
746
|
+
currencyCode?: string | null;
|
|
747
|
+
/** Tenant identifier. */
|
|
748
|
+
tenantId?: number;
|
|
749
|
+
}
|
|
707
750
|
/** Paged list of items. */
|
|
708
751
|
export interface PagedOfProductSpecificationDto {
|
|
709
752
|
/** Items count. */
|
|
@@ -718,6 +761,20 @@ export declare enum DatePeriod {
|
|
|
718
761
|
Last7Days = "Last7Days",
|
|
719
762
|
Last30Days = "Last30Days"
|
|
720
763
|
}
|
|
764
|
+
/** Available product resource types */
|
|
765
|
+
export declare enum ProjectProductResourceType {
|
|
766
|
+
_0 = 0,
|
|
767
|
+
_1 = 1,
|
|
768
|
+
_2 = 2
|
|
769
|
+
}
|
|
770
|
+
/** Dto class, containing information about a project item resource. */
|
|
771
|
+
export interface ProjectItemResourceDto {
|
|
772
|
+
/** Resource ID. */
|
|
773
|
+
resourceId?: string | null;
|
|
774
|
+
/** Resource name. */
|
|
775
|
+
name?: string | null;
|
|
776
|
+
type?: ProjectProductResourceType;
|
|
777
|
+
}
|
|
721
778
|
/** Dto class, containing information about a project item. */
|
|
722
779
|
export interface ProjectItemDto {
|
|
723
780
|
/** Item name. */
|
|
@@ -734,6 +791,8 @@ export interface ProjectItemDto {
|
|
|
734
791
|
designIds?: string[] | null;
|
|
735
792
|
/** SKU. */
|
|
736
793
|
sku?: string | null;
|
|
794
|
+
/** External resources descriptions. */
|
|
795
|
+
resources?: ProjectItemResourceDto[] | null;
|
|
737
796
|
}
|
|
738
797
|
/** Dto class, containing information about a project. */
|
|
739
798
|
export interface ProjectDto {
|
|
@@ -781,6 +840,33 @@ export interface PagedOfProjectDto {
|
|
|
781
840
|
/** Items list. */
|
|
782
841
|
items?: ProjectDto[] | null;
|
|
783
842
|
}
|
|
843
|
+
/** Dto class, containing create operation paramters for a project item resource. */
|
|
844
|
+
export interface ProjectItemResourceParametersDto {
|
|
845
|
+
/** Resource URL. */
|
|
846
|
+
url?: string | null;
|
|
847
|
+
/** Resource name. */
|
|
848
|
+
name?: string | null;
|
|
849
|
+
type?: ProjectProductResourceType;
|
|
850
|
+
}
|
|
851
|
+
/** Dto class, containing create operation paramters for a project item. */
|
|
852
|
+
export interface ProjectItemParametersDto {
|
|
853
|
+
/** Item name. */
|
|
854
|
+
name?: string | null;
|
|
855
|
+
/** Item quantity information. */
|
|
856
|
+
quantity?: number | null;
|
|
857
|
+
/** Item information. */
|
|
858
|
+
fields?: {
|
|
859
|
+
[key: string]: any;
|
|
860
|
+
} | null;
|
|
861
|
+
/** Additional item information. */
|
|
862
|
+
hidden?: any | null;
|
|
863
|
+
/** A list of design identifiers associated to the item. */
|
|
864
|
+
designIds?: string[] | null;
|
|
865
|
+
/** SKU. */
|
|
866
|
+
sku?: string | null;
|
|
867
|
+
/** External resources descriptions. */
|
|
868
|
+
resources?: ProjectItemResourceParametersDto[] | null;
|
|
869
|
+
}
|
|
784
870
|
/** Dto class, containing create operation parameters for project entity. */
|
|
785
871
|
export interface CreateProjectDto {
|
|
786
872
|
/** Product reference (i.e external reference to Customer's Canvas product specification - main subject of this project). */
|
|
@@ -804,7 +890,7 @@ export interface CreateProjectDto {
|
|
|
804
890
|
/** Project owner identifier. */
|
|
805
891
|
ownerId: string;
|
|
806
892
|
/** List of project items. */
|
|
807
|
-
items?:
|
|
893
|
+
items?: ProjectItemParametersDto[] | null;
|
|
808
894
|
/** Description of the project. */
|
|
809
895
|
description?: string | null;
|
|
810
896
|
}
|
|
@@ -953,6 +1039,8 @@ export interface TenantUserInfoDto {
|
|
|
953
1039
|
userName?: string | null;
|
|
954
1040
|
/** User surname. */
|
|
955
1041
|
userSurname?: string | null;
|
|
1042
|
+
/** User status. */
|
|
1043
|
+
isActive?: boolean;
|
|
956
1044
|
}
|
|
957
1045
|
export interface FileResponse {
|
|
958
1046
|
data: Blob;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
//----------------------
|
|
5
5
|
// <auto-generated>
|
|
6
|
-
// Generated using the NSwag toolchain v13.
|
|
6
|
+
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org)
|
|
7
7
|
// </auto-generated>
|
|
8
8
|
//----------------------
|
|
9
9
|
// ReSharper disable InconsistentNaming
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.ApiException = exports.StorefrontType = exports.DatePeriod = exports.TenantInfoApiClient = exports.StorefrontUsersApiClient = exports.StorefrontsApiClient = exports.ProjectsApiClient = exports.ProductSpecificationsApiClient = exports.ProductReferencesApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
|
|
11
|
+
exports.ApiException = exports.StorefrontType = exports.ProjectProductResourceType = exports.DatePeriod = exports.TenantInfoApiClient = exports.StorefrontUsersApiClient = exports.StorefrontsApiClient = exports.ProjectsApiClient = exports.ProductSpecificationsApiClient = exports.ProductReferencesApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
|
|
12
12
|
const axios_1 = require("axios");
|
|
13
13
|
class ApiClientConfiguration {
|
|
14
14
|
apiUrl;
|
|
@@ -142,7 +142,7 @@ class BuildInfoApiClient extends ApiClientBase {
|
|
|
142
142
|
let result200 = null;
|
|
143
143
|
let resultData200 = _responseText;
|
|
144
144
|
result200 = JSON.parse(resultData200);
|
|
145
|
-
return result200;
|
|
145
|
+
return Promise.resolve(result200);
|
|
146
146
|
}
|
|
147
147
|
else if (status !== 200 && status !== 204) {
|
|
148
148
|
const _responseText = response.data;
|
|
@@ -230,7 +230,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
230
230
|
let result200 = null;
|
|
231
231
|
let resultData200 = _responseText;
|
|
232
232
|
result200 = JSON.parse(resultData200);
|
|
233
|
-
return result200;
|
|
233
|
+
return Promise.resolve(result200);
|
|
234
234
|
}
|
|
235
235
|
else if (status === 401) {
|
|
236
236
|
const _responseText = response.data;
|
|
@@ -301,7 +301,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
301
301
|
let result201 = null;
|
|
302
302
|
let resultData201 = _responseText;
|
|
303
303
|
result201 = JSON.parse(resultData201);
|
|
304
|
-
return result201;
|
|
304
|
+
return Promise.resolve(result201);
|
|
305
305
|
}
|
|
306
306
|
else if (status === 404) {
|
|
307
307
|
const _responseText = response.data;
|
|
@@ -379,7 +379,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
379
379
|
let result200 = null;
|
|
380
380
|
let resultData200 = _responseText;
|
|
381
381
|
result200 = JSON.parse(resultData200);
|
|
382
|
-
return result200;
|
|
382
|
+
return Promise.resolve(result200);
|
|
383
383
|
}
|
|
384
384
|
else if (status === 404) {
|
|
385
385
|
const _responseText = response.data;
|
|
@@ -457,7 +457,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
457
457
|
let result200 = null;
|
|
458
458
|
let resultData200 = _responseText;
|
|
459
459
|
result200 = JSON.parse(resultData200);
|
|
460
|
-
return result200;
|
|
460
|
+
return Promise.resolve(result200);
|
|
461
461
|
}
|
|
462
462
|
else if (status === 404) {
|
|
463
463
|
const _responseText = response.data;
|
|
@@ -535,7 +535,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
535
535
|
let result200 = null;
|
|
536
536
|
let resultData200 = _responseText;
|
|
537
537
|
result200 = JSON.parse(resultData200);
|
|
538
|
-
return result200;
|
|
538
|
+
return Promise.resolve(result200);
|
|
539
539
|
}
|
|
540
540
|
else if (status === 404) {
|
|
541
541
|
const _responseText = response.data;
|
|
@@ -613,7 +613,101 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
613
613
|
let result200 = null;
|
|
614
614
|
let resultData200 = _responseText;
|
|
615
615
|
result200 = JSON.parse(resultData200);
|
|
616
|
-
return result200;
|
|
616
|
+
return Promise.resolve(result200);
|
|
617
|
+
}
|
|
618
|
+
else if (status === 404) {
|
|
619
|
+
const _responseText = response.data;
|
|
620
|
+
let result404 = null;
|
|
621
|
+
let resultData404 = _responseText;
|
|
622
|
+
result404 = JSON.parse(resultData404);
|
|
623
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
624
|
+
}
|
|
625
|
+
else if (status === 401) {
|
|
626
|
+
const _responseText = response.data;
|
|
627
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
628
|
+
}
|
|
629
|
+
else if (status === 403) {
|
|
630
|
+
const _responseText = response.data;
|
|
631
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
632
|
+
}
|
|
633
|
+
else if (status !== 200 && status !== 204) {
|
|
634
|
+
const _responseText = response.data;
|
|
635
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
636
|
+
}
|
|
637
|
+
return Promise.resolve(null);
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Returns a product cost details from ecommerce system.
|
|
641
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
642
|
+
* @param sku Product SKU.
|
|
643
|
+
* @param storefrontId Storefront identifier.
|
|
644
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
645
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
646
|
+
* @param quantity (optional) Product quantity.
|
|
647
|
+
* @param tenantId (optional) Tenant identifier.
|
|
648
|
+
* @return Success
|
|
649
|
+
*/
|
|
650
|
+
getProductCostDetails(reference, sku, storefrontId, storefrontUserId, currencyCode, quantity, tenantId, cancelToken) {
|
|
651
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-cost-details?";
|
|
652
|
+
if (reference === undefined || reference === null)
|
|
653
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
654
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
655
|
+
if (sku === undefined || sku === null)
|
|
656
|
+
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
657
|
+
else
|
|
658
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
659
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
660
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
661
|
+
else
|
|
662
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
663
|
+
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
664
|
+
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
665
|
+
if (currencyCode !== undefined && currencyCode !== null)
|
|
666
|
+
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
667
|
+
if (quantity === null)
|
|
668
|
+
throw new Error("The parameter 'quantity' cannot be null.");
|
|
669
|
+
else if (quantity !== undefined)
|
|
670
|
+
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
671
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
672
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
673
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
674
|
+
let options_ = {
|
|
675
|
+
method: "GET",
|
|
676
|
+
url: url_,
|
|
677
|
+
headers: {
|
|
678
|
+
"Accept": "text/plain"
|
|
679
|
+
},
|
|
680
|
+
cancelToken
|
|
681
|
+
};
|
|
682
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
683
|
+
return this.instance.request(transformedOptions_);
|
|
684
|
+
}).catch((_error) => {
|
|
685
|
+
if (isAxiosError(_error) && _error.response) {
|
|
686
|
+
return _error.response;
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
throw _error;
|
|
690
|
+
}
|
|
691
|
+
}).then((_response) => {
|
|
692
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductCostDetails(_response));
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
processGetProductCostDetails(response) {
|
|
696
|
+
const status = response.status;
|
|
697
|
+
let _headers = {};
|
|
698
|
+
if (response.headers && typeof response.headers === "object") {
|
|
699
|
+
for (let k in response.headers) {
|
|
700
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
701
|
+
_headers[k] = response.headers[k];
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (status === 200) {
|
|
706
|
+
const _responseText = response.data;
|
|
707
|
+
let result200 = null;
|
|
708
|
+
let resultData200 = _responseText;
|
|
709
|
+
result200 = JSON.parse(resultData200);
|
|
710
|
+
return Promise.resolve(result200);
|
|
617
711
|
}
|
|
618
712
|
else if (status === 404) {
|
|
619
713
|
const _responseText = response.data;
|
|
@@ -705,7 +799,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
705
799
|
let result200 = null;
|
|
706
800
|
let resultData200 = _responseText;
|
|
707
801
|
result200 = JSON.parse(resultData200);
|
|
708
|
-
return result200;
|
|
802
|
+
return Promise.resolve(result200);
|
|
709
803
|
}
|
|
710
804
|
else if (status === 401) {
|
|
711
805
|
const _responseText = response.data;
|
|
@@ -771,7 +865,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
771
865
|
let result200 = null;
|
|
772
866
|
let resultData200 = _responseText;
|
|
773
867
|
result200 = JSON.parse(resultData200);
|
|
774
|
-
return result200;
|
|
868
|
+
return Promise.resolve(result200);
|
|
775
869
|
}
|
|
776
870
|
else if (status === 404) {
|
|
777
871
|
const _responseText = response.data;
|
|
@@ -844,7 +938,7 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
844
938
|
let result200 = null;
|
|
845
939
|
let resultData200 = _responseText;
|
|
846
940
|
result200 = JSON.parse(resultData200);
|
|
847
|
-
return result200;
|
|
941
|
+
return Promise.resolve(result200);
|
|
848
942
|
}
|
|
849
943
|
else if (status === 404) {
|
|
850
944
|
const _responseText = response.data;
|
|
@@ -955,7 +1049,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
955
1049
|
let result200 = null;
|
|
956
1050
|
let resultData200 = _responseText;
|
|
957
1051
|
result200 = JSON.parse(resultData200);
|
|
958
|
-
return result200;
|
|
1052
|
+
return Promise.resolve(result200);
|
|
959
1053
|
}
|
|
960
1054
|
else if (status === 401) {
|
|
961
1055
|
const _responseText = response.data;
|
|
@@ -1026,7 +1120,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1026
1120
|
let result201 = null;
|
|
1027
1121
|
let resultData201 = _responseText;
|
|
1028
1122
|
result201 = JSON.parse(resultData201);
|
|
1029
|
-
return result201;
|
|
1123
|
+
return Promise.resolve(result201);
|
|
1030
1124
|
}
|
|
1031
1125
|
else if (status === 409) {
|
|
1032
1126
|
const _responseText = response.data;
|
|
@@ -1099,7 +1193,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1099
1193
|
let result200 = null;
|
|
1100
1194
|
let resultData200 = _responseText;
|
|
1101
1195
|
result200 = JSON.parse(resultData200);
|
|
1102
|
-
return result200;
|
|
1196
|
+
return Promise.resolve(result200);
|
|
1103
1197
|
}
|
|
1104
1198
|
else if (status === 404) {
|
|
1105
1199
|
const _responseText = response.data;
|
|
@@ -1172,7 +1266,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1172
1266
|
let result200 = null;
|
|
1173
1267
|
let resultData200 = _responseText;
|
|
1174
1268
|
result200 = JSON.parse(resultData200);
|
|
1175
|
-
return result200;
|
|
1269
|
+
return Promise.resolve(result200);
|
|
1176
1270
|
}
|
|
1177
1271
|
else if (status === 400) {
|
|
1178
1272
|
const _responseText = response.data;
|
|
@@ -1263,7 +1357,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1263
1357
|
let result200 = null;
|
|
1264
1358
|
let resultData200 = _responseText;
|
|
1265
1359
|
result200 = JSON.parse(resultData200);
|
|
1266
|
-
return result200;
|
|
1360
|
+
return Promise.resolve(result200);
|
|
1267
1361
|
}
|
|
1268
1362
|
else if (status === 400) {
|
|
1269
1363
|
const _responseText = response.data;
|
|
@@ -1354,7 +1448,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1354
1448
|
let result200 = null;
|
|
1355
1449
|
let resultData200 = _responseText;
|
|
1356
1450
|
result200 = JSON.parse(resultData200);
|
|
1357
|
-
return result200;
|
|
1451
|
+
return Promise.resolve(result200);
|
|
1358
1452
|
}
|
|
1359
1453
|
else if (status === 400) {
|
|
1360
1454
|
const _responseText = response.data;
|
|
@@ -1430,7 +1524,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1430
1524
|
let result200 = null;
|
|
1431
1525
|
let resultData200 = _responseText;
|
|
1432
1526
|
result200 = JSON.parse(resultData200);
|
|
1433
|
-
return result200;
|
|
1527
|
+
return Promise.resolve(result200);
|
|
1434
1528
|
}
|
|
1435
1529
|
else if (status === 401) {
|
|
1436
1530
|
const _responseText = response.data;
|
|
@@ -1492,7 +1586,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1492
1586
|
let result200 = null;
|
|
1493
1587
|
let resultData200 = _responseText;
|
|
1494
1588
|
result200 = JSON.parse(resultData200);
|
|
1495
|
-
return result200;
|
|
1589
|
+
return Promise.resolve(result200);
|
|
1496
1590
|
}
|
|
1497
1591
|
else if (status === 401) {
|
|
1498
1592
|
const _responseText = response.data;
|
|
@@ -1568,7 +1662,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1568
1662
|
let result200 = null;
|
|
1569
1663
|
let resultData200 = _responseText;
|
|
1570
1664
|
result200 = JSON.parse(resultData200);
|
|
1571
|
-
return result200;
|
|
1665
|
+
return Promise.resolve(result200);
|
|
1572
1666
|
}
|
|
1573
1667
|
else if (status === 401) {
|
|
1574
1668
|
const _responseText = response.data;
|
|
@@ -1647,7 +1741,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1647
1741
|
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
1648
1742
|
const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1649
1743
|
const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1650
|
-
return Promise.resolve({ fileName: fileName, status: status, data: response.data, headers: _headers });
|
|
1744
|
+
return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
|
|
1651
1745
|
}
|
|
1652
1746
|
else if (status === 404) {
|
|
1653
1747
|
const _responseText = response.data;
|
|
@@ -1720,7 +1814,7 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1720
1814
|
let result200 = null;
|
|
1721
1815
|
let resultData200 = _responseText;
|
|
1722
1816
|
result200 = JSON.parse(resultData200);
|
|
1723
|
-
return result200;
|
|
1817
|
+
return Promise.resolve(result200);
|
|
1724
1818
|
}
|
|
1725
1819
|
else if (status === 404) {
|
|
1726
1820
|
const _responseText = response.data;
|
|
@@ -1815,7 +1909,7 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
1815
1909
|
let result200 = null;
|
|
1816
1910
|
let resultData200 = _responseText;
|
|
1817
1911
|
result200 = JSON.parse(resultData200);
|
|
1818
|
-
return result200;
|
|
1912
|
+
return Promise.resolve(result200);
|
|
1819
1913
|
}
|
|
1820
1914
|
else if (status === 401) {
|
|
1821
1915
|
const _responseText = response.data;
|
|
@@ -1881,7 +1975,7 @@ class StorefrontsApiClient extends ApiClientBase {
|
|
|
1881
1975
|
let result200 = null;
|
|
1882
1976
|
let resultData200 = _responseText;
|
|
1883
1977
|
result200 = JSON.parse(resultData200);
|
|
1884
|
-
return result200;
|
|
1978
|
+
return Promise.resolve(result200);
|
|
1885
1979
|
}
|
|
1886
1980
|
else if (status === 404) {
|
|
1887
1981
|
const _responseText = response.data;
|
|
@@ -1981,7 +2075,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
1981
2075
|
let result200 = null;
|
|
1982
2076
|
let resultData200 = _responseText;
|
|
1983
2077
|
result200 = JSON.parse(resultData200);
|
|
1984
|
-
return result200;
|
|
2078
|
+
return Promise.resolve(result200);
|
|
1985
2079
|
}
|
|
1986
2080
|
else if (status === 401) {
|
|
1987
2081
|
const _responseText = response.data;
|
|
@@ -2052,7 +2146,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2052
2146
|
let result201 = null;
|
|
2053
2147
|
let resultData201 = _responseText;
|
|
2054
2148
|
result201 = JSON.parse(resultData201);
|
|
2055
|
-
return result201;
|
|
2149
|
+
return Promise.resolve(result201);
|
|
2056
2150
|
}
|
|
2057
2151
|
else if (status === 409) {
|
|
2058
2152
|
const _responseText = response.data;
|
|
@@ -2130,7 +2224,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2130
2224
|
let result200 = null;
|
|
2131
2225
|
let resultData200 = _responseText;
|
|
2132
2226
|
result200 = JSON.parse(resultData200);
|
|
2133
|
-
return result200;
|
|
2227
|
+
return Promise.resolve(result200);
|
|
2134
2228
|
}
|
|
2135
2229
|
else if (status === 404) {
|
|
2136
2230
|
const _responseText = response.data;
|
|
@@ -2208,7 +2302,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2208
2302
|
let result200 = null;
|
|
2209
2303
|
let resultData200 = _responseText;
|
|
2210
2304
|
result200 = JSON.parse(resultData200);
|
|
2211
|
-
return result200;
|
|
2305
|
+
return Promise.resolve(result200);
|
|
2212
2306
|
}
|
|
2213
2307
|
else if (status === 409) {
|
|
2214
2308
|
const _responseText = response.data;
|
|
@@ -2368,7 +2462,7 @@ class StorefrontUsersApiClient extends ApiClientBase {
|
|
|
2368
2462
|
let result201 = null;
|
|
2369
2463
|
let resultData201 = _responseText;
|
|
2370
2464
|
result201 = JSON.parse(resultData201);
|
|
2371
|
-
return result201;
|
|
2465
|
+
return Promise.resolve(result201);
|
|
2372
2466
|
}
|
|
2373
2467
|
else if (status === 404) {
|
|
2374
2468
|
const _responseText = response.data;
|
|
@@ -2455,7 +2549,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2455
2549
|
let result200 = null;
|
|
2456
2550
|
let resultData200 = _responseText;
|
|
2457
2551
|
result200 = JSON.parse(resultData200);
|
|
2458
|
-
return result200;
|
|
2552
|
+
return Promise.resolve(result200);
|
|
2459
2553
|
}
|
|
2460
2554
|
else if (status === 401) {
|
|
2461
2555
|
const _responseText = response.data;
|
|
@@ -2517,7 +2611,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2517
2611
|
let result200 = null;
|
|
2518
2612
|
let resultData200 = _responseText;
|
|
2519
2613
|
result200 = JSON.parse(resultData200);
|
|
2520
|
-
return result200;
|
|
2614
|
+
return Promise.resolve(result200);
|
|
2521
2615
|
}
|
|
2522
2616
|
else if (status === 401) {
|
|
2523
2617
|
const _responseText = response.data;
|
|
@@ -2579,7 +2673,7 @@ class TenantInfoApiClient extends ApiClientBase {
|
|
|
2579
2673
|
let result200 = null;
|
|
2580
2674
|
let resultData200 = _responseText;
|
|
2581
2675
|
result200 = JSON.parse(resultData200);
|
|
2582
|
-
return result200;
|
|
2676
|
+
return Promise.resolve(result200);
|
|
2583
2677
|
}
|
|
2584
2678
|
else if (status === 401) {
|
|
2585
2679
|
const _responseText = response.data;
|
|
@@ -2605,6 +2699,13 @@ var DatePeriod;
|
|
|
2605
2699
|
DatePeriod["Last7Days"] = "Last7Days";
|
|
2606
2700
|
DatePeriod["Last30Days"] = "Last30Days";
|
|
2607
2701
|
})(DatePeriod = exports.DatePeriod || (exports.DatePeriod = {}));
|
|
2702
|
+
/** Available product resource types */
|
|
2703
|
+
var ProjectProductResourceType;
|
|
2704
|
+
(function (ProjectProductResourceType) {
|
|
2705
|
+
ProjectProductResourceType[ProjectProductResourceType["_0"] = 0] = "_0";
|
|
2706
|
+
ProjectProductResourceType[ProjectProductResourceType["_1"] = 1] = "_1";
|
|
2707
|
+
ProjectProductResourceType[ProjectProductResourceType["_2"] = 2] = "_2";
|
|
2708
|
+
})(ProjectProductResourceType = exports.ProjectProductResourceType || (exports.ProjectProductResourceType = {}));
|
|
2608
2709
|
/** Storefront types. */
|
|
2609
2710
|
var StorefrontType;
|
|
2610
2711
|
(function (StorefrontType) {
|