@aurigma/axios-storefront-api-client 2.38.1 → 2.39.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.
@@ -259,11 +259,12 @@ export interface IProjectsApiClient {
259
259
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
260
260
  * @param search (optional) Search string for partial match.
261
261
  * @param orderId (optional) Identifier of corresponding order.
262
+ * @param processingStatus (optional) Project processing status filter.
262
263
  * @param storefrontId (optional) Storefront identifier.
263
264
  * @param tenantId (optional) Tenant identifier.
264
265
  * @return Success
265
266
  */
266
- getAll(ownerId?: string | null | undefined, productReference?: string | null | undefined, status?: number | null | undefined, datePeriod?: DatePeriod | undefined, skip?: number | null | undefined, take?: number | null | undefined, sorting?: string | null | undefined, search?: string | null | undefined, orderId?: string | null | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined): Promise<PagedOfProjectDto>;
267
+ getAll(ownerId?: string | null | undefined, productReference?: string | null | undefined, status?: number | null | undefined, datePeriod?: DatePeriod | undefined, skip?: number | null | undefined, take?: number | null | undefined, sorting?: string | null | undefined, search?: string | null | undefined, orderId?: string | null | undefined, processingStatus?: ProjectProcessingStatus | null | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined): Promise<PagedOfProjectDto>;
267
268
  /**
268
269
  * Creates a new project.
269
270
  * @param storefrontId Storefront identifier.
@@ -308,6 +309,14 @@ export interface IProjectsApiClient {
308
309
  * @return Success
309
310
  */
310
311
  createByRenderHiResScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectByRenderHiResScenarioDto | null | undefined): Promise<ProjectDto>;
312
+ /**
313
+ * Creates a new project by 'Specific Pipeline' scenario.
314
+ * @param storefrontId Storefront identifier.
315
+ * @param tenantId (optional) Tenant identifier.
316
+ * @param body (optional) Create operation parameters.
317
+ * @return Success
318
+ */
319
+ createBySpecificPipelineScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectBySpecificPipelineScenarioDto | null | undefined): Promise<ProjectDto>;
311
320
  /**
312
321
  * Returns all available status transitions for a project.
313
322
  * @param id Project identifier.
@@ -417,11 +426,12 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
417
426
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
418
427
  * @param search (optional) Search string for partial match.
419
428
  * @param orderId (optional) Identifier of corresponding order.
429
+ * @param processingStatus (optional) Project processing status filter.
420
430
  * @param storefrontId (optional) Storefront identifier.
421
431
  * @param tenantId (optional) Tenant identifier.
422
432
  * @return Success
423
433
  */
