@aurigma/axios-design-atoms-api-client 2.80.14 → 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.
- package/dist/cjs/design-atoms-api-client.d.ts +46 -0
- package/dist/cjs/design-atoms-api-client.js +84 -0
- package/dist/cjs/design-atoms-api-client.js.map +1 -1
- package/dist/esm/design-atoms-api-client.d.ts +46 -0
- package/dist/esm/design-atoms-api-client.js +84 -0
- package/dist/esm/design-atoms-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -6289,6 +6289,90 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
|
|
|
6289
6289
|
}
|
|
6290
6290
|
return Promise.resolve(null);
|
|
6291
6291
|
}
|
|
6292
|
+
/**
|
|
6293
|
+
* Creates a new print product and saves it as a design file.
|
|
6294
|
+
* @param name (optional) Design file name.
|
|
6295
|
+
* @param path (optional) Design file path.
|
|
6296
|
+
* @param privateStorageOwner (optional) Private storage owner identifier.
|
|
6297
|
+
* @param tenantId (optional) Tenant ID.
|
|
6298
|
+
* @param body (optional) Patch product parameters model.
|
|
6299
|
+
* @return Created
|
|
6300
|
+
*/
|
|
6301
|
+
createDesignProduct(name, path, privateStorageOwner, tenantId, body, cancelToken) {
|
|
6302
|
+
let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product?";
|
|
6303
|
+
if (name !== undefined && name !== null)
|
|
6304
|
+
url_ += "name=" + encodeURIComponent("" + name) + "&";
|
|
6305
|
+
if (path !== undefined && path !== null)
|
|
6306
|
+
url_ += "path=" + encodeURIComponent("" + path) + "&";
|
|
6307
|
+
if (privateStorageOwner !== undefined && privateStorageOwner !== null)
|
|
6308
|
+
url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
|
|
6309
|
+
if (tenantId === null)
|
|
6310
|
+
throw new Error("The parameter 'tenantId' cannot be null.");
|
|
6311
|
+
else if (tenantId !== undefined)
|
|
6312
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
6313
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6314
|
+
const content_ = JSON.stringify(body);
|
|
6315
|
+
let options_ = {
|
|
6316
|
+
data: content_,
|
|
6317
|
+
method: "POST",
|
|
6318
|
+
url: url_,
|
|
6319
|
+
headers: {
|
|
6320
|
+
"Content-Type": "application/json",
|
|
6321
|
+
"Accept": "application/json"
|
|
6322
|
+
},
|
|
6323
|
+
cancelToken
|
|
6324
|
+
};
|
|
6325
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6326
|
+
return this.instance.request(transformedOptions_);
|
|
6327
|
+
}).catch((_error) => {
|
|
6328
|
+
if (isAxiosError(_error) && _error.response) {
|
|
6329
|
+
return _error.response;
|
|
6330
|
+
}
|
|
6331
|
+
else {
|
|
6332
|
+
throw _error;
|
|
6333
|
+
}
|
|
6334
|
+
}).then((_response) => {
|
|
6335
|
+
return this.transformResult(url_, _response, (_response) => this.processCreateDesignProduct(_response));
|
|
6336
|
+
});
|
|
6337
|
+
}
|
|
6338
|
+
processCreateDesignProduct(response) {
|
|
6339
|
+
const status = response.status;
|
|
6340
|
+
let _headers = {};
|
|
6341
|
+
if (response.headers && typeof response.headers === "object") {
|
|
6342
|
+
for (let k in response.headers) {
|
|
6343
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
6344
|
+
_headers[k] = response.headers[k];
|
|
6345
|
+
}
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
if (status === 201) {
|
|
6349
|
+
const _responseText = response.data;
|
|
6350
|
+
let result201 = null;
|
|
6351
|
+
let resultData201 = _responseText;
|
|
6352
|
+
result201 = JSON.parse(resultData201);
|
|
6353
|
+
return Promise.resolve(result201);
|
|
6354
|
+
}
|
|
6355
|
+
else if (status === 409) {
|
|
6356
|
+
const _responseText = response.data;
|
|
6357
|
+
let result409 = null;
|
|
6358
|
+
let resultData409 = _responseText;
|
|
6359
|
+
result409 = JSON.parse(resultData409);
|
|
6360
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
6361
|
+
}
|
|
6362
|
+
else if (status === 401) {
|
|
6363
|
+
const _responseText = response.data;
|
|
6364
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
6365
|
+
}
|
|
6366
|
+
else if (status === 403) {
|
|
6367
|
+
const _responseText = response.data;
|
|
6368
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
6369
|
+
}
|
|
6370
|
+
else if (status !== 200 && status !== 204) {
|
|
6371
|
+
const _responseText = response.data;
|
|
6372
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6373
|
+
}
|
|
6374
|
+
return Promise.resolve(null);
|
|
6375
|
+
}
|
|
6292
6376
|
}
|
|
6293
6377
|
export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
|
|
6294
6378
|
instance;
|