@ignos/api-client 20250527.0.11834 → 20250528.0.11839

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.
@@ -1328,6 +1328,12 @@ export interface ICncSetupFixturesClient {
1328
1328
  updateFixtures(update: FixtureUpdateDto[]): Promise<FixtureDto[]>;
1329
1329
  getFixtureInterfaceSuggestions(input: string | undefined, fixtureType: FixtureTypeDto | undefined): Promise<FixtureSuggestionDto[]>;
1330
1330
  getFixtureLocationSuggestions(input: string | undefined, fixtureType: FixtureTypeDto | undefined): Promise<FixtureSuggestionDto[]>;
1331
+ listFixtureAttachments(fixtureId: string): Promise<FileDto[]>;
1332
+ uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto>;
1333
+ deleteFixtureAttachment(fixtureId: string, filename: string): Promise<void>;
1334
+ listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
1335
+ uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
1336
+ deleteFixtureImage(fixtureId: string, filename: string): Promise<void>;
1331
1337
  operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
1332
1338
  operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
1333
1339
  }
@@ -1350,6 +1356,18 @@ export declare class CncSetupFixturesClient extends AuthorizedApiBase implements
1350
1356
  protected processGetFixtureInterfaceSuggestions(response: Response): Promise<FixtureSuggestionDto[]>;
1351
1357
  getFixtureLocationSuggestions(input: string | undefined, fixtureType: FixtureTypeDto | undefined): Promise<FixtureSuggestionDto[]>;
1352
1358
  protected processGetFixtureLocationSuggestions(response: Response): Promise<FixtureSuggestionDto[]>;
1359
+ listFixtureAttachments(fixtureId: string): Promise<FileDto[]>;
1360
+ protected processListFixtureAttachments(response: Response): Promise<FileDto[]>;
1361
+ uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto>;
1362
+ protected processUploadFixtureAttachment(response: Response): Promise<FileDto>;
1363
+ deleteFixtureAttachment(fixtureId: string, filename: string): Promise<void>;
1364
+ protected processDeleteFixtureAttachment(response: Response): Promise<void>;
1365
+ listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
1366
+ protected processListFixtureImages(response: Response): Promise<ListFixtureImagesDto[]>;
1367
+ uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
1368
+ protected processUploadFixtureImage(response: Response): Promise<ListFixtureImagesDto>;
1369
+ deleteFixtureImage(fixtureId: string, filename: string): Promise<void>;
1370
+ protected processDeleteFixtureImage(response: Response): Promise<void>;
1353
1371
  operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
1354
1372
  protected processOperationAddFixture(response: Response): Promise<CncMachineOperationDto>;
1355
1373
  operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
