@aurigma/ng-storefront-api-client 2.22.30 → 2.24.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.
@@ -1403,6 +1403,90 @@ class ProjectsApiClient extends ApiClientBase {
1403
1403
  }
1404
1404
  return of(null);
1405
1405
  }
1406
+ /**
1407
+ * Creates a new project by 'Render HiRes' scenario.
1408
+ * @param storefrontId Storefront identifier.
1409
+ * @param tenantId (optional) Tenant identifier.
1410
+ * @param body (optional) Create operation parameters.
1411
+ * @return Success
1412
+ */
1413
+ createByRenderHiResScenario(storefrontId, tenantId, body) {
1414
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/by-scenario/render-hires?";
1415
+ if (storefrontId === undefined || storefrontId === null)
1416
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1417
+ else
1418
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1419
+ if (tenantId !== undefined && tenantId !== null)
1420
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1421
+ url_ = url_.replace(/[?&]$/, "");
1422
+ const content_ = JSON.stringify(body);
1423
+ let options_ = {
1424
+ body: content_,
1425
+ observe: "response",
1426
+ responseType: "blob",
1427
+ headers: new HttpHeaders({
1428
+ "Content-Type": "application/json-patch+json",
1429
+ "Accept": "text/plain"
1430
+ })
1431
+ };
1432
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
1433
+ return this.http.request("post", url_, transformedOptions_);
1434
+ })).pipe(mergeMap((response_) => {
1435
+ return this.transformResult(url_, response_, (r) => this.processCreateByRenderHiResScenario(r));
1436
+ })).pipe(catchError((response_) => {
1437
+ if (response_ instanceof HttpResponseBase) {
1438
+ try {
1439
+ return this.transformResult(url_, response_, (r) => this.processCreateByRenderHiResScenario(r));
1440
+ }
1441
+ catch (e) {
1442
+ return throwError(e);
1443
+ }
1444
+ }
1445
+ else
1446
+ return throwError(response_);
1447
+ }));
1448
+ }
1449
+ processCreateByRenderHiResScenario(response) {
1450
+ const status = response.status;
1451
+ const responseBlob = response instanceof HttpResponse ? response.body :
1452
+ response.error instanceof Blob ? response.error : undefined;
1453
+ let _headers = {};
1454
+ if (response.headers) {
1455
+ for (let key of response.headers.keys()) {
1456
+ _headers[key] = response.headers.get(key);
1457
+ }
1458
+ }
1459
+ if (status === 201) {
1460
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1461
+ let result201 = null;
1462
+ result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1463
+ return of(result201);
1464
+ }));
1465
+ }
1466
+ else if (status === 409) {
1467
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1468
+ let result409 = null;
1469
+ result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1470
+ return throwException("Conflict", status, _responseText, _headers, result409);
1471
+ }));
1472
+ }
1473
+ else if (status === 401) {
1474
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1475
+ return throwException("Unauthorized", status, _responseText, _headers);
1476
+ }));
1477
+ }
1478
+ else if (status === 403) {
1479
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1480
+ return throwException("Forbidden", status, _responseText, _headers);
1481
+ }));
1482
+ }
1483
+ else if (status !== 200 && status !== 204) {
1484
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
1485
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1486
+ }));
1487
+ }
1488
+ return of(null);
1489
+ }
1406
1490
  /**
1407
1491
  * Returns all available status transitions for a project.
1408
1492
  * @param id Project identifier.
@@ -1826,6 +1910,7 @@ class ProjectsApiClient extends ApiClientBase {
1826
1910
  * @param designId Design identifier.
1827
1911
  * @param tenantId (optional) Tenant identifier.
1828
1912
  * @return Success
1913
+ * @deprecated
1829
1914
  */
