@aurigma/axios-design-atoms-api-client 2.39.5 → 2.42.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.
@@ -53,6 +53,16 @@ export interface IDesignAtomsCompatibilityApiClient {
53
53
  * @return Success
54
54
  */
55
55
  fonts(tenantId: number, psName: string | null): Promise<FileResponse>;
56
+ /**
57
+ * @param body (optional)
58
+ * @return Success
59
+ */
60
+ getColorPreview(tenantId: number, body?: GetColorPreviewRequest | null | undefined): Promise<any>;
61
+ /**
62
+ * @param body (optional)
63
+ * @return Success
64
+ */
65
+ getColorPreviews(tenantId: number, body?: GetColorPreviewsRequest | null | undefined): Promise<GetColorPreviewsResponse>;
56
66
  /**
57
67
  * @param fontKey (optional)
58
68
  * @return Success
@@ -193,6 +203,18 @@ export declare class DesignAtomsCompatibilityApiClient extends ApiClientBase imp
193
203
  */
194
204
  fonts(tenantId: number, psName: string | null, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
195
205
  protected processFonts(response: AxiosResponse): Promise<FileResponse>;
206
+ /**
207
+ * @param body (optional)
208
+ * @return Success
209
+ */
210
+ getColorPreview(tenantId: number, body?: GetColorPreviewRequest | null | undefined, cancelToken?: CancelToken | undefined): Promise<any>;
211
+ protected processGetColorPreview(response: AxiosResponse): Promise<any>;
212
+ /**
213
+ * @param body (optional)
214
+ * @return Success
215
+ */
216
+ getColorPreviews(tenantId: number, body?: GetColorPreviewsRequest | null | undefined, cancelToken?: CancelToken | undefined): Promise<GetColorPreviewsResponse>;
217
+ protected processGetColorPreviews(response: AxiosResponse): Promise<GetColorPreviewsResponse>;
196
218
  /**
197
219
  * @param fontKey (optional)
198
220
  * @return Success
@@ -816,6 +838,18 @@ export interface IDesignAtomsViewerApiClient {
816
838
  * @return Success
817
839
  */
818
840
  fonts(psName: string | null, tenantId?: number | undefined): Promise<FileResponse>;
841
+ /**
842
+ * @param tenantId (optional) Tenant identifier
843
+ * @param body (optional)
844
+ * @return Success
845
+ */
846
+ getColorPreview(tenantId?: number | undefined, body?: GetColorPreviewRequest | null | undefined): Promise<any>;
847
+ /**
848
+ * @param tenantId (optional) Tenant identifier
849
+ * @param body (optional)
850
+ * @return Success
851
+ */
852
+ getColorPreviews(tenantId?: number | undefined, body?: GetColorPreviewsRequest | null | undefined): Promise<GetColorPreviewsResponse>;
819
853
  /**
820
854
  * @param fontKey (optional)
821
855
  * @param tenantId (optional) Tenant identifier
@@ -980,6 +1014,20 @@ export declare class DesignAtomsViewerApiClient extends ApiClientBase implements
980
1014
  */
981
1015
  fonts(psName: string | null, tenantId?: number | undefined, cancelToken?: CancelToken | undefined): Promise<FileResponse>;
982
1016
  protected processFonts(response: AxiosResponse): Promise<FileResponse>;
1017
+ /**
1018
+ * @param tenantId (optional) Tenant identifier
1019
+ * @param body (optional)
1020
+ * @return Success
1021
+ */
1022
+ getColorPreview(tenantId?: number | undefined, body?: GetColorPreviewRequest | null | undefined, cancelToken?: CancelToken | undefined): Promise<any>;
1023
+ protected processGetColorPreview(response: AxiosResponse): Promise<any>;
1024
+ /**
1025
+ * @param tenantId (optional) Tenant identifier
1026
+ * @param body (optional)
1027
+ * @return Success
1028
+ */
1029
+ getColorPreviews(tenantId?: number | undefined, body?: GetColorPreviewsRequest | null | undefined, cancelToken?: CancelToken | undefined): Promise<GetColorPreviewsResponse>;
1030
+ protected processGetColorPreviews(response: AxiosResponse): Promise<GetColorPreviewsResponse>;
983
1031
  /**
984
1032
  * @param fontKey (optional)
985
1033
  * @param tenantId (optional) Tenant identifier
@@ -1171,6 +1219,30 @@ export interface FontsMethodData {
1171
1219
  advancedMode?: boolean;
1172
1220
  baseUrl?: string | null;
1173
1221
  }
1222
+ export interface GetColorPreviewRequest {
1223
+ colorData?: any | null;
1224
+ }
1225
+ export interface GetColorPreviewsRequest {
1226
+ colorData?: any | null;
1227
+ }
1228
+ export declare enum ColorSpace {
1229
+ Rgb = "Rgb",
1230
+ Cmyk = "Cmyk",
1231
+ Grayscale = "Grayscale",
1232
+ Lab = "Lab",
1233
+ Spot = "Spot"
1234
+ }
1235
+ export interface RgbColor {
1236
+ readonly colorSpace?: ColorSpace;
1237
+ r?: number;
1238
+ g?: number;
1239
+ b?: number;
1240
+ alpha?: number;
1241
+ profile?: string | null;
1242
+ }
1243
+ export interface GetColorPreviewsResponse {
1244
+ previews?: RgbColor[] | null;
1245
+ }
1174
1246
  export interface GetImageSizeRequest {
1175
1247
  imageId?: string | null;
1176
1248
  pageIndex?: number;
@@ -312,6 +312,134 @@ export class DesignAtomsCompatibilityApiClient extends ApiClientBase {
312
312
  }
313
313
  return Promise.resolve(null);
314
314
  }
315
+ /**
316
+ * @param body (optional)
317
+ * @return Success
318
+ */
319
+ getColorPreview(tenantId, body, cancelToken) {
320
+ let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreview";
321
+ if (tenantId === undefined || tenantId === null)
322
+ throw new Error("The parameter 'tenantId' must be defined.");
323
+ url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
324
+ url_ = url_.replace(/[?&]$/, "");
325
+ const content_ = JSON.stringify(body);
326
+ let options_ = {
327
+ data: content_,
328
+ method: "POST",
329
+ url: url_,
330
+ headers: {
331
+ "Content-Type": "application/json",
332
+ "Accept": "application/json"
333
+ },
334
+ cancelToken
335
+ };
336
+ return this.transformOptions(options_).then(transformedOptions_ => {
337
+ return this.instance.request(transformedOptions_);
338
+ }).catch((_error) => {
339
+ if (isAxiosError(_error) && _error.response) {
340
+ return _error.response;
341
+ }
342
+ else {
343
+ throw _error;
344
+ }
345
+ }).then((_response) => {
346
+ return this.transformResult(url_, _response, (_response) => this.processGetColorPreview(_response));
347
+ });
348
+ }
349
+ processGetColorPreview(response) {
350
+ const status = response.status;
351
+ let _headers = {};
352
+ if (response.headers && typeof response.headers === "object") {
353
+ for (let k in response.headers) {
354
+ if (response.headers.hasOwnProperty(k)) {
355
+ _headers[k] = response.headers[k];
356
+ }
357
+ }
358
+ }
359
+ if (status === 200) {
360
+ const _responseText = response.data;
361
+ let result200 = null;
362
+ let resultData200 = _responseText;
363
+ result200 = JSON.parse(resultData200);
364
+ return Promise.resolve(result200);
365
+ }
366
+ else if (status === 500) {
367
+ const _responseText = response.data;
368
+ let result500 = null;
369
+ let resultData500 = _responseText;
370
+ result500 = JSON.parse(resultData500);
371
+ return throwException("Internal server error", status, _responseText, _headers, result500);
372
+ }
373
+ else if (status !== 200 && status !== 204) {
374
+ const _responseText = response.data;
375
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
376
+ }
377
+ return Promise.resolve(null);
378
+ }
379
+ /**
380
+ * @param body (optional)
381
+ * @return Success
382
+ */
383
+ getColorPreviews(tenantId, body, cancelToken) {
384
+ let url_ = this.baseUrl + "/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreviews";
385
+ if (tenantId === undefined || tenantId === null)
386
+ throw new Error("The parameter 'tenantId' must be defined.");
387
+ url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
388
+ url_ = url_.replace(/[?&]$/, "");
389
+ const content_ = JSON.stringify(body);
390
+ let options_ = {
391
+ data: content_,
392
+ method: "POST",
393
+ url: url_,
394
+ headers: {
395
+ "Content-Type": "application/json",
396
+ "Accept": "application/json"
397
+ },
398
+ cancelToken
399
+ };
400
+ return this.transformOptions(options_).then(transformedOptions_ => {
401
+ return this.instance.request(transformedOptions_);
402
+ }).catch((_error) => {
403
+ if (isAxiosError(_error) && _error.response) {
404
+ return _error.response;
405
+ }
406
+ else {
407
+ throw _error;
408
+ }
409
+ }).then((_response) => {
410
+ return this.transformResult(url_, _response, (_response) => this.processGetColorPreviews(_response));
411
+ });
412
+ }
413
+ processGetColorPreviews(response) {
414
+ const status = response.status;
415
+ let _headers = {};
416
+ if (response.headers && typeof response.headers === "object") {
417
+ for (let k in response.headers) {
418
+ if (response.headers.hasOwnProperty(k)) {
419
+ _headers[k] = response.headers[k];
420
+ }
421
+ }
422
+ }
423
+ if (status === 200) {
424
+ const _responseText = response.data;
425
+ let result200 = null;
426
+ let resultData200 = _responseText;
427
+ result200 = JSON.parse(resultData200);
428
+ return Promise.resolve(result200);
429
+ }
430
+ else if (status === 500) {
431
+ const _responseText = response.data;
432
+ let result500 = null;
433
+ let resultData500 = _responseText;
434
+ result500 = JSON.parse(resultData500);
435
+ return throwException("Internal server error", status, _responseText, _headers, result500);
436
+ }
437
+ else if (status !== 200 && status !== 204) {
438
+ const _responseText = response.data;
439
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
440
+ }
441
+ return Promise.resolve(null);
442
+ }
315
443
  /**
316
444
  * @param fontKey (optional)
317
445
  * @return Success
@@ -3980,6 +4108,138 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
3980
4108
  }
3981
4109
  return Promise.resolve(null);
3982
4110
  }
4111
+ /**
4112
+ * @param tenantId (optional) Tenant identifier
4113
+ * @param body (optional)
4114
+ * @return Success
4115
+ */
4116
+ getColorPreview(tenantId, body, cancelToken) {
4117
+ let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/GetColorPreview?";
4118
+ if (tenantId === null)
4119
+ throw new Error("The parameter 'tenantId' cannot be null.");
4120
+ else if (tenantId !== undefined)
4121
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4122
+ url_ = url_.replace(/[?&]$/, "");
4123
+ const content_ = JSON.stringify(body);
4124
+ let options_ = {
4125
+ data: content_,
4126
+ method: "POST",
4127
+ url: url_,
4128
+ headers: {
4129
+ "Content-Type": "application/json",
4130
+ "Accept": "application/json"
4131
+ },
4132
+ cancelToken
4133
+ };
4134
+ return this.transformOptions(options_).then(transformedOptions_ => {
4135
+ return this.instance.request(transformedOptions_);
4136
+ }).catch((_error) => {
4137
+ if (isAxiosError(_error) && _error.response) {
4138
+ return _error.response;
4139
+ }
4140
+ else {
4141
+ throw _error;
4142
+ }
4143
+ }).then((_response) => {
4144
+ return this.transformResult(url_, _response, (_response) => this.processGetColorPreview(_response));
4145
+ });
4146
+ }
4147
+ processGetColorPreview(response) {
4148
+ const status = response.status;
4149
+ let _headers = {};
4150
+ if (response.headers && typeof response.headers === "object") {
4151
+ for (let k in response.headers) {
4152
+ if (response.headers.hasOwnProperty(k)) {
4153
+ _headers[k] = response.headers[k];
4154
+ }
4155
+ }
4156
+ }
4157
+ if (status === 200) {
4158
+ const _responseText = response.data;
4159
+ let result200 = null;
4160
+ let resultData200 = _responseText;
4161
+ result200 = JSON.parse(resultData200);
4162
+ return Promise.resolve(result200);
4163
+ }
4164
+ else if (status === 500) {
4165
+ const _responseText = response.data;
4166
+ let result500 = null;
4167
+ let resultData500 = _responseText;
4168
+ result500 = JSON.parse(resultData500);
4169
+ return throwException("Internal server error", status, _responseText, _headers, result500);
4170
+ }
4171
+ else if (status !== 200 && status !== 204) {
4172
+ const _responseText = response.data;
4173
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4174
+ }
4175
+ return Promise.resolve(null);
4176
+ }
4177
+ /**
4178
+ * @param tenantId (optional) Tenant identifier
4179
+ * @param body (optional)
4180
+ * @return Success
4181
+ */
4182
+ getColorPreviews(tenantId, body, cancelToken) {
4183
+ let url_ = this.baseUrl + "/api/atoms/v1/ccviewer/GetColorPreviews?";
4184
+ if (tenantId === null)
4185
+ throw new Error("The parameter 'tenantId' cannot be null.");
4186
+ else if (tenantId !== undefined)
4187
+ url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
4188
+ url_ = url_.replace(/[?&]$/, "");
4189
+ const content_ = JSON.stringify(body);
4190
+ let options_ = {
4191
+ data: content_,
4192
+ method: "POST",
4193
+ url: url_,
4194
+ headers: {
4195
+ "Content-Type": "application/json",
4196
+ "Accept": "application/json"
4197
+ },
4198
+ cancelToken
4199
+ };
4200
+ return this.transformOptions(options_).then(transformedOptions_ => {
4201
+ return this.instance.request(transformedOptions_);
4202
+ }).catch((_error) => {
4203
+ if (isAxiosError(_error) && _error.response) {
4204
+ return _error.response;
4205
+ }
4206
+ else {
4207
+ throw _error;
4208
+ }
4209
+ }).then((_response) => {
4210
+ return this.transformResult(url_, _response, (_response) => this.processGetColorPreviews(_response));
4211
+ });
4212
+ }
4213
+ processGetColorPreviews(response) {
4214
+ const status = response.status;
4215
+ let _headers = {};
4216
+ if (response.headers && typeof response.headers === "object") {
4217
+ for (let k in response.headers) {
4218
+ if (response.headers.hasOwnProperty(k)) {
4219
+ _headers[k] = response.headers[k];
4220
+ }
4221
+ }
4222
+ }
4223
+ if (status === 200) {
4224
+ const _responseText = response.data;
4225
+ let result200 = null;
4226
+ let resultData200 = _responseText;
4227
+ result200 = JSON.parse(resultData200);
4228
+ return Promise.resolve(result200);
4229
+ }
4230
+ else if (status === 500) {
4231
+ const _responseText = response.data;
4232
+ let result500 = null;
4233
+ let resultData500 = _responseText;
4234
+ result500 = JSON.parse(resultData500);
4235
+ return throwException("Internal server error", status, _responseText, _headers, result500);
4236
+ }
4237
+ else if (status !== 200 && status !== 204) {
4238
+ const _responseText = response.data;
4239
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4240
+ }
4241
+ return Promise.resolve(null);
4242
+ }
3983
4243
  /**
3984
4244
  * @param fontKey (optional)
3985
4245
  * @param tenantId (optional) Tenant identifier
@@ -5522,6 +5782,14 @@ export class DesignAtomsViewerApiClient extends ApiClientBase {
5522
5782
  return Promise.resolve(null);
5523
5783
  }
5524
5784
  }
5785
+ export var ColorSpace;
5786
+ (function (ColorSpace) {
5787
+ ColorSpace["Rgb"] = "Rgb";
5788
+ ColorSpace["Cmyk"] = "Cmyk";
5789
+ ColorSpace["Grayscale"] = "Grayscale";
5790
+ ColorSpace["Lab"] = "Lab";
5791
+ ColorSpace["Spot"] = "Spot";
5792
+ })(ColorSpace || (ColorSpace = {}));
5525
5793
  /** Image preview file format. */
5526
5794
  export var ImagePreviewFormat;
5527
5795
  (function (ImagePreviewFormat) {