@aurigma/axios-design-atoms-api-client 2.80.14 → 2.83.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.
@@ -1091,6 +1091,16 @@ export interface IDesignAtomsPrintProductApiClient {
1091
1091
  * @return Success
1092
1092
  */
1093
1093
  addDesignSurfaceModel(id: string, index?: number | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: any | undefined): Promise<any>;
1094
+ /**
1095
+ * Creates a new print product and saves it as a design file.
1096
+ * @param name (optional) Design file name.
1097
+ * @param path (optional) Design file path.
1098
+ * @param privateStorageOwner (optional) Private storage owner identifier.
1099
+ * @param tenantId (optional) Tenant ID.
1100
+ * @param body (optional) Patch product parameters model.
1101
+ * @return Created
1102
+ */
1103
+ createDesignProduct(name?: string | null | undefined, path?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateProductModel | undefined): Promise<DesignInfo>;
1094
1104
  }
1095
1105
  export declare class DesignAtomsPrintProductApiClient extends ApiClientBase implements IDesignAtomsPrintProductApiClient {
1096
1106
  private instance;
@@ -1476,6 +1486,17 @@ export declare class DesignAtomsPrintProductApiClient extends ApiClientBase impl
1476
1486
  */
1477
1487
  addDesignSurfaceModel(id: string, index?: number | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: any | undefined, cancelToken?: CancelToken | undefined): Promise<any>;
1478
1488
  protected processAddDesignSurfaceModel(response: AxiosResponse): Promise<any>;
1489
+ /**
1490
+ * Creates a new print product and saves it as a design file.
1491
+ * @param name (optional) Design file name.
1492
+ * @param path (optional) Design file path.
1493
+ * @param privateStorageOwner (optional) Private storage owner identifier.
1494
+ * @param tenantId (optional) Tenant ID.
1495
+ * @param body (optional) Patch product parameters model.
1496
+ * @return Created
1497
+ */
1498
+ createDesignProduct(name?: string | null | undefined, path?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateProductModel | undefined, cancelToken?: CancelToken | undefined): Promise<DesignInfo>;
1499
+ protected processCreateDesignProduct(response: AxiosResponse): Promise<DesignInfo>;
1479
1500
  }
