@aurigma/ng-storefront-api-client 2.38.2 → 2.40.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/aurigma-ng-storefront-api-client.metadata.json +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.js +661 -164
- package/bundles/aurigma-ng-storefront-api-client.umd.js.map +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js +1 -1
- package/bundles/aurigma-ng-storefront-api-client.umd.min.js.map +1 -1
- package/esm2015/aurigma-ng-storefront-api-client.js +1 -1
- package/esm2015/lib/storefront-api-client.js +476 -46
- package/esm2015/lib/storefront.module.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/aurigma-ng-storefront-api-client.js +476 -46
- package/fesm2015/aurigma-ng-storefront-api-client.js.map +1 -1
- package/lib/storefront-api-client.d.ts +184 -37
- package/package.json +1 -1
|
@@ -169,6 +169,181 @@ BuildInfoApiClient.ctorParameters = () => [
|
|
|
169
169
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
170
170
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
171
171
|
];
|
|
172
|
+
class ProcessingPipelinesApiClient extends ApiClientBase {
|
|
173
|
+
constructor(configuration, http, baseUrl) {
|
|
174
|
+
super(configuration);
|
|
175
|
+
this.jsonParseReviver = undefined;
|
|
176
|
+
this.http = http;
|
|
177
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns all processing pipelines relevant to the specified query parameters.
|
|
181
|
+
* @param skip (optional) Defines page start offset from beginning of sorted result list.
|
|
182
|
+
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
183
|
+
* @param search (optional) Search string for partial by processing pipeline name.
|
|
184
|
+
* @param tenantId (optional) Tenant identifier.
|
|
185
|
+
* @return Success
|
|
186
|
+
*/
|
|
187
|
+
getAll(skip, take, search, tenantId) {
|
|
188
|
+
let url_ = this.baseUrl + "/api/storefront/v1/processing-pipelines?";
|
|
189
|
+
if (skip !== undefined && skip !== null)
|
|
190
|
+
url_ += "skip=" + encodeURIComponent("" + skip) + "&";
|
|
191
|
+
if (take !== undefined && take !== null)
|
|
192
|
+
url_ += "take=" + encodeURIComponent("" + take) + "&";
|
|
193
|
+
if (search !== undefined && search !== null)
|
|
194
|
+
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
195
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
196
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
197
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
198
|
+
let options_ = {
|
|
199
|
+
observe: "response",
|
|
200
|
+
responseType: "blob",
|
|
201
|
+
headers: new HttpHeaders({
|
|
202
|
+
"Accept": "text/plain"
|
|
203
|
+
})
|
|
204
|
+
};
|
|
205
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
206
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
207
|
+
})).pipe(mergeMap((response_) => {
|
|
208
|
+
return this.transformResult(url_, response_, (r) => this.processGetAll(r));
|
|
209
|
+
})).pipe(catchError((response_) => {
|
|
210
|
+
if (response_ instanceof HttpResponseBase) {
|
|
211
|
+
try {
|
|
212
|
+
return this.transformResult(url_, response_, (r) => this.processGetAll(r));
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
return throwError(e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else
|
|
219
|
+
return throwError(response_);
|
|
220
|
+
}));
|
|
221
|
+
}
|
|
222
|
+
processGetAll(response) {
|
|
223
|
+
const status = response.status;
|
|
224
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
225
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
226
|
+
let _headers = {};
|
|
227
|
+
if (response.headers) {
|
|
228
|
+
for (let key of response.headers.keys()) {
|
|
229
|
+
_headers[key] = response.headers.get(key);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (status === 200) {
|
|
233
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
234
|
+
let result200 = null;
|
|
235
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
236
|
+
return of(result200);
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
else if (status === 401) {
|
|
240
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
241
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
244
|
+
else if (status === 403) {
|
|
245
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
246
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
247
|
+
}));
|
|
248
|
+
}
|
|
249
|
+
else if (status !== 200 && status !== 204) {
|
|
250
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
251
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
252
|
+
}));
|
|
253
|
+
}
|
|
254
|
+
return of(null);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Returns a processing pipeline.
|
|
258
|
+
* @param id Processing pipeline identifier..
|
|
259
|
+
* @param tenantId (optional) Tenant identifier.
|
|
260
|
+
* @return Success
|
|
261
|
+
*/
|
|
262
|
+
get(id, tenantId) {
|
|
263
|
+
let url_ = this.baseUrl + "/api/storefront/v1/processing-pipelines/{id}?";
|
|
264
|
+
if (id === undefined || id === null)
|
|
265
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
266
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
267
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
268
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
269
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
270
|
+
let options_ = {
|
|
271
|
+
observe: "response",
|
|
272
|
+
responseType: "blob",
|
|
273
|
+
headers: new HttpHeaders({
|
|
274
|
+
"Accept": "text/plain"
|
|
275
|
+
})
|
|
276
|
+
};
|
|
277
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
278
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
279
|
+
})).pipe(mergeMap((response_) => {
|
|
280
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
281
|
+
})).pipe(catchError((response_) => {
|
|
282
|
+
if (response_ instanceof HttpResponseBase) {
|
|
283
|
+
try {
|
|
284
|
+
return this.transformResult(url_, response_, (r) => this.processGet(r));
|
|
285
|
+
}
|
|
286
|
+
catch (e) {
|
|
287
|
+
return throwError(e);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else
|
|
291
|
+
return throwError(response_);
|
|
292
|
+
}));
|
|
293
|
+
}
|
|
294
|
+
processGet(response) {
|
|
295
|
+
const status = response.status;
|
|
296
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
297
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
298
|
+
let _headers = {};
|
|
299
|
+
if (response.headers) {
|
|
300
|
+
for (let key of response.headers.keys()) {
|
|
301
|
+
_headers[key] = response.headers.get(key);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (status === 200) {
|
|
305
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
306
|
+
let result200 = null;
|
|
307
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
308
|
+
return of(result200);
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
else if (status === 404) {
|
|
312
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
313
|
+
let result404 = null;
|
|
314
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
315
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
316
|
+
}));
|
|
317
|
+
}
|
|
318
|
+
else if (status === 401) {
|
|
319
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
320
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
321
|
+
}));
|
|
322
|
+
}
|
|
323
|
+
else if (status === 403) {
|
|
324
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
325
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
326
|
+
}));
|
|
327
|
+
}
|
|
328
|
+
else if (status !== 200 && status !== 204) {
|
|
329
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
330
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
331
|
+
}));
|
|
332
|
+
}
|
|
333
|
+
return of(null);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
ProcessingPipelinesApiClient.ɵprov = ɵɵdefineInjectable({ factory: function ProcessingPipelinesApiClient_Factory() { return new ProcessingPipelinesApiClient(ɵɵinject(ApiClientConfiguration), ɵɵinject(HttpClient), ɵɵinject(API_BASE_URL, 8)); }, token: ProcessingPipelinesApiClient, providedIn: "root" });
|
|
337
|
+
ProcessingPipelinesApiClient.decorators = [
|
|
338
|
+
{ type: Injectable, args: [{
|
|
339
|
+
providedIn: 'root'
|
|
340
|
+
},] }
|
|
341
|
+
];
|
|
342
|
+
ProcessingPipelinesApiClient.ctorParameters = () => [
|
|
343
|
+
{ type: ApiClientConfiguration, decorators: [{ type: Inject, args: [ApiClientConfiguration,] }] },
|
|
344
|
+
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
345
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
346
|
+
];
|
|
172
347
|
class ProductReferencesApiClient extends ApiClientBase {
|
|
173
348
|
constructor(configuration, http, baseUrl) {
|
|
174
349
|
super(configuration);
|
|
@@ -604,21 +779,37 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
604
779
|
return of(null);
|
|
605
780
|
}
|
|
606
781
|
/**
|
|
607
|
-
* Returns a product
|
|
608
|
-
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
782
|
+
* Returns a product cost details from ecommerce system.
|
|
783
|
+
* @param reference Product reference - external reference to Customer's Canvas product product specification, e.g online store product identifier.
|
|
784
|
+
* @param sku Product SKU.
|
|
609
785
|
* @param storefrontId Storefront identifier.
|
|
786
|
+
* @param storefrontUserId (optional) Storefront user identifier.
|
|
787
|
+
* @param currencyCode (optional) Product cost currency code.
|
|
788
|
+
* @param quantity (optional) Product quantity.
|
|
610
789
|
* @param tenantId (optional) Tenant identifier.
|
|
611
790
|
* @return Success
|
|
612
791
|
*/
|
|
613
|
-
|
|
614
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-
|
|
792
|
+
getProductCostDetails(reference, sku, storefrontId, storefrontUserId, currencyCode, quantity, tenantId) {
|
|
793
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-cost-details?";
|
|
615
794
|
if (reference === undefined || reference === null)
|
|
616
795
|
throw new Error("The parameter 'reference' must be defined.");
|
|
617
796
|
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
797
|
+
if (sku === undefined || sku === null)
|
|
798
|
+
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
799
|
+
else
|
|
800
|
+
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
618
801
|
if (storefrontId === undefined || storefrontId === null)
|
|
619
802
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
620
803
|
else
|
|
621
804
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
805
|
+
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
806
|
+
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
807
|
+
if (currencyCode !== undefined && currencyCode !== null)
|
|
808
|
+
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
809
|
+
if (quantity === null)
|
|
810
|
+
throw new Error("The parameter 'quantity' cannot be null.");
|
|
811
|
+
else if (quantity !== undefined)
|
|
812
|
+
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
622
813
|
if (tenantId !== undefined && tenantId !== null)
|
|
623
814
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
624
815
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -632,11 +823,11 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
632
823
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
633
824
|
return this.http.request("get", url_, transformedOptions_);
|
|
634
825
|
})).pipe(mergeMap((response_) => {
|
|
635
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
826
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
636
827
|
})).pipe(catchError((response_) => {
|
|
637
828
|
if (response_ instanceof HttpResponseBase) {
|
|
638
829
|
try {
|
|
639
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
830
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductCostDetails(r));
|
|
640
831
|
}
|
|
641
832
|
catch (e) {
|
|
642
833
|
return throwError(e);
|
|
@@ -646,7 +837,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
646
837
|
return throwError(response_);
|
|
647
838
|
}));
|
|
648
839
|
}
|
|
649
|
-
|
|
840
|
+
processGetProductCostDetails(response) {
|
|
650
841
|
const status = response.status;
|
|
651
842
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
652
843
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -659,14 +850,14 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
659
850
|
if (status === 200) {
|
|
660
851
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
661
852
|
let result200 = null;
|
|
662
|
-
result200 = _responseText === "" ? null : _responseText;
|
|
853
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
663
854
|
return of(result200);
|
|
664
855
|
}));
|
|
665
856
|
}
|
|
666
857
|
else if (status === 404) {
|
|
667
858
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
668
859
|
let result404 = null;
|
|
669
|
-
result404 = _responseText === "" ? null : _responseText;
|
|
860
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
670
861
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
671
862
|
}));
|
|
672
863
|
}
|
|
@@ -688,37 +879,103 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
688
879
|
return of(null);
|
|
689
880
|
}
|
|
690
881
|
/**
|
|
691
|
-
* Returns a product
|
|
692
|
-
* @param reference Product reference - external reference to Customer's Canvas product
|
|
693
|
-
* @param
|
|
694
|
-
* @param storefrontId Storefront identifier.
|
|
695
|
-
* @param storefrontUserId (optional) Storefront user identifier.
|
|
696
|
-
* @param currencyCode (optional) Product cost currency code.
|
|
697
|
-
* @param quantity (optional) Product quantity.
|
|
882
|
+
* Returns a product personalization workflow description by product specification identifier.
|
|
883
|
+
* @param reference Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.
|
|
884
|
+
* @param storefrontId (optional) Storefront identifier.
|
|
698
885
|
* @param tenantId (optional) Tenant identifier.
|
|
699
886
|
* @return Success
|
|
700
887
|
*/
|
|
701
|
-
|
|
702
|
-
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/
|
|
888
|
+
getPersonalizationWorkflow(reference, storefrontId, tenantId) {
|
|
889
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/personalization-workflow?";
|
|
890
|
+
if (reference === undefined || reference === null)
|
|
891
|
+
throw new Error("The parameter 'reference' must be defined.");
|
|
892
|
+
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
893
|
+
if (storefrontId === null)
|
|
894
|
+
throw new Error("The parameter 'storefrontId' cannot be null.");
|
|
895
|
+
else if (storefrontId !== undefined)
|
|
896
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
897
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
898
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
899
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
900
|
+
let options_ = {
|
|
901
|
+
observe: "response",
|
|
902
|
+
responseType: "blob",
|
|
903
|
+
headers: new HttpHeaders({
|
|
904
|
+
"Accept": "text/plain"
|
|
905
|
+
})
|
|
906
|
+
};
|
|
907
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
908
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
909
|
+
})).pipe(mergeMap((response_) => {
|
|
910
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
911
|
+
})).pipe(catchError((response_) => {
|
|
912
|
+
if (response_ instanceof HttpResponseBase) {
|
|
913
|
+
try {
|
|
914
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
915
|
+
}
|
|
916
|
+
catch (e) {
|
|
917
|
+
return throwError(e);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
else
|
|
921
|
+
return throwError(response_);
|
|
922
|
+
}));
|
|
923
|
+
}
|
|
924
|
+
processGetPersonalizationWorkflow(response) {
|
|
925
|
+
const status = response.status;
|
|
926
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
927
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
928
|
+
let _headers = {};
|
|
929
|
+
if (response.headers) {
|
|
930
|
+
for (let key of response.headers.keys()) {
|
|
931
|
+
_headers[key] = response.headers.get(key);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
if (status === 200) {
|
|
935
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
936
|
+
let result200 = null;
|
|
937
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
938
|
+
return of(result200);
|
|
939
|
+
}));
|
|
940
|
+
}
|
|
941
|
+
else if (status === 404) {
|
|
942
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
943
|
+
let result404 = null;
|
|
944
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
945
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
946
|
+
}));
|
|
947
|
+
}
|
|
948
|
+
else if (status === 401) {
|
|
949
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
950
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
951
|
+
}));
|
|
952
|
+
}
|
|
953
|
+
else if (status === 403) {
|
|
954
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
955
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
956
|
+
}));
|
|
957
|
+
}
|
|
958
|
+
else if (status !== 200 && status !== 204) {
|
|
959
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
960
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
961
|
+
}));
|
|
962
|
+
}
|
|
963
|
+
return of(null);
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* @param tenantId (optional)
|
|
967
|
+
* @return Success
|
|
968
|
+
* @deprecated
|
|
969
|
+
*/
|
|
970
|
+
getProductConfig(reference, storefrontId, tenantId) {
|
|
971
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-references/{reference}/product-config?";
|
|
703
972
|
if (reference === undefined || reference === null)
|
|
704
973
|
throw new Error("The parameter 'reference' must be defined.");
|
|
705
974
|
url_ = url_.replace("{reference}", encodeURIComponent("" + reference));
|
|
706
|
-
if (sku === undefined || sku === null)
|
|
707
|
-
throw new Error("The parameter 'sku' must be defined and cannot be null.");
|
|
708
|
-
else
|
|
709
|
-
url_ += "sku=" + encodeURIComponent("" + sku) + "&";
|
|
710
975
|
if (storefrontId === undefined || storefrontId === null)
|
|
711
976
|
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
712
977
|
else
|
|
713
978
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
714
|
-
if (storefrontUserId !== undefined && storefrontUserId !== null)
|
|
715
|
-
url_ += "storefrontUserId=" + encodeURIComponent("" + storefrontUserId) + "&";
|
|
716
|
-
if (currencyCode !== undefined && currencyCode !== null)
|
|
717
|
-
url_ += "currencyCode=" + encodeURIComponent("" + currencyCode) + "&";
|
|
718
|
-
if (quantity === null)
|
|
719
|
-
throw new Error("The parameter 'quantity' cannot be null.");
|
|
720
|
-
else if (quantity !== undefined)
|
|
721
|
-
url_ += "quantity=" + encodeURIComponent("" + quantity) + "&";
|
|
722
979
|
if (tenantId !== undefined && tenantId !== null)
|
|
723
980
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
724
981
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -732,11 +989,11 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
732
989
|
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
733
990
|
return this.http.request("get", url_, transformedOptions_);
|
|
734
991
|
})).pipe(mergeMap((response_) => {
|
|
735
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
992
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
736
993
|
})).pipe(catchError((response_) => {
|
|
737
994
|
if (response_ instanceof HttpResponseBase) {
|
|
738
995
|
try {
|
|
739
|
-
return this.transformResult(url_, response_, (r) => this.
|
|
996
|
+
return this.transformResult(url_, response_, (r) => this.processGetProductConfig(r));
|
|
740
997
|
}
|
|
741
998
|
catch (e) {
|
|
742
999
|
return throwError(e);
|
|
@@ -746,7 +1003,7 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
746
1003
|
return throwError(response_);
|
|
747
1004
|
}));
|
|
748
1005
|
}
|
|
749
|
-
|
|
1006
|
+
processGetProductConfig(response) {
|
|
750
1007
|
const status = response.status;
|
|
751
1008
|
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
752
1009
|
response.error instanceof Blob ? response.error : undefined;
|
|
@@ -759,14 +1016,14 @@ class ProductReferencesApiClient extends ApiClientBase {
|
|
|
759
1016
|
if (status === 200) {
|
|
760
1017
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
761
1018
|
let result200 = null;
|
|
762
|
-
result200 = _responseText === "" ? null :
|
|
1019
|
+
result200 = _responseText === "" ? null : _responseText;
|
|
763
1020
|
return of(result200);
|
|
764
1021
|
}));
|
|
765
1022
|
}
|
|
766
1023
|
else if (status === 404) {
|
|
767
1024
|
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
768
1025
|
let result404 = null;
|
|
769
|
-
result404 = _responseText === "" ? null :
|
|
1026
|
+
result404 = _responseText === "" ? null : _responseText;
|
|
770
1027
|
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
771
1028
|
}));
|
|
772
1029
|
}
|
|
@@ -966,11 +1223,89 @@ class ProductSpecificationsApiClient extends ApiClientBase {
|
|
|
966
1223
|
return of(null);
|
|
967
1224
|
}
|
|
968
1225
|
/**
|
|
969
|
-
* Returns a product
|
|
1226
|
+
* Returns a product personalization workflow description by product specification identifier.
|
|
970
1227
|
* @param id Product specification identifier.
|
|
971
1228
|
* @param tenantId (optional) Tenant identifier.
|
|
972
1229
|
* @return Success
|
|
973
1230
|
*/
|
|
1231
|
+
getPersonalizationWorkflow(id, tenantId) {
|
|
1232
|
+
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/personalization-workflow?";
|
|
1233
|
+
if (id === undefined || id === null)
|
|
1234
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
1235
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
1236
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1237
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1238
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1239
|
+
let options_ = {
|
|
1240
|
+
observe: "response",
|
|
1241
|
+
responseType: "blob",
|
|
1242
|
+
headers: new HttpHeaders({
|
|
1243
|
+
"Accept": "text/plain"
|
|
1244
|
+
})
|
|
1245
|
+
};
|
|
1246
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
1247
|
+
return this.http.request("get", url_, transformedOptions_);
|
|
1248
|
+
})).pipe(mergeMap((response_) => {
|
|
1249
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
1250
|
+
})).pipe(catchError((response_) => {
|
|
1251
|
+
if (response_ instanceof HttpResponseBase) {
|
|
1252
|
+
try {
|
|
1253
|
+
return this.transformResult(url_, response_, (r) => this.processGetPersonalizationWorkflow(r));
|
|
1254
|
+
}
|
|
1255
|
+
catch (e) {
|
|
1256
|
+
return throwError(e);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
else
|
|
1260
|
+
return throwError(response_);
|
|
1261
|
+
}));
|
|
1262
|
+
}
|
|
1263
|
+
processGetPersonalizationWorkflow(response) {
|
|
1264
|
+
const status = response.status;
|
|
1265
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
1266
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
1267
|
+
let _headers = {};
|
|
1268
|
+
if (response.headers) {
|
|
1269
|
+
for (let key of response.headers.keys()) {
|
|
1270
|
+
_headers[key] = response.headers.get(key);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
if (status === 200) {
|
|
1274
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1275
|
+
let result200 = null;
|
|
1276
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1277
|
+
return of(result200);
|
|
1278
|
+
}));
|
|
1279
|
+
}
|
|
1280
|
+
else if (status === 404) {
|
|
1281
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1282
|
+
let result404 = null;
|
|
1283
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1284
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
1285
|
+
}));
|
|
1286
|
+
}
|
|
1287
|
+
else if (status === 401) {
|
|
1288
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1289
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1290
|
+
}));
|
|
1291
|
+
}
|
|
1292
|
+
else if (status === 403) {
|
|
1293
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1294
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1295
|
+
}));
|
|
1296
|
+
}
|
|
1297
|
+
else if (status !== 200 && status !== 204) {
|
|
1298
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
1299
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1300
|
+
}));
|
|
1301
|
+
}
|
|
1302
|
+
return of(null);
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* @param tenantId (optional)
|
|
1306
|
+
* @return Success
|
|
1307
|
+
* @deprecated
|
|
1308
|
+
*/
|
|
974
1309
|
getConfiguration(id, tenantId) {
|
|
975
1310
|
let url_ = this.baseUrl + "/api/storefront/v1/product-specifications/{id}/config?";
|
|
976
1311
|
if (id === undefined || id === null)
|
|
@@ -1074,11 +1409,12 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1074
1409
|
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
1075
1410
|
* @param search (optional) Search string for partial match.
|
|
1076
1411
|
* @param orderId (optional) Identifier of corresponding order.
|
|
1412
|
+
* @param processingStatus (optional) Project processing status filter.
|
|
1077
1413
|
* @param storefrontId (optional) Storefront identifier.
|
|
1078
1414
|
* @param tenantId (optional) Tenant identifier.
|
|
1079
1415
|
* @return Success
|
|
1080
1416
|
*/
|
|
1081
|
-
getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, storefrontId, tenantId) {
|
|
1417
|
+
getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, processingStatus, storefrontId, tenantId) {
|
|
1082
1418
|
let url_ = this.baseUrl + "/api/storefront/v1/projects?";
|
|
1083
1419
|
if (ownerId !== undefined && ownerId !== null)
|
|
1084
1420
|
url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
|
|
@@ -1100,6 +1436,8 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1100
1436
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
1101
1437
|
if (orderId !== undefined && orderId !== null)
|
|
1102
1438
|
url_ += "orderId=" + encodeURIComponent("" + orderId) + "&";
|
|
1439
|
+
if (processingStatus !== undefined && processingStatus !== null)
|
|
1440
|
+
url_ += "processingStatus=" + encodeURIComponent("" + processingStatus) + "&";
|
|
1103
1441
|
if (storefrontId !== undefined && storefrontId !== null)
|
|
1104
1442
|
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1105
1443
|
if (tenantId !== undefined && tenantId !== null)
|
|
@@ -1642,6 +1980,90 @@ class ProjectsApiClient extends ApiClientBase {
|
|
|
1642
1980
|
}
|
|
1643
1981
|
return of(null);
|
|
1644
1982
|
}
|
|
1983
|
+
/**
|
|
1984
|
+
* Creates a new project by 'Specific Pipeline' scenario.
|
|
1985
|
+
* @param storefrontId Storefront identifier.
|
|
1986
|
+
* @param tenantId (optional) Tenant identifier.
|
|
1987
|
+
* @param body (optional) Create operation parameters.
|
|
1988
|
+
* @return Success
|
|
1989
|
+
*/
|
|
1990
|
+
createBySpecificPipelineScenario(storefrontId, tenantId, body) {
|
|
1991
|
+
let url_ = this.baseUrl + "/api/storefront/v1/projects/by-scenario/specific-pipeline?";
|
|
1992
|
+
if (storefrontId === undefined || storefrontId === null)
|
|
1993
|
+
throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
|
|
1994
|
+
else
|
|
1995
|
+
url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
|
|
1996
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
1997
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
1998
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1999
|
+
const content_ = JSON.stringify(body);
|
|
2000
|
+
let options_ = {
|
|
2001
|
+
body: content_,
|
|
2002
|
+
observe: "response",
|
|
2003
|
+
responseType: "blob",
|
|
2004
|
+
headers: new HttpHeaders({
|
|
2005
|
+
"Content-Type": "application/json-patch+json",
|
|
2006
|
+
"Accept": "text/plain"
|
|
2007
|
+
})
|
|
2008
|
+
};
|
|
2009
|
+
return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
|
|
2010
|
+
return this.http.request("post", url_, transformedOptions_);
|
|
2011
|
+
})).pipe(mergeMap((response_) => {
|
|
2012
|
+
return this.transformResult(url_, response_, (r) => this.processCreateBySpecificPipelineScenario(r));
|
|
2013
|
+
})).pipe(catchError((response_) => {
|
|
2014
|
+
if (response_ instanceof HttpResponseBase) {
|
|
2015
|
+
try {
|
|
2016
|
+
return this.transformResult(url_, response_, (r) => this.processCreateBySpecificPipelineScenario(r));
|
|
2017
|
+
}
|
|
2018
|
+
catch (e) {
|
|
2019
|
+
return throwError(e);
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
else
|
|
2023
|
+
return throwError(response_);
|
|
2024
|
+
}));
|
|
2025
|
+
}
|
|
2026
|
+
processCreateBySpecificPipelineScenario(response) {
|
|
2027
|
+
const status = response.status;
|
|
2028
|
+
const responseBlob = response instanceof HttpResponse ? response.body :
|
|
2029
|
+
response.error instanceof Blob ? response.error : undefined;
|
|
2030
|
+
let _headers = {};
|
|
2031
|
+
if (response.headers) {
|
|
2032
|
+
for (let key of response.headers.keys()) {
|
|
2033
|
+
_headers[key] = response.headers.get(key);
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
if (status === 201) {
|
|
2037
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2038
|
+
let result201 = null;
|
|
2039
|
+
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2040
|
+
return of(result201);
|
|
2041
|
+
}));
|
|
2042
|
+
}
|
|
2043
|
+
else if (status === 409) {
|
|
2044
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2045
|
+
let result409 = null;
|
|
2046
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2047
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2048
|
+
}));
|
|
2049
|
+
}
|
|
2050
|
+
else if (status === 401) {
|
|
2051
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2052
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2053
|
+
}));
|
|
2054
|
+
}
|
|
2055
|
+
else if (status === 403) {
|
|
2056
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2057
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2058
|
+
}));
|
|
2059
|
+
}
|
|
2060
|
+
else if (status !== 200 && status !== 204) {
|
|
2061
|
+
return blobToText(responseBlob).pipe(mergeMap(_responseText => {
|
|
2062
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2063
|
+
}));
|
|
2064
|
+
}
|
|
2065
|
+
return of(null);
|
|
2066
|
+
}
|
|
1645
2067
|
/**
|
|
1646
2068
|
* Returns all available status transitions for a project.
|
|
1647
2069
|
* @param id Project identifier.
|
|
@@ -3576,6 +3998,14 @@ TenantInfoApiClient.ctorParameters = () => [
|
|
|
3576
3998
|
{ type: HttpClient, decorators: [{ type: Inject, args: [HttpClient,] }] },
|
|
3577
3999
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [API_BASE_URL,] }] }
|
|
3578
4000
|
];
|
|
4001
|
+
/** Type of editor that should be configured by workflow. */
|
|
4002
|
+
var WorkflowType;
|
|
4003
|
+
(function (WorkflowType) {
|
|
4004
|
+
WorkflowType["UIFramework"] = "UIFramework";
|
|
4005
|
+
WorkflowType["SimpleEditor"] = "SimpleEditor";
|
|
4006
|
+
WorkflowType["DesignEditor"] = "DesignEditor";
|
|
4007
|
+
WorkflowType["HandyEditor"] = "HandyEditor";
|
|
4008
|
+
})(WorkflowType || (WorkflowType = {}));
|
|
3579
4009
|
/** Defines all available date period filter values for queries. */
|
|
3580
4010
|
var DatePeriod;
|
|
3581
4011
|
(function (DatePeriod) {
|
|
@@ -3584,6 +4014,14 @@ var DatePeriod;
|
|
|
3584
4014
|
DatePeriod["Last7Days"] = "Last7Days";
|
|
3585
4015
|
DatePeriod["Last30Days"] = "Last30Days";
|
|
3586
4016
|
})(DatePeriod || (DatePeriod = {}));
|
|
4017
|
+
/** Available project processing statuses. */
|
|
4018
|
+
var ProjectProcessingStatus;
|
|
4019
|
+
(function (ProjectProcessingStatus) {
|
|
4020
|
+
ProjectProcessingStatus["Pending"] = "Pending";
|
|
4021
|
+
ProjectProcessingStatus["InProgress"] = "InProgress";
|
|
4022
|
+
ProjectProcessingStatus["Completed"] = "Completed";
|
|
4023
|
+
ProjectProcessingStatus["Failed"] = "Failed";
|
|
4024
|
+
})(ProjectProcessingStatus || (ProjectProcessingStatus = {}));
|
|
3587
4025
|
/** Available product resource types */
|
|
3588
4026
|
var ProjectItemResourceType;
|
|
3589
4027
|
(function (ProjectItemResourceType) {
|
|
@@ -3611,14 +4049,6 @@ var RenderHiResScenarioOutputFlipMode;
|
|
|
3611
4049
|
RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
|
|
3612
4050
|
RenderHiResScenarioOutputFlipMode["Both"] = "Both";
|
|
3613
4051
|
})(RenderHiResScenarioOutputFlipMode || (RenderHiResScenarioOutputFlipMode = {}));
|
|
3614
|
-
/** Available project processing statuses. */
|
|
3615
|
-
var ProjectProcessingStatus;
|
|
3616
|
-
(function (ProjectProcessingStatus) {
|
|
3617
|
-
ProjectProcessingStatus["Pending"] = "Pending";
|
|
3618
|
-
ProjectProcessingStatus["InProgress"] = "InProgress";
|
|
3619
|
-
ProjectProcessingStatus["Completed"] = "Completed";
|
|
3620
|
-
ProjectProcessingStatus["Failed"] = "Failed";
|
|
3621
|
-
})(ProjectProcessingStatus || (ProjectProcessingStatus = {}));
|
|
3622
4052
|
/** Available value types for order data item. */
|
|
3623
4053
|
var OrderDataItemValueType;
|
|
3624
4054
|
(function (OrderDataItemValueType) {
|
|
@@ -3718,5 +4148,5 @@ StorefrontModule.decorators = [
|
|
|
3718
4148
|
* Generated bundle index. Do not edit.
|
|
3719
4149
|
*/
|
|
3720
4150
|
|
|
3721
|
-
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, OrderDataItemValueType, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient };
|
|
4151
|
+
export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, OrderDataItemValueType, ProcessingPipelinesApiClient, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient, WorkflowType };
|
|
3722
4152
|
//# sourceMappingURL=aurigma-ng-storefront-api-client.js.map
|