424
- getAll(ownerId?: string | null | undefined, productReference?: string | null | undefined, status?: number | null | undefined, datePeriod?: DatePeriod | undefined, skip?: number | null | undefined, take?: number | null | undefined, sorting?: string | null | undefined, search?: string | null | undefined, orderId?: string | null | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<PagedOfProjectDto>;
434
+ getAll(ownerId?: string | null | undefined, productReference?: string | null | undefined, status?: number | null | undefined, datePeriod?: DatePeriod | undefined, skip?: number | null | undefined, take?: number | null | undefined, sorting?: string | null | undefined, search?: string | null | undefined, orderId?: string | null | undefined, processingStatus?: ProjectProcessingStatus | null | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<PagedOfProjectDto>;
425
435
  protected processGetAll(response: AxiosResponse): Promise<PagedOfProjectDto>;
426
436
  /**
427
437
  * Creates a new project.
@@ -473,6 +483,15 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
473
483
  */
474
484
  createByRenderHiResScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectByRenderHiResScenarioDto | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectDto>;
475
485
  protected processCreateByRenderHiResScenario(response: AxiosResponse): Promise<ProjectDto>;
486
+ /**
487
+ * Creates a new project by 'Specific Pipeline' scenario.
488
+ * @param storefrontId Storefront identifier.
489
+ * @param tenantId (optional) Tenant identifier.
490
+ * @param body (optional) Create operation parameters.
491
+ * @return Success
492
+ */
493
+ createBySpecificPipelineScenario(storefrontId: number, tenantId?: number | null | undefined, body?: CreateProjectBySpecificPipelineScenarioDto | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectDto>;
494
+ protected processCreateBySpecificPipelineScenario(response: AxiosResponse): Promise<ProjectDto>;
476
495
  /**
477
496
  * Returns all available status transitions for a project.
478
497
  * @param id Project identifier.
@@ -891,6 +910,13 @@ export declare enum DatePeriod {
891
910
  Last7Days = "Last7Days",
892
911
  Last30Days = "Last30Days"
893
912
  }
913
+ /** Available project processing statuses. */
914
+ export declare enum ProjectProcessingStatus {
915
+ Pending = "Pending",
916
+ InProgress = "InProgress",
917
+ Completed = "Completed",
918
+ Failed = "Failed"
919
+ }
894
920
  /** Available product resource types */
895
921
  export declare enum ProjectItemResourceType {
896
922
  General = "General",
@@ -963,6 +989,8 @@ export interface ProjectDto {
963
989
  lastModified?: string | null;
964
990
  /** Description of the project. */
965
991
  description?: string | null;
992
+ /** Project processing status. */
993
+ processingStatus?: ProjectProcessingStatus;
966
994
  }
967
995
  /** Paged list of items. */
968
996
  export interface PagedOfProjectDto {
@@ -982,7 +1010,7 @@ export interface ProjectItemResourceParametersDto {
982
1010
  /** Original resource identifier. */
983
1011
  resourceId?: string | null;
984
1012
  }
985
- /** Dto class, containing create operation paramters for a project item. */
1013
+ /** Dto class, containing create operation parameters for a project item. */
986
1014
  export interface ProjectItemParametersDto {
987
1015
  /** Item name. */
988
1016
  name?: string | null;
@@ -1062,7 +1090,7 @@ export declare enum RenderHiResScenarioOutputFlipMode {
1062
1090
  Vertical = "Vertical",
1063
1091
  Both = "Both"
1064
1092
  }
1065
- /** Dto class, containing 'RenderHiRes' scenario paramters. */
1093
+ /** Dto class, containing 'RenderHiRes' scenario parameters. */
1066
1094
  export interface RenderHiResScenarioDto {
1067
1095
  /** Private design identifier. */
1068
1096
  designId: string;
@@ -1092,6 +1120,26 @@ export interface CreateProjectByRenderHiResScenarioDto {
1092
1120
  /** List of project items. */
1093
1121
  scenario: RenderHiResScenarioDto;
1094
1122
  }
1123
+ /** Dto class, containing 'Specific Pipeline' scenario parameters. */
1124
+ export interface SpecificPipelineScenarioDto {
1125
+ /** An existing processing pipeline identifier. */
1126
+ pipelineId?: number;
1127
+ }
1128
+ /** Dto class, containing 'create' operation parameters for a new project that should be created by executing 'Specific Pipeline' scenario. <seealso cref="T:BackOffice.Web.PublicApi.ApiStorefront.Models.CreateProjectDto" /> */
1129
+ export interface CreateProjectBySpecificPipelineScenarioDto {
1130
+ /** Project owner identifier. */
1131
+ ownerId: string;
1132
+ /** Project name. */
1133
+ name?: string | null;
1134
+ /** Description of the project. */
1135
+ description?: string | null;
1136
+ /** Ecommerce system order description. */
1137
+ orderDetails?: OrderDetailsDto | null;
1138
+ /** List of project items. */
1139
+ items?: ProjectItemParametersDto[] | null;
1140
+ /** 'Specific Pipeline' scenario params. <seealso cref="T:BackOffice.Web.PublicApi.ApiStorefront.Models.SpecificPipelineScenarioDto" /> */
1141
+ scenario: SpecificPipelineScenarioDto;
1142
+ }
1095
1143
  /** Project transition dto class. */
1096
1144
  export interface ProjectTransitionDto {
1097
1145
  /** Transition identifying name. */
@@ -1134,13 +1182,6 @@ export interface ProjectPdfResultDto {
1134
1182
  /** Project pdf url. */
1135
1183
  url?: string | null;
1136
1184
  }
1137
- /** Available project processing statuses. */
1138
- export declare enum ProjectProcessingStatus {
1139
- Pending = "Pending",
1140
- InProgress = "InProgress",
1141
- Completed = "Completed",
1142
- Failed = "Failed"
1143
- }
1144
1185
  /** Dto class, containing description of a project output file. */
1145
1186
  export interface ProjectOutputFileDetailsDto {
1146
1187
  /** Project output file URL. */
@@ -1255,6 +1296,8 @@ export interface TenantApplicationsInfoDto {
1255
1296
  uiFrameworkUrl?: string | null;
1256
1297
  /** An url to the 'Simple editor'. */
1257
1298
  simpleEditorUrl?: string | null;
1299
+ /** An url to the 'Handy editor'. */
1300
+ handyEditorUrl?: string | null;
1258
1301
  /** An url to the 'Preflight' tenant application. */
1259
1302
  preflightUrl?: string | null;
1260
1303
  /** An url to the 'Dynamic Image' tenant application. */
@@ -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.OrderDataItemValueType = 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;
11
+ exports.ApiException = exports.StorefrontType = exports.OrderDataItemValueType = exports.RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputColorSpace = exports.RenderHiResScenarioOutputFormat = exports.ProjectItemResourceType = exports.ProjectProcessingStatus = 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;
@@ -621,14 +621,14 @@ class ProductReferencesApiClient extends ApiClientBase {
621
621
  const _responseText = response.data;
622
622
  let result200 = null;
623
623
  let resultData200 = _responseText;
624
- result200 = JSON.parse(resultData200);
624
+ result200 = resultData200;
625
625
  return Promise.resolve(result200);
626
626
  }
627
627
  else if (status === 404) {
628
628
  const _responseText = response.data;
629
629
  let result404 = null;
630
630
  let resultData404 = _responseText;
631
- result404 = JSON.parse(resultData404);
631
+ result404 = resultData404;
632
632
  return throwException("Not Found", status, _responseText, _headers, result404);
633
633
  }
634
634
  else if (status === 401) {
@@ -946,14 +946,14 @@ class ProductSpecificationsApiClient extends ApiClientBase {
946
946
  const _responseText = response.data;
947
947
  let result200 = null;
948
948
  let resultData200 = _responseText;
949
- result200 = JSON.parse(resultData200);
949
+ result200 = resultData200;
950
950
  return Promise.resolve(result200);
951
951
  }
952
952
  else if (status === 404) {
953
953
  const _responseText = response.data;
954
954
  let result404 = null;
955
955
  let resultData404 = _responseText;
956
- result404 = JSON.parse(resultData404);
956
+ result404 = resultData404;
957
957
  return throwException("Not Found", status, _responseText, _headers, result404);
958
958
  }
959
959
  else if (status === 401) {
@@ -992,11 +992,12 @@ class ProjectsApiClient extends ApiClientBase {
992
992
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
993
993
  * @param search (optional) Search string for partial match.
994
994
  * @param orderId (optional) Identifier of corresponding order.
995
+ * @param processingStatus (optional) Project processing status filter.
995
996
  * @param storefrontId (optional) Storefront identifier.
996
997
  * @param tenantId (optional) Tenant identifier.
997
998
  * @return Success
998
999
  */
999
- getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, storefrontId, tenantId, cancelToken) {
1000
+ getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, processingStatus, storefrontId, tenantId, cancelToken) {
1000
1001
  let url_ = this.baseUrl + "/api/storefront/v1/projects?";
1001
1002
  if (ownerId !== undefined && ownerId !== null)
1002
1003
  url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
@@ -1018,6 +1019,8 @@ class ProjectsApiClient extends ApiClientBase {
1018
1019
  url_ += "search=" + encodeURIComponent("" + search) + "&";
1019
1020
  if (orderId !== undefined && orderId !== null)
1020
1021
  url_ += "orderId=" + encodeURIComponent("" + orderId) + "&";
1022
+ if (processingStatus !== undefined && processingStatus !== null)
1023
+ url_ += "processingStatus=" + encodeURIComponent("" + processingStatus) + "&";
1021
1024
  if (storefrontId !== undefined && storefrontId !== null)
1022
1025
  url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1023
1026
  if (tenantId !== undefined && tenantId !== null)
@@ -1518,6 +1521,84 @@ class ProjectsApiClient extends ApiClientBase {
1518
1521
  }
1519
1522
  return Promise.resolve(null);
1520
1523
  }
1524
+ /**
1525
+ * Creates a new project by 'Specific Pipeline' scenario.
1526
+ * @param storefrontId Storefront identifier.
1527
+ * @param tenantId (optional) Tenant identifier.
1528
+ * @param body (optional) Create operation parameters.
1529
+ * @return Success
1530
+ */
1531
+ createBySpecificPipelineScenario(storefrontId, tenantId, body, cancelToken) {
1532
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/by-scenario/specific-pipeline?";
1533
+ if (storefrontId === undefined || storefrontId === null)
1534
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1535
+ else
1536
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1537
+ if (tenantId !== undefined && tenantId !== null)
1538
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1539
+ url_ = url_.replace(/[?&]$/, "");
1540
+ const content_ = JSON.stringify(body);
1541
+ let options_ = {
1542
+ data: content_,
1543
+ method: "POST",
1544
+ url: url_,
1545
+ headers: {
1546
+ "Content-Type": "application/json-patch+json",
1547
+ "Accept": "text/plain"
1548
+ },
1549
+ cancelToken
1550
+ };
1551
+ return this.transformOptions(options_).then(transformedOptions_ => {
1552
+ return this.instance.request(transformedOptions_);
1553
+ }).catch((_error) => {
1554
+ if (isAxiosError(_error) && _error.response) {
1555
+ return _error.response;
1556
+ }
1557
+ else {
1558
+ throw _error;
1559
+ }
1560
+ }).then((_response) => {
1561
+ return this.transformResult(url_, _response, (_response) => this.processCreateBySpecificPipelineScenario(_response));
1562
+ });
1563
+ }
1564
+ processCreateBySpecificPipelineScenario(response) {
1565
+ const status = response.status;
1566
+ let _headers = {};
1567
+ if (response.headers && typeof response.headers === "object") {
1568
+ for (let k in response.headers) {
1569
+ if (response.headers.hasOwnProperty(k)) {
1570
+ _headers[k] = response.headers[k];
1571
+ }
1572
+ }
1573
+ }
1574
+ if (status === 201) {
1575
+ const _responseText = response.data;
1576
+ let result201 = null;
1577
+ let resultData201 = _responseText;
1578
+ result201 = JSON.parse(resultData201);
1579
+ return Promise.resolve(result201);
1580
+ }
1581
+ else if (status === 409) {
1582
+ const _responseText = response.data;
1583
+ let result409 = null;
1584
+ let resultData409 = _responseText;
1585
+ result409 = JSON.parse(resultData409);
1586
+ return throwException("Conflict", status, _responseText, _headers, result409);
1587
+ }
1588
+ else if (status === 401) {
1589
+ const _responseText = response.data;
1590
+ return throwException("Unauthorized", status, _responseText, _headers);
1591
+ }
1592
+ else if (status === 403) {
1593
+ const _responseText = response.data;
1594
+ return throwException("Forbidden", status, _responseText, _headers);
1595
+ }
1596
+ else if (status !== 200 && status !== 204) {
1597
+ const _responseText = response.data;
1598
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1599
+ }
1600
+ return Promise.resolve(null);
1601
+ }
1521
1602
  /**
1522
1603
  * Returns all available status transitions for a project.
1523
1604
  * @param id Project identifier.
@@ -3285,6 +3366,14 @@ var DatePeriod;
3285
3366
  DatePeriod["Last7Days"] = "Last7Days";
3286
3367
  DatePeriod["Last30Days"] = "Last30Days";
3287
3368
  })(DatePeriod = exports.DatePeriod || (exports.DatePeriod = {}));
3369
+ /** Available project processing statuses. */
3370
+ var ProjectProcessingStatus;
3371
+ (function (ProjectProcessingStatus) {
3372
+ ProjectProcessingStatus["Pending"] = "Pending";
3373
+ ProjectProcessingStatus["InProgress"] = "InProgress";
3374
+ ProjectProcessingStatus["Completed"] = "Completed";
3375
+ ProjectProcessingStatus["Failed"] = "Failed";
3376
+ })(ProjectProcessingStatus = exports.ProjectProcessingStatus || (exports.ProjectProcessingStatus = {}));
3288
3377
  /** Available product resource types */
3289
3378
  var ProjectItemResourceType;
3290
3379
  (function (ProjectItemResourceType) {
@@ -3312,14 +3401,6 @@ var RenderHiResScenarioOutputFlipMode;
3312
3401
  RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
3313
3402
  RenderHiResScenarioOutputFlipMode["Both"] = "Both";
3314
3403
  })(RenderHiResScenarioOutputFlipMode = exports.RenderHiResScenarioOutputFlipMode || (exports.RenderHiResScenarioOutputFlipMode = {}));
3315
- /** Available project processing statuses. */
3316
- var ProjectProcessingStatus;
3317
- (function (ProjectProcessingStatus) {
3318
- ProjectProcessingStatus["Pending"] = "Pending";
3319
- ProjectProcessingStatus["InProgress"] = "InProgress";
3320
- ProjectProcessingStatus["Completed"] = "Completed";
3321
- ProjectProcessingStatus["Failed"] = "Failed";
3322
- })(ProjectProcessingStatus = exports.ProjectProcessingStatus || (exports.ProjectProcessingStatus = {}));
3323
3404
  /** Available value types for order data item. */
3324
3405
  var OrderDataItemValueType;
3325
3406
  (function (OrderDataItemValueType) {