@ignos/api-client 20260513.126.1-alpha → 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 +121 -5
- package/lib/ignosportal-api.js +454 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +564 -6
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -615,6 +615,48 @@ export declare class KpiAdminResourceClient extends AuthorizedApiBase implements
|
|
|
615
615
|
updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
|
|
616
616
|
protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
|
|
617
617
|
}
|
|
618
|
+
export interface IKpiCalendarClient {
|
|
619
|
+
listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
|
|
620
|
+
createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
|
|
621
|
+
updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
|
|
622
|
+
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
623
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
624
|
+
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
625
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
626
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
627
|
+
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
628
|
+
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
629
|
+
migrateCapacityToSchedules(): Promise<MigrationResultDto>;
|
|
630
|
+
}
|
|
631
|
+
export declare class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendarClient {
|
|
632
|
+
private http;
|
|
633
|
+
private baseUrl;
|
|
634
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
|
|
635
|
+
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
636
|
+
});
|
|
637
|
+
listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
|
|
638
|
+
protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionDto[]>;
|
|
639
|
+
createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
|
|
640
|
+
protected processCreateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto>;
|
|
641
|
+
updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
|
|
642
|
+
protected processUpdateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto>;
|
|
643
|
+
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
644
|
+
protected processDeleteCalendarDefinition(response: Response): Promise<FileResponse>;
|
|
645
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
646
|
+
protected processListResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
647
|
+
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
648
|
+
protected processAddResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
|
|
649
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
650
|
+
protected processDeleteResourceCalendarPeriods(response: Response): Promise<FileResponse>;
|
|
651
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
652
|
+
protected processUpdateResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
|
|
653
|
+
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
654
|
+
protected processBulkAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]>;
|
|
655
|
+
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
656
|
+
protected processCopyResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
|
|
657
|
+
migrateCapacityToSchedules(): Promise<MigrationResultDto>;
|
|
658
|
+
protected processMigrateCapacityToSchedules(response: Response): Promise<MigrationResultDto>;
|
|
659
|
+
}
|
|
618
660
|
export interface IKpiResourceClient {
|
|
619
661
|
getResourceKpi(resourceExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<ResourceKpiDto>;
|
|
620
662
|
getResourceDailyUptime(resourceExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<ResourceDailyUptimeDto>;
|
|
@@ -4112,6 +4154,84 @@ export interface UpdateCalendarSettingsCommand {
|
|
|
4112
4154
|
holidayHours?: number;
|
|
4113
4155
|
defaultPerformancePercent?: number | null;
|
|
4114
4156
|
}
|
|
4157
|
+
export interface CalendarDefinitionDto {
|
|
4158
|
+
id?: string;
|
|
4159
|
+
name?: string;
|
|
4160
|
+
hoursPerWeekday?: {
|
|
4161
|
+
[key in DayOfWeek]?: number;
|
|
4162
|
+
};
|
|
4163
|
+
created?: Date | null;
|
|
4164
|
+
updatedBy?: string | null;
|
|
4165
|
+
}
|
|
4166
|
+
export interface CreateCalendarDefinition {
|
|
4167
|
+
name: string;
|
|
4168
|
+
hoursPerWeekday: {
|
|
4169
|
+
[key in DayOfWeek]?: number;
|
|
4170
|
+
};
|
|
4171
|
+
}
|
|
4172
|
+
export interface UpdateCalendarDefinitionRequest {
|
|
4173
|
+
name?: string | null;
|
|
4174
|
+
hoursPerWeekday?: {
|
|
4175
|
+
[key in DayOfWeek]?: number;
|
|
4176
|
+
} | null;
|
|
4177
|
+
}
|
|
4178
|
+
export interface ResourceCalendarPeriodSchedulesDto {
|
|
4179
|
+
groups?: ResourceCalendarPeriodGroupDto[];
|
|
4180
|
+
ungroupedResources?: ResourceCalendarPeriodsDto[];
|
|
4181
|
+
}
|
|
4182
|
+
export interface ResourceCalendarPeriodGroupDto {
|
|
4183
|
+
resourceGroupName?: string;
|
|
4184
|
+
resources?: ResourceCalendarPeriodsDto[];
|
|
4185
|
+
}
|
|
4186
|
+
export interface ResourceCalendarPeriodsDto {
|
|
4187
|
+
resourceExternalId?: string;
|
|
4188
|
+
resourceName?: string;
|
|
4189
|
+
periods?: ResourceCalendarPeriodDto[];
|
|
4190
|
+
}
|
|
4191
|
+
export interface ResourceCalendarPeriodDto {
|
|
4192
|
+
resourceExternalId?: string;
|
|
4193
|
+
calendarDefinitionId?: string;
|
|
4194
|
+
calendarDefinitionName?: string;
|
|
4195
|
+
effectiveFrom?: string;
|
|
4196
|
+
effectiveTo?: string | null;
|
|
4197
|
+
targetPercent?: number;
|
|
4198
|
+
comment?: string | null;
|
|
4199
|
+
}
|
|
4200
|
+
export interface AddResourceCalendarPeriod {
|
|
4201
|
+
resourceExternalId: string;
|
|
4202
|
+
calendarDefinitionId: string;
|
|
4203
|
+
effectiveFrom: string;
|
|
4204
|
+
targetPercent: number;
|
|
4205
|
+
comment?: string | null;
|
|
4206
|
+
}
|
|
4207
|
+
export interface UpdateResourceCalendarPeriodRequest {
|
|
4208
|
+
calendarDefinitionId?: string | null;
|
|
4209
|
+
targetPercent?: number | null;
|
|
4210
|
+
newEffectiveFrom?: string | null;
|
|
4211
|
+
comment?: string | null;
|
|
4212
|
+
}
|
|
4213
|
+
export interface DeleteResourceCalendarPeriod {
|
|
4214
|
+
periods: PeriodKey[];
|
|
4215
|
+
}
|
|
4216
|
+
export interface PeriodKey {
|
|
4217
|
+
resourceExternalId?: string;
|
|
4218
|
+
effectiveFrom?: string;
|
|
4219
|
+
}
|
|
4220
|
+
export interface BulkAddResourceCalendarPeriods {
|
|
4221
|
+
resourceExternalIds: string[];
|
|
4222
|
+
calendarDefinitionId: string;
|
|
4223
|
+
effectiveFrom: string;
|
|
4224
|
+
targetPercent: number;
|
|
4225
|
+
comment?: string | null;
|
|
4226
|
+
}
|
|
4227
|
+
export interface CopyResourceCalendarPeriodRequest {
|
|
4228
|
+
targetResourceExternalId: string;
|
|
4229
|
+
effectiveFrom: string;
|
|
4230
|
+
}
|
|
4231
|
+
export interface MigrationResultDto {
|
|
4232
|
+
created?: number;
|
|
4233
|
+
skipped?: number;
|
|
4234
|
+
}
|
|
4115
4235
|
export interface ResourceKpiDto {
|
|
4116
4236
|
uptimeToNow: number;
|
|
4117
4237
|
uptimeToNowPreviousPeriod: number;
|
|
@@ -4152,6 +4272,7 @@ export interface ApplicationResourcesResourceGroupDto {
|
|
|
4152
4272
|
id: string;
|
|
4153
4273
|
name: string;
|
|
4154
4274
|
companyId?: string | null;
|
|
4275
|
+
department?: string | null;
|
|
4155
4276
|
resources: ResourceGroupMemberDto[];
|
|
4156
4277
|
}
|
|
4157
4278
|
export interface ResourceGroupMemberDto {
|
|
@@ -4814,10 +4935,6 @@ export interface TraceListItemDto {
|
|
|
4814
4935
|
consumptions: TraceItemConsumptionDto[];
|
|
4815
4936
|
}
|
|
4816
4937
|
export interface TraceItemConsumptionDto {
|
|
4817
|
-
updated?: Date | null;
|
|
4818
|
-
updatedBy?: string | null;
|
|
4819
|
-
updatedById?: string | null;
|
|
4820
|
-
updateType?: TraceUpdateType | null;
|
|
4821
4938
|
sourceWorkOrder?: string | null;
|
|
4822
4939
|
sourceSequence?: string | null;
|
|
4823
4940
|
traceNumber?: string | null;
|
|
@@ -4828,7 +4945,6 @@ export interface TraceItemConsumptionDto {
|
|
|
4828
4945
|
reference?: string | null;
|
|
4829
4946
|
label: string;
|
|
4830
4947
|
}
|
|
4831
|
-
export type TraceUpdateType = "None" | "User" | "System";
|
|
4832
4948
|
export interface TraceMaterialDetailDto {
|
|
4833
4949
|
materialLine: number;
|
|
4834
4950
|
operation?: number | null;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -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);
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -4839,6 +4839,483 @@ export class KpiAdminResourceClient extends AuthorizedApiBase implements IKpiAdm
|
|
|
4839
4839
|
}
|
|
4840
4840
|
}
|
|
4841
4841
|
|
|
4842
|
+
export interface IKpiCalendarClient {
|
|
4843
|
+
|
|
4844
|
+
listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
|
|
4845
|
+
|
|
4846
|
+
createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
|
|
4847
|
+
|
|
4848
|
+
updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
|
|
4849
|
+
|
|
4850
|
+
deleteCalendarDefinition(id: string): Promise<FileResponse>;
|
|
4851
|
+
|
|
4852
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
|
|
4853
|
+
|
|
4854
|
+
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
|
|
4855
|
+
|
|
4856
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
|
|
4857
|
+
|
|
4858
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
4859
|
+
|
|
4860
|
+
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
|
|
4861
|
+
|
|
4862
|
+
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
|
|
4863
|
+
|
|
4864
|
+
migrateCapacityToSchedules(): Promise<MigrationResultDto>;
|
|
4865
|
+
}
|
|
4866
|
+
|
|
4867
|
+
export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendarClient {
|
|
4868
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
4869
|
+
private baseUrl: string;
|
|
4870
|
+
|
|
4871
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
4872
|
+
super(configuration);
|
|
4873
|
+
this.http = http ? http : window as any;
|
|
4874
|
+
this.baseUrl = baseUrl ?? "";
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4877
|
+
listCalendarDefinitions(): Promise<CalendarDefinitionDto[]> {
|
|
4878
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions";
|
|
4879
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4880
|
+
|
|
4881
|
+
let options_: RequestInit = {
|
|
4882
|
+
method: "GET",
|
|
4883
|
+
headers: {
|
|
4884
|
+
"Accept": "application/json"
|
|
4885
|
+
}
|
|
4886
|
+
};
|
|
4887
|
+
|
|
4888
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4889
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4890
|
+
}).then((_response: Response) => {
|
|
4891
|
+
return this.processListCalendarDefinitions(_response);
|
|
4892
|
+
});
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionDto[]> {
|
|
4896
|
+
const status = response.status;
|
|
4897
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
4898
|
+
if (status === 200) {
|
|
4899
|
+
return response.text().then((_responseText) => {
|
|
4900
|
+
let result200: any = null;
|
|
4901
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CalendarDefinitionDto[];
|
|
4902
|
+
return result200;
|
|
4903
|
+
});
|
|
4904
|
+
} else if (status !== 200 && status !== 204) {
|
|
4905
|
+
return response.text().then((_responseText) => {
|
|
4906
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4907
|
+
});
|
|
4908
|
+
}
|
|
4909
|
+
return Promise.resolve<CalendarDefinitionDto[]>(null as any);
|
|
4910
|
+
}
|
|
4911
|
+
|
|
4912
|
+
createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto> {
|
|
4913
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions";
|
|
4914
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4915
|
+
|
|
4916
|
+
const content_ = JSON.stringify(request);
|
|
4917
|
+
|
|
4918
|
+
let options_: RequestInit = {
|
|
4919
|
+
body: content_,
|
|
4920
|
+
method: "POST",
|
|
4921
|
+
headers: {
|
|
4922
|
+
"Content-Type": "application/json",
|
|
4923
|
+
"Accept": "application/json"
|
|
4924
|
+
}
|
|
4925
|
+
};
|
|
4926
|
+
|
|
4927
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4928
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4929
|
+
}).then((_response: Response) => {
|
|
4930
|
+
return this.processCreateCalendarDefinition(_response);
|
|
4931
|
+
});
|
|
4932
|
+
}
|
|
4933
|
+
|
|
4934
|
+
protected processCreateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto> {
|
|
4935
|
+
const status = response.status;
|
|
4936
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
4937
|
+
if (status === 200) {
|
|
4938
|
+
return response.text().then((_responseText) => {
|
|
4939
|
+
let result200: any = null;
|
|
4940
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CalendarDefinitionDto;
|
|
4941
|
+
return result200;
|
|
4942
|
+
});
|
|
4943
|
+
} else if (status !== 200 && status !== 204) {
|
|
4944
|
+
return response.text().then((_responseText) => {
|
|
4945
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4946
|
+
});
|
|
4947
|
+
}
|
|
4948
|
+
return Promise.resolve<CalendarDefinitionDto>(null as any);
|
|
4949
|
+
}
|
|
4950
|
+
|
|
4951
|
+
updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto> {
|
|
4952
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions/{id}";
|
|
4953
|
+
if (id === undefined || id === null)
|
|
4954
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
4955
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4956
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4957
|
+
|
|
4958
|
+
const content_ = JSON.stringify(request);
|
|
4959
|
+
|
|
4960
|
+
let options_: RequestInit = {
|
|
4961
|
+
body: content_,
|
|
4962
|
+
method: "PUT",
|
|
4963
|
+
headers: {
|
|
4964
|
+
"Content-Type": "application/json",
|
|
4965
|
+
"Accept": "application/json"
|
|
4966
|
+
}
|
|
4967
|
+
};
|
|
4968
|
+
|
|
4969
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4970
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4971
|
+
}).then((_response: Response) => {
|
|
4972
|
+
return this.processUpdateCalendarDefinition(_response);
|
|
4973
|
+
});
|
|
4974
|
+
}
|
|
4975
|
+
|
|
4976
|
+
protected processUpdateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto> {
|
|
4977
|
+
const status = response.status;
|
|
4978
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
4979
|
+
if (status === 200) {
|
|
4980
|
+
return response.text().then((_responseText) => {
|
|
4981
|
+
let result200: any = null;
|
|
4982
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CalendarDefinitionDto;
|
|
4983
|
+
return result200;
|
|
4984
|
+
});
|
|
4985
|
+
} else if (status !== 200 && status !== 204) {
|
|
4986
|
+
return response.text().then((_responseText) => {
|
|
4987
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
4988
|
+
});
|
|
4989
|
+
}
|
|
4990
|
+
return Promise.resolve<CalendarDefinitionDto>(null as any);
|
|
4991
|
+
}
|
|
4992
|
+
|
|
4993
|
+
deleteCalendarDefinition(id: string): Promise<FileResponse> {
|
|
4994
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-definitions/{id}";
|
|
4995
|
+
if (id === undefined || id === null)
|
|
4996
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
4997
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
4998
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
4999
|
+
|
|
5000
|
+
let options_: RequestInit = {
|
|
5001
|
+
method: "DELETE",
|
|
5002
|
+
headers: {
|
|
5003
|
+
"Accept": "application/octet-stream"
|
|
5004
|
+
}
|
|
5005
|
+
};
|
|
5006
|
+
|
|
5007
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5008
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5009
|
+
}).then((_response: Response) => {
|
|
5010
|
+
return this.processDeleteCalendarDefinition(_response);
|
|
5011
|
+
});
|
|
5012
|
+
}
|
|
5013
|
+
|
|
5014
|
+
protected processDeleteCalendarDefinition(response: Response): Promise<FileResponse> {
|
|
5015
|
+
const status = response.status;
|
|
5016
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5017
|
+
if (status === 200 || status === 206) {
|
|
5018
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
5019
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
5020
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
5021
|
+
if (fileName) {
|
|
5022
|
+
fileName = decodeURIComponent(fileName);
|
|
5023
|
+
} else {
|
|
5024
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
5025
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
5026
|
+
}
|
|
5027
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
5028
|
+
} else if (status !== 200 && status !== 204) {
|
|
5029
|
+
return response.text().then((_responseText) => {
|
|
5030
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5031
|
+
});
|
|
5032
|
+
}
|
|
5033
|
+
return Promise.resolve<FileResponse>(null as any);
|
|
5034
|
+
}
|
|
5035
|
+
|
|
5036
|
+
listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto> {
|
|
5037
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
5038
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5039
|
+
|
|
5040
|
+
let options_: RequestInit = {
|
|
5041
|
+
method: "GET",
|
|
5042
|
+
headers: {
|
|
5043
|
+
"Accept": "application/json"
|
|
5044
|
+
}
|
|
5045
|
+
};
|
|
5046
|
+
|
|
5047
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5048
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5049
|
+
}).then((_response: Response) => {
|
|
5050
|
+
return this.processListResourceCalendarPeriods(_response);
|
|
5051
|
+
});
|
|
5052
|
+
}
|
|
5053
|
+
|
|
5054
|
+
protected processListResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodSchedulesDto> {
|
|
5055
|
+
const status = response.status;
|
|
5056
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5057
|
+
if (status === 200) {
|
|
5058
|
+
return response.text().then((_responseText) => {
|
|
5059
|
+
let result200: any = null;
|
|
5060
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodSchedulesDto;
|
|
5061
|
+
return result200;
|
|
5062
|
+
});
|
|
5063
|
+
} else if (status !== 200 && status !== 204) {
|
|
5064
|
+
return response.text().then((_responseText) => {
|
|
5065
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5066
|
+
});
|
|
5067
|
+
}
|
|
5068
|
+
return Promise.resolve<ResourceCalendarPeriodSchedulesDto>(null as any);
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto> {
|
|
5072
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
5073
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5074
|
+
|
|
5075
|
+
const content_ = JSON.stringify(request);
|
|
5076
|
+
|
|
5077
|
+
let options_: RequestInit = {
|
|
5078
|
+
body: content_,
|
|
5079
|
+
method: "POST",
|
|
5080
|
+
headers: {
|
|
5081
|
+
"Content-Type": "application/json",
|
|
5082
|
+
"Accept": "application/json"
|
|
5083
|
+
}
|
|
5084
|
+
};
|
|
5085
|
+
|
|
5086
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5087
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5088
|
+
}).then((_response: Response) => {
|
|
5089
|
+
return this.processAddResourceCalendarPeriod(_response);
|
|
5090
|
+
});
|
|
5091
|
+
}
|
|
5092
|
+
|
|
5093
|
+
protected processAddResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto> {
|
|
5094
|
+
const status = response.status;
|
|
5095
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5096
|
+
if (status === 200) {
|
|
5097
|
+
return response.text().then((_responseText) => {
|
|
5098
|
+
let result200: any = null;
|
|
5099
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto;
|
|
5100
|
+
return result200;
|
|
5101
|
+
});
|
|
5102
|
+
} else if (status !== 200 && status !== 204) {
|
|
5103
|
+
return response.text().then((_responseText) => {
|
|
5104
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5105
|
+
});
|
|
5106
|
+
}
|
|
5107
|
+
return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
|
|
5108
|
+
}
|
|
5109
|
+
|
|
5110
|
+
deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse> {
|
|
5111
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
|
|
5112
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5113
|
+
|
|
5114
|
+
const content_ = JSON.stringify(request);
|
|
5115
|
+
|
|
5116
|
+
let options_: RequestInit = {
|
|
5117
|
+
body: content_,
|
|
5118
|
+
method: "DELETE",
|
|
5119
|
+
headers: {
|
|
5120
|
+
"Content-Type": "application/json",
|
|
5121
|
+
"Accept": "application/octet-stream"
|
|
5122
|
+
}
|
|
5123
|
+
};
|
|
5124
|
+
|
|
5125
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5126
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5127
|
+
}).then((_response: Response) => {
|
|
5128
|
+
return this.processDeleteResourceCalendarPeriods(_response);
|
|
5129
|
+
});
|
|
5130
|
+
}
|
|
5131
|
+
|
|
5132
|
+
protected processDeleteResourceCalendarPeriods(response: Response): Promise<FileResponse> {
|
|
5133
|
+
const status = response.status;
|
|
5134
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
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 }; });
|
|
5146
|
+
} else if (status !== 200 && status !== 204) {
|
|
5147
|
+
return response.text().then((_responseText) => {
|
|
5148
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5149
|
+
});
|
|
5150
|
+
}
|
|
5151
|
+
return Promise.resolve<FileResponse>(null as any);
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5154
|
+
updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto> {
|
|
5155
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{resourceExternalId}/{effectiveFrom}";
|
|
5156
|
+
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
5157
|
+
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
5158
|
+
url_ = url_.replace("{resourceExternalId}", encodeURIComponent("" + resourceExternalId));
|
|
5159
|
+
if (effectiveFrom === undefined || effectiveFrom === null)
|
|
5160
|
+
throw new globalThis.Error("The parameter 'effectiveFrom' must be defined.");
|
|
5161
|
+
url_ = url_.replace("{effectiveFrom}", encodeURIComponent("" + effectiveFrom));
|
|
5162
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5163
|
+
|
|
5164
|
+
const content_ = JSON.stringify(request);
|
|
5165
|
+
|
|
5166
|
+
let options_: RequestInit = {
|
|
5167
|
+
body: content_,
|
|
5168
|
+
method: "PUT",
|
|
5169
|
+
headers: {
|
|
5170
|
+
"Content-Type": "application/json",
|
|
5171
|
+
"Accept": "application/json"
|
|
5172
|
+
}
|
|
5173
|
+
};
|
|
5174
|
+
|
|
5175
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5176
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5177
|
+
}).then((_response: Response) => {
|
|
5178
|
+
return this.processUpdateResourceCalendarPeriod(_response);
|
|
5179
|
+
});
|
|
5180
|
+
}
|
|
5181
|
+
|
|
5182
|
+
protected processUpdateResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto> {
|
|
5183
|
+
const status = response.status;
|
|
5184
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
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
|
+
});
|
|
5191
|
+
} else if (status !== 200 && status !== 204) {
|
|
5192
|
+
return response.text().then((_responseText) => {
|
|
5193
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5194
|
+
});
|
|
5195
|
+
}
|
|
5196
|
+
return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]> {
|
|
5200
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/bulk";
|
|
5201
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5202
|
+
|
|
5203
|
+
const content_ = JSON.stringify(request);
|
|
5204
|
+
|
|
5205
|
+
let options_: RequestInit = {
|
|
5206
|
+
body: content_,
|
|
5207
|
+
method: "POST",
|
|
5208
|
+
headers: {
|
|
5209
|
+
"Content-Type": "application/json",
|
|
5210
|
+
"Accept": "application/json"
|
|
5211
|
+
}
|
|
5212
|
+
};
|
|
5213
|
+
|
|
5214
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5215
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5216
|
+
}).then((_response: Response) => {
|
|
5217
|
+
return this.processBulkAddResourceCalendarPeriods(_response);
|
|
5218
|
+
});
|
|
5219
|
+
}
|
|
5220
|
+
|
|
5221
|
+
protected processBulkAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]> {
|
|
5222
|
+
const status = response.status;
|
|
5223
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5224
|
+
if (status === 200) {
|
|
5225
|
+
return response.text().then((_responseText) => {
|
|
5226
|
+
let result200: any = null;
|
|
5227
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto[];
|
|
5228
|
+
return result200;
|
|
5229
|
+
});
|
|
5230
|
+
} else if (status !== 200 && status !== 204) {
|
|
5231
|
+
return response.text().then((_responseText) => {
|
|
5232
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5233
|
+
});
|
|
5234
|
+
}
|
|
5235
|
+
return Promise.resolve<ResourceCalendarPeriodDto[]>(null as any);
|
|
5236
|
+
}
|
|
5237
|
+
|
|
5238
|
+
copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto> {
|
|
5239
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{sourceResourceExternalId}/{sourceEffectiveFrom}/copy";
|
|
5240
|
+
if (sourceResourceExternalId === undefined || sourceResourceExternalId === null)
|
|
5241
|
+
throw new globalThis.Error("The parameter 'sourceResourceExternalId' must be defined.");
|
|
5242
|
+
url_ = url_.replace("{sourceResourceExternalId}", encodeURIComponent("" + sourceResourceExternalId));
|
|
5243
|
+
if (sourceEffectiveFrom === undefined || sourceEffectiveFrom === null)
|
|
5244
|
+
throw new globalThis.Error("The parameter 'sourceEffectiveFrom' must be defined.");
|
|
5245
|
+
url_ = url_.replace("{sourceEffectiveFrom}", encodeURIComponent("" + sourceEffectiveFrom));
|
|
5246
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5247
|
+
|
|
5248
|
+
const content_ = JSON.stringify(request);
|
|
5249
|
+
|
|
5250
|
+
let options_: RequestInit = {
|
|
5251
|
+
body: content_,
|
|
5252
|
+
method: "POST",
|
|
5253
|
+
headers: {
|
|
5254
|
+
"Content-Type": "application/json",
|
|
5255
|
+
"Accept": "application/json"
|
|
5256
|
+
}
|
|
5257
|
+
};
|
|
5258
|
+
|
|
5259
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5260
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5261
|
+
}).then((_response: Response) => {
|
|
5262
|
+
return this.processCopyResourceCalendarPeriod(_response);
|
|
5263
|
+
});
|
|
5264
|
+
}
|
|
5265
|
+
|
|
5266
|
+
protected processCopyResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto> {
|
|
5267
|
+
const status = response.status;
|
|
5268
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5269
|
+
if (status === 200) {
|
|
5270
|
+
return response.text().then((_responseText) => {
|
|
5271
|
+
let result200: any = null;
|
|
5272
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto;
|
|
5273
|
+
return result200;
|
|
5274
|
+
});
|
|
5275
|
+
} else if (status !== 200 && status !== 204) {
|
|
5276
|
+
return response.text().then((_responseText) => {
|
|
5277
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5278
|
+
});
|
|
5279
|
+
}
|
|
5280
|
+
return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
|
|
5281
|
+
}
|
|
5282
|
+
|
|
5283
|
+
migrateCapacityToSchedules(): Promise<MigrationResultDto> {
|
|
5284
|
+
let url_ = this.baseUrl + "/resources/kpi/calendar-periods/migrate-capacity";
|
|
5285
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5286
|
+
|
|
5287
|
+
let options_: RequestInit = {
|
|
5288
|
+
method: "POST",
|
|
5289
|
+
headers: {
|
|
5290
|
+
"Accept": "application/json"
|
|
5291
|
+
}
|
|
5292
|
+
};
|
|
5293
|
+
|
|
5294
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5295
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5296
|
+
}).then((_response: Response) => {
|
|
5297
|
+
return this.processMigrateCapacityToSchedules(_response);
|
|
5298
|
+
});
|
|
5299
|
+
}
|
|
5300
|
+
|
|
5301
|
+
protected processMigrateCapacityToSchedules(response: Response): Promise<MigrationResultDto> {
|
|
5302
|
+
const status = response.status;
|
|
5303
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5304
|
+
if (status === 200) {
|
|
5305
|
+
return response.text().then((_responseText) => {
|
|
5306
|
+
let result200: any = null;
|
|
5307
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MigrationResultDto;
|
|
5308
|
+
return result200;
|
|
5309
|
+
});
|
|
5310
|
+
} else if (status !== 200 && status !== 204) {
|
|
5311
|
+
return response.text().then((_responseText) => {
|
|
5312
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5313
|
+
});
|
|
5314
|
+
}
|
|
5315
|
+
return Promise.resolve<MigrationResultDto>(null as any);
|
|
5316
|
+
}
|
|
5317
|
+
}
|
|
5318
|
+
|
|
4842
5319
|
export interface IKpiResourceClient {
|
|
4843
5320
|
|
|
4844
5321
|
getResourceKpi(resourceExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<ResourceKpiDto>;
|
|
@@ -30511,6 +30988,92 @@ export interface UpdateCalendarSettingsCommand {
|
|
|
30511
30988
|
defaultPerformancePercent?: number | null;
|
|
30512
30989
|
}
|
|
30513
30990
|
|
|
30991
|
+
export interface CalendarDefinitionDto {
|
|
30992
|
+
id?: string;
|
|
30993
|
+
name?: string;
|
|
30994
|
+
hoursPerWeekday?: { [key in DayOfWeek]?: number; };
|
|
30995
|
+
created?: Date | null;
|
|
30996
|
+
updatedBy?: string | null;
|
|
30997
|
+
}
|
|
30998
|
+
|
|
30999
|
+
export interface CreateCalendarDefinition {
|
|
31000
|
+
name: string;
|
|
31001
|
+
hoursPerWeekday: { [key in DayOfWeek]?: number; };
|
|
31002
|
+
}
|
|
31003
|
+
|
|
31004
|
+
export interface UpdateCalendarDefinitionRequest {
|
|
31005
|
+
name?: string | null;
|
|
31006
|
+
hoursPerWeekday?: { [key in DayOfWeek]?: number; } | null;
|
|
31007
|
+
}
|
|
31008
|
+
|
|
31009
|
+
export interface ResourceCalendarPeriodSchedulesDto {
|
|
31010
|
+
groups?: ResourceCalendarPeriodGroupDto[];
|
|
31011
|
+
ungroupedResources?: ResourceCalendarPeriodsDto[];
|
|
31012
|
+
}
|
|
31013
|
+
|
|
31014
|
+
export interface ResourceCalendarPeriodGroupDto {
|
|
31015
|
+
resourceGroupName?: string;
|
|
31016
|
+
resources?: ResourceCalendarPeriodsDto[];
|
|
31017
|
+
}
|
|
31018
|
+
|
|
31019
|
+
export interface ResourceCalendarPeriodsDto {
|
|
31020
|
+
resourceExternalId?: string;
|
|
31021
|
+
resourceName?: string;
|
|
31022
|
+
periods?: ResourceCalendarPeriodDto[];
|
|
31023
|
+
}
|
|
31024
|
+
|
|
31025
|
+
export interface ResourceCalendarPeriodDto {
|
|
31026
|
+
resourceExternalId?: string;
|
|
31027
|
+
calendarDefinitionId?: string;
|
|
31028
|
+
calendarDefinitionName?: string;
|
|
31029
|
+
effectiveFrom?: string;
|
|
31030
|
+
effectiveTo?: string | null;
|
|
31031
|
+
targetPercent?: number;
|
|
31032
|
+
comment?: string | null;
|
|
31033
|
+
}
|
|
31034
|
+
|
|
31035
|
+
export interface AddResourceCalendarPeriod {
|
|
31036
|
+
resourceExternalId: string;
|
|
31037
|
+
calendarDefinitionId: string;
|
|
31038
|
+
effectiveFrom: string;
|
|
31039
|
+
targetPercent: number;
|
|
31040
|
+
comment?: string | null;
|
|
31041
|
+
}
|
|
31042
|
+
|
|
31043
|
+
export interface UpdateResourceCalendarPeriodRequest {
|
|
31044
|
+
calendarDefinitionId?: string | null;
|
|
31045
|
+
targetPercent?: number | null;
|
|
31046
|
+
newEffectiveFrom?: string | null;
|
|
31047
|
+
comment?: string | null;
|
|
31048
|
+
}
|
|
31049
|
+
|
|
31050
|
+
export interface DeleteResourceCalendarPeriod {
|
|
31051
|
+
periods: PeriodKey[];
|
|
31052
|
+
}
|
|
31053
|
+
|
|
31054
|
+
export interface PeriodKey {
|
|
31055
|
+
resourceExternalId?: string;
|
|
31056
|
+
effectiveFrom?: string;
|
|
31057
|
+
}
|
|
31058
|
+
|
|
31059
|
+
export interface BulkAddResourceCalendarPeriods {
|
|
31060
|
+
resourceExternalIds: string[];
|
|
31061
|
+
calendarDefinitionId: string;
|
|
31062
|
+
effectiveFrom: string;
|
|
31063
|
+
targetPercent: number;
|
|
31064
|
+
comment?: string | null;
|
|
31065
|
+
}
|
|
31066
|
+
|
|
31067
|
+
export interface CopyResourceCalendarPeriodRequest {
|
|
31068
|
+
targetResourceExternalId: string;
|
|
31069
|
+
effectiveFrom: string;
|
|
31070
|
+
}
|
|
31071
|
+
|
|
31072
|
+
export interface MigrationResultDto {
|
|
31073
|
+
created?: number;
|
|
31074
|
+
skipped?: number;
|
|
31075
|
+
}
|
|
31076
|
+
|
|
30514
31077
|
export interface ResourceKpiDto {
|
|
30515
31078
|
uptimeToNow: number;
|
|
30516
31079
|
uptimeToNowPreviousPeriod: number;
|
|
@@ -30557,6 +31120,7 @@ export interface ApplicationResourcesResourceGroupDto {
|
|
|
30557
31120
|
id: string;
|
|
30558
31121
|
name: string;
|
|
30559
31122
|
companyId?: string | null;
|
|
31123
|
+
department?: string | null;
|
|
30560
31124
|
resources: ResourceGroupMemberDto[];
|
|
30561
31125
|
}
|
|
30562
31126
|
|
|
@@ -31318,10 +31882,6 @@ export interface TraceListItemDto {
|
|
|
31318
31882
|
}
|
|
31319
31883
|
|
|
31320
31884
|
export interface TraceItemConsumptionDto {
|
|
31321
|
-
updated?: Date | null;
|
|
31322
|
-
updatedBy?: string | null;
|
|
31323
|
-
updatedById?: string | null;
|
|
31324
|
-
updateType?: TraceUpdateType | null;
|
|
31325
31885
|
sourceWorkOrder?: string | null;
|
|
31326
31886
|
sourceSequence?: string | null;
|
|
31327
31887
|
traceNumber?: string | null;
|
|
@@ -31333,8 +31893,6 @@ export interface TraceItemConsumptionDto {
|
|
|
31333
31893
|
label: string;
|
|
31334
31894
|
}
|
|
31335
31895
|
|
|
31336
|
-
export type TraceUpdateType = "None" | "User" | "System";
|
|
31337
|
-
|
|
31338
31896
|
export interface TraceMaterialDetailDto {
|
|
31339
31897
|
materialLine: number;
|
|
31340
31898
|
operation?: number | null;
|