@aurigma/axios-storefront-api-client 2.50.1 → 2.52.2

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.
@@ -338,11 +338,12 @@ export interface IProjectsApiClient {
338
338
  * @param search (optional) Search string for partial match.
339
339
  * @param orderId (optional) Identifier of corresponding order.
340
340
  * @param processingStatus (optional) Project processing status filter.
341
+ * @param includeObsolete (optional) Indicates if obsolete projects prepared to be removed should be included to result.
341
342
  * @param storefrontId (optional) Storefront identifier.
342
343
  * @param tenantId (optional) Tenant identifier.
343
344
  * @return Success
344
345
  */
345
- 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>;
346
+ 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, includeObsolete?: boolean | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined): Promise<PagedOfProjectDto>;
346
347
  /**
347
348
  * Returns a project by identifier.
348
349
  * @param id Project identifier.
@@ -426,6 +427,14 @@ export interface IProjectsApiClient {
426
427
  * @return Success
427
428
  */
428
429
  forceStatus(id: number, status: number, tenantId?: number | null | undefined): Promise<ProjectStatusDto>;
430
+ /**
431
+ * Deletes specified projects.
432
+ These projects will be hide from projects list immediately, but complete projects data cleaning will take some additional time.
433
+ * @param tenantId (optional) Tenant identifier.
434
+ * @param body (optional)
435
+ * @return Success
436
+ */
437
+ batchDelete(tenantId?: number | null | undefined, body?: BatchDeleteProjectsInput | null | undefined): Promise<PagedOfProjectStatusDto>;
429
438
  /**
430
439
  * Returns a list of all existing project statuses.
431
440
  * @param tenantId (optional) Tenant identifier.
@@ -517,11 +526,12 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
517
526
  * @param search (optional) Search string for partial match.
518
527
  * @param orderId (optional) Identifier of corresponding order.
519
528
  * @param processingStatus (optional) Project processing status filter.
529
+ * @param includeObsolete (optional) Indicates if obsolete projects prepared to be removed should be included to result.
520
530
  * @param storefrontId (optional) Storefront identifier.
521
531
  * @param tenantId (optional) Tenant identifier.
522
532
  * @return Success
523
533
  */
524
- 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>;
534
+ 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, includeObsolete?: boolean | undefined, storefrontId?: number | null | undefined, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<PagedOfProjectDto>;
525
535
  protected processGetAll(response: AxiosResponse): Promise<PagedOfProjectDto>;
526
536
  /**
527
537
  * Returns a project by identifier.
@@ -617,6 +627,15 @@ export declare class ProjectsApiClient extends ApiClientBase implements IProject
617
627
  */
618
628
  forceStatus(id: number, status: number, tenantId?: number | null | undefined, cancelToken?: CancelToken | undefined): Promise<ProjectStatusDto>;
619
629
  protected processForceStatus(response: AxiosResponse): Promise<ProjectStatusDto>;
630
+ /**
631
+ * Deletes specified projects.
632
+ These projects will be hide from projects list immediately, but complete projects data cleaning will take some additional time.
633
+ * @param tenantId (optional) Tenant identifier.
634
+ * @param body (optional)
635
+ * @return Success
636
+ */
637
+ batchDelete(tenantId?: number | null | undefined, body?: BatchDeleteProjectsInput | null | undefined, cancelToken?: CancelToken | undefined): Promise<PagedOfProjectStatusDto>;
638
+ protected processBatchDelete(response: AxiosResponse): Promise<PagedOfProjectStatusDto>;
620
639
  /**
621
640
  * Returns a list of all existing project statuses.
622
641
  * @param tenantId (optional) Tenant identifier.
@@ -1159,6 +1178,11 @@ export interface PagedOfProjectDto {
1159
1178
  /** Items list. */
1160
1179
  items?: ProjectDto[] | null;
1161
1180
  }
1181
+ /** Conflict descritpion. */
1182
+ export interface ConflictDto {
1183
+ /** Conflict description. */
1184
+ description?: string | null;
1185
+ }
1162
1186
  /** Dto class, containing create operation parameters for a project item resource. */
