@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. */
@@ -615,14 +615,14 @@ export class ProductReferencesApiClient extends ApiClientBase {
615
615
  const _responseText = response.data;
616
616
  let result200 = null;
617
617
  let resultData200 = _responseText;
618
- result200 = JSON.parse(resultData200);
618
+ result200 = resultData200;
619
619
  return Promise.resolve(result200);
620
620
  }
621
621
  else if (status === 404) {
622
622
  const _responseText = response.data;
623
623
  let result404 = null;
624
624
  let resultData404 = _responseText;
625
- result404 = JSON.parse(resultData404);
625
+ result404 = resultData404;
626
626
  return throwException("Not Found", status, _responseText, _headers, result404);
627
627
  }
628
628
  else if (status === 401) {
@@ -939,14 +939,14 @@ export class ProductSpecificationsApiClient extends ApiClientBase {
939
939
  const _responseText = response.data;
940
940
  let result200 = null;
941
941
  let resultData200 = _responseText;
942
- result200 = JSON.parse(resultData200);
942
+ result200 = resultData200;
943
943
  return Promise.resolve(result200);
944
944
  }
945
945
  else if (status === 404) {
946
946
  const _responseText = response.data;
947
947
  let result404 = null;
948
948
  let resultData404 = _responseText;
949
- result404 = JSON.parse(resultData404);
949
+ result404 = resultData404;
950
950
  return throwException("Not Found", status, _responseText, _headers, result404);
951
951
  }
952
952
  else if (status === 401) {
@@ -984,11 +984,12 @@ export class ProjectsApiClient extends ApiClientBase {
984
984
  * @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
985
985
  * @param search (optional) Search string for partial match.
986
986
  * @param orderId (optional) Identifier of corresponding order.
987
+ * @param processingStatus (optional) Project processing status filter.
987
988
  * @param storefrontId (optional) Storefront identifier.
988
989
  * @param tenantId (optional) Tenant identifier.
989
990
  * @return Success
990
991
  */
991
- getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, storefrontId, tenantId, cancelToken) {
992
+ getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, processingStatus, storefrontId, tenantId, cancelToken) {
992
993
  let url_ = this.baseUrl + "/api/storefront/v1/projects?";
993
994
  if (ownerId !== undefined && ownerId !== null)
994
995
  url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
@@ -1010,6 +1011,8 @@ export class ProjectsApiClient extends ApiClientBase {
1010
1011
  url_ += "search=" + encodeURIComponent("" + search) + "&";
1011
1012
  if (orderId !== undefined && orderId !== null)
1012
1013
  url_ += "orderId=" + encodeURIComponent("" + orderId) + "&";
1014
+ if (processingStatus !== undefined && processingStatus !== null)
1015
+ url_ += "processingStatus=" + encodeURIComponent("" + processingStatus) + "&";
1013
1016
  if (storefrontId !== undefined && storefrontId !== null)
1014
1017
  url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1015
1018
  if (tenantId !== undefined && tenantId !== null)
@@ -1510,6 +1513,84 @@ export class ProjectsApiClient extends ApiClientBase {
1510
1513
  }
1511
1514
  return Promise.resolve(null);
1512
1515
  }
1516
+ /**
1517
+ * Creates a new project by 'Specific Pipeline' scenario.
1518
+ * @param storefrontId Storefront identifier.
1519
+ * @param tenantId (optional) Tenant identifier.
1520
+ * @param body (optional) Create operation parameters.
1521
+ * @return Success
1522
+ */
1523
+ createBySpecificPipelineScenario(storefrontId, tenantId, body, cancelToken) {
1524
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/by-scenario/specific-pipeline?";
1525
+ if (storefrontId === undefined || storefrontId === null)
1526
+ throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");
1527
+ else
1528
+ url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1529
+ if (tenantId !== undefined && tenantId !== null)
1530
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
1531
+ url_ = url_.replace(/[?&]$/, "");
1532
+ const content_ = JSON.stringify(body);
1533
+ let options_ = {
1534
+ data: content_,
1535
+ method: "POST",
1536
+ url: url_,
1537
+ headers: {
1538
+ "Content-Type": "application/json-patch+json",
1539
+ "Accept": "text/plain"
1540
+ },
1541
+ cancelToken
1542
+ };
1543
+ return this.transformOptions(options_).then(transformedOptions_ => {
1544
+ return this.instance.request(transformedOptions_);
1545
+ }).catch((_error) => {
1546
+ if (isAxiosError(_error) && _error.response) {
1547
+ return _error.response;
1548
+ }
1549
+ else {
1550
+ throw _error;
1551
+ }
1552
+ }).then((_response) => {
1553
+ return this.transformResult(url_, _response, (_response) => this.processCreateBySpecificPipelineScenario(_response));
1554
+ });
1555
+ }
1556
+ processCreateBySpecificPipelineScenario(response) {
1557
+ const status = response.status;
1558
+ let _headers = {};
1559
+ if (response.headers && typeof response.headers === "object") {
1560
+ for (let k in response.headers) {
1561
+ if (response.headers.hasOwnProperty(k)) {
1562
+ _headers[k] = response.headers[k];
1563
+ }
1564
+ }
1565
+ }
1566
+ if (status === 201) {
1567
+ const _responseText = response.data;
1568
+ let result201 = null;
1569
+ let resultData201 = _responseText;
1570
+ result201 = JSON.parse(resultData201);
1571
+ return Promise.resolve(result201);
1572
+ }
1573
+ else if (status === 409) {
1574
+ const _responseText = response.data;
1575
+ let result409 = null;
1576
+ let resultData409 = _responseText;
1577
+ result409 = JSON.parse(resultData409);
1578
+ return throwException("Conflict", status, _responseText, _headers, result409);
1579
+ }
1580
+ else if (status === 401) {
1581
+ const _responseText = response.data;
1582
+ return throwException("Unauthorized", status, _responseText, _headers);
1583
+ }
1584
+ else if (status === 403) {
1585
+ const _responseText = response.data;
1586
+ return throwException("Forbidden", status, _responseText, _headers);
1587
+ }
1588
+ else if (status !== 200 && status !== 204) {
1589
+ const _responseText = response.data;
1590
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1591
+ }
1592
+ return Promise.resolve(null);
1593
+ }
1513
1594
  /**
1514
1595
  * Returns all available status transitions for a project.
1515
1596
  * @param id Project identifier.
@@ -3273,6 +3354,14 @@ export var DatePeriod;
3273
3354
  DatePeriod["Last7Days"] = "Last7Days";
3274
3355
  DatePeriod["Last30Days"] = "Last30Days";
3275
3356
  })(DatePeriod || (DatePeriod = {}));
3357
+ /** Available project processing statuses. */
3358
+ export var ProjectProcessingStatus;
3359
+ (function (ProjectProcessingStatus) {
3360
+ ProjectProcessingStatus["Pending"] = "Pending";
3361
+ ProjectProcessingStatus["InProgress"] = "InProgress";
3362
+ ProjectProcessingStatus["Completed"] = "Completed";
3363
+ ProjectProcessingStatus["Failed"] = "Failed";
3364
+ })(ProjectProcessingStatus || (ProjectProcessingStatus = {}));
3276
3365
  /** Available product resource types */
3277
3366
  export var ProjectItemResourceType;
3278
3367
  (function (ProjectItemResourceType) {
@@ -3300,14 +3389,6 @@ export var RenderHiResScenarioOutputFlipMode;
3300
3389
  RenderHiResScenarioOutputFlipMode["Vertical"] = "Vertical";
3301
3390
  RenderHiResScenarioOutputFlipMode["Both"] = "Both";
3302
3391
  })(RenderHiResScenarioOutputFlipMode || (RenderHiResScenarioOutputFlipMode = {}));
3303
- /** Available project processing statuses. */
3304
- export var ProjectProcessingStatus;
3305
- (function (ProjectProcessingStatus) {
3306
- ProjectProcessingStatus["Pending"] = "Pending";
3307
- ProjectProcessingStatus["InProgress"] = "InProgress";
3308
- ProjectProcessingStatus["Completed"] = "Completed";
3309
- ProjectProcessingStatus["Failed"] = "Failed";
3310
- })(ProjectProcessingStatus || (ProjectProcessingStatus = {}));
3311
3392
  /** Available value types for order data item. */
3312
3393
  export var OrderDataItemValueType;
3313
3394
  (function (OrderDataItemValueType) {