1830
1915
  getProjectPdfUrl(id, designUserId, designId, tenantId) {
1831
1916
  let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
@@ -1909,6 +1994,7 @@ class ProjectsApiClient extends ApiClientBase {
1909
1994
  * @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
1910
1995
  * @param tenantId (optional) Tenant identifier.
1911
1996
  * @return Success
1997
+ * @deprecated
1912
1998
  */
1913
1999
  getProjectPdfZip(id, designUserId, designId, attachment, tenantId) {
1914
2000
  let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
@@ -1992,6 +2078,235 @@ class ProjectsApiClient extends ApiClientBase {
1992
2078
  }
1993
2079
  return of(null);
1994
2080
  }
2081
+ /**
2082
+ * Returns a project processing results.
2083
+ * @param id Project identifier.
2084
+ * @param tenantId (optional) Tenant identifier.
2085
+ * @return Success
2086
+ */
2087
+ getProjectProcessingResults(id, tenantId) {
2088
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/processing-results?";
2089
+ if (id === undefined || id === null)
2090
+ throw new Error("The parameter 'id' must be defined.");
2091
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2092
+ if (tenantId !== undefined && tenantId !== null)
2093
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2094
+ url_ = url_.replace(/[?&]$/, "");
2095
+ let options_ = {
2096
+ observe: "response",
2097
+ responseType: "blob",
2098
+ headers: new HttpHeaders({
2099
+ "Accept": "text/plain"
2100
+ })
2101
+ };
2102
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2103
+ return this.http.request("get", url_, transformedOptions_);
2104
+ })).pipe(mergeMap((response_) => {
2105
+ return this.transformResult(url_, response_, (r) => this.processGetProjectProcessingResults(r));
2106
+ })).pipe(catchError((response_) => {
2107
+ if (response_ instanceof HttpResponseBase) {
2108
+ try {
2109
+ return this.transformResult(url_, response_, (r) => this.processGetProjectProcessingResults(r));
2110
+ }
2111
+ catch (e) {
2112
+ return throwError(e);
2113
+ }
2114
+ }
2115
+ else
2116
+ return throwError(response_);
2117
+ }));
2118
+ }
2119
+ processGetProjectProcessingResults(response) {
2120
+ const status = response.status;
2121
+ const responseBlob = response instanceof HttpResponse ? response.body :
2122
+ response.error instanceof Blob ? response.error : undefined;
2123
+ let _headers = {};
2124
+ if (response.headers) {
2125
+ for (let key of response.headers.keys()) {
2126
+ _headers[key] = response.headers.get(key);
2127
+ }
2128
+ }
2129
+ if (status === 200) {
2130
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2131
+ let result200 = null;
2132
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2133
+ return of(result200);
2134
+ }));
2135
+ }
2136
+ else if (status === 404) {
2137
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2138
+ let result404 = null;
2139
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2140
+ return throwException("Not Found", status, _responseText, _headers, result404);
2141
+ }));
2142
+ }
2143
+ else if (status === 401) {
2144
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2145
+ return throwException("Unauthorized", status, _responseText, _headers);
2146
+ }));
2147
+ }
2148
+ else if (status === 403) {
2149
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2150
+ return throwException("Forbidden", status, _responseText, _headers);
2151
+ }));
2152
+ }
2153
+ else if (status !== 200 && status !== 204) {
2154
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2155
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2156
+ }));
2157
+ }
2158
+ return of(null);
2159
+ }
2160
+ /**
2161
+ * Resumes project processing.
2162
+ * @param id Project identifier.
2163
+ * @param tenantId (optional) Tenant identifier.
2164
+ * @return Success
2165
+ */
2166
+ resumeProjectProcessing(id, tenantId) {
2167
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/resume-processing?";
2168
+ if (id === undefined || id === null)
2169
+ throw new Error("The parameter 'id' must be defined.");
2170
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2171
+ if (tenantId !== undefined && tenantId !== null)
2172
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2173
+ url_ = url_.replace(/[?&]$/, "");
2174
+ let options_ = {
2175
+ observe: "response",
2176
+ responseType: "blob",
2177
+ headers: new HttpHeaders({})
2178
+ };
2179
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2180
+ return this.http.request("post", url_, transformedOptions_);
2181
+ })).pipe(mergeMap((response_) => {
2182
+ return this.transformResult(url_, response_, (r) => this.processResumeProjectProcessing(r));
2183
+ })).pipe(catchError((response_) => {
2184
+ if (response_ instanceof HttpResponseBase) {
2185
+ try {
2186
+ return this.transformResult(url_, response_, (r) => this.processResumeProjectProcessing(r));
2187
+ }
2188
+ catch (e) {
2189
+ return throwError(e);
2190
+ }
2191
+ }
2192
+ else
2193
+ return throwError(response_);
2194
+ }));
2195
+ }
2196
+ processResumeProjectProcessing(response) {
2197
+ const status = response.status;
2198
+ const responseBlob = response instanceof HttpResponse ? response.body :
2199
+ response.error instanceof Blob ? response.error : undefined;
2200
+ let _headers = {};
2201
+ if (response.headers) {
2202
+ for (let key of response.headers.keys()) {
2203
+ _headers[key] = response.headers.get(key);
2204
+ }
2205
+ }
2206
+ if (status === 204) {
2207
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2208
+ return of(null);
2209
+ }));
2210
+ }
2211
+ else if (status === 404) {
2212
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2213
+ let result404 = null;
2214
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2215
+ return throwException("Not Found", status, _responseText, _headers, result404);
2216
+ }));
2217
+ }
2218
+ else if (status === 401) {
2219
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2220
+ return throwException("Unauthorized", status, _responseText, _headers);
2221
+ }));
2222
+ }
2223
+ else if (status === 403) {
2224
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2225
+ return throwException("Forbidden", status, _responseText, _headers);
2226
+ }));
2227
+ }
2228
+ else if (status !== 200 && status !== 204) {
2229
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2230
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2231
+ }));
2232
+ }
2233
+ return of(null);
2234
+ }
2235
+ /**
2236
+ * Restarts a project processing routine.
2237
+ * @param id Project identifier.
2238
+ * @param tenantId (optional) Tenant identifier.
2239
+ * @return Success
2240
+ */
2241
+ restartProjectProcessing(id, tenantId) {
2242
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/restart-processing?";
2243
+ if (id === undefined || id === null)
2244
+ throw new Error("The parameter 'id' must be defined.");
2245
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2246
+ if (tenantId !== undefined && tenantId !== null)
2247
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2248
+ url_ = url_.replace(/[?&]$/, "");
2249
+ let options_ = {
2250
+ observe: "response",
2251
+ responseType: "blob",
2252
+ headers: new HttpHeaders({})
2253
+ };
2254
+ return from(this.transformOptions(options_)).pipe(mergeMap(transformedOptions_ => {
2255
+ return this.http.request("post", url_, transformedOptions_);
2256
+ })).pipe(mergeMap((response_) => {
2257
+ return this.transformResult(url_, response_, (r) => this.processRestartProjectProcessing(r));
2258
+ })).pipe(catchError((response_) => {
2259
+ if (response_ instanceof HttpResponseBase) {
2260
+ try {
2261
+ return this.transformResult(url_, response_, (r) => this.processRestartProjectProcessing(r));
2262
+ }
2263
+ catch (e) {
2264
+ return throwError(e);
2265
+ }
2266
+ }
2267
+ else
2268
+ return throwError(response_);
2269
+ }));
2270
+ }
2271
+ processRestartProjectProcessing(response) {
2272
+ const status = response.status;
2273
+ const responseBlob = response instanceof HttpResponse ? response.body :
2274
+ response.error instanceof Blob ? response.error : undefined;
2275
+ let _headers = {};
2276
+ if (response.headers) {
2277
+ for (let key of response.headers.keys()) {
2278
+ _headers[key] = response.headers.get(key);
2279
+ }
2280
+ }
2281
+ if (status === 204) {
2282
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2283
+ return of(null);
2284
+ }));
2285
+ }
2286
+ else if (status === 404) {
2287
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2288
+ let result404 = null;
2289
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2290
+ return throwException("Not Found", status, _responseText, _headers, result404);
2291
+ }));
2292
+ }
2293
+ else if (status === 401) {
2294
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2295
+ return throwException("Unauthorized", status, _responseText, _headers);
2296
+ }));
2297
+ }
2298
+ else if (status === 403) {
2299
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2300
+ return throwException("Forbidden", status, _responseText, _headers);
2301
+ }));
2302
+ }
2303
+ else if (status !== 200 && status !== 204) {
2304
+ return blobToText(responseBlob).pipe(mergeMap(_responseText => {
2305
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2306
+ }));
2307
+ }
2308
+ return of(null);
2309
+ }
1995
2310
  /**
1996
2311
  * Returns an order description from the ecommerce system for the specified project.
1997
2312
  * @param id Project identifier.
@@ -3035,12 +3350,40 @@ var DatePeriod;
3035
3350
  DatePeriod["Last30Days"] = "Last30Days";
3036
3351
  })(DatePeriod || (DatePeriod = {}));
3037
3352
  /** Available product resource types */
