@ignos/api-client 20260513.126.1-alpha → 20260518.128.1-alpha
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 +224 -108
- package/lib/ignosportal-api.js +455 -1
- package/package.json +1 -1
- package/src/ignosportal-api.ts +668 -110
package/lib/ignosportal-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//----------------------
|
|
2
2
|
// <auto-generated>
|
|
3
|
-
// Generated using the NSwag toolchain v14.
|
|
3
|
+
// Generated using the NSwag toolchain v14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
|
4
4
|
// </auto-generated>
|
|
5
5
|
//----------------------
|
|
6
6
|
/* eslint-disable */
|
|
@@ -4480,6 +4480,460 @@ export class KpiAdminResourceClient extends AuthorizedApiBase {
|
|
|
4480
4480
|
return Promise.resolve(null);
|
|
4481
4481
|
}
|
|
4482
4482
|
}
|
|
4483
|
+
export class KpiCalendarClient extends AuthorizedApiBase {
|
|
4484
|
+
constructor(configuration, baseUrl, http) {
|
|
4485
|
+
super(configuration);
|
|
4486
|
+
this.http = http ? http : window;
|
|
4487
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
4488
|
+
}
|
|
4489
|
+
listCalendarDefinitions() {
|
|
4490
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions";
|
|
4491
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4492
|
+
let options_ = {
|
|
4493
|
+
method: "GET",
|
|
4494
|
+
headers: {
|
|
4495
|
+
"Accept": "application/json"
|
|
4496
|
+
}
|
|
4497
|
+
};
|
|
4498
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4499
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4500
|
+
}).then((_response) => {
|
|
4501
|
+
return this.processListCalendarDefinitions(_response);
|
|
4502
|
+
});
|
|
4503
|
+
}
|
|
4504
|
+
processListCalendarDefinitions(response) {
|
|
4505
|
+
const status = response.status;
|
|
4506
|
+
let _headers = {};
|
|
4507
|
+
if (response.headers && response.headers.forEach) {
|
|
4508
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4509
|
+
}
|
|
4510
|
+
;
|
|
4511
|
+
if (status === 200) {
|
|
4512
|
+
return response.text().then((_responseText) => {
|
|
4513
|
+
let result200 = null;
|
|
4514
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4515
|
+
return result200;
|
|
4516
|
+
});
|
|
4517
|
+
}
|
|
4518
|
+
else if (status !== 200 && status !== 204) {
|
|
4519
|
+
return response.text().then((_responseText) => {
|
|
4520
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4521
|
+
});
|
|
4522
|
+
}
|
|
4523
|
+
return Promise.resolve(null);
|
|
4524
|
+
}
|
|
4525
|
+
createCalendarDefinition(request) {
|
|
4526
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions";
|
|
4527
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4528
|
+
const content_ = JSON.stringify(request);
|
|
4529
|
+
let options_ = {
|
|
4530
|
+
body: content_,
|
|
4531
|
+
method: "POST",
|
|
4532
|
+
headers: {
|
|
4533
|
+
"Content-Type": "application/json",
|
|
4534
|
+
"Accept": "application/json"
|
|
4535
|
+
}
|
|
4536
|
+
};
|
|
4537
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4538
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4539
|
+
}).then((_response) => {
|
|
4540
|
+
return this.processCreateCalendarDefinition(_response);
|
|
4541
|
+
});
|
|
4542
|
+
}
|
|
4543
|
+
processCreateCalendarDefinition(response) {
|
|
4544
|
+
const status = response.status;
|
|
4545
|
+
let _headers = {};
|
|
4546
|
+
if (response.headers && response.headers.forEach) {
|
|
4547
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4548
|
+
}
|
|
4549
|
+
;
|
|
4550
|
+
if (status === 200) {
|
|
4551
|
+
return response.text().then((_responseText) => {
|
|
4552
|
+
let result200 = null;
|
|
4553
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4554
|
+
return result200;
|
|
4555
|
+
});
|
|
4556
|
+
}
|
|
4557
|
+
else if (status !== 200 && status !== 204) {
|
|
4558
|
+
return response.text().then((_responseText) => {
|
|
4559
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4562
|
+
return Promise.resolve(null);
|
|
4563
|
+
}
|
|
4564
|
+
updateCalendarDefinition(id, request) {
|
|
4565
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions/{id}";
|
|
4566
|
+
if (id === undefined || id === null)
|
|
4567
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
4568
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4569
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4570
|
+
const content_ = JSON.stringify(request);
|
|
4571
|
+
let options_ = {
|
|
4572
|
+
body: content_,
|
|
4573
|
+
method: "PUT",
|
|
4574
|
+
headers: {
|
|
4575
|
+
"Content-Type": "application/json",
|
|
4576
|
+
"Accept": "application/json"
|
|
4577
|
+
}
|
|
4578
|
+
};
|
|
4579
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4580
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4581
|
+
}).then((_response) => {
|
|
4582
|
+
return this.processUpdateCalendarDefinition(_response);
|
|
4583
|
+
});
|
|
4584
|
+
}
|
|
4585
|
+
processUpdateCalendarDefinition(response) {
|
|
4586
|
+
const status = response.status;
|
|
4587
|
+
let _headers = {};
|
|
4588
|
+
if (response.headers && response.headers.forEach) {
|
|
4589
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4590
|
+
}
|
|
4591
|
+
;
|
|
4592
|
+
if (status === 200) {
|
|
4593
|
+
return response.text().then((_responseText) => {
|
|
4594
|
+
let result200 = null;
|
|
4595
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4596
|
+
return result200;
|
|
4597
|
+
});
|
|
4598
|
+
}
|
|
4599
|
+
else if (status !== 200 && status !== 204) {
|
|
4600
|
+
return response.text().then((_responseText) => {
|
|
4601
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4604
|
+
return Promise.resolve(null);
|
|
4605
|
+
}
|
|
4606
|
+
deleteCalendarDefinition(id) {
|
|
4607
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions/{id}";
|
|
4608
|
+
if (id === undefined || id === null)
|
|
4609
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
4610
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4611
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4612
|
+
let options_ = {
|
|
4613
|
+
method: "DELETE",
|
|
4614
|
+
headers: {
|
|
4615
|
+
"Accept": "application/octet-stream"
|
|
4616
|
+
}
|
|
4617
|
+
};
|
|
4618
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4619
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4620
|
+
}).then((_response) => {
|
|
4621
|
+
return this.processDeleteCalendarDefinition(_response);
|
|
4622
|
+
});
|
|
4623
|
+
}
|
|
4624
|
+
processDeleteCalendarDefinition(response) {
|
|
4625
|
+
const status = response.status;
|
|
4626
|
+
let _headers = {};
|
|
4627
|
+
if (response.headers && response.headers.forEach) {
|
|
4628
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4629
|
+
}
|
|
4630
|
+
;
|
|
4631
|
+
if (status === 200 || status === 206) {
|
|
4632
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4633
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
4634
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
4635
|
+
if (fileName) {
|
|
4636
|
+
fileName = decodeURIComponent(fileName);
|
|
4637
|
+
}
|
|
4638
|
+
else {
|
|
4639
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4640
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4641
|
+
}
|
|
4642
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
4643
|
+
}
|
|
4644
|
+
else if (status !== 200 && status !== 204) {
|
|
4645
|
+
return response.text().then((_responseText) => {
|
|
4646
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4647
|
+
});
|
|
4648
|
+
}
|
|
4649
|
+
return Promise.resolve(null);
|
|
4650
|
+
}
|
|
4651
|
+
listResourceCalendarPeriods() {
|
|
4652
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
4653
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4654
|
+
let options_ = {
|
|
4655
|
+
method: "GET",
|
|
4656
|
+
headers: {
|
|
4657
|
+
"Accept": "application/json"
|
|
4658
|
+
}
|
|
4659
|
+
};
|
|
4660
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4661
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4662
|
+
}).then((_response) => {
|
|
4663
|
+
return this.processListResourceCalendarPeriods(_response);
|
|
4664
|
+
});
|
|
4665
|
+
}
|
|
4666
|
+
processListResourceCalendarPeriods(response) {
|
|
4667
|
+
const status = response.status;
|
|
4668
|
+
let _headers = {};
|
|
4669
|
+
if (response.headers && response.headers.forEach) {
|
|
4670
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4671
|
+
}
|
|
4672
|
+
;
|
|
4673
|
+
if (status === 200) {
|
|
4674
|
+
return response.text().then((_responseText) => {
|
|
4675
|
+
let result200 = null;
|
|
4676
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4677
|
+
return result200;
|
|
4678
|
+
});
|
|
4679
|
+
}
|
|
4680
|
+
else if (status !== 200 && status !== 204) {
|
|
4681
|
+
return response.text().then((_responseText) => {
|
|
4682
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4683
|
+
});
|
|
4684
|
+
}
|
|
4685
|
+
return Promise.resolve(null);
|
|
4686
|
+
}
|
|
4687
|
+
addResourceCalendarPeriod(request) {
|
|
4688
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
4689
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4690
|
+
const content_ = JSON.stringify(request);
|
|
4691
|
+
let options_ = {
|
|
4692
|
+
body: content_,
|
|
4693
|
+
method: "POST",
|
|
4694
|
+
headers: {
|
|
4695
|
+
"Content-Type": "application/json",
|
|
4696
|
+
"Accept": "application/json"
|
|
4697
|
+
}
|
|
4698
|
+
};
|
|
4699
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4700
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4701
|
+
}).then((_response) => {
|
|
4702
|
+
return this.processAddResourceCalendarPeriod(_response);
|
|
4703
|
+
});
|
|
4704
|
+
}
|
|
4705
|
+
processAddResourceCalendarPeriod(response) {
|
|
4706
|
+
const status = response.status;
|
|
4707
|
+
let _headers = {};
|
|
4708
|
+
if (response.headers && response.headers.forEach) {
|
|
4709
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4710
|
+
}
|
|
4711
|
+
;
|
|
4712
|
+
if (status === 200) {
|
|
4713
|
+
return response.text().then((_responseText) => {
|
|
4714
|
+
let result200 = null;
|
|
4715
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4716
|
+
return result200;
|
|
4717
|
+
});
|
|
4718
|
+
}
|
|
4719
|
+
else if (status !== 200 && status !== 204) {
|
|
4720
|
+
return response.text().then((_responseText) => {
|
|
4721
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4722
|
+
});
|
|
4723
|
+
}
|
|
4724
|
+
return Promise.resolve(null);
|
|
4725
|
+
}
|
|
4726
|
+
deleteResourceCalendarPeriods(request) {
|
|
4727
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
4728
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4729
|
+
const content_ = JSON.stringify(request);
|
|
4730
|
+
let options_ = {
|
|
4731
|
+
body: content_,
|
|
4732
|
+
method: "DELETE",
|
|
4733
|
+
headers: {
|
|
4734
|
+
"Content-Type": "application/json",
|
|
4735
|
+
"Accept": "application/octet-stream"
|
|
4736
|
+
}
|
|
4737
|
+
};
|
|
4738
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4739
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4740
|
+
}).then((_response) => {
|
|
4741
|
+
return this.processDeleteResourceCalendarPeriods(_response);
|
|
4742
|
+
});
|
|
4743
|
+
}
|
|
4744
|
+
processDeleteResourceCalendarPeriods(response) {
|
|
4745
|
+
const status = response.status;
|
|
4746
|
+
let _headers = {};
|
|
4747
|
+
if (response.headers && response.headers.forEach) {
|
|
4748
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4749
|
+
}
|
|
4750
|
+
;
|
|
4751
|
+
if (status === 200 || status === 206) {
|
|
4752
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
4753
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
4754
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
4755
|
+
if (fileName) {
|
|
4756
|
+
fileName = decodeURIComponent(fileName);
|
|
4757
|
+
}
|
|
4758
|
+
else {
|
|
4759
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4760
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4761
|
+
}
|
|
4762
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
4763
|
+
}
|
|
4764
|
+
else if (status !== 200 && status !== 204) {
|
|
4765
|
+
return response.text().then((_responseText) => {
|
|
4766
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4767
|
+
});
|
|
4768
|
+
}
|
|
4769
|
+
return Promise.resolve(null);
|
|
4770
|
+
}
|
|
4771
|
+
updateResourceCalendarPeriod(resourceExternalId, effectiveFrom, request) {
|
|
4772
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{resourceExternalId}/{effectiveFrom}";
|
|
4773
|
+
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
4774
|
+
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
4775
|
+
url_ = url_.replace("{resourceExternalId}", encodeURIComponent("" + resourceExternalId));
|
|
4776
|
+
if (effectiveFrom === undefined || effectiveFrom === null)
|
|
4777
|
+
throw new globalThis.Error("The parameter 'effectiveFrom' must be defined.");
|
|
4778
|
+
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
4779
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4780
|
+
const content_ = JSON.stringify(request);
|
|
4781
|
+
let options_ = {
|
|
4782
|
+
body: content_,
|
|
4783
|
+
method: "PUT",
|
|
4784
|
+
headers: {
|
|
4785
|
+
"Content-Type": "application/json",
|
|
4786
|
+
"Accept": "application/json"
|
|
4787
|
+
}
|
|
4788
|
+
};
|
|
4789
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4790
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4791
|
+
}).then((_response) => {
|
|
4792
|
+
return this.processUpdateResourceCalendarPeriod(_response);
|
|
4793
|
+
});
|
|
4794
|
+
}
|
|
4795
|
+
processUpdateResourceCalendarPeriod(response) {
|
|
4796
|
+
const status = response.status;
|
|
4797
|
+
let _headers = {};
|
|
4798
|
+
if (response.headers && response.headers.forEach) {
|
|
4799
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4800
|
+
}
|
|
4801
|
+
;
|
|
4802
|
+
if (status === 200) {
|
|
4803
|
+
return response.text().then((_responseText) => {
|
|
4804
|
+
let result200 = null;
|
|
4805
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4806
|
+
return result200;
|
|
4807
|
+
});
|
|
4808
|
+
}
|
|
4809
|
+
else if (status !== 200 && status !== 204) {
|
|
4810
|
+
return response.text().then((_responseText) => {
|
|
4811
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4812
|
+
});
|
|
4813
|
+
}
|
|
4814
|
+
return Promise.resolve(null);
|
|
4815
|
+
}
|
|
4816
|
+
bulkAddResourceCalendarPeriods(request) {
|
|
4817
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/bulk";
|
|
4818
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4819
|
+
const content_ = JSON.stringify(request);
|
|
4820
|
+
let options_ = {
|
|
4821
|
+
body: content_,
|
|
4822
|
+
method: "POST",
|
|
4823
|
+
headers: {
|
|
4824
|
+
"Content-Type": "application/json",
|
|
4825
|
+
"Accept": "application/json"
|
|
4826
|
+
}
|
|
4827
|
+
};
|
|
4828
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4829
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4830
|
+
}).then((_response) => {
|
|
4831
|
+
return this.processBulkAddResourceCalendarPeriods(_response);
|
|
4832
|
+
});
|
|
4833
|
+
}
|
|
4834
|
+
processBulkAddResourceCalendarPeriods(response) {
|
|
4835
|
+
const status = response.status;
|
|
4836
|
+
let _headers = {};
|
|
4837
|
+
if (response.headers && response.headers.forEach) {
|
|
4838
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4839
|
+
}
|
|
4840
|
+
;
|
|
4841
|
+
if (status === 200) {
|
|
4842
|
+
return response.text().then((_responseText) => {
|
|
4843
|
+
let result200 = null;
|
|
4844
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4845
|
+
return result200;
|
|
4846
|
+
});
|
|
4847
|
+
}
|
|
4848
|
+
else if (status !== 200 && status !== 204) {
|
|
4849
|
+
return response.text().then((_responseText) => {
|
|
4850
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4851
|
+
});
|
|
4852
|
+
}
|
|
4853
|
+
return Promise.resolve(null);
|
|
4854
|
+
}
|
|
4855
|
+
copyResourceCalendarPeriod(sourceResourceExternalId, sourceEffectiveFrom, request) {
|
|
4856
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{sourceResourceExternalId}/{sourceEffectiveFrom}/copy";
|
|
4857
|
+
if (sourceResourceExternalId === undefined || sourceResourceExternalId === null)
|
|
4858
|
+
throw new globalThis.Error("The parameter 'sourceResourceExternalId' must be defined.");
|
|
4859
|
+
url_ = url_.replace("{sourceResourceExternalId}", encodeURIComponent("" + sourceResourceExternalId));
|
|
4860
|
+
if (sourceEffectiveFrom === undefined || sourceEffectiveFrom === null)
|
|
4861
|
+
throw new globalThis.Error("The parameter 'sourceEffectiveFrom' must be defined.");
|
|
4862
|
+
url_ = url_.replace("{sourceEffectiveFrom}", encodeURIComponent("" + sourceEffectiveFrom));
|
|
4863
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4864
|
+
const content_ = JSON.stringify(request);
|
|
4865
|
+
let options_ = {
|
|
4866
|
+
body: content_,
|
|
4867
|
+
method: "POST",
|
|
4868
|
+
headers: {
|
|
4869
|
+
"Content-Type": "application/json",
|
|
4870
|
+
"Accept": "application/json"
|
|
4871
|
+
}
|
|
4872
|
+
};
|
|
4873
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4874
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4875
|
+
}).then((_response) => {
|
|
4876
|
+
return this.processCopyResourceCalendarPeriod(_response);
|
|
4877
|
+
});
|
|
4878
|
+
}
|
|
4879
|
+
processCopyResourceCalendarPeriod(response) {
|
|
4880
|
+
const status = response.status;
|
|
4881
|
+
let _headers = {};
|
|
4882
|
+
if (response.headers && response.headers.forEach) {
|
|
4883
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4884
|
+
}
|
|
4885
|
+
;
|
|
4886
|
+
if (status === 200) {
|
|
4887
|
+
return response.text().then((_responseText) => {
|
|
4888
|
+
let result200 = null;
|
|
4889
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4890
|
+
return result200;
|
|
4891
|
+
});
|
|
4892
|
+
}
|
|
4893
|
+
else if (status !== 200 && status !== 204) {
|
|
4894
|
+
return response.text().then((_responseText) => {
|
|
4895
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4896
|
+
});
|
|
4897
|
+
}
|
|
4898
|
+
return Promise.resolve(null);
|
|
4899
|
+
}
|
|
4900
|
+
migrateCapacityToSchedules() {
|
|
4901
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/migrate-capacity";
|
|
4902
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4903
|
+
let options_ = {
|
|
4904
|
+
method: "POST",
|
|
4905
|
+
headers: {
|
|
4906
|
+
"Accept": "application/json"
|
|
4907
|
+
}
|
|
4908
|
+
};
|
|
4909
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4910
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4911
|
+
}).then((_response) => {
|
|
4912
|
+
return this.processMigrateCapacityToSchedules(_response);
|
|
4913
|
+
});
|
|
4914
|
+
}
|
|
4915
|
+
processMigrateCapacityToSchedules(response) {
|
|
4916
|
+
const status = response.status;
|
|
4917
|
+
let _headers = {};
|
|
4918
|
+
if (response.headers && response.headers.forEach) {
|
|
4919
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4920
|
+
}
|
|
4921
|
+
;
|
|
4922
|
+
if (status === 200) {
|
|
4923
|
+
return response.text().then((_responseText) => {
|
|
4924
|
+
let result200 = null;
|
|
4925
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
4926
|
+
return result200;
|
|
4927
|
+
});
|
|
4928
|
+
}
|
|
4929
|
+
else if (status !== 200 && status !== 204) {
|
|
4930
|
+
return response.text().then((_responseText) => {
|
|
4931
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4932
|
+
});
|
|
4933
|
+
}
|
|
4934
|
+
return Promise.resolve(null);
|
|
4935
|
+
}
|
|
4936
|
+
}
|
|
4483
4937
|
export class KpiResourceClient extends AuthorizedApiBase {
|
|
4484
4938
|
constructor(configuration, baseUrl, http) {
|
|
4485
4939
|
super(configuration);
|