@aurigma/axios-design-atoms-api-client 2.76.4 → 2.79.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.
@@ -3281,6 +3281,285 @@ export class DesignAtomsPrintProductApiClient extends ApiClientBase {
3281
3281
  }
3282
3282
  return Promise.resolve(null);
3283
3283
  }
3284
+ /**
3285
+ * Returns a list of print-product container descriptions of the specified design file.
3286
+ * @param id Design identifier.
3287
+ * @param index (optional)
3288
+ * @param surfaceId (optional) Print-product surface identifier.
3289
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3290
+ * @param tenantId (optional) Tenant ID.
3291
+ * @param body (optional)
3292
+ * @return Success
3293
+ */
3294
+ addDesignSurfaceContainer(id, index, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
3295
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers?";
3296
+ if (id === undefined || id === null)
3297
+ throw new Error("The parameter 'id' must be defined.");
3298
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3299
+ if (index !== undefined && index !== null)
3300
+ url_ += "index=" + encodeURIComponent("" + index) + "&";
3301
+ if (surfaceId !== undefined && surfaceId !== null)
3302
+ url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
3303
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3304
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3305
+ if (tenantId === null)
3306
+ throw new Error("The parameter 'tenantId' cannot be null.");
3307
+ else if (tenantId !== undefined)
3308
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3309
+ url_ = url_.replace(/[?&]$/, "");
3310
+ const content_ = JSON.stringify(body);
3311
+ let options_ = {
3312
+ data: content_,
3313
+ method: "POST",
3314
+ url: url_,
3315
+ headers: {
3316
+ "Content-Type": "application/json",
3317
+ "Accept": "application/json"
3318
+ },
3319
+ cancelToken
3320
+ };
3321
+ return this.transformOptions(options_).then(transformedOptions_ => {
3322
+ return this.instance.request(transformedOptions_);
3323
+ }).catch((_error) => {
3324
+ if (isAxiosError(_error) && _error.response) {
3325
+ return _error.response;
3326
+ }
3327
+ else {
3328
+ throw _error;
3329
+ }
3330
+ }).then((_response) => {
3331
+ return this.transformResult(url_, _response, (_response) => this.processAddDesignSurfaceContainer(_response));
3332
+ });
3333
+ }
3334
+ processAddDesignSurfaceContainer(response) {
3335
+ const status = response.status;
3336
+ let _headers = {};
3337
+ if (response.headers && typeof response.headers === "object") {
3338
+ for (let k in response.headers) {
3339
+ if (response.headers.hasOwnProperty(k)) {
3340
+ _headers[k] = response.headers[k];
3341
+ }
3342
+ }
3343
+ }
3344
+ if (status === 200) {
3345
+ const _responseText = response.data;
3346
+ let result200 = null;
3347
+ let resultData200 = _responseText;
3348
+ result200 = JSON.parse(resultData200);
3349
+ return Promise.resolve(result200);
3350
+ }
3351
+ else if (status === 404) {
3352
+ const _responseText = response.data;
3353
+ let result404 = null;
3354
+ let resultData404 = _responseText;
3355
+ result404 = JSON.parse(resultData404);
3356
+ return throwException("Not Found", status, _responseText, _headers, result404);
3357
+ }
3358
+ else if (status === 409) {
3359
+ const _responseText = response.data;
3360
+ let result409 = null;
3361
+ let resultData409 = _responseText;
3362
+ result409 = JSON.parse(resultData409);
3363
+ return throwException("Conflict", status, _responseText, _headers, result409);
3364
+ }
3365
+ else if (status === 401) {
3366
+ const _responseText = response.data;
3367
+ return throwException("Unauthorized", status, _responseText, _headers);
3368
+ }
3369
+ else if (status === 403) {
3370
+ const _responseText = response.data;
3371
+ return throwException("Forbidden", status, _responseText, _headers);
3372
+ }
3373
+ else if (status !== 200 && status !== 204) {
3374
+ const _responseText = response.data;
3375
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3376
+ }
3377
+ return Promise.resolve(null);
3378
+ }
3379
+ /**
3380
+ * Returns a print-product container parameters of the specified design file.
3381
+ * @param id Design identifier.
3382
+ * @param containerId Print-product container identifier.
3383
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3384
+ * @param tenantId (optional) Tenant ID.
3385
+ * @return Success
3386
+ */
3387
+ getDesignSurfaceContainer(id, containerId, privateStorageOwner, tenantId, cancelToken) {
3388
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";
3389
+ if (id === undefined || id === null)
3390
+ throw new Error("The parameter 'id' must be defined.");
3391
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3392
+ if (containerId === undefined || containerId === null)
3393
+ throw new Error("The parameter 'containerId' must be defined.");
3394
+ url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
3395
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3396
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3397
+ if (tenantId === null)
3398
+ throw new Error("The parameter 'tenantId' cannot be null.");
3399
+ else if (tenantId !== undefined)
3400
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3401
+ url_ = url_.replace(/[?&]$/, "");
3402
+ let options_ = {
3403
+ method: "GET",
3404
+ url: url_,
3405
+ headers: {
3406
+ "Accept": "application/json"
3407
+ },
3408
+ cancelToken
3409
+ };
3410
+ return this.transformOptions(options_).then(transformedOptions_ => {
3411
+ return this.instance.request(transformedOptions_);
3412
+ }).catch((_error) => {
3413
+ if (isAxiosError(_error) && _error.response) {
3414
+ return _error.response;
3415
+ }
3416
+ else {
3417
+ throw _error;
3418
+ }
3419
+ }).then((_response) => {
3420
+ return this.transformResult(url_, _response, (_response) => this.processGetDesignSurfaceContainer(_response));
3421
+ });
3422
+ }
3423
+ processGetDesignSurfaceContainer(response) {
3424
+ const status = response.status;
3425
+ let _headers = {};
3426
+ if (response.headers && typeof response.headers === "object") {
3427
+ for (let k in response.headers) {
3428
+ if (response.headers.hasOwnProperty(k)) {
3429
+ _headers[k] = response.headers[k];
3430
+ }
3431
+ }
3432
+ }
3433
+ if (status === 200) {
3434
+ const _responseText = response.data;
3435
+ let result200 = null;
3436
+ let resultData200 = _responseText;
3437
+ result200 = JSON.parse(resultData200);
3438
+ return Promise.resolve(result200);
3439
+ }
3440
+ else if (status === 404) {
3441
+ const _responseText = response.data;
3442
+ let result404 = null;
3443
+ let resultData404 = _responseText;
3444
+ result404 = JSON.parse(resultData404);
3445
+ return throwException("Not Found", status, _responseText, _headers, result404);
3446
+ }
3447
+ else if (status === 409) {
3448
+ const _responseText = response.data;
3449
+ let result409 = null;
3450
+ let resultData409 = _responseText;
3451
+ result409 = JSON.parse(resultData409);
3452
+ return throwException("Conflict", status, _responseText, _headers, result409);
3453
+ }
3454
+ else if (status === 401) {
3455
+ const _responseText = response.data;
3456
+ return throwException("Unauthorized", status, _responseText, _headers);
3457
+ }
3458
+ else if (status === 403) {
3459
+ const _responseText = response.data;
3460
+ return throwException("Forbidden", status, _responseText, _headers);
3461
+ }
3462
+ else if (status !== 200 && status !== 204) {
3463
+ const _responseText = response.data;
3464
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3465
+ }
3466
+ return Promise.resolve(null);
3467
+ }
3468
+ /**
3469
+ * Returns a list of print-product container descriptions of the specified design file.
3470
+ * @param id Design identifier.
3471
+ * @param surfaceId (optional) Print-product surface identifier.
3472
+ * @param privateStorageOwner (optional) Private storage owner identifier.
3473
+ * @param tenantId (optional) Tenant ID.
3474
+ * @param body (optional)
3475
+ * @return Success
3476
+ */
3477
+ updateDesignSurfaceContainer(id, containerId, surfaceId, privateStorageOwner, tenantId, body, cancelToken) {
3478
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";
3479
+ if (id === undefined || id === null)
3480
+ throw new Error("The parameter 'id' must be defined.");
3481
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
3482
+ if (containerId === undefined || containerId === null)
3483
+ throw new Error("The parameter 'containerId' must be defined.");
3484
+ url_ = url_.replace("{containerId}", encodeURIComponent("" + containerId));
3485
+ if (surfaceId !== undefined && surfaceId !== null)
3486
+ url_ += "surfaceId=" + encodeURIComponent("" + surfaceId) + "&";
3487
+ if (privateStorageOwner !== undefined && privateStorageOwner !== null)
3488
+ url_ += "privateStorageOwner=" + encodeURIComponent("" + privateStorageOwner) + "&";
3489
+ if (tenantId === null)
3490
+ throw new Error("The parameter 'tenantId' cannot be null.");
3491
+ else if (tenantId !== undefined)
3492
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
3493
+ url_ = url_.replace(/[?&]$/, "");
3494
+ const content_ = JSON.stringify(body);
3495
+ let options_ = {
3496
+ data: content_,
3497
+ method: "PUT",
3498
+ url: url_,
3499
+ headers: {
3500
+ "Content-Type": "application/json",
3501
+ "Accept": "application/json"
3502
+ },
3503
+ cancelToken
3504
+ };
3505
+ return this.transformOptions(options_).then(transformedOptions_ => {
3506
+ return this.instance.request(transformedOptions_);
3507
+ }).catch((_error) => {
3508
+ if (isAxiosError(_error) && _error.response) {
3509
+ return _error.response;
3510
+ }
3511
+ else {
3512
+ throw _error;
3513
+ }
3514
+ }).then((_response) => {
3515
+ return this.transformResult(url_, _response, (_response) => this.processUpdateDesignSurfaceContainer(_response));
3516
+ });
3517
+ }
3518
+ processUpdateDesignSurfaceContainer(response) {
3519
+ const status = response.status;
3520
+ let _headers = {};
3521
+ if (response.headers && typeof response.headers === "object") {
3522
+ for (let k in response.headers) {
3523
+ if (response.headers.hasOwnProperty(k)) {
3524
+ _headers[k] = response.headers[k];
3525
+ }
3526
+ }
3527
+ }
3528
+ if (status === 200) {
3529
+ const _responseText = response.data;
3530
+ let result200 = null;
3531
+ let resultData200 = _responseText;
3532
+ result200 = JSON.parse(resultData200);
3533
+ return Promise.resolve(result200);
3534
+ }
3535
+ else if (status === 404) {
3536
+ const _responseText = response.data;
3537
+ let result404 = null;
3538
+ let resultData404 = _responseText;
3539
+ result404 = JSON.parse(resultData404);
3540
+ return throwException("Not Found", status, _responseText, _headers, result404);
3541
+ }
3542
+ else if (status === 409) {
3543
+ const _responseText = response.data;
3544
+ let result409 = null;
3545
+ let resultData409 = _responseText;
3546
+ result409 = JSON.parse(resultData409);
3547
+ return throwException("Conflict", status, _responseText, _headers, result409);
3548
+ }
3549
+ else if (status === 401) {
3550
+ const _responseText = response.data;
3551
+ return throwException("Unauthorized", status, _responseText, _headers);
3552
+ }
3553
+ else if (status === 403) {
3554
+ const _responseText = response.data;
3555
+ return throwException("Forbidden", status, _responseText, _headers);
3556
+ }
3557
+ else if (status !== 200 && status !== 204) {
3558
+ const _responseText = response.data;
3559
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3560
+ }
3561
+ return Promise.resolve(null);
3562
+ }
3284
3563
  /**
3285
3564
  * Deletes a specified print-product container in an existing design file.
3286
3565
  * @param id Design identifier.
@@ -6083,6 +6362,81 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6083
6362
  }
6084
6363
  return Promise.resolve(null);
6085
6364
  }
6365
+ /**
6366
+ * Creates ellipse print-product item and returns its serialized model.
6367
+ * @param tenantId (optional) Tenant ID.
6368
+ * @param body (optional) Operation parameters.
6369
+ * @return Success
6370
+ */
6371
+ createEllipseItem(tenantId, body, cancelToken) {
6372
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/ellipse?";
6373
+ if (tenantId === null)
6374
+ throw new Error("The parameter 'tenantId' cannot be null.");
6375
+ else if (tenantId !== undefined)
6376
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
6377
+ url_ = url_.replace(/[?&]$/, "");
6378
+ const content_ = JSON.stringify(body);
6379
+ let options_ = {
6380
+ data: content_,
6381
+ method: "POST",
6382
+ url: url_,
6383
+ headers: {
6384
+ "Content-Type": "application/json",
6385
+ "Accept": "application/json"
6386
+ },
6387
+ cancelToken
6388
+ };
6389
+ return this.transformOptions(options_).then(transformedOptions_ => {
6390
+ return this.instance.request(transformedOptions_);
6391
+ }).catch((_error) => {
6392
+ if (isAxiosError(_error) && _error.response) {
6393
+ return _error.response;
6394
+ }
6395
+ else {
6396
+ throw _error;
6397
+ }
6398
+ }).then((_response) => {
6399
+ return this.transformResult(url_, _response, (_response) => this.processCreateEllipseItem(_response));
6400
+ });
6401
+ }
6402
+ processCreateEllipseItem(response) {
6403
+ const status = response.status;
6404
+ let _headers = {};
6405
+ if (response.headers && typeof response.headers === "object") {
6406
+ for (let k in response.headers) {
6407
+ if (response.headers.hasOwnProperty(k)) {
6408
+ _headers[k] = response.headers[k];
6409
+ }
6410
+ }
6411
+ }
6412
+ if (status === 200) {
6413
+ const _responseText = response.data;
6414
+ let result200 = null;
6415
+ let resultData200 = _responseText;
6416
+ result200 = JSON.parse(resultData200);
6417
+ return Promise.resolve(result200);
6418
+ }
6419
+ else if (status === 404) {
6420
+ const _responseText = response.data;
6421
+ let result404 = null;
6422
+ let resultData404 = _responseText;
6423
+ result404 = JSON.parse(resultData404);
6424
+ return throwException("Not Found", status, _responseText, _headers, result404);
6425
+ }
6426
+ else if (status === 401) {
6427
+ const _responseText = response.data;
6428
+ return throwException("Unauthorized", status, _responseText, _headers);
6429
+ }
6430
+ else if (status === 403) {
6431
+ const _responseText = response.data;
6432
+ return throwException("Forbidden", status, _responseText, _headers);
6433
+ }
6434
+ else if (status !== 200 && status !== 204) {
6435
+ const _responseText = response.data;
6436
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6437
+ }
6438
+ return Promise.resolve(null);
6439
+ }
6086
6440
  /**
6087
6441
  * Extracts print-product item image.
6088
6442
  * @param tenantId (optional) Tenant ID.
@@ -6873,6 +7227,81 @@ export class DesignAtomsPrintProductItemsApiClient extends ApiClientBase {
6873
7227
  }
6874
7228
  return Promise.resolve(null);
6875
7229
  }
7230
+ /**
7231
+ * Creates rectangle print-product item and returns its serialized model.
7232
+ * @param tenantId (optional) Tenant ID.
7233
+ * @param body (optional) Operation parameters.
7234
+ * @return Success
7235
+ */
7236
+ createRectangleItem(tenantId, body, cancelToken) {
7237
+ let url_ = this.baseUrl + "/api/atoms/v1/designs/print-product/items/rectangle?";
7238
+ if (tenantId === null)
7239
+ throw new Error("The parameter 'tenantId' cannot be null.");
7240
+ else if (tenantId !== undefined)
7241
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
7242
+ url_ = url_.replace(/[?&]$/, "");
7243
+ const content_ = JSON.stringify(body);
7244
+ let options_ = {
7245
+ data: content_,
7246
+ method: "POST",
7247
+ url: url_,
7248
+ headers: {
7249
+ "Content-Type": "application/json",
7250
+ "Accept": "application/json"
7251
+ },
7252
+ cancelToken
7253
+ };
7254
+ return this.transformOptions(options_).then(transformedOptions_ => {
7255
+ return this.instance.request(transformedOptions_);
7256
+ }).catch((_error) => {
7257
+ if (isAxiosError(_error) && _error.response) {
7258
+ return _error.response;
7259
+ }
7260
+ else {
7261
+ throw _error;
7262
+ }
7263
+ }).then((_response) => {
7264
+ return this.transformResult(url_, _response, (_response) => this.processCreateRectangleItem(_response));
7265
+ });
7266
+ }
7267
+ processCreateRectangleItem(response) {
7268
+ const status = response.status;
7269
+ let _headers = {};
7270
+ if (response.headers && typeof response.headers === "object") {
7271
+ for (let k in response.headers) {
7272
+ if (response.headers.hasOwnProperty(k)) {
7273
+ _headers[k] = response.headers[k];
7274
+ }
7275
+ }
7276
+ }
7277
+ if (status === 200) {
7278
+ const _responseText = response.data;
7279
+ let result200 = null;
7280
+ let resultData200 = _responseText;
7281
+ result200 = JSON.parse(resultData200);
7282
+ return Promise.resolve(result200);
7283
+ }
7284
+ else if (status === 404) {
7285
+ const _responseText = response.data;
7286
+ let result404 = null;
7287
+ let resultData404 = _responseText;
7288
+ result404 = JSON.parse(resultData404);
7289
+ return throwException("Not Found", status, _responseText, _headers, result404);
7290
+ }
7291
+ else if (status === 401) {
7292
+ const _responseText = response.data;
7293
+ return throwException("Unauthorized", status, _responseText, _headers);
7294
+ }
7295
+ else if (status === 403) {
7296
+ const _responseText = response.data;
7297
+ return throwException("Forbidden", status, _responseText, _headers);
7298
+ }
7299
+ else if (status !== 200 && status !== 204) {
7300
+ const _responseText = response.data;
7301
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
7302
+ }
7303
+ return Promise.resolve(null);
7304
+ }
6876
7305
  }
