@aurigma/axios-storefront-api-client 2.22.30 → 2.23.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.
@@ -286,6 +286,14 @@ export interface IProjectsApiClient {
286
286
  * @return Success
287
287
  */
288
288
  delete(id: number, tenantId?: number | null | undefined): Promise<void>;
289
+ /**
290
+ * Creates a new project by 'Render HiRes' scenario.
291
+ * @param storefrontId Storefront identifier.
292
+ * @param tenantId (optional) Tenant identifier.
293
+ * @param body (optional) Create operation parameters.
294
+ * @return Success
295
+ */
296
+ createByRenderHiResScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectByRenderHiResScenarioDto | undefined): Promise<ProjectDto>;
289
297
  /**
290
298
  * Returns all available status transitions for a project.
291
299
  * @param id Project identifier.
@@ -328,6 +336,7 @@ export interface IProjectsApiClient {
328
336
  * @param designId Design identifier.
329
337
  * @param tenantId (optional) Tenant identifier.
330
338
  * @return Success
339
+ * @deprecated
331
340
  */
332
341
  getProjectPdfUrl(id: number, designUserId: string, designId: string, tenantId?: number | null | undefined): Promise<ProjectPdfResultDto>;
333
342
  /**
@@ -338,8 +347,30 @@ export interface IProjectsApiClient {
338
347
  * @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
339
348
  * @param tenantId (optional) Tenant identifier.
340
349
  * @return Success
350
+ * @deprecated
341
351
  */
342
352
  getProjectPdfZip(id: number, designUserId: string, designId: string, attachment?: boolean | null | undefined, tenantId?: number | null | undefined): Promise<FileResponse>;
353
+ /**
354
+ * Returns a project processing results.
355
+ * @param id Project identifier.
356
+ * @param tenantId (optional) Tenant identifier.
357
+ * @return Success
358
+ */
359
+ getProjectProcessingResults(id: number, tenantId?: number | null | undefined): Promise<ProjectProcessingResultsDto>;
360
+ /**
361
+ * Resumes project processing.
362
+ * @param id Project identifier.
363
+ * @param tenantId (optional) Tenant identifier.
364
+ * @return Success
365
+ */
366
+ resumeProjectProcessing(id: number, tenantId?: number | null | undefined): Promise<void>;
367
+ /**
368
+ * Restarts a project processing routine.
369
+ * @param id Project identifier.
370
+ * @param tenantId (optional) Tenant identifier.
371
+ * @return Success
372
+ */
373
+ restartProjectProcessing(id: number, tenantId?: number | null | undefined): Promise<void>;
343
374
  /**
344
375
  * Returns an order description from the ecommerce system for the specified project.
345
376
  * @param id Project identifier.
@@ -395,6 +426,15 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
395
426
  */