@@ -8499,6 +8517,30 @@ export declare class FixtureSuggestionDto implements IFixtureSuggestionDto {
8499
8517
  export interface IFixtureSuggestionDto {
8500
8518
  suggestion: string;
8501
8519
  }
8520
+ export declare class UploadFixtureAttachmentDto implements IUploadFixtureAttachmentDto {
8521
+ uploadKey?: string;
8522
+ filename?: string;
8523
+ constructor(data?: IUploadFixtureAttachmentDto);
8524
+ init(_data?: any): void;
8525
+ static fromJS(data: any): UploadFixtureAttachmentDto;
8526
+ toJSON(data?: any): any;
8527
+ }
8528
+ export interface IUploadFixtureAttachmentDto {
8529
+ uploadKey?: string;
8530
+ filename?: string;
8531
+ }
8532
+ export declare class ListFixtureImagesDto implements IListFixtureImagesDto {
8533
+ image?: FileDto;
8534
+ thumbnail?: FileDto | null;
8535
+ constructor(data?: IListFixtureImagesDto);
8536
+ init(_data?: any): void;
8537
+ static fromJS(data: any): ListFixtureImagesDto;
8538
+ toJSON(data?: any): any;
8539
+ }
8540
+ export interface IListFixtureImagesDto {
8541
+ image?: FileDto;
8542
+ thumbnail?: FileDto | null;
8543
+ }
8502
8544
  export declare class SpindleAndCuttingSpeedDto implements ISpindleAndCuttingSpeedDto {
8503
8545
  diameter: number;
8504
8546
  cuttingSpeed: number;
@@ -11463,6 +11463,256 @@ export class CncSetupFixturesClient extends AuthorizedApiBase {
11463
11463
  }
11464
11464
  return Promise.resolve(null);
11465
11465
  }
11466
+ listFixtureAttachments(fixtureId) {
11467
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
11468
+ if (fixtureId === undefined || fixtureId === null)
11469
+ throw new Error("The parameter 'fixtureId' must be defined.");
11470
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11471
+ url_ = url_.replace(/[?&]$/, "");
11472
+ let options_ = {
11473
+ method: "GET",
11474
+ headers: {
11475
+ "Accept": "application/json"
11476
+ }
11477
+ };
11478
+ return this.transformOptions(options_).then(transformedOptions_ => {
11479
+ return this.http.fetch(url_, transformedOptions_);
11480
+ }).then((_response) => {
11481
+ return this.processListFixtureAttachments(_response);
11482
+ });
11483
+ }
11484
+ processListFixtureAttachments(response) {
11485
+ const status = response.status;
11486
+ let _headers = {};
11487
+ if (response.headers && response.headers.forEach) {
11488
+ response.headers.forEach((v, k) => _headers[k] = v);
11489
+ }
11490
+ ;
11491
+ if (status === 200) {
11492
+ return response.text().then((_responseText) => {
11493
+ let result200 = null;
11494
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
11495
+ if (Array.isArray(resultData200)) {
11496
+ result200 = [];
11497
+ for (let item of resultData200)
11498
+ result200.push(FileDto.fromJS(item));
11499
+ }
11500
+ return result200;
11501
+ });
11502
+ }
11503
+ else if (status !== 200 && status !== 204) {
11504
+ return response.text().then((_responseText) => {
11505
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11506
+ });
11507
+ }
11508
+ return Promise.resolve(null);
11509
+ }
11510
+ uploadFixtureAttachment(fixtureId, attachment) {
11511
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
11512
+ if (fixtureId === undefined || fixtureId === null)
11513
+ throw new Error("The parameter 'fixtureId' must be defined.");
11514
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11515
+ url_ = url_.replace(/[?&]$/, "");
11516
+ const content_ = JSON.stringify(attachment);
11517
+ let options_ = {
11518
+ body: content_,
11519
+ method: "POST",
11520
+ headers: {
11521
+ "Content-Type": "application/json",
11522
+ "Accept": "application/json"
11523
+ }
11524
+ };
11525
+ return this.transformOptions(options_).then(transformedOptions_ => {
11526
+ return this.http.fetch(url_, transformedOptions_);
11527
+ }).then((_response) => {
11528
+ return this.processUploadFixtureAttachment(_response);
11529
+ });
11530
+ }
11531
+ processUploadFixtureAttachment(response) {
11532
+ const status = response.status;
11533
+ let _headers = {};
11534
+ if (response.headers && response.headers.forEach) {
11535
+ response.headers.forEach((v, k) => _headers[k] = v);
11536
+ }
11537
+ ;
11538
+ if (status === 200) {
11539
+ return response.text().then((_responseText) => {
11540
+ let result200 = null;
11541
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
11542
+ result200 = FileDto.fromJS(resultData200);
11543
+ return result200;
11544
+ });
11545
+ }
11546
+ else if (status !== 200 && status !== 204) {
11547
+ return response.text().then((_responseText) => {
11548
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11549
+ });
11550
+ }
11551
+ return Promise.resolve(null);
11552
+ }
11553
+ deleteFixtureAttachment(fixtureId, filename) {
11554
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments/{filename}";
11555
+ if (fixtureId === undefined || fixtureId === null)
11556
+ throw new Error("The parameter 'fixtureId' must be defined.");
11557
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11558
+ if (filename === undefined || filename === null)
11559
+ throw new Error("The parameter 'filename' must be defined.");
11560
+ url_ = url_.replace("{filename}", encodeURIComponent("" + filename));
11561
+ url_ = url_.replace(/[?&]$/, "");
11562
+ let options_ = {
11563
+ method: "DELETE",
11564
+ headers: {}
11565
+ };
11566
+ return this.transformOptions(options_).then(transformedOptions_ => {
11567
+ return this.http.fetch(url_, transformedOptions_);
11568
+ }).then((_response) => {
11569
+ return this.processDeleteFixtureAttachment(_response);
11570
+ });
11571
+ }
11572
+ processDeleteFixtureAttachment(response) {
11573
+ const status = response.status;
11574
+ let _headers = {};
11575
+ if (response.headers && response.headers.forEach) {
11576
+ response.headers.forEach((v, k) => _headers[k] = v);
11577
+ }
11578
+ ;
11579
+ if (status === 204) {
11580
+ return response.text().then((_responseText) => {
11581
+ return;
11582
+ });
11583
+ }
11584
+ else if (status !== 200 && status !== 204) {
11585
+ return response.text().then((_responseText) => {
11586
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11587
+ });
11588
+ }
11589
+ return Promise.resolve(null);
11590
+ }
11591
+ listFixtureImages(fixtureId) {
11592
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
11593
+ if (fixtureId === undefined || fixtureId === null)
11594
+ throw new Error("The parameter 'fixtureId' must be defined.");
11595
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11596
+ url_ = url_.replace(/[?&]$/, "");
11597
+ let options_ = {
11598
+ method: "GET",
11599
+ headers: {
11600
+ "Accept": "application/json"
11601
+ }
11602
+ };
11603
+ return this.transformOptions(options_).then(transformedOptions_ => {
11604
+ return this.http.fetch(url_, transformedOptions_);
11605
+ }).then((_response) => {
11606
+ return this.processListFixtureImages(_response);
11607
+ });
11608
+ }
11609
+ processListFixtureImages(response) {
11610
+ const status = response.status;
11611
+ let _headers = {};
11612
+ if (response.headers && response.headers.forEach) {
11613
+ response.headers.forEach((v, k) => _headers[k] = v);
11614
+ }
11615
+ ;
11616
+ if (status === 200) {
11617
+ return response.text().then((_responseText) => {
11618
+ let result200 = null;
11619
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
11620
+ if (Array.isArray(resultData200)) {
11621
+ result200 = [];
11622
+ for (let item of resultData200)
11623
+ result200.push(ListFixtureImagesDto.fromJS(item));
11624
+ }
11625
+ return result200;
11626
+ });
11627
+ }
11628
+ else if (status !== 200 && status !== 204) {
11629
+ return response.text().then((_responseText) => {
11630
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11631
+ });
11632
+ }
11633
+ return Promise.resolve(null);
11634
+ }
11635
+ uploadFixtureImage(fixtureId, attachment) {
11636
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
11637
+ if (fixtureId === undefined || fixtureId === null)
11638
+ throw new Error("The parameter 'fixtureId' must be defined.");
11639
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11640
+ url_ = url_.replace(/[?&]$/, "");
11641
+ const content_ = JSON.stringify(attachment);
11642
+ let options_ = {
11643
+ body: content_,
11644
+ method: "POST",
11645
+ headers: {
11646
+ "Content-Type": "application/json",
11647
+ "Accept": "application/json"
11648
+ }
11649
+ };
11650
+ return this.transformOptions(options_).then(transformedOptions_ => {
11651
+ return this.http.fetch(url_, transformedOptions_);
11652
+ }).then((_response) => {
11653
+ return this.processUploadFixtureImage(_response);
11654
+ });
11655
+ }
11656
+ processUploadFixtureImage(response) {
11657
+ const status = response.status;
11658
+ let _headers = {};
11659
+ if (response.headers && response.headers.forEach) {
11660
+ response.headers.forEach((v, k) => _headers[k] = v);
11661
+ }
11662
+ ;
11663
+ if (status === 200) {
11664
+ return response.text().then((_responseText) => {
11665
+ let result200 = null;
11666
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
11667
+ result200 = ListFixtureImagesDto.fromJS(resultData200);
11668
+ return result200;
11669
+ });
11670
+ }
11671
+ else if (status !== 200 && status !== 204) {
11672
+ return response.text().then((_responseText) => {
11673
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11674
+ });
11675
+ }
11676
+ return Promise.resolve(null);
11677
+ }
11678
+ deleteFixtureImage(fixtureId, filename) {
11679
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images/{filename}";
11680
+ if (fixtureId === undefined || fixtureId === null)
11681
+ throw new Error("The parameter 'fixtureId' must be defined.");
11682
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
11683
+ if (filename === undefined || filename === null)
11684
+ throw new Error("The parameter 'filename' must be defined.");
11685
+ url_ = url_.replace("{filename}", encodeURIComponent("" + filename));
11686
+ url_ = url_.replace(/[?&]$/, "");
11687
+ let options_ = {
11688
+ method: "DELETE",
11689
+ headers: {}
11690
+ };
11691
+ return this.transformOptions(options_).then(transformedOptions_ => {
11692
+ return this.http.fetch(url_, transformedOptions_);
11693
+ }).then((_response) => {
11694
+ return this.processDeleteFixtureImage(_response);
11695
+ });
11696
+ }
11697
+ processDeleteFixtureImage(response) {
11698
+ const status = response.status;
11699
+ let _headers = {};
11700
+ if (response.headers && response.headers.forEach) {
11701
+ response.headers.forEach((v, k) => _headers[k] = v);
11702
+ }
11703
+ ;
11704
+ if (status === 204) {
11705
+ return response.text().then((_responseText) => {
11706
+ return;
11707
+ });
11708
+ }
11709
+ else if (status !== 200 && status !== 204) {
11710
+ return response.text().then((_responseText) => {
11711
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
11712
+ });
11713
+ }
11714
+ return Promise.resolve(null);
11715
+ }
11466
11716
  operationAddFixture(operationId, fixtureIds) {
11467
11717
  let url_ = this.baseUrl + "/fixtures/operation/{operationId}";
11468
11718
  if (operationId === undefined || operationId === null)
@@ -33925,6 +34175,62 @@ export class FixtureSuggestionDto {
33925
34175
  return data;
33926
34176
  }
33927
34177
  }
34178
+ export class UploadFixtureAttachmentDto {
34179
+ constructor(data) {
34180
+ if (data) {
34181
+ for (var property in data) {
34182
+ if (data.hasOwnProperty(property))
34183
+ this[property] = data[property];
34184
+ }
34185
+ }
34186
+ }
34187
+ init(_data) {
34188
+ if (_data) {
34189
+ this.uploadKey = _data["uploadKey"];
34190
+ this.filename = _data["filename"];
34191
+ }
34192
+ }
34193
+ static fromJS(data) {
34194
+ data = typeof data === 'object' ? data : {};
34195
+ let result = new UploadFixtureAttachmentDto();
34196
+ result.init(data);
34197
+ return result;
34198
+ }
34199
+ toJSON(data) {
34200
+ data = typeof data === 'object' ? data : {};
34201
+ data["uploadKey"] = this.uploadKey;
34202
+ data["filename"] = this.filename;
34203
+ return data;
34204
+ }
34205
+ }
34206
+ export class ListFixtureImagesDto {
34207
+ constructor(data) {
34208
+ if (data) {
34209
+ for (var property in data) {
34210
+ if (data.hasOwnProperty(property))
34211
+ this[property] = data[property];
34212
+ }
34213
+ }
34214
+ }
34215
+ init(_data) {
34216
+ if (_data) {
34217
+ this.image = _data["image"] ? FileDto.fromJS(_data["image"]) : undefined;
34218
+ this.thumbnail = _data["thumbnail"] ? FileDto.fromJS(_data["thumbnail"]) : undefined;
34219
+ }
34220
+ }
34221
+ static fromJS(data) {
34222
+ data = typeof data === 'object' ? data : {};
34223
+ let result = new ListFixtureImagesDto();
34224
+ result.init(data);
34225
+ return result;
34226
+ }
34227
+ toJSON(data) {
34228
+ data = typeof data === 'object' ? data : {};
34229
+ data["image"] = this.image ? this.image.toJSON() : undefined;
34230
+ data["thumbnail"] = this.thumbnail ? this.thumbnail.toJSON() : undefined;
34231
+ return data;
34232
+ }
34233
+ }
33928
34234
  export class SpindleAndCuttingSpeedDto {
33929
34235
  constructor(data) {
33930
34236
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250527.0.11834",
3
+ "version": "20250528.0.11839",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -11945,6 +11945,18 @@ export interface ICncSetupFixturesClient {
11945
11945
 
11946
11946
  getFixtureLocationSuggestions(input: string | undefined, fixtureType: FixtureTypeDto | undefined): Promise<FixtureSuggestionDto[]>;
11947
11947
 
11948
+ listFixtureAttachments(fixtureId: string): Promise<FileDto[]>;
11949
+
11950
+ uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto>;
11951
+
11952
+ deleteFixtureAttachment(fixtureId: string, filename: string): Promise<void>;
11953
+
11954
+ listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
11955
+
11956
+ uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
11957
+
11958
+ deleteFixtureImage(fixtureId: string, filename: string): Promise<void>;
11959
+
11948
11960
  operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
11949
11961
 
11950
11962
  operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
@@ -12220,6 +12232,254 @@ export class CncSetupFixturesClient extends AuthorizedApiBase implements ICncSet
12220
12232
  return Promise.resolve<FixtureSuggestionDto[]>(null as any);
12221
12233
  }
12222
12234
 
12235
+ listFixtureAttachments(fixtureId: string): Promise<FileDto[]> {
12236
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
12237
+ if (fixtureId === undefined || fixtureId === null)
12238
+ throw new Error("The parameter 'fixtureId' must be defined.");
12239
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12240
+ url_ = url_.replace(/[?&]$/, "");
12241
+
12242
+ let options_: RequestInit = {
12243
+ method: "GET",
12244
+ headers: {
12245
+ "Accept": "application/json"
12246
+ }
12247
+ };
12248
+
12249
+ return this.transformOptions(options_).then(transformedOptions_ => {
12250
+ return this.http.fetch(url_, transformedOptions_);
12251
+ }).then((_response: Response) => {
12252
+ return this.processListFixtureAttachments(_response);
12253
+ });
12254
+ }
12255
+
12256
+ protected processListFixtureAttachments(response: Response): Promise<FileDto[]> {
12257
+ const status = response.status;
12258
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12259
+ if (status === 200) {
12260
+ return response.text().then((_responseText) => {
12261
+ let result200: any = null;
12262
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
12263
+ if (Array.isArray(resultData200)) {
12264
+ result200 = [] as any;
12265
+ for (let item of resultData200)
12266
+ result200!.push(FileDto.fromJS(item));
12267
+ }
12268
+ return result200;
12269
+ });
12270
+ } else if (status !== 200 && status !== 204) {
12271
+ return response.text().then((_responseText) => {
12272
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12273
+ });
12274
+ }
12275
+ return Promise.resolve<FileDto[]>(null as any);
12276
+ }
12277
+
12278
+ uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto> {
12279
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
12280
+ if (fixtureId === undefined || fixtureId === null)
12281
+ throw new Error("The parameter 'fixtureId' must be defined.");
12282
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12283
+ url_ = url_.replace(/[?&]$/, "");
12284
+
12285
+ const content_ = JSON.stringify(attachment);
12286
+
12287
+ let options_: RequestInit = {
12288
+ body: content_,
12289
+ method: "POST",
12290
+ headers: {
12291
+ "Content-Type": "application/json",
12292
+ "Accept": "application/json"
12293
+ }
12294
+ };
12295
+
12296
+ return this.transformOptions(options_).then(transformedOptions_ => {
12297
+ return this.http.fetch(url_, transformedOptions_);
12298
+ }).then((_response: Response) => {
12299
+ return this.processUploadFixtureAttachment(_response);
12300
+ });
12301
+ }
12302
+
12303
+ protected processUploadFixtureAttachment(response: Response): Promise<FileDto> {
12304
+ const status = response.status;
12305
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12306
+ if (status === 200) {
12307
+ return response.text().then((_responseText) => {
12308
+ let result200: any = null;
12309
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
12310
+ result200 = FileDto.fromJS(resultData200);
12311
+ return result200;
12312
+ });
12313
+ } else if (status !== 200 && status !== 204) {
12314
+ return response.text().then((_responseText) => {
12315
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12316
+ });
12317
+ }
12318
+ return Promise.resolve<FileDto>(null as any);
12319
+ }
12320
+
12321
+ deleteFixtureAttachment(fixtureId: string, filename: string): Promise<void> {
12322
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments/{filename}";
12323
+ if (fixtureId === undefined || fixtureId === null)
12324
+ throw new Error("The parameter 'fixtureId' must be defined.");
12325
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12326
+ if (filename === undefined || filename === null)
12327
+ throw new Error("The parameter 'filename' must be defined.");
12328
+ url_ = url_.replace("{filename}", encodeURIComponent("" + filename));
12329
+ url_ = url_.replace(/[?&]$/, "");
12330
+
12331
+ let options_: RequestInit = {
12332
+ method: "DELETE",
12333
+ headers: {
12334
+ }
12335
+ };
12336
+
12337
+ return this.transformOptions(options_).then(transformedOptions_ => {
12338
+ return this.http.fetch(url_, transformedOptions_);
12339
+ }).then((_response: Response) => {
12340
+ return this.processDeleteFixtureAttachment(_response);
12341
+ });
12342
+ }
12343
+
12344
+ protected processDeleteFixtureAttachment(response: Response): Promise<void> {
12345
+ const status = response.status;
12346
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12347
+ if (status === 204) {
12348
+ return response.text().then((_responseText) => {
12349
+ return;
12350
+ });
12351
+ } else if (status !== 200 && status !== 204) {
12352
+ return response.text().then((_responseText) => {
12353
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12354
+ });
12355
+ }
12356
+ return Promise.resolve<void>(null as any);
12357
+ }
12358
+
12359
+ listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]> {
12360
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
12361
+ if (fixtureId === undefined || fixtureId === null)
12362
+ throw new Error("The parameter 'fixtureId' must be defined.");
12363
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12364
+ url_ = url_.replace(/[?&]$/, "");
12365
+
12366
+ let options_: RequestInit = {
12367
+ method: "GET",
12368
+ headers: {
12369
+ "Accept": "application/json"
12370
+ }
12371
+ };
12372
+
12373
+ return this.transformOptions(options_).then(transformedOptions_ => {
12374
+ return this.http.fetch(url_, transformedOptions_);
12375
+ }).then((_response: Response) => {
12376
+ return this.processListFixtureImages(_response);
12377
+ });
12378
+ }
12379
+
12380
+ protected processListFixtureImages(response: Response): Promise<ListFixtureImagesDto[]> {
12381
+ const status = response.status;
12382
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12383
+ if (status === 200) {
12384
+ return response.text().then((_responseText) => {
12385
+ let result200: any = null;
12386
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
12387
+ if (Array.isArray(resultData200)) {
12388
+ result200 = [] as any;
12389
+ for (let item of resultData200)
12390
+ result200!.push(ListFixtureImagesDto.fromJS(item));
12391
+ }
12392
+ return result200;
12393
+ });
12394
+ } else if (status !== 200 && status !== 204) {
12395
+ return response.text().then((_responseText) => {
12396
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12397
+ });
12398
+ }
12399
+ return Promise.resolve<ListFixtureImagesDto[]>(null as any);
12400
+ }
12401
+
12402
+ uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto> {
12403
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
12404
+ if (fixtureId === undefined || fixtureId === null)
12405
+ throw new Error("The parameter 'fixtureId' must be defined.");
12406
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12407
+ url_ = url_.replace(/[?&]$/, "");
12408
+
12409
+ const content_ = JSON.stringify(attachment);
12410
+
12411
+ let options_: RequestInit = {
12412
+ body: content_,
12413
+ method: "POST",
12414
+ headers: {
12415
+ "Content-Type": "application/json",
12416
+ "Accept": "application/json"
12417
+ }
12418
+ };
12419
+
12420
+ return this.transformOptions(options_).then(transformedOptions_ => {
12421
+ return this.http.fetch(url_, transformedOptions_);
12422
+ }).then((_response: Response) => {
12423
+ return this.processUploadFixtureImage(_response);
12424
+ });
12425
+ }
12426
+
12427
+ protected processUploadFixtureImage(response: Response): Promise<ListFixtureImagesDto> {
12428
+ const status = response.status;
12429
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12430
+ if (status === 200) {
12431
+ return response.text().then((_responseText) => {
12432
+ let result200: any = null;
12433
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
12434
+ result200 = ListFixtureImagesDto.fromJS(resultData200);
12435
+ return result200;
12436
+ });
12437
+ } else if (status !== 200 && status !== 204) {
12438
+ return response.text().then((_responseText) => {
12439
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12440
+ });
12441
+ }
12442
+ return Promise.resolve<ListFixtureImagesDto>(null as any);
12443
+ }
12444
+
12445
+ deleteFixtureImage(fixtureId: string, filename: string): Promise<void> {
12446
+ let url_ = this.baseUrl + "/fixtures/{fixtureId}/images/{filename}";
12447
+ if (fixtureId === undefined || fixtureId === null)
12448
+ throw new Error("The parameter 'fixtureId' must be defined.");
12449
+ url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
12450
+ if (filename === undefined || filename === null)
12451
+ throw new Error("The parameter 'filename' must be defined.");
12452
+ url_ = url_.replace("{filename}", encodeURIComponent("" + filename));
12453
+ url_ = url_.replace(/[?&]$/, "");
12454
+
12455
+ let options_: RequestInit = {
12456
+ method: "DELETE",
12457
+ headers: {
12458
+ }
12459
+ };
12460
+
12461
+ return this.transformOptions(options_).then(transformedOptions_ => {
12462
+ return this.http.fetch(url_, transformedOptions_);
12463
+ }).then((_response: Response) => {
12464
+ return this.processDeleteFixtureImage(_response);
12465
+ });
12466
+ }
12467
+
12468
+ protected processDeleteFixtureImage(response: Response): Promise<void> {
12469
+ const status = response.status;
12470
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
12471
+ if (status === 204) {
12472
+ return response.text().then((_responseText) => {
12473
+ return;
12474
+ });
12475
+ } else if (status !== 200 && status !== 204) {
12476
+ return response.text().then((_responseText) => {
12477
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12478
+ });
12479
+ }
12480
+ return Promise.resolve<void>(null as any);
12481
+ }
12482
+
12223
12483
  operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto> {
12224
12484
  let url_ = this.baseUrl + "/fixtures/operation/{operationId}";
12225
12485
  if (operationId === undefined || operationId === null)
@@ -41285,6 +41545,86 @@ export interface IFixtureSuggestionDto {
41285
41545
  suggestion: string;
41286
41546
  }
41287
41547
 
41548
+ export class UploadFixtureAttachmentDto implements IUploadFixtureAttachmentDto {
41549
+ uploadKey?: string;
41550
+ filename?: string;
41551
+
41552
+ constructor(data?: IUploadFixtureAttachmentDto) {
41553
+ if (data) {
41554
+ for (var property in data) {
41555
+ if (data.hasOwnProperty(property))
41556
+ (<any>this)[property] = (<any>data)[property];
41557
+ }
41558
+ }
41559
+ }
41560
+
41561
+ init(_data?: any) {
41562
+ if (_data) {
41563
+ this.uploadKey = _data["uploadKey"];
41564
+ this.filename = _data["filename"];
41565
+ }
41566
+ }
41567
+
41568
+ static fromJS(data: any): UploadFixtureAttachmentDto {
41569
+ data = typeof data === 'object' ? data : {};
41570
+ let result = new UploadFixtureAttachmentDto();
41571
+ result.init(data);
41572
+ return result;
41573
+ }
41574
+
41575
+ toJSON(data?: any) {
41576
+ data = typeof data === 'object' ? data : {};
41577
+ data["uploadKey"] = this.uploadKey;
41578
+ data["filename"] = this.filename;
41579
+ return data;
41580
+ }
41581
+ }
41582
+
41583
+ export interface IUploadFixtureAttachmentDto {
41584
+ uploadKey?: string;
41585
+ filename?: string;
41586
+ }
41587
+
41588
+ export class ListFixtureImagesDto implements IListFixtureImagesDto {
41589
+ image?: FileDto;
41590
+ thumbnail?: FileDto | null;
41591
+
41592
+ constructor(data?: IListFixtureImagesDto) {
41593
+ if (data) {
41594
+ for (var property in data) {
41595
+ if (data.hasOwnProperty(property))
41596
+ (<any>this)[property] = (<any>data)[property];
41597
+ }
41598
+ }
41599
+ }
41600
+
41601
+ init(_data?: any) {
41602
+ if (_data) {
41603
+ this.image = _data["image"] ? FileDto.fromJS(_data["image"]) : <any>undefined;
41604
+ this.thumbnail = _data["thumbnail"] ? FileDto.fromJS(_data["thumbnail"]) : <any>undefined;
41605
+ }
41606
+ }
41607
+
41608
+ static fromJS(data: any): ListFixtureImagesDto {
41609
+ data = typeof data === 'object' ? data : {};
41610
+ let result = new ListFixtureImagesDto();
41611
+ result.init(data);
41612
+ return result;
41613
+ }
41614
+
41615
+ toJSON(data?: any) {
41616
+ data = typeof data === 'object' ? data : {};
41617
+ data["image"] = this.image ? this.image.toJSON() : <any>undefined;
41618
+ data["thumbnail"] = this.thumbnail ? this.thumbnail.toJSON() : <any>undefined;
41619
+ return data;
41620
+ }
41621
+ }
41622
+
41623
+ export interface IListFixtureImagesDto {
41624
+ image?: FileDto;
41625
+ thumbnail?: FileDto | null;
41626
+ }
41627
+
41288
41628
  export class SpindleAndCuttingSpeedDto implements ISpindleAndCuttingSpeedDto {
41289
41629
  diameter!: number;
41290
41630
  cuttingSpeed!: number;