@aurigma/axios-design-atoms-api-client 2.68.1 → 2.68.7

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.
@@ -1483,6 +1483,15 @@ export interface IDesignAtomsServiceApiClient {
1483
1483
  * @return Created
1484
1484
  */
1485
1485
  createDesign(privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateDesignModel | undefined): Promise<DesignInfo>;
1486
+ /**
1487
+ * Applies item data for a specified design file taken from storage.
1488
+ * @param id Design identifier.
1489
+ * @param privateStorageOwner (optional) Private storage owner identifier.
1490
+ * @param tenantId (optional) Tenant identifier
1491
+ * @param body (optional) Design items data.
1492
+ * @return Success
1493
+ */
1494
+ applyItemsData(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: ApplyDesignItemsDataModel | undefined): Promise<void>;
1486
1495
  /**
1487
1496
  * Returns image content of the background.
1488
1497
  * @param id Design identifier.
@@ -1721,6 +1730,16 @@ export declare class DesignAtomsServiceApiClient extends ApiClientBase implement
1721
1730
  */
1722
1731
  createDesign(privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: CreateDesignModel | undefined, cancelToken?: CancelToken | undefined): Promise<DesignInfo>;
1723
1732
  protected processCreateDesign(response: AxiosResponse): Promise<DesignInfo>;
1733
+ /**
1734
+ * Applies item data for a specified design file taken from storage.
1735
+ * @param id Design identifier.
1736
+ * @param privateStorageOwner (optional) Private storage owner identifier.
1737
+ * @param tenantId (optional) Tenant identifier
1738
+ * @param body (optional) Design items data.
1739
+ * @return Success
1740
+ */
1741
+ applyItemsData(id: string, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, body?: ApplyDesignItemsDataModel | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
1742
+ protected processApplyItemsData(response: AxiosResponse): Promise<void>;
1724
1743
  /**
1725
1744
  * Returns image content of the background.
1726
1745
  * @param id Design identifier.
@@ -2378,6 +2397,13 @@ export declare class DesignAtomsViewerApiClient extends ApiClientBase implements
2378
2397
  updateShapeItemHandler(tenantId?: number | undefined, body?: UpdateHandlerRequest | undefined, cancelToken?: CancelToken | undefined): Promise<any>;
2379
2398
  protected processUpdateShapeItemHandler(response: AxiosResponse): Promise<any>;
2380
2399
  }
2400
+ /** Design items data applying operation parameters. */
2401
+ export interface ApplyDesignItemsDataModel {
2402
+ /** Set of (item name - item data) pairs. */
2403
+ itemsData?: {
2404
+ [key: string]: DesignItemDataModel;
2405
+ } | null;
2406
+ }
2381
2407
  /** Batch create items from storage source operation parameters. */
2382
2408
  export interface BatchCreateItemsFromStorageModel {
2383
2409
  /** Source image assets owner identifier. If value is set, all images should belong to a specified user. */
@@ -2486,6 +2512,56 @@ export interface DesignInfo {
2486
2512
  name?: string | null;
2487
2513
  private?: boolean;
2488
2514
  }
2515
+ /** Design item data model parameters. */
2516
+ export interface DesignItemDataModel {
2517
+ /** Text item value. */
2518
+ text?: string | null;
2519
+ /** Text leading value. */
2520
+ leading?: number | null;
2521
+ /** Text tracking value. */
2522
+ tracking?: number | null;
2523
+ /** Text font parameters. */
2524
+ font?: DesignItemFontSettingsModel | null;
2525
+ /** Text item content alignment. */
2526
+ textAlignment?: TextAlignment | null;
2527
+ /** Text item content vertical alignment. */
2528
+ textVerticalAlignment?: TextVerticalAlignment | null;
2529
+ /** Flag that indicates if text should have underline. */
2530
+ underline?: boolean | null;
2531
+ /** Item color serialized value. */
2532
+ color?: string | null;
2533
+ /** Item border color serialized value. */
2534
+ borderColor?: string | null;
2535
+ /** Item fill color serialized value. */
2536
+ fillColor?: string | null;
2537
+ /** Text item fill color serialized value. */
2538
+ textFillColor?: string | null;
2539
+ /** Image item content source value. */
2540
+ image?: string | null;
2541
+ /** Item opacity value. */
2542
+ opacity?: number | null;
2543
+ /** Item border width. */
2544
+ borderWidth?: number | null;
2545
+ /** Barcode item color serialized value. */
2546
+ barcodeColor?: string | null;
2547
+ /** Raw barcode value. */
2548
+ barcodeValue?: string | null;
2549
+ /** Flag that indicates if an item should be visible. */
2550
+ visible?: boolean | null;
2551
+ }
2552
+ /** Design item font parameters. */
2553
+ export interface DesignItemFontSettingsModel {
2554
+ /** Font post script name. */
2555
+ postScriptName?: string | null;
2556
+ /** Font size. */
2557
+ size?: number;
2558
+ /** Flag that indicates whether font is bold. */
2559
+ fauxBold?: boolean;
2560
+ /** Flag that indicates whether font is italic. */
2561
+ fauxItalic?: boolean;
2562
+ /** Flag that indicates whether all letters should be capital. */
2563
+ allCaps?: boolean;
2564
+ }
2489
2565
  /** Specific design parameters stored in product model. */
2490
2566
  export interface DesignParameters {
2491
2567
  /** Design measure unit description. */
@@ -2989,6 +3065,22 @@ export interface SizeModel {
2989
3065
  /** Design item height. */
2990
3066
  height?: number;
2991
3067
  }
3068
+ /** Text item content alignment. */
3069
+ export declare enum TextAlignment {
3070
+ Left = "Left",
3071
+ Center = "Center",
3072
+ Right = "Right",
3073
+ All = "All",
3074
+ LastLeft = "LastLeft",
3075
+ LastRight = "LastRight",
3076
+ LastCenter = "LastCenter"
3077
+ }
3078
+ /** Text item content vertical alignment. */
3079
+ export declare enum TextVerticalAlignment {
3080
+ Top = "Top",
3081
+ Center = "Center",
3082
+ Bottom = "Bottom"
3083
+ }
2992
3084
  export interface UnprocessableDesignElementDto {
2993
3085
  /** Missing element type. */
2994
3086
  readonly missingElementType?: DesignElementType | null;
@@ -8,7 +8,7 @@
8
8
  //----------------------
9
9
  // ReSharper disable InconsistentNaming
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ApiException = exports.ProductProofInterpolationMode = exports.ProductProofFormat = exports.ProductPreviewFormat = exports.ProductPatchType = exports.PlaceholderItemContentType = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.DesignElementType = exports.ConflictType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = 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.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.DesignElementType = exports.ConflictType = exports.DesignAtomsViewerApiClient = exports.DesignAtomsServiceApiClient = exports.DesignAtomsPrintProductItemsApiClient = exports.DesignAtomsPrintProductApiClient = exports.DesignAtomsPalettesApiClient = exports.DesignAtomsMockups3dApiClient = 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;
@@ -6748,6 +6748,91 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
6748
6748
  }
6749
6749
  return Promise.resolve(null);
6750
6750
  }
6751
+ /**
6752
+ * Applies item data for a specified design file taken from storage.
6753
+ * @param id Design identifier.
6754
+ * @param privateStorageOwner (optional) Private storage owner identifier.
6755
+ * @param tenantId (optional) Tenant identifier
6756
+ * @param body (optional) Design items data.
6757
+ * @return Success
6758
+ */
6759
+ applyItemsData(id, privateStorageOwner, tenantId, body, cancelToken) {
6760
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/apply-items-data?";
6761
+ if (id === undefined || id === null)
6762
+ throw new Error("The parameter 'id' must be defined.");
6763
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
6764
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
6765
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
6766
+ if (tenantId === null)
6767
+ throw new Error("The parameter 'tenantId' cannot be null.");
6768
+ else if (tenantId !== undefined)
6769
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
6770
+ url_ = url_.replace(/[?&]$/, "");
6771
+ const content_ = JSON.stringify(body);
6772
+ let options_ = {
6773
+ data: content_,
6774
+ method: "POST",
6775
+ url: url_,
6776
+ headers: {
6777
+ "Content-Type": "application/json",
6778
+ },
6779
+ cancelToken
6780
+ };
6781
+ return this.transformOptions(options_).then(transformedOptions_ => {
6782
+ return this.instance.request(transformedOptions_);
6783
+ }).catch((_error) => {
6784
+ if (isAxiosError(_error) && _error.response) {
6785
+ return _error.response;
6786
+ }
6787
+ else {
6788
+ throw _error;
6789
+ }
6790
+ }).then((_response) => {
6791
+ return this.transformResult(url_, _response, (_response) => this.processApplyItemsData(_response));
6792
+ });
6793
+ }
6794
+ processApplyItemsData(response) {
6795
+ const status = response.status;
6796
+ let _headers = {};
6797
+ if (response.headers && typeof response.headers === "object") {
6798
+ for (let k in response.headers) {
6799
+ if (response.headers.hasOwnProperty(k)) {
6800
+ _headers[k] = response.headers[k];
6801
+ }
6802
+ }
6803
+ }
6804
+ if (status === 200) {
6805
+ const _responseText = response.data;
6806
+ return Promise.resolve(null);
6807
+ }
6808
+ else if (status === 404) {
6809
+ const _responseText = response.data;
6810
+ let result404 = null;
6811
+ let resultData404 = _responseText;
6812
+ result404 = JSON.parse(resultData404);
6813
+ return throwException("Not Found", status, _responseText, _headers, result404);
6814
+ }
6815
+ else if (status === 409) {
6816
+ const _responseText = response.data;
6817
+ let result409 = null;
6818
+ let resultData409 = _responseText;
6819
+ result409 = JSON.parse(resultData409);
6820
+ return throwException("Conflict", status, _responseText, _headers, result409);
6821
+ }
6822
+ else if (status === 401) {
6823
+ const _responseText = response.data;
6824
+ return throwException("Unauthorized", status, _responseText, _headers);
6825
+ }
6826
+ else if (status === 403) {
6827
+ const _responseText = response.data;
6828
+ return throwException("Forbidden", status, _responseText, _headers);
6829
+ }
6830
+ else if (status !== 200 && status !== 204) {
6831
+ const _responseText = response.data;
6832
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6833
+ }
6834
+ return Promise.resolve(null);
6835
+ }
6751
6836
  /**
6752
6837
  * Returns image content of the background.
6753
6838
  * @param id Design identifier.
@@ -10737,6 +10822,24 @@ var ProductProofInterpolationMode;
10737
10822
  ProductProofInterpolationMode["Anisotropic9"] = "Anisotropic9";
10738
10823
  ProductProofInterpolationMode["Lanczos3"] = "Lanczos3";
10739
10824
  })(ProductProofInterpolationMode = exports.ProductProofInterpolationMode || (exports.ProductProofInterpolationMode = {}));
10825
+ /** Text item content alignment. */
10826
+ var TextAlignment;
10827
+ (function (TextAlignment) {
10828
+ TextAlignment["Left"] = "Left";
10829
+ TextAlignment["Center"] = "Center";
10830
+ TextAlignment["Right"] = "Right";
10831
+ TextAlignment["All"] = "All";
10832
+ TextAlignment["LastLeft"] = "LastLeft";
10833
+ TextAlignment["LastRight"] = "LastRight";
10834
+ TextAlignment["LastCenter"] = "LastCenter";
10835
+ })(TextAlignment = exports.TextAlignment || (exports.TextAlignment = {}));
10836
+ /** Text item content vertical alignment. */
10837
+ var TextVerticalAlignment;
10838
+ (function (TextVerticalAlignment) {
10839
+ TextVerticalAlignment["Top"] = "Top";
10840
+ TextVerticalAlignment["Center"] = "Center";
10841
+ TextVerticalAlignment["Bottom"] = "Bottom";
10842
+ })(TextVerticalAlignment = exports.TextVerticalAlignment || (exports.TextVerticalAlignment = {}));
10740
10843
  class ApiException extends Error {
10741
10844
  message;
10742
10845
  status;