6877
7306
  export class DesignAtomsServiceApiClient extends ApiClientBase {
6878
7307
  instance;
@@ -10881,6 +11310,32 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
10881
11310
  return Promise.resolve(null);
10882
11311
  }
10883
11312
  }
11313
+ export var ArtworkShapeType;
11314
+ (function (ArtworkShapeType) {
11315
+ ArtworkShapeType["Rectangle"] = "rectangle";
11316
+ ArtworkShapeType["Ellipse"] = "ellipse";
11317
+ })(ArtworkShapeType || (ArtworkShapeType = {}));
11318
+ /** Colorless container display type. */
11319
+ export var ColorlessContainerDisplayType;
11320
+ (function (ColorlessContainerDisplayType) {
11321
+ ColorlessContainerDisplayType["Color"] = "Color";
11322
+ ColorlessContainerDisplayType["Texture"] = "Texture";
11323
+ })(ColorlessContainerDisplayType || (ColorlessContainerDisplayType = {}));
11324
+ /** Colorless container dither type. */
11325
+ export var ColorlessContainerDitherType;
11326
+ (function (ColorlessContainerDitherType) {
11327
+ ColorlessContainerDitherType["None"] = "None";
11328
+ ColorlessContainerDitherType["Diffusion"] = "Diffusion";
11329
+ ColorlessContainerDitherType["Pattern"] = "Pattern";
11330
+ ColorlessContainerDitherType["Noise"] = "Noise";
11331
+ })(ColorlessContainerDitherType || (ColorlessContainerDitherType = {}));
11332
+ /** Colorless container format. */
11333
+ export var ColorlessContainerFormat;
11334
+ (function (ColorlessContainerFormat) {
11335
+ ColorlessContainerFormat["OneBit"] = "OneBit";
11336
+ ColorlessContainerFormat["Grayscale"] = "Grayscale";
11337
+ ColorlessContainerFormat["Vector"] = "Vector";
11338
+ })(ColorlessContainerFormat || (ColorlessContainerFormat = {}));
10884
11339
  /** Conflict types. */