3038
- var ProjectProductResourceType;
3039
- (function (ProjectProductResourceType) {
3040
- ProjectProductResourceType[ProjectProductResourceType["_0"] = 0] = "_0";
3041
- ProjectProductResourceType[ProjectProductResourceType["_1"] = 1] = "_1";
3042
- ProjectProductResourceType[ProjectProductResourceType["_2"] = 2] = "_2";
3043
- })(ProjectProductResourceType || (ProjectProductResourceType = {}));
3353
+ var ProjectItemResourceType;
3354
+ (function (ProjectItemResourceType) {
3355
+ ProjectItemResourceType["General"] = "General";
3356
+ ProjectItemResourceType["Preview"] = "Preview";
3357
+ ProjectItemResourceType["Hires"] = "Hires";
3358
+ })(ProjectItemResourceType || (ProjectItemResourceType = {}));
3359
+ var RenderHiResScenarioOutputFormat;
3360
+ (function (RenderHiResScenarioOutputFormat) {
3361
+ RenderHiResScenarioOutputFormat["Pdf"] = "Pdf";
3362
+ RenderHiResScenarioOutputFormat["Jpeg"] = "Jpeg";
3363
+ RenderHiResScenarioOutputFormat["Png"] = "Png";
3364
+ RenderHiResScenarioOutputFormat["Tiff"] = "Tiff";
3365
+ })(RenderHiResScenarioOutputFormat || (RenderHiResScenarioOutputFormat = {}));
3366
+ var RenderHiResScenarioOutputColorSpace;
3367
+ (function (RenderHiResScenarioOutputColorSpace) {
3368
+ RenderHiResScenarioOutputColorSpace["Rgb"] = "Rgb";
3369
+ RenderHiResScenarioOutputColorSpace["Grayscale"] = "Grayscale";
3370
+ RenderHiResScenarioOutputColorSpace["Cmyk"] = "Cmyk";
3371
+ })(RenderHiResScenarioOutputColorSpace || (RenderHiResScenarioOutputColorSpace = {}));
3372
+ var RenderHiResScenarioOutputFlipMode;
3373
+ (function (RenderHiResScenarioOutputFlipMode) {
3374
+ RenderHiResScenarioOutputFlipMode["None"] = "None";
3375
+ RenderHiResScenarioOutputFlipMode["Horizontal"] = "Horizontal";
3376
+ RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
3377
+ RenderHiResScenarioOutputFlipMode["Both"] = "Both";
3378
+ })(RenderHiResScenarioOutputFlipMode || (RenderHiResScenarioOutputFlipMode = {}));
3379
+ /** Available project processing statuses. */
3380
+ var ProjectProcessingStatus;
3381
+ (function (ProjectProcessingStatus) {
3382
+ ProjectProcessingStatus["Pending"] = "Pending";
3383
+ ProjectProcessingStatus["InProgress"] = "InProgress";
3384
+ ProjectProcessingStatus["Completed"] = "Completed";
3385
+ ProjectProcessingStatus["Failed"] = "Failed";
3386
+ })(ProjectProcessingStatus || (ProjectProcessingStatus = {}));
3044
3387
  /** Storefront types. */
3045
3388
  var StorefrontType;
3046
3389
  (function (StorefrontType) {
@@ -3132,5 +3475,5 @@ StorefrontModule.decorators = [
3132
3475
  * Generated bundle index. Do not edit.
3133
3476
  */
3134
3477
 
3135
- export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectProductResourceType, ProjectsApiClient, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient };
3478
+ export { API_BASE_URL, ApiClientBase, ApiClientConfiguration, ApiException, BuildInfoApiClient, CreateApiClientConfiguration, DatePeriod, ProductReferencesApiClient, ProductSpecificationsApiClient, ProjectItemResourceType, ProjectProcessingStatus, ProjectsApiClient, RenderHiResScenarioOutputColorSpace, RenderHiResScenarioOutputFlipMode, RenderHiResScenarioOutputFormat, StorefrontModule, StorefrontType, StorefrontUsersApiClient, StorefrontsApiClient, TenantInfoApiClient };
3136
3479
  //# sourceMappingURL=aurigma-ng-storefront-api-client.js.map