@ignos/api-client 20260512.125.1 → 20260513.127.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 +18 -7
- package/lib/ignosportal-api.js +32 -35
- package/package.json +1 -1
- package/src/ignosportal-api.ts +56 -44
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -620,10 +620,10 @@ export interface IKpiCalendarClient {
|
|
|
620
620
|
createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
|
|
621
621
|
updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
|
|
622
622
|
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
623
|
-
listResourceCalendarPeriods(): Promise<
|
|
623
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
624
624
|
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
625
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
625
626
|
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
626
|
-
deleteResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string): Promise<FileResponse>;
|
|
627
627
|
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
628
628
|
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
629
629
|
migrateCapacityToSchedules(): Promise<MigrationResultDto>;
|
|
@@ -642,14 +642,14 @@ export declare class KpiCalendarClient extends AuthorizedApiBase implements IKpi
|
|
|
642
642
|
protected processUpdateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto>;
|
|
643
643
|
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
644
644
|
protected processDeleteCalendarDefinition(response: Response): Promise<FileResponse>;
|
|
645
|
-
listResourceCalendarPeriods(): Promise<
|
|
646
|
-
protected processListResourceCalendarPeriods(response: Response): Promise<
|
|
645
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
646
|
+
protected processListResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
647
647
|
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
648
648
|
protected processAddResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
|
|
649
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
650
|
+
protected processDeleteResourceCalendarPeriods(response: Response): Promise<FileResponse>;
|
|
649
651
|
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
650
652
|
protected processUpdateResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
|
|
651
|
-
deleteResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string): Promise<FileResponse>;
|
|
652
|
-
protected processDeleteResourceCalendarPeriod(response: Response): Promise<FileResponse>;
|
|
653
653
|
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
654
654
|
protected processBulkAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]>;
|
|
655
655
|
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
@@ -4175,8 +4175,12 @@ export interface UpdateCalendarDefinitionRequest {
|
|
|
4175
4175
|
[key in DayOfWeek]?: number;
|
|
4176
4176
|
} | null;
|
|
4177
4177
|
}
|
|
4178
|
+
export interface ResourceCalendarPeriodSchedulesDto {
|
|
4179
|
+
groups?: ResourceCalendarPeriodGroupDto[];
|
|
4180
|
+
ungroupedResources?: ResourceCalendarPeriodsDto[];
|
|
4181
|
+
}
|
|
4178
4182
|
export interface ResourceCalendarPeriodGroupDto {
|
|
4179
|
-
|
|
4183
|
+
resourceGroupName?: string;
|
|
4180
4184
|
resources?: ResourceCalendarPeriodsDto[];
|
|
4181
4185
|
}
|
|
4182
4186
|
export interface ResourceCalendarPeriodsDto {
|
|
@@ -4206,6 +4210,13 @@ export interface UpdateResourceCalendarPeriodRequest {
|
|
|
4206
4210
|
newEffectiveFrom?: string | null;
|
|
4207
4211
|
comment?: string | null;
|
|
4208
4212
|
}
|
|
4213
|
+
export interface DeleteResourceCalendarPeriod {
|
|
4214
|
+
periods: PeriodKey[];
|
|
4215
|
+
}
|
|
4216
|
+
export interface PeriodKey {
|
|
4217
|
+
resourceExternalId?: string;
|
|
4218
|
+
effectiveFrom?: string;
|
|
4219
|
+
}
|
|
4209
4220
|
export interface BulkAddResourceCalendarPeriods {
|
|
4210
4221
|
resourceExternalIds: string[];
|
|
4211
4222
|
calendarDefinitionId: string;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -4723,43 +4723,43 @@ export class KpiCalendarClient extends AuthorizedApiBase {
|
|
|
4723
4723
|
}
|
|
4724
4724
|
return Promise.resolve(null);
|
|
4725
4725
|
}
|
|
4726
|
-
|
|
4727
|
-
let url_ = this.baseUrl + "/resources/kpi/calendar-periods
|
|
4728
|
-
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
4729
|
-
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
4730
|
-
url_ = url_.replace("{resourceExternalId}", encodeURIComponent("" + resourceExternalId));
|
|
4731
|
-
if (effectiveFrom === undefined || effectiveFrom === null)
|
|
4732
|
-
throw new globalThis.Error("The parameter 'effectiveFrom' must be defined.");
|
|
4733
|
-
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
4726
|
+
deleteResourceCalendarPeriods(request) {
|
|
4727
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
4734
4728
|
url_ = url_.replace(/[?&]$/, "");
|
|
4735
4729
|
const content_ = JSON.stringify(request);
|
|
4736
4730
|
let options_ = {
|
|
4737
4731
|
body: content_,
|
|
4738
|
-
method: "
|
|
4732
|
+
method: "DELETE",
|
|
4739
4733
|
headers: {
|
|
4740
4734
|
"Content-Type": "application/json",
|
|
4741
|
-
"Accept": "application/
|
|
4735
|
+
"Accept": "application/octet-stream"
|
|
4742
4736
|
}
|
|
4743
4737
|
};
|
|
4744
4738
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4745
4739
|
return this.http.fetch(url_, transformedOptions_);
|
|
4746
4740
|
}).then((_response) => {
|
|
4747
|
-
return this.
|
|
4741
|
+
return this.processDeleteResourceCalendarPeriods(_response);
|
|
4748
4742
|
});
|
|
4749
4743
|
}
|
|
4750
|
-
|
|
4744
|
+
processDeleteResourceCalendarPeriods(response) {
|
|
4751
4745
|
const status = response.status;
|
|
4752
4746
|
let _headers = {};
|
|
4753
4747
|
if (response.headers && response.headers.forEach) {
|
|
4754
4748
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4755
4749
|
}
|
|
4756
4750
|
;
|
|
4757
|
-
if (status === 200) {
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
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
4763
|
}
|
|
4764
4764
|
else if (status !== 200 && status !== 204) {
|
|
4765
4765
|
return response.text().then((_responseText) => {
|
|
@@ -4768,7 +4768,7 @@ export class KpiCalendarClient extends AuthorizedApiBase {
|
|
|
4768
4768
|
}
|
|
4769
4769
|
return Promise.resolve(null);
|
|
4770
4770
|
}
|
|
4771
|
-
|
|
4771
|
+
updateResourceCalendarPeriod(resourceExternalId, effectiveFrom, request) {
|
|
4772
4772
|
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{resourceExternalId}/{effectiveFrom}";
|
|
4773
4773
|
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
4774
4774
|
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
@@ -4777,37 +4777,34 @@ export class KpiCalendarClient extends AuthorizedApiBase {
|
|
|
4777
4777
|
throw new globalThis.Error("The parameter 'effectiveFrom' must be defined.");
|
|
4778
4778
|
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
4779
4779
|
url_ = url_.replace(/[?&]$/, "");
|
|
4780
|
+
const content_ = JSON.stringify(request);
|
|
4780
4781
|
let options_ = {
|
|
4781
|
-
|
|
4782
|
+
body: content_,
|
|
4783
|
+
method: "PUT",
|
|
4782
4784
|
headers: {
|
|
4783
|
-
"
|
|
4785
|
+
"Content-Type": "application/json",
|
|
4786
|
+
"Accept": "application/json"
|
|
4784
4787
|
}
|
|
4785
4788
|
};
|
|
4786
4789
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4787
4790
|
return this.http.fetch(url_, transformedOptions_);
|
|
4788
4791
|
}).then((_response) => {
|
|
4789
|
-
return this.
|
|
4792
|
+
return this.processUpdateResourceCalendarPeriod(_response);
|
|
4790
4793
|
});
|
|
4791
4794
|
}
|
|
4792
|
-
|
|
4795
|
+
processUpdateResourceCalendarPeriod(response) {
|
|
4793
4796
|
const status = response.status;
|
|
4794
4797
|
let _headers = {};
|
|
4795
4798
|
if (response.headers && response.headers.forEach) {
|
|
4796
4799
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
4797
4800
|
}
|
|
4798
4801
|
;
|
|
4799
|
-
if (status === 200
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
}
|
|
4806
|
-
else {
|
|
4807
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
4808
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
4809
|
-
}
|
|
4810
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
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
|
+
});
|
|
4811
4808
|
}
|
|
4812
4809
|
else if (status !== 200 && status !== 204) {
|
|
4813
4810
|
return response.text().then((_responseText) => {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -4849,13 +4849,13 @@ export interface IKpiCalendarClient {
|
|
|
4849
4849
|
|
|
4850
4850
|
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
4851
4851
|
|
|
4852
|
-
listResourceCalendarPeriods(): Promise<
|
|
4852
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
4853
4853
|
|
|
4854
4854
|
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
4855
4855
|
|
|
4856
|
-
|
|
4856
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
4857
4857
|
|
|
4858
|
-
|
|
4858
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
4859
4859
|
|
|
4860
4860
|
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
4861
4861
|
|
|
@@ -5033,7 +5033,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
|
|
|
5033
5033
|
return Promise.resolve<FileResponse>(null as any);
|
|
5034
5034
|
}
|
|
5035
5035
|
|
|
5036
|
-
listResourceCalendarPeriods(): Promise<
|
|
5036
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto> {
|
|
5037
5037
|
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
5038
5038
|
url_ = url_.replace(/[?&]$/, "");
|
|
5039
5039
|
|
|
@@ -5051,13 +5051,13 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
|
|
|
5051
5051
|
});
|
|
5052
5052
|
}
|
|
5053
5053
|
|
|
5054
|
-
protected processListResourceCalendarPeriods(response: Response): Promise<
|
|
5054
|
+
protected processListResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodSchedulesDto> {
|
|
5055
5055
|
const status = response.status;
|
|
5056
5056
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5057
5057
|
if (status === 200) {
|
|
5058
5058
|
return response.text().then((_responseText) => {
|
|
5059
5059
|
let result200: any = null;
|
|
5060
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as
|
|
5060
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodSchedulesDto;
|
|
5061
5061
|
return result200;
|
|
5062
5062
|
});
|
|
5063
5063
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5065,7 +5065,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
|
|
|
5065
5065
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5066
5066
|
});
|
|
5067
5067
|
}
|
|
5068
|
-
return Promise.resolve<
|
|
5068
|
+
return Promise.resolve<ResourceCalendarPeriodSchedulesDto>(null as any);
|
|
5069
5069
|
}
|
|
5070
5070
|
|
|
5071
5071
|
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto> {
|
|
@@ -5107,52 +5107,51 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
|
|
|
5107
5107
|
return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
|
|
5108
5108
|
}
|
|
5109
5109
|
|
|
5110
|
-
|
|
5111
|
-
let url_ = this.baseUrl + "/resources/kpi/calendar-periods
|
|
5112
|
-
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
5113
|
-
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
5114
|
-
url_ = url_.replace("{resourceExternalId}", encodeURIComponent("" + resourceExternalId));
|
|
5115
|
-
if (effectiveFrom === undefined || effectiveFrom === null)
|
|
5116
|
-
throw new globalThis.Error("The parameter 'effectiveFrom' must be defined.");
|
|
5117
|
-
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
5110
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse> {
|
|
5111
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
5118
5112
|
url_ = url_.replace(/[?&]$/, "");
|
|
5119
5113
|
|
|
5120
5114
|
const content_ = JSON.stringify(request);
|
|
5121
5115
|
|
|
5122
5116
|
let options_: RequestInit = {
|
|
5123
5117
|
body: content_,
|
|
5124
|
-
method: "
|
|
5118
|
+
method: "DELETE",
|
|
5125
5119
|
headers: {
|
|
5126
5120
|
"Content-Type": "application/json",
|
|
5127
|
-
"Accept": "application/
|
|
5121
|
+
"Accept": "application/octet-stream"
|
|
5128
5122
|
}
|
|
5129
5123
|
};
|
|
5130
5124
|
|
|
5131
5125
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5132
5126
|
return this.http.fetch(url_, transformedOptions_);
|
|
5133
5127
|
}).then((_response: Response) => {
|
|
5134
|
-
return this.
|
|
5128
|
+
return this.processDeleteResourceCalendarPeriods(_response);
|
|
5135
5129
|
});
|
|
5136
5130
|
}
|
|
5137
5131
|
|
|
5138
|
-
protected
|
|
5132
|
+
protected processDeleteResourceCalendarPeriods(response: Response): Promise<FileResponse> {
|
|
5139
5133
|
const status = response.status;
|
|
5140
5134
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5141
|
-
if (status === 200) {
|
|
5142
|
-
|
|
5143
|
-
let
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5135
|
+
if (status === 200 || status === 206) {
|
|
5136
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
5137
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
5138
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
5139
|
+
if (fileName) {
|
|
5140
|
+
fileName = decodeURIComponent(fileName);
|
|
5141
|
+
} else {
|
|
5142
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
5143
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5144
|
+
}
|
|
5145
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
5147
5146
|
} else if (status !== 200 && status !== 204) {
|
|
5148
5147
|
return response.text().then((_responseText) => {
|
|
5149
5148
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5150
5149
|
});
|
|
5151
5150
|
}
|
|
5152
|
-
return Promise.resolve<
|
|
5151
|
+
return Promise.resolve<FileResponse>(null as any);
|
|
5153
5152
|
}
|
|
5154
5153
|
|
|
5155
|
-
|
|
5154
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto> {
|
|
5156
5155
|
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{resourceExternalId}/{effectiveFrom}";
|
|
5157
5156
|
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
5158
5157
|
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
@@ -5162,40 +5161,39 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
|
|
|
5162
5161
|
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
5163
5162
|
url_ = url_.replace(/[?&]$/, "");
|
|
5164
5163
|
|
|
5164
|
+
const content_ = JSON.stringify(request);
|
|
5165
|
+
|
|
5165
5166
|
let options_: RequestInit = {
|
|
5166
|
-
|
|
5167
|
+
body: content_,
|
|
5168
|
+
method: "PUT",
|
|
5167
5169
|
headers: {
|
|
5168
|
-
"
|
|
5170
|
+
"Content-Type": "application/json",
|
|
5171
|
+
"Accept": "application/json"
|
|
5169
5172
|
}
|
|
5170
5173
|
};
|
|
5171
5174
|
|
|
5172
5175
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5173
5176
|
return this.http.fetch(url_, transformedOptions_);
|
|
5174
5177
|
}).then((_response: Response) => {
|
|
5175
|
-
return this.
|
|
5178
|
+
return this.processUpdateResourceCalendarPeriod(_response);
|
|
5176
5179
|
});
|
|
5177
5180
|
}
|
|
5178
5181
|
|
|
5179
|
-
protected
|
|
5182
|
+
protected processUpdateResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto> {
|
|
5180
5183
|
const status = response.status;
|
|
5181
5184
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5182
|
-
if (status === 200
|
|
5183
|
-
|
|
5184
|
-
let
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
} else {
|
|
5189
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
5190
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5191
|
-
}
|
|
5192
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
5185
|
+
if (status === 200) {
|
|
5186
|
+
return response.text().then((_responseText) => {
|
|
5187
|
+
let result200: any = null;
|
|
5188
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto;
|
|
5189
|
+
return result200;
|
|
5190
|
+
});
|
|
5193
5191
|
} else if (status !== 200 && status !== 204) {
|
|
5194
5192
|
return response.text().then((_responseText) => {
|
|
5195
5193
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5196
5194
|
});
|
|
5197
5195
|
}
|
|
5198
|
-
return Promise.resolve<
|
|
5196
|
+
return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
|
|
5199
5197
|
}
|
|
5200
5198
|
|
|
5201
5199
|
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]> {
|
|
@@ -31008,8 +31006,13 @@ export interface UpdateCalendarDefinitionRequest {
|
|
|
31008
31006
|
hoursPerWeekday?: { [key in DayOfWeek]?: number; } | null;
|
|
31009
31007
|
}
|
|
31010
31008
|
|
|
31009
|
+
export interface ResourceCalendarPeriodSchedulesDto {
|
|
31010
|
+
groups?: ResourceCalendarPeriodGroupDto[];
|
|
31011
|
+
ungroupedResources?: ResourceCalendarPeriodsDto[];
|
|
31012
|
+
}
|
|
31013
|
+
|
|
31011
31014
|
export interface ResourceCalendarPeriodGroupDto {
|
|
31012
|
-
|
|
31015
|
+
resourceGroupName?: string;
|
|
31013
31016
|
resources?: ResourceCalendarPeriodsDto[];
|
|
31014
31017
|
}
|
|
31015
31018
|
|
|
@@ -31044,6 +31047,15 @@ export interface UpdateResourceCalendarPeriodRequest {
|
|
|
31044
31047
|
comment?: string | null;
|
|
31045
31048
|
}
|
|
31046
31049
|
|
|
31050
|
+
export interface DeleteResourceCalendarPeriod {
|
|
31051
|
+
periods: PeriodKey[];
|
|
31052
|
+
}
|
|
31053
|
+
|
|
31054
|
+
export interface PeriodKey {
|
|
31055
|
+
resourceExternalId?: string;
|
|
31056
|
+
effectiveFrom?: string;
|
|
31057
|
+
}
|
|
31058
|
+
|
|
31047
31059
|
export interface BulkAddResourceCalendarPeriods {
|
|
31048
31060
|
resourceExternalIds: string[];
|
|
31049
31061
|
calendarDefinitionId: string;
|