@aurigma/axios-design-atoms-api-client 2.73.1 → 2.76.4

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.
@@ -617,6 +617,33 @@ export declare class DesignAtomsImagesApiClient extends ApiClientBase implements
617
617
  renderImagePreviewToResource(tenantId?: number | undefined, body?: RenderImagePreviewToResourceModel | undefined, cancelToken?: CancelToken | undefined): Promise<ResourceInfoDto>;
618
618
  protected processRenderImagePreviewToResource(response: AxiosResponse): Promise<ResourceInfoDto>;
619
619
  }
620
+ export interface IDesignAtomsMockups2dApiClient {
621
+ /**
622
+ * Renders a mockup preview with the specified parameters.
623
+ * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
624
+ (default value is 'false').
625
+ * @param tenantId (optional) Tenant ID.
626
+ * @param body (optional) Render model with preview parameters.
627
+ * @return Success
628
+ */
629
+ renderMockupPreview(attachment?: boolean | null | undefined, tenantId?: number | undefined, body?: RenderMockupPreviewModel | undefined): Promise<FileResponse>;
630
+ }
631
+ export declare class DesignAtomsMockups2dApiClient extends ApiClientBase implements IDesignAtomsMockups2dApiClient {
632
+ private instance;
633
+ private baseUrl;
634
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
635
+ constructor(configuration: ApiClientConfiguration, baseUrl?: string, instance?: AxiosInstance);
636
+ /**
637
+ * Renders a mockup preview with the specified parameters.
638
+ * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
639
+ (default value is 'false').
640
+ * @param tenantId (optional) Tenant ID.
641
+ * @param body (optional) Render model with preview parameters.
642
+ * @return Success
643
+ */
644
+ renderMockupPreview(attachment?: boolean | null | undefined, tenantId?: number | undefined, body?: RenderMockupPreviewModel | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
645
+ protected processRenderMockupPreview(response: AxiosResponse): Promise<FileResponse>;
646
+ }
620
647
  export interface IDesignAtomsMockups3dApiClient {
621
648
  /**
622
649
  * Returns a 3D-Mockup attributes.
@@ -1797,11 +1824,11 @@ export interface IDesignAtomsServiceApiClient {
1797
1824
  * @param resourceId (optional) Resource identifier.
1798
1825
  * @param privateDesignId (optional) Private design identifier.
1799
1826
  * @param privateStorageOwner (optional) Private storage owner identifier.
1800
- * @param tenantIdQuery (optional) Tenant identifier.
1827
+ * @param tenantId (optional) Tenant ID.
1801
1828
  * @return Created
1802
1829
  * @deprecated
1803
1830
  */
1804
- createPrivateDesignFromResource(resourceId?: string | null | undefined, privateDesignId?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantIdQuery?: number | undefined): Promise<void>;
1831
+ createPrivateDesignFromResource(resourceId?: string | null | undefined, privateDesignId?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined): Promise<void>;
1805
1832
  }
1806
1833
  export declare class DesignAtomsServiceApiClient extends ApiClientBase implements IDesignAtomsServiceApiClient {
1807
1834
  private instance;
@@ -2069,11 +2096,11 @@ export declare class DesignAtomsServiceApiClient extends ApiClientBase implement
2069
2096
  * @param resourceId (optional) Resource identifier.
2070
2097
  * @param privateDesignId (optional) Private design identifier.
2071
2098
  * @param privateStorageOwner (optional) Private storage owner identifier.
2072
- * @param tenantIdQuery (optional) Tenant identifier.
2099
+ * @param tenantId (optional) Tenant ID.
2073
2100
  * @return Created
2074
2101
  * @deprecated
2075
2102
  */
2076
- createPrivateDesignFromResource(resourceId?: string | null | undefined, privateDesignId?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantIdQuery?: number | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
2103
+ createPrivateDesignFromResource(resourceId?: string | null | undefined, privateDesignId?: string | null | undefined, privateStorageOwner?: string | null | undefined, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<void>;
2077
2104
  protected processCreatePrivateDesignFromResource(response: AxiosResponse): Promise<void>;
2078
2105
  }
2079
2106
  export interface IDesignAtomsViewerApiClient {
@@ -2956,6 +2983,35 @@ export interface Mockup3dAttributesDto {
2956
2983
  [key: string]: string;
2957
2984
  } | null;
2958
2985
  }
2986
+ /** Mockup preview fitting mode. */
2987
+ export declare enum MockupPreviewFitMode {
2988
+ Fit = "Fit",
2989
+ Shrink = "Shrink",
2990
+ Resize = "Resize",
2991
+ Fill = "Fill"
2992
+ }
2993
+ /** Mockup preview file format. */
2994
+ export declare enum MockupPreviewFormat {
2995
+ Jpeg = "Jpeg",
2996
+ Png = "Png"
2997
+ }
2998
+ /** Settings that describe mockup preview rendering parameters. */
2999
+ export interface MockupPreviewRenderingConfig {
3000
+ /** Mockup preview width (in pixels). */
3001
+ width?: number;
3002
+ /** Mockup preview height (in pixels). */
3003
+ height?: number;
3004
+ /** Parameters of active group layers. Each group can have only one active layer.
3005
+ E.g. { "Group1: "Layer1", "Group2": "Layer2" }.
3006
+ If value is not set, all visible layers will be rendered. */
3007
+ groups?: {
3008
+ [key: string]: string;
3009
+ } | null;
3010
+ /** Mockup preview file format. */
3011
+ fileFormat?: MockupPreviewFormat | null;
3012
+ /** Mockup preview fit mode. */
3013
+ fitMode?: MockupPreviewFitMode | null;
3014
+ }
2959
3015
  export interface MultiCallRequest {
2960
3016
  items?: MultiCallRequestItem[] | null;
2961
3017
  }
@@ -3219,6 +3275,14 @@ export interface RenderImagePreviewToResourceModel {
3219
3275
  /** Image preview configuration. */
3220
3276
  renderingConfig?: ImagePreviewRenderingConfig | null;
3221
3277
  }
3278
+ export interface RenderMockupPreviewModel {
3279
+ /** Mockup identifier. */
3280
+ mockupId?: string | null;
3281
+ /** Storage image owner identifier. */
3282
+ ownerId?: string | null;
3283
+ /** Mockup preview configuration. */
3284
+ renderingConfig?: MockupPreviewRenderingConfig | null;
3285
+ }
3222
3286
  /** Render product parameters. */
3223
3287
  export interface RenderProductModel {
3224
3288
  /** Serialized product description. */
@@ -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.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.ImageExtractionFormat = 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.MockupPreviewFormat = exports.MockupPreviewFitMode = exports.ItemType = exports.ItemSourceType = exports.ImagePreviewFormat = exports.ImagePreviewFitMode = exports.ImageExtractionFormat = exports.DesignElementType = exports.ConflictType = 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;
@@ -2545,6 +2545,103 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
2545
2545
  }
2546
2546
  }
2547
2547
  exports.DesignAtomsImagesApiClient = DesignAtomsImagesApiClient;
2548
+ class DesignAtomsMockups2dApiClient extends ApiClientBase {
2549
+ instance;
2550
+ baseUrl;
2551
+ jsonParseReviver = undefined;
2552
+ constructor(configuration, baseUrl, instance) {
2553
+ super(configuration);
2554
+ this.instance = instance ? instance : axios_1.create();
2555
+ this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
2556
+ }
2557
+ /**
2558
+ * Renders a mockup preview with the specified parameters.
2559
+ * @param attachment (optional) If set to 'true', file will be provided as an attachment with unique filename supplied
2560
+ (default value is 'false').
2561
+ * @param tenantId (optional) Tenant ID.
2562
+ * @param body (optional) Render model with preview parameters.
2563
+ * @return Success
2564
+ */
2565
+ renderMockupPreview(attachment, tenantId, body, cancelToken) {
2566
+ let url_ = this.baseUrl + "/api/atoms/v1/mockups-2d/render-preview?";
2567
+ if (attachment !== undefined && attachment !== null)
2568
+ url_ += "attachment=" + encodeURIComponent("" + attachment) + "&";
2569
+ if (tenantId === null)
2570
+ throw new Error("The parameter 'tenantId' cannot be null.");
2571
+ else if (tenantId !== undefined)
2572
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
2573
+ url_ = url_.replace(/[?&]$/, "");
2574
+ const content_ = JSON.stringify(body);
2575
+ let options_ = {
2576
+ data: content_,
2577
+ responseType: "blob",
2578
+ method: "POST",
2579
+ url: url_,
2580
+ headers: {
2581
+ "Content-Type": "application/json",
2582
+ "Accept": "application/octet-stream"
2583
+ },
2584
+ cancelToken
2585
+ };
2586
+ return this.transformOptions(options_).then(transformedOptions_ => {
2587
+ return this.instance.request(transformedOptions_);
2588
+ }).catch((_error) => {
2589
+ if (isAxiosError(_error) && _error.response) {
2590
+ return _error.response;
2591
+ }
2592
+ else {
2593
+ throw _error;
2594
+ }
2595
+ }).then((_response) => {
2596
+ return this.transformResult(url_, _response, (_response) => this.processRenderMockupPreview(_response));
2597
+ });
2598
+ }
2599
+ processRenderMockupPreview(response) {
2600
+ const status = response.status;
2601
+ let _headers = {};
2602
+ if (response.headers && typeof response.headers === "object") {
2603
+ for (let k in response.headers) {
2604
+ if (response.headers.hasOwnProperty(k)) {
2605
+ _headers[k] = response.headers[k];
2606
+ }
2607
+ }
2608
+ }
2609
+ if (status === 200 || status === 206) {
2610
+ const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
2611
+ const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
2612
+ const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
2613
+ return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers });
2614
+ }
2615
+ else if (status === 404) {
2616
+ const _responseText = response.data;
2617
+ let result404 = null;
2618
+ let resultData404 = _responseText;
2619
+ result404 = JSON.parse(resultData404);
2620
+ return throwException("Not Found", status, _responseText, _headers, result404);
2621
+ }
2622
+ else if (status === 409) {
2623
+ const _responseText = response.data;
2624
+ let result409 = null;
2625
+ let resultData409 = _responseText;
2626
+ result409 = JSON.parse(resultData409);
2627
+ return throwException("Conflict", status, _responseText, _headers, result409);
2628
+ }
2629
+ else if (status === 401) {
2630
+ const _responseText = response.data;
2631
+ return throwException("Unauthorized", status, _responseText, _headers);
2632
+ }
2633
+ else if (status === 403) {
2634
+ const _responseText = response.data;
2635
+ return throwException("Forbidden", status, _responseText, _headers);
2636
+ }
2637
+ else if (status !== 200 && status !== 204) {
2638
+ const _responseText = response.data;
2639
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2640
+ }
2641
+ return Promise.resolve(null);
2642
+ }
2643
+ }
2644
+ exports.DesignAtomsMockups2dApiClient = DesignAtomsMockups2dApiClient;
2548
2645
  class DesignAtomsMockups3dApiClient extends ApiClientBase {
2549
2646
  instance;
2550
2647
  baseUrl;
@@ -8877,11 +8974,11 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
8877
8974
  * @param resourceId (optional) Resource identifier.
8878
8975
  * @param privateDesignId (optional) Private design identifier.
8879
8976
  * @param privateStorageOwner (optional) Private storage owner identifier.
8880
- * @param tenantIdQuery (optional) Tenant identifier.
8977
+ * @param tenantId (optional) Tenant ID.
8881
8978
  * @return Created
8882
8979
  * @deprecated
8883
8980
  */
8884
- createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantIdQuery, cancelToken) {
8981
+ createPrivateDesignFromResource(resourceId, privateDesignId, privateStorageOwner, tenantId, cancelToken) {
8885
8982
  let url_ = this.baseUrl + "/api/atoms/v1/private-designs/from-resource?";
8886
8983
  if (resourceId !== undefined && resourceId !== null)
8887
8984
  url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
@@ -8889,10 +8986,10 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
8889
8986
  url_ += "privateDesignId=" + encodeURIComponent("" + privateDesignId) + "&";
8890
8987
  if (privateStorageOwner !== undefined && privateStorageOwner !== null)
8891
8988
  url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
8892
- if (tenantIdQuery === null)
8893
- throw new Error("The parameter 'tenantIdQuery' cannot be null.");
8894
- else if (tenantIdQuery !== undefined)
8895
- url_ += "tenantId=" + encodeURIComponent("" + tenantIdQuery) + "&";
8989
+ if (tenantId === null)
8990
+ throw new Error("The parameter 'tenantId' cannot be null.");
8991
+ else if (tenantId !== undefined)
8992
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
8896
8993
  url_ = url_.replace(/[?&]$/, "");
8897
8994
  let options_ = {
8898
8995
  method: "POST",
@@ -10851,6 +10948,20 @@ var ItemType;
10851
10948
  ItemType["Clipart"] = "Clipart";
10852
10949
  ItemType["Group"] = "Group";
10853
10950
  })(ItemType = exports.ItemType || (exports.ItemType = {}));
10951
+ /** Mockup preview fitting mode. */
10952
+ var MockupPreviewFitMode;
10953
+ (function (MockupPreviewFitMode) {
10954
+ MockupPreviewFitMode["Fit"] = "Fit";
10955
+ MockupPreviewFitMode["Shrink"] = "Shrink";
10956
+ MockupPreviewFitMode["Resize"] = "Resize";
10957
+ MockupPreviewFitMode["Fill"] = "Fill";
10958
+ })(MockupPreviewFitMode = exports.MockupPreviewFitMode || (exports.MockupPreviewFitMode = {}));
10959
+ /** Mockup preview file format. */
10960
+ var MockupPreviewFormat;
10961
+ (function (MockupPreviewFormat) {
10962
+ MockupPreviewFormat["Jpeg"] = "Jpeg";
10963
+ MockupPreviewFormat["Png"] = "Png";
10964
+ })(MockupPreviewFormat = exports.MockupPreviewFormat || (exports.MockupPreviewFormat = {}));
10854
10965
  /** Placeholder item content type. */
10855
10966
  var PlaceholderItemContentType;
10856
10967
  (function (PlaceholderItemContentType) {