1163
1187
  export interface ProjectItemResourceParametersDto {
1164
1188
  /** Resource URL. */
@@ -1266,7 +1290,8 @@ export declare enum RenderHiResScenarioOutputFormat {
1266
1290
  Pdf = "Pdf",
1267
1291
  Jpeg = "Jpeg",
1268
1292
  Png = "Png",
1269
- Tiff = "Tiff"
1293
+ Tiff = "Tiff",
1294
+ Bmp = "Bmp"
1270
1295
  }
1271
1296
  export declare enum RenderHiResScenarioOutputColorSpace {
1272
1297
  Rgb = "Rgb",
@@ -1359,11 +1384,6 @@ export interface PagedOfProjectTransitionDto {
1359
1384
  /** Items list. */
1360
1385
  items?: ProjectTransitionDto[] | null;
1361
1386
  }
1362
- /** Dto class, containing information about the project transition conflict. */
1363
- export interface ProjectTransitionConflictDto {
1364
- /** A list of all available status transitions for the project. */
1365
- availableTransitions?: ProjectTransitionDto[] | null;
1366
- }
1367
1387
  /** Dto class, containing the information about project status. */
1368
1388
  export interface ProjectStatusDto {
1369
1389
  /** Status code. */
@@ -1371,6 +1391,18 @@ export interface ProjectStatusDto {
1371
1391
  /** Status display name. */
1372
1392
  displayName?: string | null;
1373
1393
  }
1394
+ /** Dto class, containing information about the project transition conflict. */
1395
+ export interface ProjectTransitionConflictDto {
1396
+ /** A list of all available status transitions for the project. */
1397
+ availableTransitions?: ProjectTransitionDto[] | null;
1398
+ /** Conflict description. */
1399
+ description?: string | null;
1400
+ }
1401
+ /** Dto class, containing parameters for the 'projects batch delete' operation. */
1402
+ export interface BatchDeleteProjectsInput {
1403
+ /** Identifiers of projects that should be deleted. */
1404
+ ids?: number[] | null;
1405
+ }
1374
1406
  /** Paged list of items. */
1375
1407
  export interface PagedOfProjectStatusDto {
1376
1408
  /** Items count. */
@@ -1292,11 +1292,12 @@ export class ProjectsApiClient extends ApiClientBase {
1292
1292
  * @param search (optional) Search string for partial match.
1293
1293
  * @param orderId (optional) Identifier of corresponding order.
1294
1294
  * @param processingStatus (optional) Project processing status filter.
1295
+ * @param includeObsolete (optional) Indicates if obsolete projects prepared to be removed should be included to result.
1295
1296
  * @param storefrontId (optional) Storefront identifier.
1296
1297
  * @param tenantId (optional) Tenant identifier.
1297
1298
  * @return Success
1298
1299
  */
1299
- getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, processingStatus, storefrontId, tenantId, cancelToken) {
1300
+ getAll(ownerId, productReference, status, datePeriod, skip, take, sorting, search, orderId, processingStatus, includeObsolete, storefrontId, tenantId, cancelToken) {
1300
1301
  let url_ = this.baseUrl + "/api/storefront/v1/projects?";
1301
1302
  if (ownerId !== undefined && ownerId !== null)
1302
1303
  url_ += "ownerId=" + encodeURIComponent("" + ownerId) + "&";
@@ -1320,6 +1321,10 @@ export class ProjectsApiClient extends ApiClientBase {
1320
1321
  url_ += "orderId=" + encodeURIComponent("" + orderId) + "&";
1321
1322
  if (processingStatus !== undefined && processingStatus !== null)
1322
1323
  url_ += "processingStatus=" + encodeURIComponent("" + processingStatus) + "&";
1324
+ if (includeObsolete === null)
1325
+ throw new Error("The parameter 'includeObsolete' cannot be null.");
1326
+ else if (includeObsolete !== undefined)
1327
+ url_ += "includeObsolete=" + encodeURIComponent("" + includeObsolete) + "&";
1323
1328
  if (storefrontId !== undefined && storefrontId !== null)
1324
1329
  url_ += "storefrontId=" + encodeURIComponent("" + storefrontId) + "&";
1325
1330
  if (tenantId !== undefined && tenantId !== null)
@@ -1436,6 +1441,13 @@ export class ProjectsApiClient extends ApiClientBase {
1436
1441
  result404 = JSON.parse(resultData404);
1437
1442
  return throwException("Not Found", status, _responseText, _headers, result404);
1438
1443
  }
1444
+ else if (status === 409) {
1445
+ const _responseText = response.data;
1446
+ let result409 = null;
1447
+ let resultData409 = _responseText;
1448
+ result409 = JSON.parse(resultData409);
1449
+ return throwException("Conflict", status, _responseText, _headers, result409);
1450
+ }
1439
1451
  else if (status === 401) {
1440
1452
  const _responseText = response.data;
1441
1453
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -1504,6 +1516,13 @@ export class ProjectsApiClient extends ApiClientBase {
1504
1516
  result404 = JSON.parse(resultData404);
1505
1517
  return throwException("Not Found", status, _responseText, _headers, result404);
1506
1518
  }
1519
+ else if (status === 409) {
1520
+ const _responseText = response.data;
1521
+ let result409 = null;
1522
+ let resultData409 = _responseText;
1523
+ result409 = JSON.parse(resultData409);
1524
+ return throwException("Conflict", status, _responseText, _headers, result409);
1525
+ }
1507
1526
  else if (status === 401) {
1508
1527
  const _responseText = response.data;
1509
1528
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -1577,6 +1596,13 @@ export class ProjectsApiClient extends ApiClientBase {
1577
1596
  result404 = JSON.parse(resultData404);
1578
1597
  return throwException("Not Found", status, _responseText, _headers, result404);
1579
1598
  }
1599
+ else if (status === 409) {
1600
+ const _responseText = response.data;
1601
+ let result409 = null;
1602
+ let resultData409 = _responseText;
1603
+ result409 = JSON.parse(resultData409);
1604
+ return throwException("Conflict", status, _responseText, _headers, result409);
1605
+ }
1580
1606
  else if (status === 401) {
1581
1607
  const _responseText = response.data;
1582
1608
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -1650,6 +1676,13 @@ export class ProjectsApiClient extends ApiClientBase {
1650
1676
  result404 = resultData404;
1651
1677
  return throwException("Not Found", status, _responseText, _headers, result404);
1652
1678
  }
1679
+ else if (status === 409) {
1680
+ const _responseText = response.data;
1681
+ let result409 = null;
1682
+ let resultData409 = _responseText;
1683
+ result409 = resultData409;
1684
+ return throwException("Conflict", status, _responseText, _headers, result409);
1685
+ }
1653
1686
  else if (status === 401) {
1654
1687
  const _responseText = response.data;
1655
1688
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2252,6 +2285,80 @@ export class ProjectsApiClient extends ApiClientBase {
2252
2285
  result404 = JSON.parse(resultData404);
2253
2286
  return throwException("Not Found", status, _responseText, _headers, result404);
2254
2287
  }
2288
+ else if (status === 409) {
2289
+ const _responseText = response.data;
2290
+ let result409 = null;
2291
+ let resultData409 = _responseText;
2292
+ result409 = JSON.parse(resultData409);
2293
+ return throwException("Conflict", status, _responseText, _headers, result409);
2294
+ }
2295
+ else if (status === 401) {
2296
+ const _responseText = response.data;
2297
+ return throwException("Unauthorized", status, _responseText, _headers);
2298
+ }
2299
+ else if (status === 403) {
2300
+ const _responseText = response.data;
2301
+ return throwException("Forbidden", status, _responseText, _headers);
2302
+ }
2303
+ else if (status !== 200 && status !== 204) {
2304
+ const _responseText = response.data;
2305
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2306
+ }
2307
+ return Promise.resolve(null);
2308
+ }
2309
+ /**
2310
+ * Deletes specified projects.
2311
+ These projects will be hide from projects list immediately, but complete projects data cleaning will take some additional time.
2312
+ * @param tenantId (optional) Tenant identifier.
2313
+ * @param body (optional)
2314
+ * @return Success
2315
+ */
2316
+ batchDelete(tenantId, body, cancelToken) {
2317
+ let url_ = this.baseUrl + "/api/storefront/v1/projects/batch-delete?";
2318
+ if (tenantId !== undefined && tenantId !== null)
2319
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2320
+ url_ = url_.replace(/[?&]$/, "");
2321
+ const content_ = JSON.stringify(body);
2322
+ let options_ = {
2323
+ data: content_,
2324
+ method: "DELETE",
2325
+ url: url_,
2326
+ headers: {
2327
+ "Content-Type": "application/json-patch+json",
2328
+ "Accept": "text/plain"
2329
+ },
2330
+ cancelToken
2331
+ };
2332
+ return this.transformOptions(options_).then(transformedOptions_ => {
2333
+ return this.instance.request(transformedOptions_);
2334
+ }).catch((_error) => {
2335
+ if (isAxiosError(_error) && _error.response) {
2336
+ return _error.response;
2337
+ }
2338
+ else {
2339
+ throw _error;
2340
+ }
2341
+ }).then((_response) => {
2342
+ return this.transformResult(url_, _response, (_response) => this.processBatchDelete(_response));
2343
+ });
2344
+ }
2345
+ processBatchDelete(response) {
2346
+ const status = response.status;
2347
+ let _headers = {};
2348
+ if (response.headers && typeof response.headers === "object") {
2349
+ for (let k in response.headers) {
2350
+ if (response.headers.hasOwnProperty(k)) {
2351
+ _headers[k] = response.headers[k];
2352
+ }
2353
+ }
2354
+ }
2355
+ if (status === 200) {
2356
+ const _responseText = response.data;
2357
+ let result200 = null;
2358
+ let resultData200 = _responseText;
2359
+ result200 = JSON.parse(resultData200);
2360
+ return Promise.resolve(result200);
2361
+ }
2255
2362
  else if (status === 401) {
2256
2363
  const _responseText = response.data;
2257
2364
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2453,6 +2560,13 @@ export class ProjectsApiClient extends ApiClientBase {
2453
2560
  result200 = JSON.parse(resultData200);
2454
2561
  return Promise.resolve(result200);
2455
2562
  }
2563
+ else if (status === 409) {
2564
+ const _responseText = response.data;
2565
+ let result409 = null;
2566
+ let resultData409 = _responseText;
2567
+ result409 = JSON.parse(resultData409);
2568
+ return throwException("Conflict", status, _responseText, _headers, result409);
2569
+ }
2456
2570
  else if (status === 401) {
2457
2571
  const _responseText = response.data;
2458
2572
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2540,6 +2654,13 @@ export class ProjectsApiClient extends ApiClientBase {
2540
2654
  result404 = JSON.parse(resultData404);
2541
2655
  return throwException("Not Found", status, _responseText, _headers, result404);
2542
2656
  }
2657
+ else if (status === 409) {
2658
+ const _responseText = response.data;
2659
+ let result409 = null;
2660
+ let resultData409 = _responseText;
2661
+ result409 = JSON.parse(resultData409);
2662
+ return throwException("Conflict", status, _responseText, _headers, result409);
2663
+ }
2543
2664
  else if (status === 401) {
2544
2665
  const _responseText = response.data;
2545
2666
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2616,6 +2737,13 @@ export class ProjectsApiClient extends ApiClientBase {
2616
2737
  result404 = JSON.parse(resultData404);
2617
2738
  return throwException("Not Found", status, _responseText, _headers, result404);
2618
2739
  }
2740
+ else if (status === 409) {
2741
+ const _responseText = response.data;
2742
+ let result409 = null;
2743
+ let resultData409 = _responseText;
2744
+ result409 = JSON.parse(resultData409);
2745
+ return throwException("Conflict", status, _responseText, _headers, result409);
2746
+ }
2619
2747
  else if (status === 401) {
2620
2748
  const _responseText = response.data;
2621
2749
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2687,6 +2815,13 @@ export class ProjectsApiClient extends ApiClientBase {
2687
2815
  result404 = JSON.parse(resultData404);
2688
2816
  return throwException("Not Found", status, _responseText, _headers, result404);
2689
2817
  }
2818
+ else if (status === 409) {
2819
+ const _responseText = response.data;
2820
+ let result409 = null;
2821
+ let resultData409 = _responseText;
2822
+ result409 = JSON.parse(resultData409);
2823
+ return throwException("Conflict", status, _responseText, _headers, result409);
2824
+ }
2690
2825
  else if (status === 401) {
2691
2826
  const _responseText = response.data;
2692
2827
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2758,6 +2893,13 @@ export class ProjectsApiClient extends ApiClientBase {
2758
2893
  result404 = JSON.parse(resultData404);
2759
2894
  return throwException("Not Found", status, _responseText, _headers, result404);
2760
2895
  }
2896
+ else if (status === 409) {
2897
+ const _responseText = response.data;
2898
+ let result409 = null;
2899
+ let resultData409 = _responseText;
2900
+ result409 = JSON.parse(resultData409);
2901
+ return throwException("Conflict", status, _responseText, _headers, result409);
2902
+ }
2761
2903
  else if (status === 401) {
2762
2904
  const _responseText = response.data;
2763
2905
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2831,6 +2973,13 @@ export class ProjectsApiClient extends ApiClientBase {
2831
2973
  result404 = JSON.parse(resultData404);
2832
2974
  return throwException("Not Found", status, _responseText, _headers, result404);
2833
2975
  }
2976
+ else if (status === 409) {
2977
+ const _responseText = response.data;
2978
+ let result409 = null;
2979
+ let resultData409 = _responseText;
2980
+ result409 = JSON.parse(resultData409);
2981
+ return throwException("Conflict", status, _responseText, _headers, result409);
2982
+ }
2834
2983
  else if (status === 401) {
2835
2984
  const _responseText = response.data;
2836
2985
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -2907,6 +3056,13 @@ export class ProjectsApiClient extends ApiClientBase {
2907
3056
  result404 = JSON.parse(resultData404);
2908
3057
  return throwException("Not Found", status, _responseText, _headers, result404);
2909
3058
  }
3059
+ else if (status === 409) {
3060
+ const _responseText = response.data;
3061
+ let result409 = null;
3062
+ let resultData409 = _responseText;
3063
+ result409 = JSON.parse(resultData409);
3064
+ return throwException("Conflict", status, _responseText, _headers, result409);
3065
+ }
2910
3066
  else if (status === 401) {
2911
3067
  const _responseText = response.data;
2912
3068
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3067,6 +3223,13 @@ export class StorefrontsApiClient extends ApiClientBase {
3067
3223
  result404 = JSON.parse(resultData404);
3068
3224
  return throwException("Not Found", status, _responseText, _headers, result404);
3069
3225
  }
3226
+ else if (status === 409) {
3227
+ const _responseText = response.data;
3228
+ let result409 = null;
3229
+ let resultData409 = _responseText;
3230
+ result409 = JSON.parse(resultData409);
3231
+ return throwException("Conflict", status, _responseText, _headers, result409);
3232
+ }
3070
3233
  else if (status === 401) {
3071
3234
  const _responseText = response.data;
3072
3235
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3315,6 +3478,13 @@ export class StorefrontUsersApiClient extends ApiClientBase {
3315
3478
  result404 = JSON.parse(resultData404);
3316
3479
  return throwException("Not Found", status, _responseText, _headers, result404);
3317
3480
  }
3481
+ else if (status === 409) {
3482
+ const _responseText = response.data;
3483
+ let result409 = null;
3484
+ let resultData409 = _responseText;
3485
+ result409 = JSON.parse(resultData409);
3486
+ return throwException("Conflict", status, _responseText, _headers, result409);
3487
+ }
3318
3488
  else if (status === 401) {
3319
3489
  const _responseText = response.data;
3320
3490
  return throwException("Unauthorized", status, _responseText, _headers);
@@ -3870,6 +4040,7 @@ export var RenderHiResScenarioOutputFormat;
3870
4040
  RenderHiResScenarioOutputFormat["Jpeg"] = "Jpeg";
3871
4041
  RenderHiResScenarioOutputFormat["Png"] = "Png";
3872
4042
  RenderHiResScenarioOutputFormat["Tiff"] = "Tiff";
4043
+ RenderHiResScenarioOutputFormat["Bmp"] = "Bmp";
3873
4044
  })(RenderHiResScenarioOutputFormat || (RenderHiResScenarioOutputFormat = {}));
3874
4045
  export var RenderHiResScenarioOutputColorSpace;
3875
4046
  (function (RenderHiResScenarioOutputColorSpace) {