396
427
  delete(id: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
397
428
  protected processDelete(response: AxiosResponse): Promise<void>;
429
+ /**
430
+ * Creates a new project by 'Render HiRes' scenario.
431
+ * @param storefrontId Storefront identifier.
432
+ * @param tenantId (optional) Tenant identifier.
433
+ * @param body (optional) Create operation parameters.
434
+ * @return Success
435
+ */
436
+ createByRenderHiResScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectByRenderHiResScenarioDto | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectDto>;
437
+ protected processCreateByRenderHiResScenario(response: AxiosResponse): Promise<ProjectDto>;
398
438
  /**
399
439
  * Returns all available status transitions for a project.
400
440
  * @param id Project identifier.
@@ -442,6 +482,7 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
442
482
  * @param designId Design identifier.
443
483
  * @param tenantId (optional) Tenant identifier.
444
484
  * @return Success
485
+ * @deprecated
445
486
  */
446
487
  getProjectPdfUrl(id: number, designUserId: string, designId: string, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectPdfResultDto>;
447
488
  protected processGetProjectPdfUrl(response: AxiosResponse): Promise<ProjectPdfResultDto>;
@@ -453,9 +494,34 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
453
494
  * @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
454
495
  * @param tenantId (optional) Tenant identifier.
455
496
  * @return Success
497
+ * @deprecated
456
498
  */
457
499
  getProjectPdfZip(id: number, designUserId: string, designId: string, attachment?: boolean | null | undefined, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
458
500
  protected processGetProjectPdfZip(response: AxiosResponse): Promise<FileResponse>;
501
+ /**
502
+ * Returns a project processing results.
503
+ * @param id Project identifier.
504
+ * @param tenantId (optional) Tenant identifier.
505
+ * @return Success
506
+ */
507
+ getProjectProcessingResults(id: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectProcessingResultsDto>;
508
+ protected processGetProjectProcessingResults(response: AxiosResponse): Promise<ProjectProcessingResultsDto>;
509
+ /**
510
+ * Resumes project processing.
511
+ * @param id Project identifier.
512
+ * @param tenantId (optional) Tenant identifier.
513
+ * @return Success
514
+ */
515
+ resumeProjectProcessing(id: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
516
+ protected processResumeProjectProcessing(response: AxiosResponse): Promise<void>;
517
+ /**
518
+ * Restarts a project processing routine.
519
+ * @param id Project identifier.
520
+ * @param tenantId (optional) Tenant identifier.
521
+ * @return Success
522
+ */
523
+ restartProjectProcessing(id: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
524
+ protected processRestartProjectProcessing(response: AxiosResponse): Promise<void>;
459
525
  /**
460
526
  * Returns an order description from the ecommerce system for the specified project.
461
527
  * @param id Project identifier.
@@ -779,10 +845,10 @@ export declare enum DatePeriod {
779
845
  Last30Days = "Last30Days"
780
846
  }
781
847
  /** Available product resource types */
782
- export declare enum ProjectProductResourceType {
783
- _0 = 0,
784
- _1 = 1,
785
- _2 = 2
848
+ export declare enum ProjectItemResourceType {
849
+ General = "General",
850
+ Preview = "Preview",
851
+ Hires = "Hires"
786
852
  }
787
853
  /** Dto class, containing information about a project item resource. */
788
854
  export interface ProjectItemResourceDto {
@@ -790,7 +856,7 @@ export interface ProjectItemResourceDto {
790
856
  resourceId?: string | null;
791
857
  /** Resource name. */
792
858
  name?: string | null;
793
- type?: ProjectProductResourceType;
859
+ type?: ProjectItemResourceType;
794
860
  }
795
861
  /** Dto class, containing information about a project item. */
796
862
  export interface ProjectItemDto {
@@ -863,7 +929,7 @@ export interface ProjectItemResourceParametersDto {
863
929
  url?: string | null;
864
930
  /** Resource name. */
865
931
  name?: string | null;
866
- type?: ProjectProductResourceType;
932
+ type?: ProjectItemResourceType;
867
933
  }
868
934
  /** Dto class, containing create operation paramters for a project item. */
869
935
  export interface ProjectItemParametersDto {
@@ -911,6 +977,65 @@ export interface CreateProjectDto {
911
977
  /** Description of the project. */
912
978
  description?: string | null;
913
979
  }
980
+ /** Dto class, containing ecommerce order description. */
981
+ export interface OrderDetailsDto {
982
+ /** Order identifier in ecommerce system. */
983
+ orderId?: string | null;
984
+ /** Order url in ecommerce system. */
985
+ orderUrl?: string | null;
986
+ /** Order number in ecommerce system. */
987
+ orderNumber?: number | null;
988
+ /** Line item index from ecommerce system order. */
989
+ orderLineItemIndex?: number | null;
990
+ /** Line Item identifier from ecommerce system order. */
991
+ orderLineItemId?: string | null;
992
+ /** Customer identifier in ecommerce system. */
993
+ customerId?: string | null;
994
+ /** Customer name in ecommerce system. */
995
+ customerName?: string | null;
996
+ }
997
+ export declare enum RenderHiResScenarioOutputFormat {
998
+ Pdf = "Pdf",
999
+ Jpeg = "Jpeg",
1000
+ Png = "Png",
1001
+ Tiff = "Tiff"
1002
+ }
1003
+ export declare enum RenderHiResScenarioOutputColorSpace {
1004
+ Rgb = "Rgb",
1005
+ Grayscale = "Grayscale",
1006
+ Cmyk = "Cmyk"
1007
+ }
1008
+ export declare enum RenderHiResScenarioOutputFlipMode {
1009
+ None = "None",
1010
+ Horizontal = "Horizontal",
1011
+ Vertical = "Vertical",
1012
+ Both = "Both"
1013
+ }
1014
+ /** Dto class, containing 'RenderHiRes' scenario paramters. */
1015
+ export interface RenderHiResScenarioDto {
1016
+ /** Private design identifier. */
1017
+ designId: string;
1018
+ /** Output file name (without extension). */
1019
+ name?: string | null;
1020
+ /** Output file DPI. */
1021
+ dpi?: number;
1022
+ format?: RenderHiResScenarioOutputFormat;
1023
+ colorSpace?: RenderHiResScenarioOutputColorSpace;
1024
+ flipMode?: RenderHiResScenarioOutputFlipMode;
1025
+ /** Output file access mode. */
1026
+ anonymousAccess?: boolean | null;
1027
+ }
1028
+ /** Dto class, containing 'create' operation parameters for project entity. */
1029
+ export interface CreateProjectByRenderHiResScenarioDto {
1030
+ /** Project owner identifier. */
1031
+ ownerId: string;
1032
+ /** Project name. */
1033
+ name?: string | null;
1034
+ /** Description of the project. */
1035
+ description?: string | null;
1036
+ orderDetails?: OrderDetailsDto;
1037
+ scenario: RenderHiResScenarioDto;
1038
+ }
914
1039
  /** Project transition dto class. */
915
1040
  export interface ProjectTransitionDto {
916
1041
  /** Transition identifying name. */
@@ -953,6 +1078,34 @@ export interface ProjectPdfResultDto {
953
1078
  /** Project pdf url. */
954
1079
  url?: string | null;
955
1080
  }
1081
+ /** Available project processing statuses. */
1082
+ export declare enum ProjectProcessingStatus {
1083
+ Pending = "Pending",
1084
+ InProgress = "InProgress",
1085
+ Completed = "Completed",
1086
+ Failed = "Failed"
1087
+ }
1088
+ /** Dto class, containing description of a project output file. */
1089
+ export interface ProjectOutputFileDetailsDto {
1090
+ /** Project output file URL. */
1091
+ url?: string | null;
1092
+ /** Project output file name */
1093
+ name?: string | null;
1094
+ /** Project output file format */
1095
+ format?: string | null;
1096
+ /** Project output file id withing artifacts storage. */
1097
+ artifactId?: string | null;
1098
+ /** Project output file access strategy. */
1099
+ anonymousAccess?: boolean;
1100
+ }
1101
+ /** Dto class, containing description of project processing results. */
1102
+ export interface ProjectProcessingResultsDto {
1103
+ status?: ProjectProcessingStatus;
1104
+ /** Project status description. */
1105
+ statusDescription?: string | null;
1106
+ /** Collection of project output file descriptions. */
1107
+ outputFileDetails?: ProjectOutputFileDetailsDto[] | null;
1108
+ }
956
1109
  /** Storefront types. */
957
1110
  export declare enum StorefrontType {
958
1111
  Custom = "Custom",
@@ -8,7 +8,7 @@
8
8
  //----------------------
9
9
  // ReSharper disable InconsistentNaming
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
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;
11
+ exports.ApiException = exports.StorefrontType = exports.ProjectProcessingStatus = exports.RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputColorSpace = exports.RenderHiResScenarioOutputFormat = exports.ProjectItemResourceType = 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;
@@ -1296,6 +1296,84 @@ class ProjectsApiClient extends ApiClientBase {
1296
1296
  }
1297
1297
  return Promise.resolve(null);
1298
1298
  }
1299
+ /**
1300
+ * Creates a new project by 'Render HiRes' scenario.
1301
+ * @param storefrontId Storefront identifier.
1302
+ * @param tenantId (optional) Tenant identifier.
1303
+ * @param body (optional) Create operation parameters.
1304
+ * @return Success
1305
+ */
1306
+ createByRenderHiResScenario(storefrontId, tenantId, body, cancelToken) {
1307
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/by-scenario/render-hires?";
1308
+ if (storefrontId === undefined || storefrontId === null)
1309
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1310
+ else
1311
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1312
+ if (tenantId !== undefined && tenantId !== null)
1313
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1314
+ url_ = url_.replace(/[?&]$/, "");
1315
+ const content_ = JSON.stringify(body);
1316
+ let options_ = {
1317
+ data: content_,
1318
+ method: "POST",
1319
+ url: url_,
1320
+ headers: {
1321
+ "Content-Type": "application/json-patch+json",
1322
+ "Accept": "text/plain"
1323
+ },
1324
+ cancelToken
1325
+ };
1326
+ return this.transformOptions(options_).then(transformedOptions_ => {
1327
+ return this.instance.request(transformedOptions_);
1328
+ }).catch((_error) => {
1329
+ if (isAxiosError(_error) && _error.response) {
1330
+ return _error.response;
1331
+ }
1332
+ else {
1333
+ throw _error;
1334
+ }
1335
+ }).then((_response) => {
1336
+ return this.transformResult(url_, _response, (_response) => this.processCreateByRenderHiResScenario(_response));
1337
+ });
1338
+ }
1339
+ processCreateByRenderHiResScenario(response) {
1340
+ const status = response.status;
1341
+ let _headers = {};
1342
+ if (response.headers && typeof response.headers === "object") {
1343
+ for (let k in response.headers) {
1344
+ if (response.headers.hasOwnProperty(k)) {
1345
+ _headers[k] = response.headers[k];
1346
+ }
1347
+ }
1348
+ }
1349
+ if (status === 201) {
1350
+ const _responseText = response.data;
1351
+ let result201 = null;
1352
+ let resultData201 = _responseText;
1353
+ result201 = JSON.parse(resultData201);
1354
+ return Promise.resolve(result201);
1355
+ }
1356
+ else if (status === 409) {
1357
+ const _responseText = response.data;
1358
+ let result409 = null;
1359
+ let resultData409 = _responseText;
1360
+ result409 = JSON.parse(resultData409);
1361
+ return throwException("Conflict", status, _responseText, _headers, result409);
1362
+ }
1363
+ else if (status === 401) {
1364
+ const _responseText = response.data;
1365
+ return throwException("Unauthorized", status, _responseText, _headers);
1366
+ }
1367
+ else if (status === 403) {
1368
+ const _responseText = response.data;
1369
+ return throwException("Forbidden", status, _responseText, _headers);
1370
+ }
1371
+ else if (status !== 200 && status !== 204) {
1372
+ const _responseText = response.data;
1373
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1374
+ }
1375
+ return Promise.resolve(null);
1376
+ }
1299
1377
  /**
1300
1378
  * Returns all available status transitions for a project.
1301
1379
  * @param id Project identifier.
@@ -1689,6 +1767,7 @@ class ProjectsApiClient extends ApiClientBase {
1689
1767
  * @param designId Design identifier.
1690
1768
  * @param tenantId (optional) Tenant identifier.
1691
1769
  * @return Success
1770
+ * @deprecated
1692
1771
  */
1693
1772
  getProjectPdfUrl(id, designUserId, designId, tenantId, cancelToken) {
1694
1773
  let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf?";
@@ -1766,6 +1845,7 @@ class ProjectsApiClient extends ApiClientBase {
1766
1845
  * @param attachment (optional) If set to 'true', the requested file will be provided as an attachment with proper filename supplied (default value is 'false').
1767
1846
  * @param tenantId (optional) Tenant identifier.
1768
1847
  * @return Success
1848
+ * @deprecated
1769
1849
  */
1770
1850
  getProjectPdfZip(id, designUserId, designId, attachment, tenantId, cancelToken) {
1771
1851
  let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/project-pdf-zip?";
@@ -1844,6 +1924,215 @@ class ProjectsApiClient extends ApiClientBase {
1844
1924
  }
1845
1925
  return Promise.resolve(null);
1846
1926
  }
1927
+ /**
1928
+ * Returns a project processing results.
1929
+ * @param id Project identifier.
1930
+ * @param tenantId (optional) Tenant identifier.
1931
+ * @return Success
1932
+ */
1933
+ getProjectProcessingResults(id, tenantId, cancelToken) {
1934
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/processing-results?";
1935
+ if (id === undefined || id === null)
1936
+ throw new Error("The parameter 'id' must be defined.");
1937
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
1938
+ if (tenantId !== undefined && tenantId !== null)
1939
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1940
+ url_ = url_.replace(/[?&]$/, "");
1941
+ let options_ = {
1942
+ method: "GET",
1943
+ url: url_,
1944
+ headers: {
1945
+ "Accept": "text/plain"
1946
+ },
1947
+ cancelToken
1948
+ };
1949
+ return this.transformOptions(options_).then(transformedOptions_ => {
1950
+ return this.instance.request(transformedOptions_);
1951
+ }).catch((_error) => {
1952
+ if (isAxiosError(_error) && _error.response) {
1953
+ return _error.response;
1954
+ }
1955
+ else {
1956
+ throw _error;
1957
+ }
1958
+ }).then((_response) => {
1959
+ return this.transformResult(url_, _response, (_response) => this.processGetProjectProcessingResults(_response));
1960
+ });
1961
+ }
1962
+ processGetProjectProcessingResults(response) {
1963
+ const status = response.status;
1964
+ let _headers = {};
1965
+ if (response.headers && typeof response.headers === "object") {
1966
+ for (let k in response.headers) {
1967
+ if (response.headers.hasOwnProperty(k)) {
1968
+ _headers[k] = response.headers[k];
1969
+ }
1970
+ }
1971
+ }
1972
+ if (status === 200) {
1973
+ const _responseText = response.data;
1974
+ let result200 = null;
1975
+ let resultData200 = _responseText;
1976
+ result200 = JSON.parse(resultData200);
1977
+ return Promise.resolve(result200);
1978
+ }
1979
+ else if (status === 404) {
1980
+ const _responseText = response.data;
1981
+ let result404 = null;
1982
+ let resultData404 = _responseText;
1983
+ result404 = JSON.parse(resultData404);
1984
+ return throwException("Not Found", status, _responseText, _headers, result404);
1985
+ }
1986
+ else if (status === 401) {
1987
+ const _responseText = response.data;
1988
+ return throwException("Unauthorized", status, _responseText, _headers);
1989
+ }
1990
+ else if (status === 403) {
1991
+ const _responseText = response.data;
1992
+ return throwException("Forbidden", status, _responseText, _headers);
1993
+ }
1994
+ else if (status !== 200 && status !== 204) {
1995
+ const _responseText = response.data;
1996
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1997
+ }
1998
+ return Promise.resolve(null);
1999
+ }
2000
+ /**
2001
+ * Resumes project processing.
2002
+ * @param id Project identifier.
2003
+ * @param tenantId (optional) Tenant identifier.
2004
+ * @return Success
2005
+ */
2006
+ resumeProjectProcessing(id, tenantId, cancelToken) {
2007
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/resume-processing?";
2008
+ if (id === undefined || id === null)
2009
+ throw new Error("The parameter 'id' must be defined.");
2010
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2011
+ if (tenantId !== undefined && tenantId !== null)
2012
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2013
+ url_ = url_.replace(/[?&]$/, "");
2014
+ let options_ = {
2015
+ method: "POST",
2016
+ url: url_,
2017
+ headers: {},
2018
+ cancelToken
2019
+ };
2020
+ return this.transformOptions(options_).then(transformedOptions_ => {
2021
+ return this.instance.request(transformedOptions_);
2022
+ }).catch((_error) => {
2023
+ if (isAxiosError(_error) && _error.response) {
2024
+ return _error.response;
2025
+ }
2026
+ else {
2027
+ throw _error;
2028
+ }
2029
+ }).then((_response) => {
2030
+ return this.transformResult(url_, _response, (_response) => this.processResumeProjectProcessing(_response));
2031
+ });
2032
+ }
2033
+ processResumeProjectProcessing(response) {
2034
+ const status = response.status;
2035
+ let _headers = {};
2036
+ if (response.headers && typeof response.headers === "object") {
2037
+ for (let k in response.headers) {
2038
+ if (response.headers.hasOwnProperty(k)) {
2039
+ _headers[k] = response.headers[k];
2040
+ }
2041
+ }
2042
+ }
2043
+ if (status === 204) {
2044
+ const _responseText = response.data;
2045
+ return Promise.resolve(null);
2046
+ }
2047
+ else if (status === 404) {
2048
+ const _responseText = response.data;
2049
+ let result404 = null;
2050
+ let resultData404 = _responseText;
2051
+ result404 = JSON.parse(resultData404);
2052
+ return throwException("Not Found", status, _responseText, _headers, result404);
2053
+ }
2054
+ else if (status === 401) {
2055
+ const _responseText = response.data;
2056
+ return throwException("Unauthorized", status, _responseText, _headers);
2057
+ }
2058
+ else if (status === 403) {
2059
+ const _responseText = response.data;
2060
+ return throwException("Forbidden", status, _responseText, _headers);
2061
+ }
2062
+ else if (status !== 200 && status !== 204) {
2063
+ const _responseText = response.data;
2064
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2065
+ }
2066
+ return Promise.resolve(null);
2067
+ }
2068
+ /**
2069
+ * Restarts a project processing routine.
2070
+ * @param id Project identifier.
2071
+ * @param tenantId (optional) Tenant identifier.
2072
+ * @return Success
2073
+ */
2074
+ restartProjectProcessing(id, tenantId, cancelToken) {
2075
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/{id}/restart-processing?";
2076
+ if (id === undefined || id === null)
2077
+ throw new Error("The parameter 'id' must be defined.");
2078
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2079
+ if (tenantId !== undefined && tenantId !== null)
2080
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2081
+ url_ = url_.replace(/[?&]$/, "");
2082
+ let options_ = {
2083
+ method: "POST",
2084
+ url: url_,
2085
+ headers: {},
2086
+ cancelToken
2087
+ };
2088
+ return this.transformOptions(options_).then(transformedOptions_ => {
2089
+ return this.instance.request(transformedOptions_);
2090
+ }).catch((_error) => {
2091
+ if (isAxiosError(_error) && _error.response) {
2092
+ return _error.response;
2093
+ }
2094
+ else {
2095
+ throw _error;
2096
+ }
2097
+ }).then((_response) => {
2098
+ return this.transformResult(url_, _response, (_response) => this.processRestartProjectProcessing(_response));
2099
+ });
2100
+ }
2101
+ processRestartProjectProcessing(response) {
2102
+ const status = response.status;
2103
+ let _headers = {};
2104
+ if (response.headers && typeof response.headers === "object") {
2105
+ for (let k in response.headers) {
2106
+ if (response.headers.hasOwnProperty(k)) {
2107
+ _headers[k] = response.headers[k];
2108
+ }
2109
+ }
2110
+ }
2111
+ if (status === 204) {
2112
+ const _responseText = response.data;
2113
+ return Promise.resolve(null);
2114
+ }
2115
+ else if (status === 404) {
2116
+ const _responseText = response.data;
2117
+ let result404 = null;
2118
+ let resultData404 = _responseText;
2119
+ result404 = JSON.parse(resultData404);
2120
+ return throwException("Not Found", status, _responseText, _headers, result404);
2121
+ }
2122
+ else if (status === 401) {
2123
+ const _responseText = response.data;
2124
+ return throwException("Unauthorized", status, _responseText, _headers);
2125
+ }
2126
+ else if (status === 403) {
2127
+ const _responseText = response.data;
2128
+ return throwException("Forbidden", status, _responseText, _headers);
2129
+ }
2130
+ else if (status !== 200 && status !== 204) {
2131
+ const _responseText = response.data;
2132
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2133
+ }
2134
+ return Promise.resolve(null);
2135
+ }
1847
2136
  /**
1848
2137
  * Returns an order description from the ecommerce system for the specified project.
1849
2138
  * @param id Project identifier.
@@ -2780,12 +3069,40 @@ var DatePeriod;
2780
3069
  DatePeriod["Last30Days"] = "Last30Days";
2781
3070
  })(DatePeriod = exports.DatePeriod || (exports.DatePeriod = {}));
2782
3071
  /** Available product resource types */
2783
- var ProjectProductResourceType;
2784
- (function (ProjectProductResourceType) {
2785
- ProjectProductResourceType[ProjectProductResourceType["_0"] = 0] = "_0";
2786
- ProjectProductResourceType[ProjectProductResourceType["_1"] = 1] = "_1";
2787
- ProjectProductResourceType[ProjectProductResourceType["_2"] = 2] = "_2";
2788
- })(ProjectProductResourceType = exports.ProjectProductResourceType || (exports.ProjectProductResourceType = {}));
3072
+ var ProjectItemResourceType;
3073
+ (function (ProjectItemResourceType) {
3074
+ ProjectItemResourceType["General"] = "General";
3075
+ ProjectItemResourceType["Preview"] = "Preview";
3076
+ ProjectItemResourceType["Hires"] = "Hires";
3077
+ })(ProjectItemResourceType = exports.ProjectItemResourceType || (exports.ProjectItemResourceType = {}));
3078
+ var RenderHiResScenarioOutputFormat;
3079
+ (function (RenderHiResScenarioOutputFormat) {
3080
+ RenderHiResScenarioOutputFormat["Pdf"] = "Pdf";
3081
+ RenderHiResScenarioOutputFormat["Jpeg"] = "Jpeg";
3082
+ RenderHiResScenarioOutputFormat["Png"] = "Png";
3083
+ RenderHiResScenarioOutputFormat["Tiff"] = "Tiff";
3084
+ })(RenderHiResScenarioOutputFormat = exports.RenderHiResScenarioOutputFormat || (exports.RenderHiResScenarioOutputFormat = {}));
3085
+ var RenderHiResScenarioOutputColorSpace;
3086
+ (function (RenderHiResScenarioOutputColorSpace) {
3087
+ RenderHiResScenarioOutputColorSpace["Rgb"] = "Rgb";
3088
+ RenderHiResScenarioOutputColorSpace["Grayscale"] = "Grayscale";
3089
+ RenderHiResScenarioOutputColorSpace["Cmyk"] = "Cmyk";
3090
+ })(RenderHiResScenarioOutputColorSpace = exports.RenderHiResScenarioOutputColorSpace || (exports.RenderHiResScenarioOutputColorSpace = {}));
3091
+ var RenderHiResScenarioOutputFlipMode;
3092
+ (function (RenderHiResScenarioOutputFlipMode) {
3093
+ RenderHiResScenarioOutputFlipMode["None"] = "None";
3094
+ RenderHiResScenarioOutputFlipMode["Horizontal"] = "Horizontal";
3095
+ RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
3096
+ RenderHiResScenarioOutputFlipMode["Both"] = "Both";
3097
+ })(RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputFlipMode || (exports.RenderHiResScenarioOutputFlipMode = {}));
3098
+ /** Available project processing statuses. */
3099
+ var ProjectProcessingStatus;
3100
+ (function (ProjectProcessingStatus) {
3101
+ ProjectProcessingStatus["Pending"] = "Pending";
3102
+ ProjectProcessingStatus["InProgress"] = "InProgress";
3103
+ ProjectProcessingStatus["Completed"] = "Completed";
3104
+ ProjectProcessingStatus["Failed"] = "Failed";
3105
+ })(ProjectProcessingStatus = exports.ProjectProcessingStatus || (exports.ProjectProcessingStatus = {}));
2789
3106
  /** Storefront types. */
2790
3107
  var StorefrontType;
2791
3108
  (function (StorefrontType) {