@ignos/api-client 20260811.219.1-alpha → 20260812.220.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ignosportal-api.d.ts +188 -221
- package/lib/ignosportal-api.js +134 -354
- package/package.json +1 -1
- package/src/ignosportal-api.ts +355 -577
package/lib/ignosportal-api.js
CHANGED
|
@@ -19318,6 +19318,46 @@ export class MoveParcelsClient extends AuthorizedApiBase {
|
|
|
19318
19318
|
}
|
|
19319
19319
|
return Promise.resolve(null);
|
|
19320
19320
|
}
|
|
19321
|
+
searchParcelsV2(input, pageSize) {
|
|
19322
|
+
let url_ = this.baseUrl + "/move/parcel/search/v2?";
|
|
19323
|
+
if (input !== undefined && input !== null)
|
|
19324
|
+
url_ += "input=" + encodeURIComponent("" + input) + "&";
|
|
19325
|
+
if (pageSize !== undefined && pageSize !== null)
|
|
19326
|
+
url_ += "pageSize=" + encodeURIComponent("" + pageSize) + "&";
|
|
19327
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
19328
|
+
let options_ = {
|
|
19329
|
+
method: "GET",
|
|
19330
|
+
headers: {
|
|
19331
|
+
"Accept": "application/json"
|
|
19332
|
+
}
|
|
19333
|
+
};
|
|
19334
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
19335
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
19336
|
+
}).then((_response) => {
|
|
19337
|
+
return this.processSearchParcelsV2(_response);
|
|
19338
|
+
});
|
|
19339
|
+
}
|
|
19340
|
+
processSearchParcelsV2(response) {
|
|
19341
|
+
const status = response.status;
|
|
19342
|
+
let _headers = {};
|
|
19343
|
+
if (response.headers && response.headers.forEach) {
|
|
19344
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
19345
|
+
}
|
|
19346
|
+
;
|
|
19347
|
+
if (status === 200) {
|
|
19348
|
+
return response.text().then((_responseText) => {
|
|
19349
|
+
let result200 = null;
|
|
19350
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
19351
|
+
return result200;
|
|
19352
|
+
});
|
|
19353
|
+
}
|
|
19354
|
+
else if (status !== 200 && status !== 204) {
|
|
19355
|
+
return response.text().then((_responseText) => {
|
|
19356
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
19357
|
+
});
|
|
19358
|
+
}
|
|
19359
|
+
return Promise.resolve(null);
|
|
19360
|
+
}
|
|
19321
19361
|
}
|
|
19322
19362
|
export class MoveTrackingClient extends AuthorizedApiBase {
|
|
19323
19363
|
constructor(configuration, baseUrl, http) {
|
|
@@ -20552,45 +20592,6 @@ export class MesOrMoveClient extends AuthorizedApiBase {
|
|
|
20552
20592
|
}
|
|
20553
20593
|
return Promise.resolve(null);
|
|
20554
20594
|
}
|
|
20555
|
-
postListProductionOrders(request) {
|
|
20556
|
-
let url_ = this.baseUrl + "/mes/productionorders/list";
|
|
20557
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
20558
|
-
const content_ = JSON.stringify(request);
|
|
20559
|
-
let options_ = {
|
|
20560
|
-
body: content_,
|
|
20561
|
-
method: "POST",
|
|
20562
|
-
headers: {
|
|
20563
|
-
"Content-Type": "application/json",
|
|
20564
|
-
"Accept": "application/json"
|
|
20565
|
-
}
|
|
20566
|
-
};
|
|
20567
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20568
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
20569
|
-
}).then((_response) => {
|
|
20570
|
-
return this.processPostListProductionOrders(_response);
|
|
20571
|
-
});
|
|
20572
|
-
}
|
|
20573
|
-
processPostListProductionOrders(response) {
|
|
20574
|
-
const status = response.status;
|
|
20575
|
-
let _headers = {};
|
|
20576
|
-
if (response.headers && response.headers.forEach) {
|
|
20577
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20578
|
-
}
|
|
20579
|
-
;
|
|
20580
|
-
if (status === 200) {
|
|
20581
|
-
return response.text().then((_responseText) => {
|
|
20582
|
-
let result200 = null;
|
|
20583
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20584
|
-
return result200;
|
|
20585
|
-
});
|
|
20586
|
-
}
|
|
20587
|
-
else if (status !== 200 && status !== 204) {
|
|
20588
|
-
return response.text().then((_responseText) => {
|
|
20589
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20590
|
-
});
|
|
20591
|
-
}
|
|
20592
|
-
return Promise.resolve(null);
|
|
20593
|
-
}
|
|
20594
20595
|
}
|
|
20595
20596
|
export class MesPlannerClient extends AuthorizedApiBase {
|
|
20596
20597
|
constructor(configuration, baseUrl, http) {
|
|
@@ -21046,9 +21047,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21046
21047
|
let options_ = {
|
|
21047
21048
|
body: content_,
|
|
21048
21049
|
method: "POST",
|
|
21049
|
-
headers: {
|
|
21050
|
-
"Accept": "application/octet-stream"
|
|
21051
|
-
}
|
|
21050
|
+
headers: {}
|
|
21052
21051
|
};
|
|
21053
21052
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21054
21053
|
return this.http.fetch(url_, transformedOptions_);
|
|
@@ -21063,18 +21062,10 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21063
21062
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21064
21063
|
}
|
|
21065
21064
|
;
|
|
21066
|
-
if (status ===
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
if (fileName) {
|
|
21071
|
-
fileName = decodeURIComponent(fileName);
|
|
21072
|
-
}
|
|
21073
|
-
else {
|
|
21074
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
21075
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
21076
|
-
}
|
|
21077
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
21065
|
+
if (status === 204) {
|
|
21066
|
+
return response.text().then((_responseText) => {
|
|
21067
|
+
return;
|
|
21068
|
+
});
|
|
21078
21069
|
}
|
|
21079
21070
|
else if (status !== 200 && status !== 204) {
|
|
21080
21071
|
return response.text().then((_responseText) => {
|
|
@@ -21122,6 +21113,51 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21122
21113
|
}
|
|
21123
21114
|
return Promise.resolve(null);
|
|
21124
21115
|
}
|
|
21116
|
+
/**
|
|
21117
|
+
* Update an existing Note or Url attachment in place
|
|
21118
|
+
*/
|
|
21119
|
+
updateAttachment(id, attachmentId, request) {
|
|
21120
|
+
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
21121
|
+
if (id === undefined || id === null)
|
|
21122
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
21123
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
21124
|
+
if (attachmentId === undefined || attachmentId === null)
|
|
21125
|
+
throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
|
|
21126
|
+
url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
|
|
21127
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
21128
|
+
const content_ = JSON.stringify(request);
|
|
21129
|
+
let options_ = {
|
|
21130
|
+
body: content_,
|
|
21131
|
+
method: "PUT",
|
|
21132
|
+
headers: {
|
|
21133
|
+
"Content-Type": "application/json",
|
|
21134
|
+
}
|
|
21135
|
+
};
|
|
21136
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21137
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
21138
|
+
}).then((_response) => {
|
|
21139
|
+
return this.processUpdateAttachment(_response);
|
|
21140
|
+
});
|
|
21141
|
+
}
|
|
21142
|
+
processUpdateAttachment(response) {
|
|
21143
|
+
const status = response.status;
|
|
21144
|
+
let _headers = {};
|
|
21145
|
+
if (response.headers && response.headers.forEach) {
|
|
21146
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21147
|
+
}
|
|
21148
|
+
;
|
|
21149
|
+
if (status === 204) {
|
|
21150
|
+
return response.text().then((_responseText) => {
|
|
21151
|
+
return;
|
|
21152
|
+
});
|
|
21153
|
+
}
|
|
21154
|
+
else if (status !== 200 && status !== 204) {
|
|
21155
|
+
return response.text().then((_responseText) => {
|
|
21156
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
21157
|
+
});
|
|
21158
|
+
}
|
|
21159
|
+
return Promise.resolve(null);
|
|
21160
|
+
}
|
|
21125
21161
|
getAttachmentFile(id, attachmentId) {
|
|
21126
21162
|
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
21127
21163
|
if (id === undefined || id === null)
|
|
@@ -21181,9 +21217,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21181
21217
|
url_ = url_.replace(/[?&]$/, "");
|
|
21182
21218
|
let options_ = {
|
|
21183
21219
|
method: "DELETE",
|
|
21184
|
-
headers: {
|
|
21185
|
-
"Accept": "application/octet-stream"
|
|
21186
|
-
}
|
|
21220
|
+
headers: {}
|
|
21187
21221
|
};
|
|
21188
21222
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21189
21223
|
return this.http.fetch(url_, transformedOptions_);
|
|
@@ -21198,18 +21232,10 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21198
21232
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21199
21233
|
}
|
|
21200
21234
|
;
|
|
21201
|
-
if (status ===
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21205
|
-
if (fileName) {
|
|
21206
|
-
fileName = decodeURIComponent(fileName);
|
|
21207
|
-
}
|
|
21208
|
-
else {
|
|
21209
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
21210
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
21211
|
-
}
|
|
21212
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
21235
|
+
if (status === 204) {
|
|
21236
|
+
return response.text().then((_responseText) => {
|
|
21237
|
+
return;
|
|
21238
|
+
});
|
|
21213
21239
|
}
|
|
21214
21240
|
else if (status !== 200 && status !== 204) {
|
|
21215
21241
|
return response.text().then((_responseText) => {
|
|
@@ -21225,6 +21251,45 @@ export class MesProductionOrderClient extends AuthorizedApiBase {
|
|
|
21225
21251
|
this.http = http ? http : window;
|
|
21226
21252
|
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
21227
21253
|
}
|
|
21254
|
+
listProductionOrders(request) {
|
|
21255
|
+
let url_ = this.baseUrl + "/mes/productionorders/list";
|
|
21256
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
21257
|
+
const content_ = JSON.stringify(request);
|
|
21258
|
+
let options_ = {
|
|
21259
|
+
body: content_,
|
|
21260
|
+
method: "POST",
|
|
21261
|
+
headers: {
|
|
21262
|
+
"Content-Type": "application/json",
|
|
21263
|
+
"Accept": "application/json"
|
|
21264
|
+
}
|
|
21265
|
+
};
|
|
21266
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21267
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
21268
|
+
}).then((_response) => {
|
|
21269
|
+
return this.processListProductionOrders(_response);
|
|
21270
|
+
});
|
|
21271
|
+
}
|
|
21272
|
+
processListProductionOrders(response) {
|
|
21273
|
+
const status = response.status;
|
|
21274
|
+
let _headers = {};
|
|
21275
|
+
if (response.headers && response.headers.forEach) {
|
|
21276
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21277
|
+
}
|
|
21278
|
+
;
|
|
21279
|
+
if (status === 200) {
|
|
21280
|
+
return response.text().then((_responseText) => {
|
|
21281
|
+
let result200 = null;
|
|
21282
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
21283
|
+
return result200;
|
|
21284
|
+
});
|
|
21285
|
+
}
|
|
21286
|
+
else if (status !== 200 && status !== 204) {
|
|
21287
|
+
return response.text().then((_responseText) => {
|
|
21288
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
21289
|
+
});
|
|
21290
|
+
}
|
|
21291
|
+
return Promise.resolve(null);
|
|
21292
|
+
}
|
|
21228
21293
|
getProductionOrder(id) {
|
|
21229
21294
|
let url_ = this.baseUrl + "/mes/productionorders/{id}";
|
|
21230
21295
|
if (id === undefined || id === null)
|
|
@@ -23672,291 +23737,6 @@ export class InspectMatchSpecificationsClient extends AuthorizedApiBase {
|
|
|
23672
23737
|
return Promise.resolve(null);
|
|
23673
23738
|
}
|
|
23674
23739
|
}
|
|
23675
|
-
export class InspectSchemaCreatorClient extends AuthorizedApiBase {
|
|
23676
|
-
constructor(configuration, baseUrl, http) {
|
|
23677
|
-
super(configuration);
|
|
23678
|
-
this.http = http ? http : window;
|
|
23679
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
23680
|
-
}
|
|
23681
|
-
getSchemaCreatorState(id) {
|
|
23682
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
|
|
23683
|
-
if (id === undefined || id === null)
|
|
23684
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23685
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23686
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23687
|
-
let options_ = {
|
|
23688
|
-
method: "GET",
|
|
23689
|
-
headers: {
|
|
23690
|
-
"Accept": "application/json"
|
|
23691
|
-
}
|
|
23692
|
-
};
|
|
23693
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23694
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23695
|
-
}).then((_response) => {
|
|
23696
|
-
return this.processGetSchemaCreatorState(_response);
|
|
23697
|
-
});
|
|
23698
|
-
}
|
|
23699
|
-
processGetSchemaCreatorState(response) {
|
|
23700
|
-
const status = response.status;
|
|
23701
|
-
let _headers = {};
|
|
23702
|
-
if (response.headers && response.headers.forEach) {
|
|
23703
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23704
|
-
}
|
|
23705
|
-
;
|
|
23706
|
-
if (status === 200) {
|
|
23707
|
-
return response.text().then((_responseText) => {
|
|
23708
|
-
let result200 = null;
|
|
23709
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23710
|
-
return result200;
|
|
23711
|
-
});
|
|
23712
|
-
}
|
|
23713
|
-
else if (status !== 200 && status !== 204) {
|
|
23714
|
-
return response.text().then((_responseText) => {
|
|
23715
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23716
|
-
});
|
|
23717
|
-
}
|
|
23718
|
-
return Promise.resolve(null);
|
|
23719
|
-
}
|
|
23720
|
-
/**
|
|
23721
|
-
* Creates the initial creator state for a schema version. Returns 409 if
|
|
23722
|
-
state already exists; the caller should re-fetch it instead of writing.
|
|
23723
|
-
*/
|
|
23724
|
-
createSchemaCreatorState(id, state) {
|
|
23725
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
|
|
23726
|
-
if (id === undefined || id === null)
|
|
23727
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23728
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23729
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23730
|
-
const content_ = JSON.stringify(state);
|
|
23731
|
-
let options_ = {
|
|
23732
|
-
body: content_,
|
|
23733
|
-
method: "POST",
|
|
23734
|
-
headers: {
|
|
23735
|
-
"Content-Type": "application/json",
|
|
23736
|
-
"Accept": "application/json"
|
|
23737
|
-
}
|
|
23738
|
-
};
|
|
23739
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23740
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23741
|
-
}).then((_response) => {
|
|
23742
|
-
return this.processCreateSchemaCreatorState(_response);
|
|
23743
|
-
});
|
|
23744
|
-
}
|
|
23745
|
-
processCreateSchemaCreatorState(response) {
|
|
23746
|
-
const status = response.status;
|
|
23747
|
-
let _headers = {};
|
|
23748
|
-
if (response.headers && response.headers.forEach) {
|
|
23749
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23750
|
-
}
|
|
23751
|
-
;
|
|
23752
|
-
if (status === 201) {
|
|
23753
|
-
return response.text().then((_responseText) => {
|
|
23754
|
-
let result201 = null;
|
|
23755
|
-
result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23756
|
-
return result201;
|
|
23757
|
-
});
|
|
23758
|
-
}
|
|
23759
|
-
else if (status === 409) {
|
|
23760
|
-
return response.text().then((_responseText) => {
|
|
23761
|
-
let result409 = null;
|
|
23762
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23763
|
-
return throwException("A server side error occurred.", status, _responseText, _headers, result409);
|
|
23764
|
-
});
|
|
23765
|
-
}
|
|
23766
|
-
else if (status !== 200 && status !== 204) {
|
|
23767
|
-
return response.text().then((_responseText) => {
|
|
23768
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23769
|
-
});
|
|
23770
|
-
}
|
|
23771
|
-
return Promise.resolve(null);
|
|
23772
|
-
}
|
|
23773
|
-
updateSchemaCreatorState(id, state) {
|
|
23774
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
|
|
23775
|
-
if (id === undefined || id === null)
|
|
23776
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23777
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23778
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23779
|
-
const content_ = JSON.stringify(state);
|
|
23780
|
-
let options_ = {
|
|
23781
|
-
body: content_,
|
|
23782
|
-
method: "PUT",
|
|
23783
|
-
headers: {
|
|
23784
|
-
"Content-Type": "application/json",
|
|
23785
|
-
"Accept": "application/json"
|
|
23786
|
-
}
|
|
23787
|
-
};
|
|
23788
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23789
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23790
|
-
}).then((_response) => {
|
|
23791
|
-
return this.processUpdateSchemaCreatorState(_response);
|
|
23792
|
-
});
|
|
23793
|
-
}
|
|
23794
|
-
processUpdateSchemaCreatorState(response) {
|
|
23795
|
-
const status = response.status;
|
|
23796
|
-
let _headers = {};
|
|
23797
|
-
if (response.headers && response.headers.forEach) {
|
|
23798
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23799
|
-
}
|
|
23800
|
-
;
|
|
23801
|
-
if (status === 200) {
|
|
23802
|
-
return response.text().then((_responseText) => {
|
|
23803
|
-
let result200 = null;
|
|
23804
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23805
|
-
return result200;
|
|
23806
|
-
});
|
|
23807
|
-
}
|
|
23808
|
-
else if (status !== 200 && status !== 204) {
|
|
23809
|
-
return response.text().then((_responseText) => {
|
|
23810
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23811
|
-
});
|
|
23812
|
-
}
|
|
23813
|
-
return Promise.resolve(null);
|
|
23814
|
-
}
|
|
23815
|
-
/**
|
|
23816
|
-
* Starts a full drawing AI parse: clears every element and locks the
|
|
23817
|
-
schema for every viewer until it completes. If one is already in
|
|
23818
|
-
progress, returns that instead of starting a second one.
|
|
23819
|
-
*/
|
|
23820
|
-
requestFullDrawingParse(id) {
|
|
23821
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate/fullparse";
|
|
23822
|
-
if (id === undefined || id === null)
|
|
23823
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23824
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23825
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23826
|
-
let options_ = {
|
|
23827
|
-
method: "POST",
|
|
23828
|
-
headers: {
|
|
23829
|
-
"Accept": "application/json"
|
|
23830
|
-
}
|
|
23831
|
-
};
|
|
23832
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23833
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23834
|
-
}).then((_response) => {
|
|
23835
|
-
return this.processRequestFullDrawingParse(_response);
|
|
23836
|
-
});
|
|
23837
|
-
}
|
|
23838
|
-
processRequestFullDrawingParse(response) {
|
|
23839
|
-
const status = response.status;
|
|
23840
|
-
let _headers = {};
|
|
23841
|
-
if (response.headers && response.headers.forEach) {
|
|
23842
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23843
|
-
}
|
|
23844
|
-
;
|
|
23845
|
-
if (status === 200) {
|
|
23846
|
-
return response.text().then((_responseText) => {
|
|
23847
|
-
let result200 = null;
|
|
23848
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23849
|
-
return result200;
|
|
23850
|
-
});
|
|
23851
|
-
}
|
|
23852
|
-
else if (status !== 200 && status !== 204) {
|
|
23853
|
-
return response.text().then((_responseText) => {
|
|
23854
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23855
|
-
});
|
|
23856
|
-
}
|
|
23857
|
-
return Promise.resolve(null);
|
|
23858
|
-
}
|
|
23859
|
-
/**
|
|
23860
|
-
* Stamps the creator state's balloons onto the schema's drawing PDF and
|
|
23861
|
-
returns a temporary download link.
|
|
23862
|
-
*/
|
|
23863
|
-
exportSchemaCreatorDrawing(id) {
|
|
23864
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate/download";
|
|
23865
|
-
if (id === undefined || id === null)
|
|
23866
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23867
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23868
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23869
|
-
let options_ = {
|
|
23870
|
-
method: "POST",
|
|
23871
|
-
headers: {
|
|
23872
|
-
"Accept": "application/json"
|
|
23873
|
-
}
|
|
23874
|
-
};
|
|
23875
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23876
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23877
|
-
}).then((_response) => {
|
|
23878
|
-
return this.processExportSchemaCreatorDrawing(_response);
|
|
23879
|
-
});
|
|
23880
|
-
}
|
|
23881
|
-
processExportSchemaCreatorDrawing(response) {
|
|
23882
|
-
const status = response.status;
|
|
23883
|
-
let _headers = {};
|
|
23884
|
-
if (response.headers && response.headers.forEach) {
|
|
23885
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23886
|
-
}
|
|
23887
|
-
;
|
|
23888
|
-
if (status === 200) {
|
|
23889
|
-
return response.text().then((_responseText) => {
|
|
23890
|
-
let result200 = null;
|
|
23891
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
23892
|
-
return result200;
|
|
23893
|
-
});
|
|
23894
|
-
}
|
|
23895
|
-
else if (status !== 200 && status !== 204) {
|
|
23896
|
-
return response.text().then((_responseText) => {
|
|
23897
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23898
|
-
});
|
|
23899
|
-
}
|
|
23900
|
-
return Promise.resolve(null);
|
|
23901
|
-
}
|
|
23902
|
-
/**
|
|
23903
|
-
* Starts an async snip resolve; the result is delivered through the
|
|
23904
|
-
SchemaCreatorSnipResolved SignalR notification.
|
|
23905
|
-
* @param image (optional)
|
|
23906
|
-
*/
|
|
23907
|
-
resolveSchemaCreatorSnip(id, elementId, image) {
|
|
23908
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate/elements/{elementId}/resolvesnip";
|
|
23909
|
-
if (id === undefined || id === null)
|
|
23910
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
23911
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
23912
|
-
if (elementId === undefined || elementId === null)
|
|
23913
|
-
throw new globalThis.Error("The parameter 'elementId' must be defined.");
|
|
23914
|
-
url_ = url_.replace("{elementId}", encodeURIComponent("" + elementId));
|
|
23915
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
23916
|
-
const content_ = new FormData();
|
|
23917
|
-
if (image !== null && image !== undefined)
|
|
23918
|
-
content_.append("image", image.data, image.fileName ? image.fileName : "image");
|
|
23919
|
-
let options_ = {
|
|
23920
|
-
body: content_,
|
|
23921
|
-
method: "POST",
|
|
23922
|
-
headers: {
|
|
23923
|
-
"Accept": "application/octet-stream"
|
|
23924
|
-
}
|
|
23925
|
-
};
|
|
23926
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
23927
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
23928
|
-
}).then((_response) => {
|
|
23929
|
-
return this.processResolveSchemaCreatorSnip(_response);
|
|
23930
|
-
});
|
|
23931
|
-
}
|
|
23932
|
-
processResolveSchemaCreatorSnip(response) {
|
|
23933
|
-
const status = response.status;
|
|
23934
|
-
let _headers = {};
|
|
23935
|
-
if (response.headers && response.headers.forEach) {
|
|
23936
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
23937
|
-
}
|
|
23938
|
-
;
|
|
23939
|
-
if (status === 200 || status === 206) {
|
|
23940
|
-
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
23941
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
23942
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
23943
|
-
if (fileName) {
|
|
23944
|
-
fileName = decodeURIComponent(fileName);
|
|
23945
|
-
}
|
|
23946
|
-
else {
|
|
23947
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
23948
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
23949
|
-
}
|
|
23950
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
23951
|
-
}
|
|
23952
|
-
else if (status !== 200 && status !== 204) {
|
|
23953
|
-
return response.text().then((_responseText) => {
|
|
23954
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
23955
|
-
});
|
|
23956
|
-
}
|
|
23957
|
-
return Promise.resolve(null);
|
|
23958
|
-
}
|
|
23959
|
-
}
|
|
23960
23740
|
export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
|
|
23961
23741
|
constructor(configuration, baseUrl, http) {
|
|
23962
23742
|
super(configuration);
|