10885
11340
  export var ConflictType;
10886
11341
  (function (ConflictType) {
@@ -10889,6 +11344,22 @@ export var ConflictType;
10889
11344
  ConflictType["IdConflict"] = "IdConflict";
10890
11345
  ConflictType["GeneralConflict"] = "GeneralConflict";
10891
11346
  })(ConflictType || (ConflictType = {}));
11347
+ /** Full color container color space. */
11348
+ export var ContainerColorSpace;
11349
+ (function (ContainerColorSpace) {
11350
+ ContainerColorSpace["Rgb"] = "Rgb";
11351
+ ContainerColorSpace["Cmyk"] = "Cmyk";
11352
+ ContainerColorSpace["Grayscale"] = "Grayscale";
11353
+ ContainerColorSpace["Lab"] = "Lab";
11354
+ ContainerColorSpace["Spot"] = "Spot";
11355
+ })(ContainerColorSpace || (ContainerColorSpace = {}));
11356
+ /** Container printing mode. */
11357
+ export var ContainerPrintingMode;
11358
+ (function (ContainerPrintingMode) {
11359
+ ContainerPrintingMode["FullColor"] = "FullColor";
11360
+ ContainerPrintingMode["LimitedColor"] = "LimitedColor";
11361
+ ContainerPrintingMode["Colorless"] = "Colorless";
11362
+ })(ContainerPrintingMode || (ContainerPrintingMode = {}));
10892
11363
  export var DesignElementType;
10893
11364
  (function (DesignElementType) {
10894
11365
  DesignElementType["Product"] = "Product";
@@ -10918,6 +11389,11 @@ export var ImagePreviewFormat;
10918
11389
  ImagePreviewFormat["Jpeg"] = "Jpeg";
10919
11390
  ImagePreviewFormat["Png"] = "Png";
10920
11391
  })(ImagePreviewFormat || (ImagePreviewFormat = {}));
11392
+ export var ItemBorderStyle;
11393
+ (function (ItemBorderStyle) {
11394
+ ItemBorderStyle["Solid"] = "Solid";
11395
+ ItemBorderStyle["Dashed"] = "Dashed";
11396
+ })(ItemBorderStyle || (ItemBorderStyle = {}));
10921
11397
  /** Item source types. */
10922
11398
  export var ItemSourceType;
10923
11399
  (function (ItemSourceType) {