1480
1501
  export interface IDesignAtomsPrintProductItemsApiClient {
1481
1502
  /**
@@ -1765,7 +1786,7 @@ export interface IDesignAtomsServiceApiClient {
1765
1786
  * @param body (optional) Design variable values.
1766
1787
  * @return Success
1767
1788
  */
1768
- setVariables(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: VariablesModel | undefined): Promise<void>;
1789
+ setVariables(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: SetVariablesModel | undefined): Promise<void>;
1769
1790
  /**
1770
1791
  * Loads variable data printing information from design file taken from storage.
1771
1792
  * @param id Design identifier.
@@ -2019,7 +2040,7 @@ export declare class DesignAtomsServiceApiClient extends ApiClientBase implement
2019
2040
  * @param body (optional) Design variable values.
2020
2041
  * @return Success
2021
2042
  */
2022
- setVariables(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: VariablesModel | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
2043
+ setVariables(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: SetVariablesModel | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
2023
2044
  protected processSetVariables(response: AxiosResponse): Promise<void>;
2024
2045
  /**
2025
2046
  * Loads variable data printing information from design file taken from storage.
@@ -2888,6 +2909,24 @@ For example, `Authorization` header can be placed here to provide access to imag
2888
2909
  /** Indicates if resulting item should store original source file. */
2889
2910
  preserveOriginalFile?: boolean | null;
2890
2911
  }
2912
+ /** Design print area creation parameters. */
2913
+ export interface CreatePrintAreaModel {
2914
+ /** Print area name. */
2915
+ name?: string | null;
2916
+ /** Print area size. */
2917
+ size?: SizeModel | null;
2918
+ /** Print area position. */
2919
+ position?: PositionModel | null;
2920
+ /** Print area bleed. */
2921
+ bleed?: MarginModel | null;
2922
+ /** Print area slug. */
2923
+ slug?: MarginModel | null;
2924
+ }
2925
+ /** Create print product operation parameters. */
2926
+ export interface CreateProductModel {
2927
+ /** Design surfaces parameters. */
2928
+ surfaces?: CreateSurfaceModel[] | null;
2929
+ }
2891
2930
  /** Rectangle item creation parameters. */
2892
2931
  export interface CreateRectangleItemModel {
2893
2932
  /** Rectangle width. */
@@ -2903,6 +2942,13 @@ export interface CreateRectangleItemModel {
2903
2942
  /** Rectangle border style. */
2904
2943
  borderStyle?: ItemBorderStyle;
2905
2944
  }
2945
+ /** Design surface creation parameters. */
2946
+ export interface CreateSurfaceModel {
2947
+ /** Surface name. */
2948
+ name?: string | null;
2949
+ /** Print areas parameters. */
2950
+ printAreas?: CreatePrintAreaModel[] | null;
2951
+ }
2906
2952
  export interface DesignElementProcessingConflictDto {
2907
2953
  /** Missing element type. */
2908
2954
  readonly missingElementType?: DesignElementType | null;
@@ -2984,6 +3030,25 @@ export interface DesignParameters {
2984
3030
  /** Version of DesignAtoms library that used to save design file. */
2985
3031
  designAtomsVersion?: string | null;
2986
3032
  }
3033
+ export declare enum DesignPreviewMockupStrategy {
3034
+ UseProvidedMockup = "UseProvidedMockup",
3035
+ UseEmbeddedMockup = "UseEmbeddedMockup",
3036
+ UseNoMockup = "UseNoMockup"
3037
+ }
3038
+ export interface DesignPreviewRenderingConfig {
3039
+ /** Surface index. */
3040
+ surfaceIndex?: number | null;
3041
+ /** Indicates whether to show stub content for preview image. */
3042
+ stub?: boolean | null;
3043
+ /** Indicates whether print areas borders should be visualized. */
3044
+ visualizePrintAreas?: boolean | null;
3045
+ /** Preview image width. */
3046
+ width?: number;
3047
+ /** Preview image height. */
3048
+ height?: number;
3049
+ /** Preview image file format. */
3050
+ fileFormat?: ProductPreviewFormat | null;
3051
+ }
2987
3052
  /** Design print area parameters. */
2988
3053
  export interface DesignPrintAreaDto {
2989
3054
  /** Print area identifier. */
@@ -3020,6 +3085,28 @@ export interface DesignPrintAreaParams {
3020
3085
  /** Print area shape. Usually content of svg path that describes print area shape is provided. */
3021
3086
  shape?: string | null;
3022
3087
  }
3088
+ export interface DesignProofRenderingConfig {
3089
+ /** Surface to render. */
3090
+ surfaceIndex?: number | null;
3091
+ /** Desired proof image width. */
3092
+ width?: number;
3093
+ /** Desired proof image height. */
3094
+ height?: number;
3095
+ /** Desired proof image format. */
3096
+ format?: ProductProofFormat | null;
3097
+ /** Desired proof image interpolation. */
3098
+ interpolationMode?: ProductProofInterpolationMode | null;
3099
+ /** Defines whether safety lines should be visualized. */
3100
+ safetyLinesEnabled?: boolean | null;
3101
+ /** Defines whether print areas borders should be visualized. */
3102
+ visualizePrintAreas?: boolean | null;
3103
+ /** Defines whether watermark should be included. */
3104
+ watermarkEnabled?: boolean | null;
3105
+ /** Defines watermark opacity (in range 0 .. 1.0). */
3106
+ watermarkOpacity?: number | null;
3107
+ /** Defines whether watermark should be repeated. */
3108
+ watermarkRepeat?: boolean | null;
3109
+ }
3023
3110
  /** Print-product container description. */
3024
3111
  export interface DesignSurfaceContainerDto {
3025
3112
  /** Container identifier. */
@@ -3366,20 +3453,6 @@ export declare enum ProductPreviewFormat {
3366
3453
  Jpeg = "Jpeg",
3367
3454
  Png = "Png"
3368
3455
  }
3369
- export interface ProductPreviewRenderingConfig {
3370
- /** Surface index. */
3371
- surfaceIndex?: number | null;
3372
- /** Indicates whether to show stub content for preview image. */
3373
- stub?: boolean | null;
3374
- /** Indicates whether print areas borders should be visualized. */
3375
- visualizePrintAreas?: boolean | null;
3376
- /** Preview image width. */
3377
- width?: number;
3378
- /** Preview image height. */
3379
- height?: number;
3380
- /** Preview image file format. */
3381
- fileFormat?: ProductPreviewFormat | null;
3382
- }
3383
3456
  export declare enum ProductProofFormat {
3384
3457
  Jpeg = "Jpeg",
3385
3458
  Png = "Png",
@@ -3438,17 +3511,18 @@ export interface RenderDesignPreviewModel {
3438
3511
  /** Design identifier.
3439
3512
  Used to get design file from public or private storage. */
3440
3513
  designId?: string | null;
3514
+ /** Identifier of the design owner. */
3515
+ ownerId?: string | null;
3516
+ mockupStrategy?: DesignPreviewMockupStrategy;
3441
3517
  /** Mockup identifier.
3442
3518
  Used to get mockup file from public storage. */
3443
3519
  mockupId?: string | null;
3444
- /** Identifier of the design owner. */
3445
- ownerId?: string | null;
3446
3520
  /** Identifier of the mockup owner. */
3447
3521
  mockupOwnerId?: string | null;
3448
3522
  /** Rendering configuration for getting a preview of design. */
3449
- renderingConfig?: ProductPreviewRenderingConfig | null;
3523
+ renderingConfig?: DesignPreviewRenderingConfig | null;
3450
3524
  /** Variable (user) data for design variable fields in the preview image. */
3451
- variableData?: VariableInfo[] | null;
3525
+ variableData?: VariableData[] | null;
3452
3526
  }
3453
3527
  export interface RenderDesignPreviewToResourceModel {
3454
3528
  /** Parameters of resource that should be created for a preview rendering result. */
@@ -3458,17 +3532,18 @@ export interface RenderDesignPreviewToResourceModel {
3458
3532
  /** Design identifier.
3459
3533
  Used to get design file from public or private storage. */
3460
3534
  designId?: string | null;
3535
+ /** Identifier of the design owner. */
3536
+ ownerId?: string | null;
3537
+ mockupStrategy?: DesignPreviewMockupStrategy;
3461
3538
  /** Mockup identifier.
3462
3539
  Used to get mockup file from public storage. */
3463
3540
  mockupId?: string | null;
3464
- /** Identifier of the design owner. */
3465
- ownerId?: string | null;
3466
3541
  /** Identifier of the mockup owner. */
3467
3542
  mockupOwnerId?: string | null;
3468
3543
  /** Rendering configuration for getting a preview of design. */
3469
- renderingConfig?: ProductPreviewRenderingConfig | null;
3544
+ renderingConfig?: DesignPreviewRenderingConfig | null;
3470
3545
  /** Variable (user) data for design variable fields in the preview image. */
3471
- variableData?: VariableInfo[] | null;
3546
+ variableData?: VariableData[] | null;
3472
3547
  }
3473
3548
  export interface RenderDesignProofModel {
3474
3549
  /** Design identifier.
@@ -3477,9 +3552,9 @@ Used to get design file from public or private storage. */
3477
3552
  /** Identifier of the design owner. */
3478
3553
  ownerId?: string | null;
3479
3554
  /** Rendering configuration for getting a proof image of design. */
3480
- renderingConfig?: ProductProofRenderingConfig | null;
3555
+ renderingConfig?: DesignProofRenderingConfig | null;
3481
3556
  /** Variable (user) data for design variable fields in the proof image. */
3482
- variableData?: VariableInfo[] | null;
3557
+ variableData?: VariableData[] | null;
3483
3558
  }
3484
3559
  export interface RenderDesignProofToResourceModel {
3485
3560
  /** Parameters of resource that should be created for a preview rendering result. */
@@ -3492,9 +3567,9 @@ Used to get design file from public or private storage. */
3492
3567
  /** Identifier of the design owner. */
3493
3568
  ownerId?: string | null;
3494
3569
  /** Rendering configuration for getting a proof image of design. */
3495
- renderingConfig?: ProductProofRenderingConfig | null;
3570
+ renderingConfig?: DesignProofRenderingConfig | null;
3496
3571
  /** Variable (user) data for design variable fields in the proof image. */
3497
- variableData?: VariableInfo[] | null;
3572
+ variableData?: VariableData[] | null;
3498
3573
  }
3499
3574
  /** Web image preview rendering parameters. */
3500
3575
  export interface RenderImagePreviewFromUrlModel {
@@ -3602,6 +3677,11 @@ export interface SetEditorMockupsModel {
3602
3677
  /** List of editor mockup binding instructions. */
3603
3678
  editorMockupBindings?: EditorMockupBindingModel[] | null;
3604
3679
  }
3680
+ /** Variables information. */
3681
+ export interface SetVariablesModel {
3682
+ /** List of variables. */
3683
+ items?: VariableData[] | null;
3684
+ }
3605
3685
  /** Size of the print-product element. */
3606
3686
  export interface SizeDto {
3607
3687
  /** Print-product element width. */
@@ -3651,6 +3731,12 @@ export interface UpdateImageHandlerRequest {
3651
3731
  itemData?: any | null;
3652
3732
  colorSettings?: PreviewColorSettings | null;
3653
3733
  }
3734
+ export interface VariableData {
3735
+ /** Variable name. */
3736
+ name?: string | null;
3737
+ /** Variable value. */
3738
+ value?: string | null;
3739
+ }
3654
3740
  /** Variable information. */
3655
3741
  export interface VariableInfo {
3656
3742
  /** Variable name. */
@@ -3659,6 +3745,10 @@ export interface VariableInfo {
3659
3745
  value?: string | null;
3660
3746
  /** Variable type. */
3661
3747
  type?: string | null;
3748
+ /** Variable constraints. */
3749
+ constraints?: {
3750
+ [key: string]: string;
3751
+ } | null;
3662
3752
  }
3663
3753
  /** Variables information. */
3664
3754
  export interface VariablesModel {
@@ -8,7 +8,7 @@
8
8
  //----------------------
9
9
  // ReSharper disable InconsistentNaming
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ApiException = exports.TextVerticalAlignment = exports.TextAlignment = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.MockupPreviewFormat = exports.MockupPreviewFitMode = exports.ItemType = exports.ItemSourceType = exports.ItemBorderStyle = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.ImageExtractionFormat = exports.DesignElementType = exports.ContainerPrintingMode = exports.ContainerColorSpace = exports.ConflictType = exports.ColorlessContainerFormat = exports.ColorlessContainerDitherType = exports.ColorlessContainerDisplayType = exports.ArtworkShapeType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsMockups2dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
11
+ exports.ApiException = exports.TextVerticalAlignment = exports.TextAlignment = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.MockupPreviewFormat = exports.MockupPreviewFitMode = exports.ItemType = exports.ItemSourceType = exports.ItemBorderStyle = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.ImageExtractionFormat = exports.DesignPreviewMockupStrategy = exports.DesignElementType = exports.ContainerPrintingMode = exports.ContainerColorSpace = exports.ConflictType = exports.ColorlessContainerFormat = exports.ColorlessContainerDitherType = exports.ColorlessContainerDisplayType = exports.ArtworkShapeType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = exports.DesignAtomsMockups2dApiClient = exports.DesignAtomsImagesApiClient = exports.DesignAtomsCompatibilityApiClient = exports.BuildInfoApiClient = exports.ApiClientBase = exports.ApiClientConfiguration = void 0;
12
12
  const axios_1 = require("axios");
13
13
  class ApiClientConfiguration {
14
14
  apiUrl;
@@ -6300,6 +6300,90 @@ class DesignAtomsPrintProductApiClient extends ApiClientBase {
6300
6300
  }
6301
6301
  return Promise.resolve(null);
6302
6302
  }
6303
+ /**
6304
+ * Creates a new print product and saves it as a design file.
6305
+ * @param name (optional) Design file name.
6306
+ * @param path (optional) Design file path.
6307
+ * @param privateStorageOwner (optional) Private storage owner identifier.
6308
+ * @param tenantId (optional) Tenant ID.
6309
+ * @param body (optional) Patch product parameters model.
6310
+ * @return Created
6311
+ */
6312
+ createDesignProduct(name, path, privateStorageOwner, tenantId, body, cancelToken) {
6313
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product?";
6314
+ if (name !== undefined && name !== null)
6315
+ url_ += "name=" + encodeURIComponent("" + name) + "&";
6316
+ if (path !== undefined && path !== null)
6317
+ url_ += "path=" + encodeURIComponent("" + path) + "&";
6318
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
6319
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
6320
+ if (tenantId === null)
6321
+ throw new Error("The parameter 'tenantId' cannot be null.");
6322
+ else if (tenantId !== undefined)
6323
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
6324
+ url_ = url_.replace(/[?&]$/, "");
6325
+ const content_ = JSON.stringify(body);
6326
+ let options_ = {
6327
+ data: content_,
6328
+ method: "POST",
6329
+ url: url_,
6330
+ headers: {
6331
+ "Content-Type": "application/json",
6332
+ "Accept": "application/json"
6333
+ },
6334
+ cancelToken
6335
+ };
6336
+ return this.transformOptions(options_).then(transformedOptions_ => {
6337
+ return this.instance.request(transformedOptions_);
6338
+ }).catch((_error) => {
6339
+ if (isAxiosError(_error) && _error.response) {
6340
+ return _error.response;
6341
+ }
6342
+ else {
6343
+ throw _error;
6344
+ }
6345
+ }).then((_response) => {
6346
+ return this.transformResult(url_, _response, (_response) => this.processCreateDesignProduct(_response));
6347
+ });
6348
+ }
6349
+ processCreateDesignProduct(response) {
6350
+ const status = response.status;
6351
+ let _headers = {};
6352
+ if (response.headers && typeof response.headers === "object") {
6353
+ for (let k in response.headers) {
6354
+ if (response.headers.hasOwnProperty(k)) {
6355
+ _headers[k] = response.headers[k];
6356
+ }
6357
+ }
6358
+ }
6359
+ if (status === 201) {
6360
+ const _responseText = response.data;
6361
+ let result201 = null;
6362
+ let resultData201 = _responseText;
6363
+ result201 = JSON.parse(resultData201);
6364
+ return Promise.resolve(result201);
6365
+ }
6366
+ else if (status === 409) {
6367
+ const _responseText = response.data;
6368
+ let result409 = null;
6369
+ let resultData409 = _responseText;
6370
+ result409 = JSON.parse(resultData409);
6371
+ return throwException("Conflict", status, _responseText, _headers, result409);
6372
+ }
6373
+ else if (status === 401) {
6374
+ const _responseText = response.data;
6375
+ return throwException("Unauthorized", status, _responseText, _headers);
6376
+ }
6377
+ else if (status === 403) {
6378
+ const _responseText = response.data;
6379
+ return throwException("Forbidden", status, _responseText, _headers);
6380
+ }
6381
+ else if (status !== 200 && status !== 204) {
6382
+ const _responseText = response.data;
6383
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6384
+ }
6385
+ return Promise.resolve(null);
6386
+ }
6303
6387
  }
6304
6388
  exports.DesignAtomsPrintProductApiClient = DesignAtomsPrintProductApiClient;
6305
6389
  class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
@@ -11396,6 +11480,12 @@ var DesignElementType;
11396
11480
  DesignElementType["PrintArea"] = "PrintArea";
11397
11481
  DesignElementType["Item"] = "Item";
11398
11482
  })(DesignElementType = exports.DesignElementType || (exports.DesignElementType = {}));
11483
+ var DesignPreviewMockupStrategy;
11484
+ (function (DesignPreviewMockupStrategy) {
11485
+ DesignPreviewMockupStrategy["UseProvidedMockup"] = "UseProvidedMockup";
11486
+ DesignPreviewMockupStrategy["UseEmbeddedMockup"] = "UseEmbeddedMockup";
11487
+ DesignPreviewMockupStrategy["UseNoMockup"] = "UseNoMockup";
11488
+ })(DesignPreviewMockupStrategy = exports.DesignPreviewMockupStrategy || (exports.DesignPreviewMockupStrategy = {}));
11399
11489
  /** Image preview file format. */
11400
11490
  var ImageExtractionFormat;
11401
11491
  (function (ImageExtractionFormat) {