@ignos/api-client 20260715.185.1-alpha → 20260715.186.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 +8 -0
- package/lib/ignosportal-api.js +47 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +54 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -2441,6 +2441,7 @@ export interface IMesPlannerClient {
|
|
|
2441
2441
|
reset(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2442
2442
|
saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
2443
2443
|
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2444
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
2444
2445
|
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
2445
2446
|
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
2446
2447
|
setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
|
|
@@ -2463,6 +2464,8 @@ export declare class MesPlannerClient extends AuthorizedApiBase implements IMesP
|
|
|
2463
2464
|
protected processSaveDraft(response: Response): Promise<PlannerPlanDto>;
|
|
2464
2465
|
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2465
2466
|
protected processDiscardDraft(response: Response): Promise<PlannerPlanDto>;
|
|
2467
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
2468
|
+
protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]>;
|
|
2466
2469
|
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
2467
2470
|
protected processGetVersions(response: Response): Promise<PlannerPlanEventDto[]>;
|
|
2468
2471
|
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
@@ -7306,6 +7309,11 @@ export interface PlannerSequenceInput {
|
|
|
7306
7309
|
[key: string]: string;
|
|
7307
7310
|
} | null;
|
|
7308
7311
|
}
|
|
7312
|
+
export interface WeekCapacityDto {
|
|
7313
|
+
weekGroup: string;
|
|
7314
|
+
weekStart: Date;
|
|
7315
|
+
capacityHours: number;
|
|
7316
|
+
}
|
|
7309
7317
|
export interface PlannerPlanEventDto {
|
|
7310
7318
|
id: string;
|
|
7311
7319
|
eventType: PlannerEventType;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -20548,6 +20548,53 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20548
20548
|
}
|
|
20549
20549
|
return Promise.resolve(null);
|
|
20550
20550
|
}
|
|
20551
|
+
getCapacity(resourceGroupId, from, to) {
|
|
20552
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
|
|
20553
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20554
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20555
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20556
|
+
if (from === null)
|
|
20557
|
+
throw new globalThis.Error("The parameter 'from' cannot be null.");
|
|
20558
|
+
else if (from !== undefined)
|
|
20559
|
+
url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
|
|
20560
|
+
if (to === null)
|
|
20561
|
+
throw new globalThis.Error("The parameter 'to' cannot be null.");
|
|
20562
|
+
else if (to !== undefined)
|
|
20563
|
+
url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
|
|
20564
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20565
|
+
let options_ = {
|
|
20566
|
+
method: "GET",
|
|
20567
|
+
headers: {
|
|
20568
|
+
"Accept": "application/json"
|
|
20569
|
+
}
|
|
20570
|
+
};
|
|
20571
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20572
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20573
|
+
}).then((_response) => {
|
|
20574
|
+
return this.processGetCapacity(_response);
|
|
20575
|
+
});
|
|
20576
|
+
}
|
|
20577
|
+
processGetCapacity(response) {
|
|
20578
|
+
const status = response.status;
|
|
20579
|
+
let _headers = {};
|
|
20580
|
+
if (response.headers && response.headers.forEach) {
|
|
20581
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20582
|
+
}
|
|
20583
|
+
;
|
|
20584
|
+
if (status === 200) {
|
|
20585
|
+
return response.text().then((_responseText) => {
|
|
20586
|
+
let result200 = null;
|
|
20587
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20588
|
+
return result200;
|
|
20589
|
+
});
|
|
20590
|
+
}
|
|
20591
|
+
else if (status !== 200 && status !== 204) {
|
|
20592
|
+
return response.text().then((_responseText) => {
|
|
20593
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20594
|
+
});
|
|
20595
|
+
}
|
|
20596
|
+
return Promise.resolve(null);
|
|
20597
|
+
}
|
|
20551
20598
|
getVersions(resourceGroupId) {
|
|
20552
20599
|
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
|
|
20553
20600
|
if (resourceGroupId === undefined || resourceGroupId === null)
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -21707,6 +21707,8 @@ export interface IMesPlannerClient {
|
|
|
21707
21707
|
|
|
21708
21708
|
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
21709
21709
|
|
|
21710
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
21711
|
+
|
|
21710
21712
|
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
21711
21713
|
|
|
21712
21714
|
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
@@ -21965,6 +21967,52 @@ export class MesPlannerClient extends AuthorizedApiBase implements IMesPlannerCl
|
|
|
21965
21967
|
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
21966
21968
|
}
|
|
21967
21969
|
|
|
21970
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]> {
|
|
21971
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
|
|
21972
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
21973
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
21974
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
21975
|
+
if (from === null)
|
|
21976
|
+
throw new globalThis.Error("The parameter 'from' cannot be null.");
|
|
21977
|
+
else if (from !== undefined)
|
|
21978
|
+
url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
|
|
21979
|
+
if (to === null)
|
|
21980
|
+
throw new globalThis.Error("The parameter 'to' cannot be null.");
|
|
21981
|
+
else if (to !== undefined)
|
|
21982
|
+
url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
|
|
21983
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
21984
|
+
|
|
21985
|
+
let options_: RequestInit = {
|
|
21986
|
+
method: "GET",
|
|
21987
|
+
headers: {
|
|
21988
|
+
"Accept": "application/json"
|
|
21989
|
+
}
|
|
21990
|
+
};
|
|
21991
|
+
|
|
21992
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21993
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
21994
|
+
}).then((_response: Response) => {
|
|
21995
|
+
return this.processGetCapacity(_response);
|
|
21996
|
+
});
|
|
21997
|
+
}
|
|
21998
|
+
|
|
21999
|
+
protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]> {
|
|
22000
|
+
const status = response.status;
|
|
22001
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22002
|
+
if (status === 200) {
|
|
22003
|
+
return response.text().then((_responseText) => {
|
|
22004
|
+
let result200: any = null;
|
|
22005
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as WeekCapacityDto[];
|
|
22006
|
+
return result200;
|
|
22007
|
+
});
|
|
22008
|
+
} else if (status !== 200 && status !== 204) {
|
|
22009
|
+
return response.text().then((_responseText) => {
|
|
22010
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22011
|
+
});
|
|
22012
|
+
}
|
|
22013
|
+
return Promise.resolve<WeekCapacityDto[]>(null as any);
|
|
22014
|
+
}
|
|
22015
|
+
|
|
21968
22016
|
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]> {
|
|
21969
22017
|
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
|
|
21970
22018
|
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
@@ -35073,6 +35121,12 @@ export interface PlannerSequenceInput {
|
|
|
35073
35121
|
weekGroups?: { [key: string]: string; } | null;
|
|
35074
35122
|
}
|
|
35075
35123
|
|
|
35124
|
+
export interface WeekCapacityDto {
|
|
35125
|
+
weekGroup: string;
|
|
35126
|
+
weekStart: Date;
|
|
35127
|
+
capacityHours: number;
|
|
35128
|
+
}
|
|
35129
|
+
|
|
35076
35130
|
export interface PlannerPlanEventDto {
|
|
35077
35131
|
id: string;
|
|
35078
35132
|
eventType: PlannerEventType;
|