@aurigma/axios-design-atoms-api-client 2.80.12 → 2.82.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
  /**
@@ -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;
@@ -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 {