@ignos/api-client 20250527.0.11834 → 20250528.0.11837
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/lib/ignosportal-api.d.ts +36 -0
- package/lib/ignosportal-api.js +230 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +260 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -1328,6 +1328,10 @@ 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
|
+
listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
|
|
1334
|
+
uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
|
|
1331
1335
|
operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
1332
1336
|
operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
1333
1337
|
}
|
|
@@ -1350,6 +1354,14 @@ export declare class CncSetupFixturesClient extends AuthorizedApiBase implements
|
|
|
1350
1354
|
protected processGetFixtureInterfaceSuggestions(response: Response): Promise<FixtureSuggestionDto[]>;
|
|
1351
1355
|
getFixtureLocationSuggestions(input: string | undefined, fixtureType: FixtureTypeDto | undefined): Promise<FixtureSuggestionDto[]>;
|
|
1352
1356
|
protected processGetFixtureLocationSuggestions(response: Response): Promise<FixtureSuggestionDto[]>;
|
|
1357
|
+
listFixtureAttachments(fixtureId: string): Promise<FileDto[]>;
|
|
1358
|
+
protected processListFixtureAttachments(response: Response): Promise<FileDto[]>;
|
|
1359
|
+
uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto>;
|
|
1360
|
+
protected processUploadFixtureAttachment(response: Response): Promise<FileDto>;
|
|
1361
|
+
listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
|
|
1362
|
+
protected processListFixtureImages(response: Response): Promise<ListFixtureImagesDto[]>;
|
|
1363
|
+
uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
|
|
1364
|
+
protected processUploadFixtureImage(response: Response): Promise<ListFixtureImagesDto>;
|
|
1353
1365
|
operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
1354
1366
|
protected processOperationAddFixture(response: Response): Promise<CncMachineOperationDto>;
|
|
1355
1367
|
operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
@@ -8499,6 +8511,30 @@ export declare class FixtureSuggestionDto implements IFixtureSuggestionDto {
|
|
|
8499
8511
|
export interface IFixtureSuggestionDto {
|
|
8500
8512
|
suggestion: string;
|
|
8501
8513
|
}
|
|
8514
|
+
export declare class UploadFixtureAttachmentDto implements IUploadFixtureAttachmentDto {
|
|
8515
|
+
uploadKey?: string;
|
|
8516
|
+
filename?: string;
|
|
8517
|
+
constructor(data?: IUploadFixtureAttachmentDto);
|
|
8518
|
+
init(_data?: any): void;
|
|
8519
|
+
static fromJS(data: any): UploadFixtureAttachmentDto;
|
|
8520
|
+
toJSON(data?: any): any;
|
|
8521
|
+
}
|
|
8522
|
+
export interface IUploadFixtureAttachmentDto {
|
|
8523
|
+
uploadKey?: string;
|
|
8524
|
+
filename?: string;
|
|
8525
|
+
}
|
|
8526
|
+
export declare class ListFixtureImagesDto implements IListFixtureImagesDto {
|
|
8527
|
+
image?: FileDto;
|
|
8528
|
+
thumbnail?: FileDto | null;
|
|
8529
|
+
constructor(data?: IListFixtureImagesDto);
|
|
8530
|
+
init(_data?: any): void;
|
|
8531
|
+
static fromJS(data: any): ListFixtureImagesDto;
|
|
8532
|
+
toJSON(data?: any): any;
|
|
8533
|
+
}
|
|
8534
|
+
export interface IListFixtureImagesDto {
|
|
8535
|
+
image?: FileDto;
|
|
8536
|
+
thumbnail?: FileDto | null;
|
|
8537
|
+
}
|
|
8502
8538
|
export declare class SpindleAndCuttingSpeedDto implements ISpindleAndCuttingSpeedDto {
|
|
8503
8539
|
diameter: number;
|
|
8504
8540
|
cuttingSpeed: number;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -11463,6 +11463,180 @@ 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
|
+
listFixtureImages(fixtureId) {
|
|
11554
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
|
|
11555
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
11556
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
11557
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
11558
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11559
|
+
let options_ = {
|
|
11560
|
+
method: "GET",
|
|
11561
|
+
headers: {
|
|
11562
|
+
"Accept": "application/json"
|
|
11563
|
+
}
|
|
11564
|
+
};
|
|
11565
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11566
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11567
|
+
}).then((_response) => {
|
|
11568
|
+
return this.processListFixtureImages(_response);
|
|
11569
|
+
});
|
|
11570
|
+
}
|
|
11571
|
+
processListFixtureImages(response) {
|
|
11572
|
+
const status = response.status;
|
|
11573
|
+
let _headers = {};
|
|
11574
|
+
if (response.headers && response.headers.forEach) {
|
|
11575
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11576
|
+
}
|
|
11577
|
+
;
|
|
11578
|
+
if (status === 200) {
|
|
11579
|
+
return response.text().then((_responseText) => {
|
|
11580
|
+
let result200 = null;
|
|
11581
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11582
|
+
if (Array.isArray(resultData200)) {
|
|
11583
|
+
result200 = [];
|
|
11584
|
+
for (let item of resultData200)
|
|
11585
|
+
result200.push(ListFixtureImagesDto.fromJS(item));
|
|
11586
|
+
}
|
|
11587
|
+
return result200;
|
|
11588
|
+
});
|
|
11589
|
+
}
|
|
11590
|
+
else if (status !== 200 && status !== 204) {
|
|
11591
|
+
return response.text().then((_responseText) => {
|
|
11592
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11593
|
+
});
|
|
11594
|
+
}
|
|
11595
|
+
return Promise.resolve(null);
|
|
11596
|
+
}
|
|
11597
|
+
uploadFixtureImage(fixtureId, attachment) {
|
|
11598
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
|
|
11599
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
11600
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
11601
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
11602
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11603
|
+
const content_ = JSON.stringify(attachment);
|
|
11604
|
+
let options_ = {
|
|
11605
|
+
body: content_,
|
|
11606
|
+
method: "POST",
|
|
11607
|
+
headers: {
|
|
11608
|
+
"Content-Type": "application/json",
|
|
11609
|
+
"Accept": "application/json"
|
|
11610
|
+
}
|
|
11611
|
+
};
|
|
11612
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11613
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11614
|
+
}).then((_response) => {
|
|
11615
|
+
return this.processUploadFixtureImage(_response);
|
|
11616
|
+
});
|
|
11617
|
+
}
|
|
11618
|
+
processUploadFixtureImage(response) {
|
|
11619
|
+
const status = response.status;
|
|
11620
|
+
let _headers = {};
|
|
11621
|
+
if (response.headers && response.headers.forEach) {
|
|
11622
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11623
|
+
}
|
|
11624
|
+
;
|
|
11625
|
+
if (status === 200) {
|
|
11626
|
+
return response.text().then((_responseText) => {
|
|
11627
|
+
let result200 = null;
|
|
11628
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11629
|
+
result200 = ListFixtureImagesDto.fromJS(resultData200);
|
|
11630
|
+
return result200;
|
|
11631
|
+
});
|
|
11632
|
+
}
|
|
11633
|
+
else if (status !== 200 && status !== 204) {
|
|
11634
|
+
return response.text().then((_responseText) => {
|
|
11635
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11636
|
+
});
|
|
11637
|
+
}
|
|
11638
|
+
return Promise.resolve(null);
|
|
11639
|
+
}
|
|
11466
11640
|
operationAddFixture(operationId, fixtureIds) {
|
|
11467
11641
|
let url_ = this.baseUrl + "/fixtures/operation/{operationId}";
|
|
11468
11642
|
if (operationId === undefined || operationId === null)
|
|
@@ -33925,6 +34099,62 @@ export class FixtureSuggestionDto {
|
|
|
33925
34099
|
return data;
|
|
33926
34100
|
}
|
|
33927
34101
|
}
|
|
34102
|
+
export class UploadFixtureAttachmentDto {
|
|
34103
|
+
constructor(data) {
|
|
34104
|
+
if (data) {
|
|
34105
|
+
for (var property in data) {
|
|
34106
|
+
if (data.hasOwnProperty(property))
|
|
34107
|
+
this[property] = data[property];
|
|
34108
|
+
}
|
|
34109
|
+
}
|
|
34110
|
+
}
|
|
34111
|
+
init(_data) {
|
|
34112
|
+
if (_data) {
|
|
34113
|
+
this.uploadKey = _data["uploadKey"];
|
|
34114
|
+
this.filename = _data["filename"];
|
|
34115
|
+
}
|
|
34116
|
+
}
|
|
34117
|
+
static fromJS(data) {
|
|
34118
|
+
data = typeof data === 'object' ? data : {};
|
|
34119
|
+
let result = new UploadFixtureAttachmentDto();
|
|
34120
|
+
result.init(data);
|
|
34121
|
+
return result;
|
|
34122
|
+
}
|
|
34123
|
+
toJSON(data) {
|
|
34124
|
+
data = typeof data === 'object' ? data : {};
|
|
34125
|
+
data["uploadKey"] = this.uploadKey;
|
|
34126
|
+
data["filename"] = this.filename;
|
|
34127
|
+
return data;
|
|
34128
|
+
}
|
|
34129
|
+
}
|
|
34130
|
+
export class ListFixtureImagesDto {
|
|
34131
|
+
constructor(data) {
|
|
34132
|
+
if (data) {
|
|
34133
|
+
for (var property in data) {
|
|
34134
|
+
if (data.hasOwnProperty(property))
|
|
34135
|
+
this[property] = data[property];
|
|
34136
|
+
}
|
|
34137
|
+
}
|
|
34138
|
+
}
|
|
34139
|
+
init(_data) {
|
|
34140
|
+
if (_data) {
|
|
34141
|
+
this.image = _data["image"] ? FileDto.fromJS(_data["image"]) : undefined;
|
|
34142
|
+
this.thumbnail = _data["thumbnail"] ? FileDto.fromJS(_data["thumbnail"]) : undefined;
|
|
34143
|
+
}
|
|
34144
|
+
}
|
|
34145
|
+
static fromJS(data) {
|
|
34146
|
+
data = typeof data === 'object' ? data : {};
|
|
34147
|
+
let result = new ListFixtureImagesDto();
|
|
34148
|
+
result.init(data);
|
|
34149
|
+
return result;
|
|
34150
|
+
}
|
|
34151
|
+
toJSON(data) {
|
|
34152
|
+
data = typeof data === 'object' ? data : {};
|
|
34153
|
+
data["image"] = this.image ? this.image.toJSON() : undefined;
|
|
34154
|
+
data["thumbnail"] = this.thumbnail ? this.thumbnail.toJSON() : undefined;
|
|
34155
|
+
return data;
|
|
34156
|
+
}
|
|
34157
|
+
}
|
|
33928
34158
|
export class SpindleAndCuttingSpeedDto {
|
|
33929
34159
|
constructor(data) {
|
|
33930
34160
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -11945,6 +11945,14 @@ 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
|
+
listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]>;
|
|
11953
|
+
|
|
11954
|
+
uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto>;
|
|
11955
|
+
|
|
11948
11956
|
operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
11949
11957
|
|
|
11950
11958
|
operationRemoveFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto>;
|
|
@@ -12220,6 +12228,178 @@ export class CncSetupFixturesClient extends AuthorizedApiBase implements ICncSet
|
|
|
12220
12228
|
return Promise.resolve<FixtureSuggestionDto[]>(null as any);
|
|
12221
12229
|
}
|
|
12222
12230
|
|
|
12231
|
+
listFixtureAttachments(fixtureId: string): Promise<FileDto[]> {
|
|
12232
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
|
|
12233
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
12234
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
12235
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
12236
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12237
|
+
|
|
12238
|
+
let options_: RequestInit = {
|
|
12239
|
+
method: "GET",
|
|
12240
|
+
headers: {
|
|
12241
|
+
"Accept": "application/json"
|
|
12242
|
+
}
|
|
12243
|
+
};
|
|
12244
|
+
|
|
12245
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12246
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12247
|
+
}).then((_response: Response) => {
|
|
12248
|
+
return this.processListFixtureAttachments(_response);
|
|
12249
|
+
});
|
|
12250
|
+
}
|
|
12251
|
+
|
|
12252
|
+
protected processListFixtureAttachments(response: Response): Promise<FileDto[]> {
|
|
12253
|
+
const status = response.status;
|
|
12254
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
12255
|
+
if (status === 200) {
|
|
12256
|
+
return response.text().then((_responseText) => {
|
|
12257
|
+
let result200: any = null;
|
|
12258
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12259
|
+
if (Array.isArray(resultData200)) {
|
|
12260
|
+
result200 = [] as any;
|
|
12261
|
+
for (let item of resultData200)
|
|
12262
|
+
result200!.push(FileDto.fromJS(item));
|
|
12263
|
+
}
|
|
12264
|
+
return result200;
|
|
12265
|
+
});
|
|
12266
|
+
} else if (status !== 200 && status !== 204) {
|
|
12267
|
+
return response.text().then((_responseText) => {
|
|
12268
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12269
|
+
});
|
|
12270
|
+
}
|
|
12271
|
+
return Promise.resolve<FileDto[]>(null as any);
|
|
12272
|
+
}
|
|
12273
|
+
|
|
12274
|
+
uploadFixtureAttachment(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<FileDto> {
|
|
12275
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/attachments";
|
|
12276
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
12277
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
12278
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
12279
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12280
|
+
|
|
12281
|
+
const content_ = JSON.stringify(attachment);
|
|
12282
|
+
|
|
12283
|
+
let options_: RequestInit = {
|
|
12284
|
+
body: content_,
|
|
12285
|
+
method: "POST",
|
|
12286
|
+
headers: {
|
|
12287
|
+
"Content-Type": "application/json",
|
|
12288
|
+
"Accept": "application/json"
|
|
12289
|
+
}
|
|
12290
|
+
};
|
|
12291
|
+
|
|
12292
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12293
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12294
|
+
}).then((_response: Response) => {
|
|
12295
|
+
return this.processUploadFixtureAttachment(_response);
|
|
12296
|
+
});
|
|
12297
|
+
}
|
|
12298
|
+
|
|
12299
|
+
protected processUploadFixtureAttachment(response: Response): Promise<FileDto> {
|
|
12300
|
+
const status = response.status;
|
|
12301
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
12302
|
+
if (status === 200) {
|
|
12303
|
+
return response.text().then((_responseText) => {
|
|
12304
|
+
let result200: any = null;
|
|
12305
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12306
|
+
result200 = FileDto.fromJS(resultData200);
|
|
12307
|
+
return result200;
|
|
12308
|
+
});
|
|
12309
|
+
} else if (status !== 200 && status !== 204) {
|
|
12310
|
+
return response.text().then((_responseText) => {
|
|
12311
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12312
|
+
});
|
|
12313
|
+
}
|
|
12314
|
+
return Promise.resolve<FileDto>(null as any);
|
|
12315
|
+
}
|
|
12316
|
+
|
|
12317
|
+
listFixtureImages(fixtureId: string): Promise<ListFixtureImagesDto[]> {
|
|
12318
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
|
|
12319
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
12320
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
12321
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
12322
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12323
|
+
|
|
12324
|
+
let options_: RequestInit = {
|
|
12325
|
+
method: "GET",
|
|
12326
|
+
headers: {
|
|
12327
|
+
"Accept": "application/json"
|
|
12328
|
+
}
|
|
12329
|
+
};
|
|
12330
|
+
|
|
12331
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12332
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12333
|
+
}).then((_response: Response) => {
|
|
12334
|
+
return this.processListFixtureImages(_response);
|
|
12335
|
+
});
|
|
12336
|
+
}
|
|
12337
|
+
|
|
12338
|
+
protected processListFixtureImages(response: Response): Promise<ListFixtureImagesDto[]> {
|
|
12339
|
+
const status = response.status;
|
|
12340
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
12341
|
+
if (status === 200) {
|
|
12342
|
+
return response.text().then((_responseText) => {
|
|
12343
|
+
let result200: any = null;
|
|
12344
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12345
|
+
if (Array.isArray(resultData200)) {
|
|
12346
|
+
result200 = [] as any;
|
|
12347
|
+
for (let item of resultData200)
|
|
12348
|
+
result200!.push(ListFixtureImagesDto.fromJS(item));
|
|
12349
|
+
}
|
|
12350
|
+
return result200;
|
|
12351
|
+
});
|
|
12352
|
+
} else if (status !== 200 && status !== 204) {
|
|
12353
|
+
return response.text().then((_responseText) => {
|
|
12354
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12355
|
+
});
|
|
12356
|
+
}
|
|
12357
|
+
return Promise.resolve<ListFixtureImagesDto[]>(null as any);
|
|
12358
|
+
}
|
|
12359
|
+
|
|
12360
|
+
uploadFixtureImage(fixtureId: string, attachment: UploadFixtureAttachmentDto): Promise<ListFixtureImagesDto> {
|
|
12361
|
+
let url_ = this.baseUrl + "/fixtures/{fixtureId}/images";
|
|
12362
|
+
if (fixtureId === undefined || fixtureId === null)
|
|
12363
|
+
throw new Error("The parameter 'fixtureId' must be defined.");
|
|
12364
|
+
url_ = url_.replace("{fixtureId}", encodeURIComponent("" + fixtureId));
|
|
12365
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12366
|
+
|
|
12367
|
+
const content_ = JSON.stringify(attachment);
|
|
12368
|
+
|
|
12369
|
+
let options_: RequestInit = {
|
|
12370
|
+
body: content_,
|
|
12371
|
+
method: "POST",
|
|
12372
|
+
headers: {
|
|
12373
|
+
"Content-Type": "application/json",
|
|
12374
|
+
"Accept": "application/json"
|
|
12375
|
+
}
|
|
12376
|
+
};
|
|
12377
|
+
|
|
12378
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12379
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12380
|
+
}).then((_response: Response) => {
|
|
12381
|
+
return this.processUploadFixtureImage(_response);
|
|
12382
|
+
});
|
|
12383
|
+
}
|
|
12384
|
+
|
|
12385
|
+
protected processUploadFixtureImage(response: Response): Promise<ListFixtureImagesDto> {
|
|
12386
|
+
const status = response.status;
|
|
12387
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
12388
|
+
if (status === 200) {
|
|
12389
|
+
return response.text().then((_responseText) => {
|
|
12390
|
+
let result200: any = null;
|
|
12391
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12392
|
+
result200 = ListFixtureImagesDto.fromJS(resultData200);
|
|
12393
|
+
return result200;
|
|
12394
|
+
});
|
|
12395
|
+
} else if (status !== 200 && status !== 204) {
|
|
12396
|
+
return response.text().then((_responseText) => {
|
|
12397
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12398
|
+
});
|
|
12399
|
+
}
|
|
12400
|
+
return Promise.resolve<ListFixtureImagesDto>(null as any);
|
|
12401
|
+
}
|
|
12402
|
+
|
|
12223
12403
|
operationAddFixture(operationId: string, fixtureIds: string[]): Promise<CncMachineOperationDto> {
|
|
12224
12404
|
let url_ = this.baseUrl + "/fixtures/operation/{operationId}";
|
|
12225
12405
|
if (operationId === undefined || operationId === null)
|
|
@@ -41285,6 +41465,86 @@ export interface IFixtureSuggestionDto {
|
|
|
41285
41465
|
suggestion: string;
|
|
41286
41466
|
}
|
|
41287
41467
|
|
|
41468
|
+
export class UploadFixtureAttachmentDto implements IUploadFixtureAttachmentDto {
|
|
41469
|
+
uploadKey?: string;
|
|
41470
|
+
filename?: string;
|
|
41471
|
+
|
|
41472
|
+
constructor(data?: IUploadFixtureAttachmentDto) {
|
|
41473
|
+
if (data) {
|
|
41474
|
+
for (var property in data) {
|
|
41475
|
+
if (data.hasOwnProperty(property))
|
|
41476
|
+
(<any>this)[property] = (<any>data)[property];
|
|
41477
|
+
}
|
|
41478
|
+
}
|
|
41479
|
+
}
|
|
41480
|
+
|
|
41481
|
+
init(_data?: any) {
|
|
41482
|
+
if (_data) {
|
|
41483
|
+
this.uploadKey = _data["uploadKey"];
|
|
41484
|
+
this.filename = _data["filename"];
|
|
41485
|
+
}
|
|
41486
|
+
}
|
|
41487
|
+
|
|
41488
|
+
static fromJS(data: any): UploadFixtureAttachmentDto {
|
|
41489
|
+
data = typeof data === 'object' ? data : {};
|
|
41490
|
+
let result = new UploadFixtureAttachmentDto();
|
|
41491
|
+
result.init(data);
|
|
41492
|
+
return result;
|
|
41493
|
+
}
|
|
41494
|
+
|
|
41495
|
+
toJSON(data?: any) {
|
|
41496
|
+
data = typeof data === 'object' ? data : {};
|
|
41497
|
+
data["uploadKey"] = this.uploadKey;
|
|
41498
|
+
data["filename"] = this.filename;
|
|
41499
|
+
return data;
|
|
41500
|
+
}
|
|
41501
|
+
}
|
|
41502
|
+
|
|
41503
|
+
export interface IUploadFixtureAttachmentDto {
|
|
41504
|
+
uploadKey?: string;
|
|
41505
|
+
filename?: string;
|
|
41506
|
+
}
|
|
41507
|
+
|
|
41508
|
+
export class ListFixtureImagesDto implements IListFixtureImagesDto {
|
|
41509
|
+
image?: FileDto;
|
|
41510
|
+
thumbnail?: FileDto | null;
|
|
41511
|
+
|
|
41512
|
+
constructor(data?: IListFixtureImagesDto) {
|
|
41513
|
+
if (data) {
|
|
41514
|
+
for (var property in data) {
|
|
41515
|
+
if (data.hasOwnProperty(property))
|
|
41516
|
+
(<any>this)[property] = (<any>data)[property];
|
|
41517
|
+
}
|
|
41518
|
+
}
|
|
41519
|
+
}
|
|
41520
|
+
|
|
41521
|
+
init(_data?: any) {
|
|
41522
|
+
if (_data) {
|
|
41523
|
+
this.image = _data["image"] ? FileDto.fromJS(_data["image"]) : <any>undefined;
|
|
41524
|
+
this.thumbnail = _data["thumbnail"] ? FileDto.fromJS(_data["thumbnail"]) : <any>undefined;
|
|
41525
|
+
}
|
|
41526
|
+
}
|
|
41527
|
+
|
|
41528
|
+
static fromJS(data: any): ListFixtureImagesDto {
|
|
41529
|
+
data = typeof data === 'object' ? data : {};
|
|
41530
|
+
let result = new ListFixtureImagesDto();
|
|
41531
|
+
result.init(data);
|
|
41532
|
+
return result;
|
|
41533
|
+
}
|
|
41534
|
+
|
|
41535
|
+
toJSON(data?: any) {
|
|
41536
|
+
data = typeof data === 'object' ? data : {};
|
|
41537
|
+
data["image"] = this.image ? this.image.toJSON() : <any>undefined;
|
|
41538
|
+
data["thumbnail"] = this.thumbnail ? this.thumbnail.toJSON() : <any>undefined;
|
|
41539
|
+
return data;
|
|
41540
|
+
}
|
|
41541
|
+
}
|
|
41542
|
+
|
|
41543
|
+
export interface IListFixtureImagesDto {
|
|
41544
|
+
image?: FileDto;
|
|
41545
|
+
thumbnail?: FileDto | null;
|
|
41546
|
+
}
|
|
41547
|
+
|
|
41288
41548
|
export class SpindleAndCuttingSpeedDto implements ISpindleAndCuttingSpeedDto {
|
|
41289
41549
|
diameter!: number;
|
|
41290
41550
|
cuttingSpeed!: number;
|