@aurigma/axios-storefront-api-client 2.39.1 → 2.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/storefront-api-client.d.ts +134 -28
- package/dist/cjs/storefront-api-client.js +346 -35
- package/dist/cjs/storefront-api-client.js.map +1 -1
- package/dist/esm/storefront-api-client.d.ts +134 -28
- package/dist/esm/storefront-api-client.js +344 -34
- package/dist/esm/storefront-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -155,6 +155,160 @@ export class BuildInfoApiClient extends ApiClientBase {
|
|
|
155
155
|
return Promise.resolve(null);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
export class ProcessingPipelinesApiClient extends ApiClientBase {
|
|
159
|
+
instance;
|
|
160
|
+
baseUrl;
|
|
161
|
+
jsonParseReviver = undefined;
|
|
162
|
+
constructor(configuration, baseUrl, instance) {
|
|
163
|
+
super(configuration);
|
|
164
|
+
this.instance = instance ? instance : axios.create();
|
|
165
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Returns all processing pipelines relevant to the specified query parameters.
|
|
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 search (optional) Search string for partial by processing pipeline name.
|
|
172
|
+
* @param tenantId (optional) Tenant identifier.
|
|
173
|
+
* @return Success
|
|
174
|
+
*/
|
|
175
|
+
getAll(skip, take, search, tenantId, cancelToken) {
|
|
176
|
+
let url_ = this.baseUrl + "/api/storefront/v1/processing-pipelines?";
|
|
177
|
+
if (skip !== undefined && skip !== null)
|
|
178
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
179
|
+
if (take !== undefined && take !== null)
|
|
180
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
181
|
+
if (search !== undefined && search !== null)
|
|
182
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
183
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
184
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
185
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
186
|
+
let options_ = {
|
|
187
|
+
method: "GET",
|
|
188
|
+
url: url_,
|
|
189
|
+
headers: {
|
|
190
|
+
"Accept": "text/plain"
|
|
191
|
+
},
|
|
192
|
+
cancelToken
|
|
193
|
+
};
|
|
194
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
195
|
+
return this.instance.request(transformedOptions_);
|
|
196
|
+
}).catch((_error) => {
|
|
197
|
+
if (isAxiosError(_error) && _error.response) {
|
|
198
|
+
return _error.response;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
throw _error;
|
|
202
|
+
}
|
|
203
|
+
}).then((_response) => {
|
|
204
|
+
return this.transformResult(url_, _response, (_response) => this.processGetAll(_response));
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
processGetAll(response) {
|
|
208
|
+
const status = response.status;
|
|
209
|
+
let _headers = {};
|
|
210
|
+
if (response.headers && typeof response.headers === "object") {
|
|
211
|
+
for (let k in response.headers) {
|
|
212
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
213
|
+
_headers[k] = response.headers[k];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (status === 200) {
|
|
218
|
+
const _responseText = response.data;
|
|
219
|
+
let result200 = null;
|
|
220
|
+
let resultData200 = _responseText;
|
|
221
|
+
result200 = JSON.parse(resultData200);
|
|
222
|
+
return Promise.resolve(result200);
|
|
223
|
+
}
|
|
224
|
+
else if (status === 401) {
|
|
225
|
+
const _responseText = response.data;
|
|
226
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
227
|
+
}
|
|
228
|
+
else if (status === 403) {
|
|
229
|
+
const _responseText = response.data;
|
|
230
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
231
|
+
}
|
|
232
|
+
else if (status !== 200 && status !== 204) {
|
|
233
|
+
const _responseText = response.data;
|
|
234
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
235
|
+
}
|
|
236
|
+
return Promise.resolve(null);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Returns a processing pipeline.
|
|
240
|
+
* @param id Processing pipeline identifier.
|
|
241
|
+
* @param tenantId (optional) Tenant identifier.
|
|
242
|
+
* @return Success
|
|
243
|
+
*/
|
|
244
|
+
get(id, tenantId, cancelToken) {
|
|
245
|
+
let url_ = this.baseUrl + "/api/storefront/v1/processing-pipelines/{id}?";
|
|
246
|
+
if (id === undefined || id === null)
|
|
247
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
248
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
249
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
250
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
251
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
252
|
+
let options_ = {
|
|
253
|
+
method: "GET",
|
|
254
|
+
url: url_,
|
|
255
|
+
headers: {
|
|
256
|
+
"Accept": "text/plain"
|
|
257
|
+
},
|
|
258
|
+
cancelToken
|
|
259
|
+
};
|
|
260
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
261
|
+
return this.instance.request(transformedOptions_);
|
|
262
|
+
}).catch((_error) => {
|
|
263
|
+
if (isAxiosError(_error) && _error.response) {
|
|
264
|
+
return _error.response;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
throw _error;
|
|
268
|
+
}
|
|
269
|
+
}).then((_response) => {
|
|
270
|
+
return this.transformResult(url_, _response, (_response) => this.processGet(_response));
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
processGet(response) {
|
|
274
|
+
const status = response.status;
|
|
275
|
+
let _headers = {};
|
|
276
|
+
if (response.headers && typeof response.headers === "object") {
|
|
277
|
+
for (let k in response.headers) {
|
|
278
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
279
|
+
_headers[k] = response.headers[k];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (status === 200) {
|
|
284
|
+
const _responseText = response.data;
|
|
285
|
+
let result200 = null;
|
|
286
|
+
let resultData200 = _responseText;
|
|
287
|
+
result200 = JSON.parse(resultData200);
|
|
288
|
+
return Promise.resolve(result200);
|
|
289
|
+
}
|
|
290
|
+
else if (status === 404) {
|
|
291
|
+
const _responseText = response.data;
|
|
292
|
+
let result404 = null;
|
|
293
|
+
let resultData404 = _responseText;
|
|
294
|
+
result404 = JSON.parse(resultData404);
|
|
295
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
296
|
+
}
|
|
297
|
+
else if (status === 401) {
|
|
298
|
+
const _responseText = response.data;
|
|
299
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
300
|
+
}
|
|
301
|
+
else if (status === 403) {
|
|
302
|
+
const _responseText = response.data;
|
|
303
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
304
|
+
}
|
|
305
|
+
else if (status !== 200 && status !== 204) {
|
|
306
|
+
const _responseText = response.data;
|
|
307
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
308
|
+
}
|
|
309
|
+
return Promise.resolve(null);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
158
312
|
export class ProductReferencesApiClient extends ApiClientBase {
|
|
159
313
|
instance;
|
|
160
314
|
baseUrl;
|
|
@@ -562,21 +716,37 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
562
716
|
return Promise.resolve(null);
|
|
563
717
|
}
|
|
564
718
|
/**
|
|
565
|
-
* Returns a product
|
|
566
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
719
|
+
* Returns a product cost details from ecommerce system.
|
|
720
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
721
|
+
* @param sku Product SKU.
|
|
567
722
|
* @param storefrontId Storefront identifier.
|
|
723
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
724
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
725
|
+
* @param quantity (optional) Product quantity.
|
|
568
726
|
* @param tenantId (optional) Tenant identifier.
|
|
569
727
|
* @return Success
|
|
570
728
|
*/
|
|
571
|
-
|
|
572
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-
|
|
729
|
+
getProductCostDetails(reference, sku, storefrontId, storefrontUserId, currencyCode, quantity, tenantId, cancelToken) {
|
|
730
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-cost-details?";
|
|
573
731
|
if (reference === undefined || reference === null)
|
|
574
732
|
throw new Error("The parameter 'reference' must be defined.");
|
|
575
733
|
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
734
|
+
if (sku === undefined || sku === null)
|
|
735
|
+
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
736
|
+
else
|
|
737
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
576
738
|
if (storefrontId === undefined || storefrontId === null)
|
|
577
739
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
578
740
|
else
|
|
579
741
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
742
|
+
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
743
|
+
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
744
|
+
if (currencyCode !== undefined && currencyCode !== null)
|
|
745
|
+
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
746
|
+
if (quantity === null)
|
|
747
|
+
throw new Error("The parameter 'quantity' cannot be null.");
|
|
748
|
+
else if (quantity !== undefined)
|
|
749
|
+
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
580
750
|
if (tenantId !== undefined && tenantId !== null)
|
|
581
751
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
582
752
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -598,10 +768,10 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
598
768
|
throw _error;
|
|
599
769
|
}
|
|
600
770
|
}).then((_response) => {
|
|
601
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
771
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductCostDetails(_response));
|
|
602
772
|
});
|
|
603
773
|
}
|
|
604
|
-
|
|
774
|
+
processGetProductCostDetails(response) {
|
|
605
775
|
const status = response.status;
|
|
606
776
|
let _headers = {};
|
|
607
777
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -615,14 +785,14 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
615
785
|
const _responseText = response.data;
|
|
616
786
|
let result200 = null;
|
|
617
787
|
let resultData200 = _responseText;
|
|
618
|
-
result200 = resultData200;
|
|
788
|
+
result200 = JSON.parse(resultData200);
|
|
619
789
|
return Promise.resolve(result200);
|
|
620
790
|
}
|
|
621
791
|
else if (status === 404) {
|
|
622
792
|
const _responseText = response.data;
|
|
623
793
|
let result404 = null;
|
|
624
794
|
let resultData404 = _responseText;
|
|
625
|
-
result404 = resultData404;
|
|
795
|
+
result404 = JSON.parse(resultData404);
|
|
626
796
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
627
797
|
}
|
|
628
798
|
else if (status === 401) {
|
|
@@ -640,37 +810,97 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
640
810
|
return Promise.resolve(null);
|
|
641
811
|
}
|
|
642
812
|
/**
|
|
643
|
-
* Returns a product
|
|
644
|
-
* @param reference Product reference - external reference to Customer's Canvas product
|
|
645
|
-
* @param
|
|
646
|
-
* @param storefrontId Storefront identifier.
|
|
647
|
-
* @param storefrontUserId (optional) Storefront user identifier.
|
|
648
|
-
* @param currencyCode (optional) Product cost currency code.
|
|
649
|
-
* @param quantity (optional) Product quantity.
|
|
813
|
+
* Returns a product personalization workflow description by product specification identifier.
|
|
814
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
815
|
+
* @param storefrontId (optional) Storefront identifier.
|
|
650
816
|
* @param tenantId (optional) Tenant identifier.
|
|
651
817
|
* @return Success
|
|
652
818
|
*/
|
|
653
|
-
|
|
654
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/
|
|
819
|
+
getPersonalizationWorkflow(reference, storefrontId, tenantId, cancelToken) {
|
|
820
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/personalization-workflow?";
|
|
821
|
+
if (reference === undefined || reference === null)
|
|
822
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
823
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
824
|
+
if (storefrontId === null)
|
|
825
|
+
throw new Error("The parameter 'storefrontId' cannot be null.");
|
|
826
|
+
else if (storefrontId !== undefined)
|
|
827
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
828
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
829
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
830
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
831
|
+
let options_ = {
|
|
832
|
+
method: "GET",
|
|
833
|
+
url: url_,
|
|
834
|
+
headers: {
|
|
835
|
+
"Accept": "text/plain"
|
|
836
|
+
},
|
|
837
|
+
cancelToken
|
|
838
|
+
};
|
|
839
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
840
|
+
return this.instance.request(transformedOptions_);
|
|
841
|
+
}).catch((_error) => {
|
|
842
|
+
if (isAxiosError(_error) && _error.response) {
|
|
843
|
+
return _error.response;
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
throw _error;
|
|
847
|
+
}
|
|
848
|
+
}).then((_response) => {
|
|
849
|
+
return this.transformResult(url_, _response, (_response) => this.processGetPersonalizationWorkflow(_response));
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
processGetPersonalizationWorkflow(response) {
|
|
853
|
+
const status = response.status;
|
|
854
|
+
let _headers = {};
|
|
855
|
+
if (response.headers && typeof response.headers === "object") {
|
|
856
|
+
for (let k in response.headers) {
|
|
857
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
858
|
+
_headers[k] = response.headers[k];
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
if (status === 200) {
|
|
863
|
+
const _responseText = response.data;
|
|
864
|
+
let result200 = null;
|
|
865
|
+
let resultData200 = _responseText;
|
|
866
|
+
result200 = JSON.parse(resultData200);
|
|
867
|
+
return Promise.resolve(result200);
|
|
868
|
+
}
|
|
869
|
+
else if (status === 404) {
|
|
870
|
+
const _responseText = response.data;
|
|
871
|
+
let result404 = null;
|
|
872
|
+
let resultData404 = _responseText;
|
|
873
|
+
result404 = JSON.parse(resultData404);
|
|
874
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
875
|
+
}
|
|
876
|
+
else if (status === 401) {
|
|
877
|
+
const _responseText = response.data;
|
|
878
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
879
|
+
}
|
|
880
|
+
else if (status === 403) {
|
|
881
|
+
const _responseText = response.data;
|
|
882
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
883
|
+
}
|
|
884
|
+
else if (status !== 200 && status !== 204) {
|
|
885
|
+
const _responseText = response.data;
|
|
886
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
887
|
+
}
|
|
888
|
+
return Promise.resolve(null);
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* @param tenantId (optional)
|
|
892
|
+
* @return Success
|
|
893
|
+
* @deprecated
|
|
894
|
+
*/
|
|
895
|
+
getProductConfig(reference, storefrontId, tenantId, cancelToken) {
|
|
896
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
655
897
|
if (reference === undefined || reference === null)
|
|
656
898
|
throw new Error("The parameter 'reference' must be defined.");
|
|
657
899
|
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
658
|
-
if (sku === undefined || sku === null)
|
|
659
|
-
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
660
|
-
else
|
|
661
|
-
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
662
900
|
if (storefrontId === undefined || storefrontId === null)
|
|
663
901
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
664
902
|
else
|
|
665
903
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
666
|
-
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
667
|
-
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
668
|
-
if (currencyCode !== undefined && currencyCode !== null)
|
|
669
|
-
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
670
|
-
if (quantity === null)
|
|
671
|
-
throw new Error("The parameter 'quantity' cannot be null.");
|
|
672
|
-
else if (quantity !== undefined)
|
|
673
|
-
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
674
904
|
if (tenantId !== undefined && tenantId !== null)
|
|
675
905
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
676
906
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -692,10 +922,10 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
692
922
|
throw _error;
|
|
693
923
|
}
|
|
694
924
|
}).then((_response) => {
|
|
695
|
-
return this.transformResult(url_, _response, (_response) => this.
|
|
925
|
+
return this.transformResult(url_, _response, (_response) => this.processGetProductConfig(_response));
|
|
696
926
|
});
|
|
697
927
|
}
|
|
698
|
-
|
|
928
|
+
processGetProductConfig(response) {
|
|
699
929
|
const status = response.status;
|
|
700
930
|
let _headers = {};
|
|
701
931
|
if (response.headers && typeof response.headers === "object") {
|
|
@@ -709,14 +939,14 @@ export class ProductReferencesApiClient extends ApiClientBase {
|
|
|
709
939
|
const _responseText = response.data;
|
|
710
940
|
let result200 = null;
|
|
711
941
|
let resultData200 = _responseText;
|
|
712
|
-
result200 =
|
|
942
|
+
result200 = resultData200;
|
|
713
943
|
return Promise.resolve(result200);
|
|
714
944
|
}
|
|
715
945
|
else if (status === 404) {
|
|
716
946
|
const _responseText = response.data;
|
|
717
947
|
let result404 = null;
|
|
718
948
|
let resultData404 = _responseText;
|
|
719
|
-
result404 =
|
|
949
|
+
result404 = resultData404;
|
|
720
950
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
721
951
|
}
|
|
722
952
|
else if (status === 401) {
|
|
@@ -891,11 +1121,83 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
891
1121
|
return Promise.resolve(null);
|
|
892
1122
|
}
|
|
893
1123
|
/**
|
|
894
|
-
* Returns a product
|
|
1124
|
+
* Returns a product personalization workflow description by product specification identifier.
|
|
895
1125
|
* @param id Product specification identifier.
|
|
896
1126
|
* @param tenantId (optional) Tenant identifier.
|
|
897
1127
|
* @return Success
|
|
898
1128
|
*/
|
|
1129
|
+
getPersonalizationWorkflow(id, tenantId, cancelToken) {
|
|
1130
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/personalization-workflow?";
|
|
1131
|
+
if (id === undefined || id === null)
|
|
1132
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1133
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1134
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1135
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1136
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1137
|
+
let options_ = {
|
|
1138
|
+
method: "GET",
|
|
1139
|
+
url: url_,
|
|
1140
|
+
headers: {
|
|
1141
|
+
"Accept": "text/plain"
|
|
1142
|
+
},
|
|
1143
|
+
cancelToken
|
|
1144
|
+
};
|
|
1145
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
1146
|
+
return this.instance.request(transformedOptions_);
|
|
1147
|
+
}).catch((_error) => {
|
|
1148
|
+
if (isAxiosError(_error) && _error.response) {
|
|
1149
|
+
return _error.response;
|
|
1150
|
+
}
|
|
1151
|
+
else {
|
|
1152
|
+
throw _error;
|
|
1153
|
+
}
|
|
1154
|
+
}).then((_response) => {
|
|
1155
|
+
return this.transformResult(url_, _response, (_response) => this.processGetPersonalizationWorkflow(_response));
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
processGetPersonalizationWorkflow(response) {
|
|
1159
|
+
const status = response.status;
|
|
1160
|
+
let _headers = {};
|
|
1161
|
+
if (response.headers && typeof response.headers === "object") {
|
|
1162
|
+
for (let k in response.headers) {
|
|
1163
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
1164
|
+
_headers[k] = response.headers[k];
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
if (status === 200) {
|
|
1169
|
+
const _responseText = response.data;
|
|
1170
|
+
let result200 = null;
|
|
1171
|
+
let resultData200 = _responseText;
|
|
1172
|
+
result200 = JSON.parse(resultData200);
|
|
1173
|
+
return Promise.resolve(result200);
|
|
1174
|
+
}
|
|
1175
|
+
else if (status === 404) {
|
|
1176
|
+
const _responseText = response.data;
|
|
1177
|
+
let result404 = null;
|
|
1178
|
+
let resultData404 = _responseText;
|
|
1179
|
+
result404 = JSON.parse(resultData404);
|
|
1180
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1181
|
+
}
|
|
1182
|
+
else if (status === 401) {
|
|
1183
|
+
const _responseText = response.data;
|
|
1184
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1185
|
+
}
|
|
1186
|
+
else if (status === 403) {
|
|
1187
|
+
const _responseText = response.data;
|
|
1188
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1189
|
+
}
|
|
1190
|
+
else if (status !== 200 && status !== 204) {
|
|
1191
|
+
const _responseText = response.data;
|
|
1192
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1193
|
+
}
|
|
1194
|
+
return Promise.resolve(null);
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* @param tenantId (optional)
|
|
1198
|
+
* @return Success
|
|
1199
|
+
* @deprecated
|
|
1200
|
+
*/
|
|
899
1201
|
getConfiguration(id, tenantId, cancelToken) {
|
|
900
1202
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
|
|
901
1203
|
if (id === undefined || id === null)
|
|
@@ -3346,6 +3648,14 @@ export class TenantInfoApiClient extends ApiClientBase {
|
|
|
3346
3648
|
return Promise.resolve(null);
|
|
3347
3649
|
}
|
|
3348
3650
|
}
|
|
3651
|
+
/** Type of editor that should be configured by workflow. */
|
|
3652
|
+
export var WorkflowType;
|
|
3653
|
+
(function (WorkflowType) {
|
|
3654
|
+
WorkflowType["UIFramework"] = "UIFramework";
|
|
3655
|
+
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
3656
|
+
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
3657
|
+
WorkflowType["WorkflowElements"] = "WorkflowElements";
|
|
3658
|
+
})(WorkflowType || (WorkflowType = {}));
|
|
3349
3659
|
/** Defines all available date period filter values for queries. */
|
|
3350
3660
|
export var DatePeriod;
|
|
3351
3661
|
(function (DatePeriod) {
|