@ignos/api-client 20260727.196.1 → 20260728.197.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 +115 -0
- package/lib/ignosportal-api.js +418 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +523 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -2473,6 +2473,45 @@ export declare class MesOrMoveClient extends AuthorizedApiBase implements IMesOr
|
|
|
2473
2473
|
postListProductionOrders(request: ListProductionOrdersRequest): Promise<ProductionOrderListDto[]>;
|
|
2474
2474
|
protected processPostListProductionOrders(response: Response): Promise<ProductionOrderListDto[]>;
|
|
2475
2475
|
}
|
|
2476
|
+
export interface IMesPlannerClient {
|
|
2477
|
+
getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
|
|
2478
|
+
publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
|
|
2479
|
+
updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
2480
|
+
reset(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2481
|
+
saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
2482
|
+
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2483
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
2484
|
+
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
2485
|
+
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
2486
|
+
setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
|
|
2487
|
+
}
|
|
2488
|
+
export declare class MesPlannerClient extends AuthorizedApiBase implements IMesPlannerClient {
|
|
2489
|
+
private http;
|
|
2490
|
+
private baseUrl;
|
|
2491
|
+
constructor(configuration: IApiClientConfig, baseUrl?: string, http?: {
|
|
2492
|
+
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
2493
|
+
});
|
|
2494
|
+
getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
|
|
2495
|
+
protected processGetPlan(response: Response): Promise<PlannerPlanDto>;
|
|
2496
|
+
publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
|
|
2497
|
+
protected processPublish(response: Response): Promise<PlannerPlanDto>;
|
|
2498
|
+
updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
2499
|
+
protected processUpdateSequence(response: Response): Promise<PlannerPlanDto>;
|
|
2500
|
+
reset(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2501
|
+
protected processReset(response: Response): Promise<PlannerPlanDto>;
|
|
2502
|
+
saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
2503
|
+
protected processSaveDraft(response: Response): Promise<PlannerPlanDto>;
|
|
2504
|
+
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
2505
|
+
protected processDiscardDraft(response: Response): Promise<PlannerPlanDto>;
|
|
2506
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
2507
|
+
protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]>;
|
|
2508
|
+
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
2509
|
+
protected processGetVersions(response: Response): Promise<PlannerPlanEventDto[]>;
|
|
2510
|
+
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
2511
|
+
protected processGetVersion(response: Response): Promise<PlannerPlanDto>;
|
|
2512
|
+
setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
|
|
2513
|
+
protected processSetProgramStatus(response: Response): Promise<ProgramStatus>;
|
|
2514
|
+
}
|
|
2476
2515
|
export interface IMesProductionOrderAttachmentClient {
|
|
2477
2516
|
/**
|
|
2478
2517
|
* Upload a new attachment (with or without a file)
|
|
@@ -7383,6 +7422,78 @@ export interface ListProductionOrdersRequest {
|
|
|
7383
7422
|
searchType: SearchTypeDto;
|
|
7384
7423
|
maxResults?: number | null;
|
|
7385
7424
|
}
|
|
7425
|
+
export interface PlannerPlanDto {
|
|
7426
|
+
resourceGroupId: string;
|
|
7427
|
+
sequence: PlannerOperationDto[];
|
|
7428
|
+
lockedCount: number;
|
|
7429
|
+
planSavedAt?: Date | null;
|
|
7430
|
+
isDraft: boolean;
|
|
7431
|
+
publishedETag?: string | null;
|
|
7432
|
+
weeklyCapacities: WeekCapacityDto[];
|
|
7433
|
+
}
|
|
7434
|
+
export interface PlannerOperationDto {
|
|
7435
|
+
id: string;
|
|
7436
|
+
productionOrderNumber: string;
|
|
7437
|
+
operation: number;
|
|
7438
|
+
operationName: string;
|
|
7439
|
+
plannedStart: Date;
|
|
7440
|
+
plannedEnd?: Date | null;
|
|
7441
|
+
status: OperationStatusDto;
|
|
7442
|
+
resourceId: string;
|
|
7443
|
+
resourceName: string;
|
|
7444
|
+
resourceDepartmentNumber?: string | null;
|
|
7445
|
+
resourceDepartmentName?: string | null;
|
|
7446
|
+
partNumber: string;
|
|
7447
|
+
partName?: string | null;
|
|
7448
|
+
partMaterial?: string | null;
|
|
7449
|
+
quantity: number;
|
|
7450
|
+
producedQuantity: number;
|
|
7451
|
+
totalPlannedHours?: number;
|
|
7452
|
+
totalUsedHours?: number;
|
|
7453
|
+
customerName?: string | null;
|
|
7454
|
+
project?: WorkOrderProjectDto | null;
|
|
7455
|
+
sequenceNumber: number;
|
|
7456
|
+
isManuallyLocked: boolean;
|
|
7457
|
+
weekGroup: string;
|
|
7458
|
+
programStatus?: ProgramStatus | null;
|
|
7459
|
+
}
|
|
7460
|
+
export type ProgramStatus = "Blank" | "NotOk" | "Ok";
|
|
7461
|
+
export interface WeekCapacityDto {
|
|
7462
|
+
weekGroup: string;
|
|
7463
|
+
weekStart: Date;
|
|
7464
|
+
capacityHours: number;
|
|
7465
|
+
}
|
|
7466
|
+
export interface PublishPlanRequest {
|
|
7467
|
+
/** ETag of the published plan the caller last read, used for optimistic
|
|
7468
|
+
concurrency. Null if the caller never observed a published plan. */
|
|
7469
|
+
publishedETag?: string | null;
|
|
7470
|
+
comment?: string | null;
|
|
7471
|
+
/** The caller's unsaved working sequence to publish. When null, the
|
|
7472
|
+
persisted active plan (draft, else published) is published instead. */
|
|
7473
|
+
sequence?: PlannerSequenceInput | null;
|
|
7474
|
+
}
|
|
7475
|
+
export interface PlannerSequenceInput {
|
|
7476
|
+
orderedOperationKeys: string[];
|
|
7477
|
+
lockedCount: number;
|
|
7478
|
+
weekGroups?: {
|
|
7479
|
+
[key: string]: string;
|
|
7480
|
+
} | null;
|
|
7481
|
+
}
|
|
7482
|
+
export interface PlannerPlanEventDto {
|
|
7483
|
+
id: string;
|
|
7484
|
+
eventType: PlannerEventType;
|
|
7485
|
+
occurredAt: Date;
|
|
7486
|
+
by?: string | null;
|
|
7487
|
+
comment?: string | null;
|
|
7488
|
+
operationCount: number;
|
|
7489
|
+
lockedCount: number;
|
|
7490
|
+
}
|
|
7491
|
+
export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
7492
|
+
export interface SetProgramStatus {
|
|
7493
|
+
workOrderId?: string;
|
|
7494
|
+
operationNumber?: number;
|
|
7495
|
+
status?: ProgramStatus;
|
|
7496
|
+
}
|
|
7386
7497
|
export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
|
|
7387
7498
|
export interface WorkOrderAttachmentDto {
|
|
7388
7499
|
createdBy?: UserDto | null;
|
|
@@ -7652,6 +7763,7 @@ export interface ProductionScheduleOperationDto {
|
|
|
7652
7763
|
materialPickStatus: MaterialPickStatus;
|
|
7653
7764
|
productionStatus: OperationStatusDto;
|
|
7654
7765
|
setupStatus?: OperationStatusDto | null;
|
|
7766
|
+
programStatus?: ProgramStatus | null;
|
|
7655
7767
|
}
|
|
7656
7768
|
export interface SurroundingOperationDto {
|
|
7657
7769
|
id: string;
|
|
@@ -9865,17 +9977,20 @@ export interface WorkorderDiscussionMessageDto {
|
|
|
9865
9977
|
operationName?: string | null;
|
|
9866
9978
|
resourceId?: string | null;
|
|
9867
9979
|
created?: Date;
|
|
9980
|
+
messageType?: DiscussionMessageType;
|
|
9868
9981
|
}
|
|
9869
9982
|
export interface WorkOrderDiscussionContent {
|
|
9870
9983
|
type?: WorkOrderDiscussionContentType;
|
|
9871
9984
|
value?: string;
|
|
9872
9985
|
}
|
|
9873
9986
|
export type WorkOrderDiscussionContentType = 0 | 1;
|
|
9987
|
+
export type DiscussionMessageType = "Public" | "Planner";
|
|
9874
9988
|
export interface AddDiscussionMessageRequest {
|
|
9875
9989
|
message: string;
|
|
9876
9990
|
operationId?: string | null;
|
|
9877
9991
|
operationName?: string | null;
|
|
9878
9992
|
resourceId?: string | null;
|
|
9993
|
+
messageType?: DiscussionMessageType;
|
|
9879
9994
|
}
|
|
9880
9995
|
export interface WorkorderDiscussionReadStatusDto {
|
|
9881
9996
|
workorderId: string;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -20592,6 +20592,424 @@ export class MesOrMoveClient extends AuthorizedApiBase {
|
|
|
20592
20592
|
return Promise.resolve(null);
|
|
20593
20593
|
}
|
|
20594
20594
|
}
|
|
20595
|
+
export class MesPlannerClient extends AuthorizedApiBase {
|
|
20596
|
+
constructor(configuration, baseUrl, http) {
|
|
20597
|
+
super(configuration);
|
|
20598
|
+
this.http = http ? http : window;
|
|
20599
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20600
|
+
}
|
|
20601
|
+
getPlan(resourceGroupId) {
|
|
20602
|
+
let url_ = this.baseUrl + "/mes/planner/plan?";
|
|
20603
|
+
if (resourceGroupId === null)
|
|
20604
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
|
|
20605
|
+
else if (resourceGroupId !== undefined)
|
|
20606
|
+
url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
|
|
20607
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20608
|
+
let options_ = {
|
|
20609
|
+
method: "GET",
|
|
20610
|
+
headers: {
|
|
20611
|
+
"Accept": "application/json"
|
|
20612
|
+
}
|
|
20613
|
+
};
|
|
20614
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20615
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20616
|
+
}).then((_response) => {
|
|
20617
|
+
return this.processGetPlan(_response);
|
|
20618
|
+
});
|
|
20619
|
+
}
|
|
20620
|
+
processGetPlan(response) {
|
|
20621
|
+
const status = response.status;
|
|
20622
|
+
let _headers = {};
|
|
20623
|
+
if (response.headers && response.headers.forEach) {
|
|
20624
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20625
|
+
}
|
|
20626
|
+
;
|
|
20627
|
+
if (status === 200) {
|
|
20628
|
+
return response.text().then((_responseText) => {
|
|
20629
|
+
let result200 = null;
|
|
20630
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20631
|
+
return result200;
|
|
20632
|
+
});
|
|
20633
|
+
}
|
|
20634
|
+
else if (status !== 200 && status !== 204) {
|
|
20635
|
+
return response.text().then((_responseText) => {
|
|
20636
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20637
|
+
});
|
|
20638
|
+
}
|
|
20639
|
+
return Promise.resolve(null);
|
|
20640
|
+
}
|
|
20641
|
+
publish(resourceGroupId, request) {
|
|
20642
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/publish";
|
|
20643
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20644
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20645
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20646
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20647
|
+
const content_ = JSON.stringify(request);
|
|
20648
|
+
let options_ = {
|
|
20649
|
+
body: content_,
|
|
20650
|
+
method: "POST",
|
|
20651
|
+
headers: {
|
|
20652
|
+
"Content-Type": "application/json",
|
|
20653
|
+
"Accept": "application/json"
|
|
20654
|
+
}
|
|
20655
|
+
};
|
|
20656
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20657
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20658
|
+
}).then((_response) => {
|
|
20659
|
+
return this.processPublish(_response);
|
|
20660
|
+
});
|
|
20661
|
+
}
|
|
20662
|
+
processPublish(response) {
|
|
20663
|
+
const status = response.status;
|
|
20664
|
+
let _headers = {};
|
|
20665
|
+
if (response.headers && response.headers.forEach) {
|
|
20666
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20667
|
+
}
|
|
20668
|
+
;
|
|
20669
|
+
if (status === 200) {
|
|
20670
|
+
return response.text().then((_responseText) => {
|
|
20671
|
+
let result200 = null;
|
|
20672
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20673
|
+
return result200;
|
|
20674
|
+
});
|
|
20675
|
+
}
|
|
20676
|
+
else if (status !== 200 && status !== 204) {
|
|
20677
|
+
return response.text().then((_responseText) => {
|
|
20678
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20679
|
+
});
|
|
20680
|
+
}
|
|
20681
|
+
return Promise.resolve(null);
|
|
20682
|
+
}
|
|
20683
|
+
updateSequence(resourceGroupId, sequence) {
|
|
20684
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/sequence";
|
|
20685
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20686
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20687
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20688
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20689
|
+
const content_ = JSON.stringify(sequence);
|
|
20690
|
+
let options_ = {
|
|
20691
|
+
body: content_,
|
|
20692
|
+
method: "PUT",
|
|
20693
|
+
headers: {
|
|
20694
|
+
"Content-Type": "application/json",
|
|
20695
|
+
"Accept": "application/json"
|
|
20696
|
+
}
|
|
20697
|
+
};
|
|
20698
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20699
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20700
|
+
}).then((_response) => {
|
|
20701
|
+
return this.processUpdateSequence(_response);
|
|
20702
|
+
});
|
|
20703
|
+
}
|
|
20704
|
+
processUpdateSequence(response) {
|
|
20705
|
+
const status = response.status;
|
|
20706
|
+
let _headers = {};
|
|
20707
|
+
if (response.headers && response.headers.forEach) {
|
|
20708
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20709
|
+
}
|
|
20710
|
+
;
|
|
20711
|
+
if (status === 200) {
|
|
20712
|
+
return response.text().then((_responseText) => {
|
|
20713
|
+
let result200 = null;
|
|
20714
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20715
|
+
return result200;
|
|
20716
|
+
});
|
|
20717
|
+
}
|
|
20718
|
+
else if (status !== 200 && status !== 204) {
|
|
20719
|
+
return response.text().then((_responseText) => {
|
|
20720
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20721
|
+
});
|
|
20722
|
+
}
|
|
20723
|
+
return Promise.resolve(null);
|
|
20724
|
+
}
|
|
20725
|
+
reset(resourceGroupId) {
|
|
20726
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/reset";
|
|
20727
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20728
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20729
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20730
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20731
|
+
let options_ = {
|
|
20732
|
+
method: "POST",
|
|
20733
|
+
headers: {
|
|
20734
|
+
"Accept": "application/json"
|
|
20735
|
+
}
|
|
20736
|
+
};
|
|
20737
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20738
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20739
|
+
}).then((_response) => {
|
|
20740
|
+
return this.processReset(_response);
|
|
20741
|
+
});
|
|
20742
|
+
}
|
|
20743
|
+
processReset(response) {
|
|
20744
|
+
const status = response.status;
|
|
20745
|
+
let _headers = {};
|
|
20746
|
+
if (response.headers && response.headers.forEach) {
|
|
20747
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20748
|
+
}
|
|
20749
|
+
;
|
|
20750
|
+
if (status === 200) {
|
|
20751
|
+
return response.text().then((_responseText) => {
|
|
20752
|
+
let result200 = null;
|
|
20753
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20754
|
+
return result200;
|
|
20755
|
+
});
|
|
20756
|
+
}
|
|
20757
|
+
else if (status !== 200 && status !== 204) {
|
|
20758
|
+
return response.text().then((_responseText) => {
|
|
20759
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20760
|
+
});
|
|
20761
|
+
}
|
|
20762
|
+
return Promise.resolve(null);
|
|
20763
|
+
}
|
|
20764
|
+
saveDraft(resourceGroupId, sequence) {
|
|
20765
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
|
|
20766
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20767
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20768
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20769
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20770
|
+
const content_ = JSON.stringify(sequence);
|
|
20771
|
+
let options_ = {
|
|
20772
|
+
body: content_,
|
|
20773
|
+
method: "POST",
|
|
20774
|
+
headers: {
|
|
20775
|
+
"Content-Type": "application/json",
|
|
20776
|
+
"Accept": "application/json"
|
|
20777
|
+
}
|
|
20778
|
+
};
|
|
20779
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20780
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20781
|
+
}).then((_response) => {
|
|
20782
|
+
return this.processSaveDraft(_response);
|
|
20783
|
+
});
|
|
20784
|
+
}
|
|
20785
|
+
processSaveDraft(response) {
|
|
20786
|
+
const status = response.status;
|
|
20787
|
+
let _headers = {};
|
|
20788
|
+
if (response.headers && response.headers.forEach) {
|
|
20789
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20790
|
+
}
|
|
20791
|
+
;
|
|
20792
|
+
if (status === 200) {
|
|
20793
|
+
return response.text().then((_responseText) => {
|
|
20794
|
+
let result200 = null;
|
|
20795
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20796
|
+
return result200;
|
|
20797
|
+
});
|
|
20798
|
+
}
|
|
20799
|
+
else if (status !== 200 && status !== 204) {
|
|
20800
|
+
return response.text().then((_responseText) => {
|
|
20801
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20802
|
+
});
|
|
20803
|
+
}
|
|
20804
|
+
return Promise.resolve(null);
|
|
20805
|
+
}
|
|
20806
|
+
discardDraft(resourceGroupId) {
|
|
20807
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
|
|
20808
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20809
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20810
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20811
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20812
|
+
let options_ = {
|
|
20813
|
+
method: "DELETE",
|
|
20814
|
+
headers: {
|
|
20815
|
+
"Accept": "application/json"
|
|
20816
|
+
}
|
|
20817
|
+
};
|
|
20818
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20819
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20820
|
+
}).then((_response) => {
|
|
20821
|
+
return this.processDiscardDraft(_response);
|
|
20822
|
+
});
|
|
20823
|
+
}
|
|
20824
|
+
processDiscardDraft(response) {
|
|
20825
|
+
const status = response.status;
|
|
20826
|
+
let _headers = {};
|
|
20827
|
+
if (response.headers && response.headers.forEach) {
|
|
20828
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20829
|
+
}
|
|
20830
|
+
;
|
|
20831
|
+
if (status === 200) {
|
|
20832
|
+
return response.text().then((_responseText) => {
|
|
20833
|
+
let result200 = null;
|
|
20834
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20835
|
+
return result200;
|
|
20836
|
+
});
|
|
20837
|
+
}
|
|
20838
|
+
else if (status !== 200 && status !== 204) {
|
|
20839
|
+
return response.text().then((_responseText) => {
|
|
20840
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20841
|
+
});
|
|
20842
|
+
}
|
|
20843
|
+
return Promise.resolve(null);
|
|
20844
|
+
}
|
|
20845
|
+
getCapacity(resourceGroupId, from, to) {
|
|
20846
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
|
|
20847
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20848
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20849
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20850
|
+
if (from === null)
|
|
20851
|
+
throw new globalThis.Error("The parameter 'from' cannot be null.");
|
|
20852
|
+
else if (from !== undefined)
|
|
20853
|
+
url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
|
|
20854
|
+
if (to === null)
|
|
20855
|
+
throw new globalThis.Error("The parameter 'to' cannot be null.");
|
|
20856
|
+
else if (to !== undefined)
|
|
20857
|
+
url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
|
|
20858
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20859
|
+
let options_ = {
|
|
20860
|
+
method: "GET",
|
|
20861
|
+
headers: {
|
|
20862
|
+
"Accept": "application/json"
|
|
20863
|
+
}
|
|
20864
|
+
};
|
|
20865
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20866
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20867
|
+
}).then((_response) => {
|
|
20868
|
+
return this.processGetCapacity(_response);
|
|
20869
|
+
});
|
|
20870
|
+
}
|
|
20871
|
+
processGetCapacity(response) {
|
|
20872
|
+
const status = response.status;
|
|
20873
|
+
let _headers = {};
|
|
20874
|
+
if (response.headers && response.headers.forEach) {
|
|
20875
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20876
|
+
}
|
|
20877
|
+
;
|
|
20878
|
+
if (status === 200) {
|
|
20879
|
+
return response.text().then((_responseText) => {
|
|
20880
|
+
let result200 = null;
|
|
20881
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20882
|
+
return result200;
|
|
20883
|
+
});
|
|
20884
|
+
}
|
|
20885
|
+
else if (status !== 200 && status !== 204) {
|
|
20886
|
+
return response.text().then((_responseText) => {
|
|
20887
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20888
|
+
});
|
|
20889
|
+
}
|
|
20890
|
+
return Promise.resolve(null);
|
|
20891
|
+
}
|
|
20892
|
+
getVersions(resourceGroupId) {
|
|
20893
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
|
|
20894
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20895
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20896
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20897
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20898
|
+
let options_ = {
|
|
20899
|
+
method: "GET",
|
|
20900
|
+
headers: {
|
|
20901
|
+
"Accept": "application/json"
|
|
20902
|
+
}
|
|
20903
|
+
};
|
|
20904
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20905
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20906
|
+
}).then((_response) => {
|
|
20907
|
+
return this.processGetVersions(_response);
|
|
20908
|
+
});
|
|
20909
|
+
}
|
|
20910
|
+
processGetVersions(response) {
|
|
20911
|
+
const status = response.status;
|
|
20912
|
+
let _headers = {};
|
|
20913
|
+
if (response.headers && response.headers.forEach) {
|
|
20914
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20915
|
+
}
|
|
20916
|
+
;
|
|
20917
|
+
if (status === 200) {
|
|
20918
|
+
return response.text().then((_responseText) => {
|
|
20919
|
+
let result200 = null;
|
|
20920
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20921
|
+
return result200;
|
|
20922
|
+
});
|
|
20923
|
+
}
|
|
20924
|
+
else if (status !== 200 && status !== 204) {
|
|
20925
|
+
return response.text().then((_responseText) => {
|
|
20926
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20927
|
+
});
|
|
20928
|
+
}
|
|
20929
|
+
return Promise.resolve(null);
|
|
20930
|
+
}
|
|
20931
|
+
getVersion(resourceGroupId, eventId) {
|
|
20932
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
|
|
20933
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20934
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20935
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20936
|
+
if (eventId === undefined || eventId === null)
|
|
20937
|
+
throw new globalThis.Error("The parameter 'eventId' must be defined.");
|
|
20938
|
+
url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
|
|
20939
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20940
|
+
let options_ = {
|
|
20941
|
+
method: "GET",
|
|
20942
|
+
headers: {
|
|
20943
|
+
"Accept": "application/json"
|
|
20944
|
+
}
|
|
20945
|
+
};
|
|
20946
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20947
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20948
|
+
}).then((_response) => {
|
|
20949
|
+
return this.processGetVersion(_response);
|
|
20950
|
+
});
|
|
20951
|
+
}
|
|
20952
|
+
processGetVersion(response) {
|
|
20953
|
+
const status = response.status;
|
|
20954
|
+
let _headers = {};
|
|
20955
|
+
if (response.headers && response.headers.forEach) {
|
|
20956
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20957
|
+
}
|
|
20958
|
+
;
|
|
20959
|
+
if (status === 200) {
|
|
20960
|
+
return response.text().then((_responseText) => {
|
|
20961
|
+
let result200 = null;
|
|
20962
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20963
|
+
return result200;
|
|
20964
|
+
});
|
|
20965
|
+
}
|
|
20966
|
+
else if (status !== 200 && status !== 204) {
|
|
20967
|
+
return response.text().then((_responseText) => {
|
|
20968
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20969
|
+
});
|
|
20970
|
+
}
|
|
20971
|
+
return Promise.resolve(null);
|
|
20972
|
+
}
|
|
20973
|
+
setProgramStatus(command) {
|
|
20974
|
+
let url_ = this.baseUrl + "/mes/planner/operations/program-status";
|
|
20975
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20976
|
+
const content_ = JSON.stringify(command);
|
|
20977
|
+
let options_ = {
|
|
20978
|
+
body: content_,
|
|
20979
|
+
method: "PUT",
|
|
20980
|
+
headers: {
|
|
20981
|
+
"Content-Type": "application/json",
|
|
20982
|
+
"Accept": "application/json"
|
|
20983
|
+
}
|
|
20984
|
+
};
|
|
20985
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20986
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20987
|
+
}).then((_response) => {
|
|
20988
|
+
return this.processSetProgramStatus(_response);
|
|
20989
|
+
});
|
|
20990
|
+
}
|
|
20991
|
+
processSetProgramStatus(response) {
|
|
20992
|
+
const status = response.status;
|
|
20993
|
+
let _headers = {};
|
|
20994
|
+
if (response.headers && response.headers.forEach) {
|
|
20995
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20996
|
+
}
|
|
20997
|
+
;
|
|
20998
|
+
if (status === 200) {
|
|
20999
|
+
return response.text().then((_responseText) => {
|
|
21000
|
+
let result200 = null;
|
|
21001
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
21002
|
+
return result200;
|
|
21003
|
+
});
|
|
21004
|
+
}
|
|
21005
|
+
else if (status !== 200 && status !== 204) {
|
|
21006
|
+
return response.text().then((_responseText) => {
|
|
21007
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
21008
|
+
});
|
|
21009
|
+
}
|
|
21010
|
+
return Promise.resolve(null);
|
|
21011
|
+
}
|
|
21012
|
+
}
|
|
20595
21013
|
export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
20596
21014
|
constructor(configuration, baseUrl, http) {
|
|
20597
21015
|
super(configuration);
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -22011,6 +22011,445 @@ export class MesOrMoveClient extends AuthorizedApiBase implements IMesOrMoveClie
|
|
|
22011
22011
|
}
|
|
22012
22012
|
}
|
|
22013
22013
|
|
|
22014
|
+
export interface IMesPlannerClient {
|
|
22015
|
+
|
|
22016
|
+
getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
|
|
22017
|
+
|
|
22018
|
+
publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
|
|
22019
|
+
|
|
22020
|
+
updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
22021
|
+
|
|
22022
|
+
reset(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
22023
|
+
|
|
22024
|
+
saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
|
|
22025
|
+
|
|
22026
|
+
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
|
|
22027
|
+
|
|
22028
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
|
|
22029
|
+
|
|
22030
|
+
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
|
|
22031
|
+
|
|
22032
|
+
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
|
|
22033
|
+
|
|
22034
|
+
setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
|
|
22035
|
+
}
|
|
22036
|
+
|
|
22037
|
+
export class MesPlannerClient extends AuthorizedApiBase implements IMesPlannerClient {
|
|
22038
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
22039
|
+
private baseUrl: string;
|
|
22040
|
+
|
|
22041
|
+
constructor(configuration: IApiClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
22042
|
+
super(configuration);
|
|
22043
|
+
this.http = http ? http : window as any;
|
|
22044
|
+
this.baseUrl = baseUrl ?? "";
|
|
22045
|
+
}
|
|
22046
|
+
|
|
22047
|
+
getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto> {
|
|
22048
|
+
let url_ = this.baseUrl + "/mes/planner/plan?";
|
|
22049
|
+
if (resourceGroupId === null)
|
|
22050
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
|
|
22051
|
+
else if (resourceGroupId !== undefined)
|
|
22052
|
+
url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
|
|
22053
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22054
|
+
|
|
22055
|
+
let options_: RequestInit = {
|
|
22056
|
+
method: "GET",
|
|
22057
|
+
headers: {
|
|
22058
|
+
"Accept": "application/json"
|
|
22059
|
+
}
|
|
22060
|
+
};
|
|
22061
|
+
|
|
22062
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22063
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22064
|
+
}).then((_response: Response) => {
|
|
22065
|
+
return this.processGetPlan(_response);
|
|
22066
|
+
});
|
|
22067
|
+
}
|
|
22068
|
+
|
|
22069
|
+
protected processGetPlan(response: Response): Promise<PlannerPlanDto> {
|
|
22070
|
+
const status = response.status;
|
|
22071
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22072
|
+
if (status === 200) {
|
|
22073
|
+
return response.text().then((_responseText) => {
|
|
22074
|
+
let result200: any = null;
|
|
22075
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22076
|
+
return result200;
|
|
22077
|
+
});
|
|
22078
|
+
} else if (status !== 200 && status !== 204) {
|
|
22079
|
+
return response.text().then((_responseText) => {
|
|
22080
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22081
|
+
});
|
|
22082
|
+
}
|
|
22083
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22084
|
+
}
|
|
22085
|
+
|
|
22086
|
+
publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto> {
|
|
22087
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/publish";
|
|
22088
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22089
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22090
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22091
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22092
|
+
|
|
22093
|
+
const content_ = JSON.stringify(request);
|
|
22094
|
+
|
|
22095
|
+
let options_: RequestInit = {
|
|
22096
|
+
body: content_,
|
|
22097
|
+
method: "POST",
|
|
22098
|
+
headers: {
|
|
22099
|
+
"Content-Type": "application/json",
|
|
22100
|
+
"Accept": "application/json"
|
|
22101
|
+
}
|
|
22102
|
+
};
|
|
22103
|
+
|
|
22104
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22105
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22106
|
+
}).then((_response: Response) => {
|
|
22107
|
+
return this.processPublish(_response);
|
|
22108
|
+
});
|
|
22109
|
+
}
|
|
22110
|
+
|
|
22111
|
+
protected processPublish(response: Response): Promise<PlannerPlanDto> {
|
|
22112
|
+
const status = response.status;
|
|
22113
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22114
|
+
if (status === 200) {
|
|
22115
|
+
return response.text().then((_responseText) => {
|
|
22116
|
+
let result200: any = null;
|
|
22117
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22118
|
+
return result200;
|
|
22119
|
+
});
|
|
22120
|
+
} else if (status !== 200 && status !== 204) {
|
|
22121
|
+
return response.text().then((_responseText) => {
|
|
22122
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22123
|
+
});
|
|
22124
|
+
}
|
|
22125
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22126
|
+
}
|
|
22127
|
+
|
|
22128
|
+
updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto> {
|
|
22129
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/sequence";
|
|
22130
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22131
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22132
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22133
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22134
|
+
|
|
22135
|
+
const content_ = JSON.stringify(sequence);
|
|
22136
|
+
|
|
22137
|
+
let options_: RequestInit = {
|
|
22138
|
+
body: content_,
|
|
22139
|
+
method: "PUT",
|
|
22140
|
+
headers: {
|
|
22141
|
+
"Content-Type": "application/json",
|
|
22142
|
+
"Accept": "application/json"
|
|
22143
|
+
}
|
|
22144
|
+
};
|
|
22145
|
+
|
|
22146
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22147
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22148
|
+
}).then((_response: Response) => {
|
|
22149
|
+
return this.processUpdateSequence(_response);
|
|
22150
|
+
});
|
|
22151
|
+
}
|
|
22152
|
+
|
|
22153
|
+
protected processUpdateSequence(response: Response): Promise<PlannerPlanDto> {
|
|
22154
|
+
const status = response.status;
|
|
22155
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22156
|
+
if (status === 200) {
|
|
22157
|
+
return response.text().then((_responseText) => {
|
|
22158
|
+
let result200: any = null;
|
|
22159
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22160
|
+
return result200;
|
|
22161
|
+
});
|
|
22162
|
+
} else if (status !== 200 && status !== 204) {
|
|
22163
|
+
return response.text().then((_responseText) => {
|
|
22164
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22165
|
+
});
|
|
22166
|
+
}
|
|
22167
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22168
|
+
}
|
|
22169
|
+
|
|
22170
|
+
reset(resourceGroupId: string): Promise<PlannerPlanDto> {
|
|
22171
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/reset";
|
|
22172
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22173
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22174
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22175
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22176
|
+
|
|
22177
|
+
let options_: RequestInit = {
|
|
22178
|
+
method: "POST",
|
|
22179
|
+
headers: {
|
|
22180
|
+
"Accept": "application/json"
|
|
22181
|
+
}
|
|
22182
|
+
};
|
|
22183
|
+
|
|
22184
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22185
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22186
|
+
}).then((_response: Response) => {
|
|
22187
|
+
return this.processReset(_response);
|
|
22188
|
+
});
|
|
22189
|
+
}
|
|
22190
|
+
|
|
22191
|
+
protected processReset(response: Response): Promise<PlannerPlanDto> {
|
|
22192
|
+
const status = response.status;
|
|
22193
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22194
|
+
if (status === 200) {
|
|
22195
|
+
return response.text().then((_responseText) => {
|
|
22196
|
+
let result200: any = null;
|
|
22197
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22198
|
+
return result200;
|
|
22199
|
+
});
|
|
22200
|
+
} else if (status !== 200 && status !== 204) {
|
|
22201
|
+
return response.text().then((_responseText) => {
|
|
22202
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22203
|
+
});
|
|
22204
|
+
}
|
|
22205
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22206
|
+
}
|
|
22207
|
+
|
|
22208
|
+
saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto> {
|
|
22209
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
|
|
22210
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22211
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22212
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22213
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22214
|
+
|
|
22215
|
+
const content_ = JSON.stringify(sequence);
|
|
22216
|
+
|
|
22217
|
+
let options_: RequestInit = {
|
|
22218
|
+
body: content_,
|
|
22219
|
+
method: "POST",
|
|
22220
|
+
headers: {
|
|
22221
|
+
"Content-Type": "application/json",
|
|
22222
|
+
"Accept": "application/json"
|
|
22223
|
+
}
|
|
22224
|
+
};
|
|
22225
|
+
|
|
22226
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22227
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22228
|
+
}).then((_response: Response) => {
|
|
22229
|
+
return this.processSaveDraft(_response);
|
|
22230
|
+
});
|
|
22231
|
+
}
|
|
22232
|
+
|
|
22233
|
+
protected processSaveDraft(response: Response): Promise<PlannerPlanDto> {
|
|
22234
|
+
const status = response.status;
|
|
22235
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22236
|
+
if (status === 200) {
|
|
22237
|
+
return response.text().then((_responseText) => {
|
|
22238
|
+
let result200: any = null;
|
|
22239
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22240
|
+
return result200;
|
|
22241
|
+
});
|
|
22242
|
+
} else if (status !== 200 && status !== 204) {
|
|
22243
|
+
return response.text().then((_responseText) => {
|
|
22244
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22245
|
+
});
|
|
22246
|
+
}
|
|
22247
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22248
|
+
}
|
|
22249
|
+
|
|
22250
|
+
discardDraft(resourceGroupId: string): Promise<PlannerPlanDto> {
|
|
22251
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
|
|
22252
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22253
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22254
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22255
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22256
|
+
|
|
22257
|
+
let options_: RequestInit = {
|
|
22258
|
+
method: "DELETE",
|
|
22259
|
+
headers: {
|
|
22260
|
+
"Accept": "application/json"
|
|
22261
|
+
}
|
|
22262
|
+
};
|
|
22263
|
+
|
|
22264
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22265
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22266
|
+
}).then((_response: Response) => {
|
|
22267
|
+
return this.processDiscardDraft(_response);
|
|
22268
|
+
});
|
|
22269
|
+
}
|
|
22270
|
+
|
|
22271
|
+
protected processDiscardDraft(response: Response): Promise<PlannerPlanDto> {
|
|
22272
|
+
const status = response.status;
|
|
22273
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22274
|
+
if (status === 200) {
|
|
22275
|
+
return response.text().then((_responseText) => {
|
|
22276
|
+
let result200: any = null;
|
|
22277
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22278
|
+
return result200;
|
|
22279
|
+
});
|
|
22280
|
+
} else if (status !== 200 && status !== 204) {
|
|
22281
|
+
return response.text().then((_responseText) => {
|
|
22282
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22283
|
+
});
|
|
22284
|
+
}
|
|
22285
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22286
|
+
}
|
|
22287
|
+
|
|
22288
|
+
getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]> {
|
|
22289
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
|
|
22290
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22291
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22292
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22293
|
+
if (from === null)
|
|
22294
|
+
throw new globalThis.Error("The parameter 'from' cannot be null.");
|
|
22295
|
+
else if (from !== undefined)
|
|
22296
|
+
url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
|
|
22297
|
+
if (to === null)
|
|
22298
|
+
throw new globalThis.Error("The parameter 'to' cannot be null.");
|
|
22299
|
+
else if (to !== undefined)
|
|
22300
|
+
url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
|
|
22301
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22302
|
+
|
|
22303
|
+
let options_: RequestInit = {
|
|
22304
|
+
method: "GET",
|
|
22305
|
+
headers: {
|
|
22306
|
+
"Accept": "application/json"
|
|
22307
|
+
}
|
|
22308
|
+
};
|
|
22309
|
+
|
|
22310
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22311
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22312
|
+
}).then((_response: Response) => {
|
|
22313
|
+
return this.processGetCapacity(_response);
|
|
22314
|
+
});
|
|
22315
|
+
}
|
|
22316
|
+
|
|
22317
|
+
protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]> {
|
|
22318
|
+
const status = response.status;
|
|
22319
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22320
|
+
if (status === 200) {
|
|
22321
|
+
return response.text().then((_responseText) => {
|
|
22322
|
+
let result200: any = null;
|
|
22323
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as WeekCapacityDto[];
|
|
22324
|
+
return result200;
|
|
22325
|
+
});
|
|
22326
|
+
} else if (status !== 200 && status !== 204) {
|
|
22327
|
+
return response.text().then((_responseText) => {
|
|
22328
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22329
|
+
});
|
|
22330
|
+
}
|
|
22331
|
+
return Promise.resolve<WeekCapacityDto[]>(null as any);
|
|
22332
|
+
}
|
|
22333
|
+
|
|
22334
|
+
getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]> {
|
|
22335
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
|
|
22336
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22337
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22338
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22339
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22340
|
+
|
|
22341
|
+
let options_: RequestInit = {
|
|
22342
|
+
method: "GET",
|
|
22343
|
+
headers: {
|
|
22344
|
+
"Accept": "application/json"
|
|
22345
|
+
}
|
|
22346
|
+
};
|
|
22347
|
+
|
|
22348
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22349
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22350
|
+
}).then((_response: Response) => {
|
|
22351
|
+
return this.processGetVersions(_response);
|
|
22352
|
+
});
|
|
22353
|
+
}
|
|
22354
|
+
|
|
22355
|
+
protected processGetVersions(response: Response): Promise<PlannerPlanEventDto[]> {
|
|
22356
|
+
const status = response.status;
|
|
22357
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22358
|
+
if (status === 200) {
|
|
22359
|
+
return response.text().then((_responseText) => {
|
|
22360
|
+
let result200: any = null;
|
|
22361
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanEventDto[];
|
|
22362
|
+
return result200;
|
|
22363
|
+
});
|
|
22364
|
+
} else if (status !== 200 && status !== 204) {
|
|
22365
|
+
return response.text().then((_responseText) => {
|
|
22366
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22367
|
+
});
|
|
22368
|
+
}
|
|
22369
|
+
return Promise.resolve<PlannerPlanEventDto[]>(null as any);
|
|
22370
|
+
}
|
|
22371
|
+
|
|
22372
|
+
getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto> {
|
|
22373
|
+
let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
|
|
22374
|
+
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
22375
|
+
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
22376
|
+
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
22377
|
+
if (eventId === undefined || eventId === null)
|
|
22378
|
+
throw new globalThis.Error("The parameter 'eventId' must be defined.");
|
|
22379
|
+
url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
|
|
22380
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22381
|
+
|
|
22382
|
+
let options_: RequestInit = {
|
|
22383
|
+
method: "GET",
|
|
22384
|
+
headers: {
|
|
22385
|
+
"Accept": "application/json"
|
|
22386
|
+
}
|
|
22387
|
+
};
|
|
22388
|
+
|
|
22389
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22390
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22391
|
+
}).then((_response: Response) => {
|
|
22392
|
+
return this.processGetVersion(_response);
|
|
22393
|
+
});
|
|
22394
|
+
}
|
|
22395
|
+
|
|
22396
|
+
protected processGetVersion(response: Response): Promise<PlannerPlanDto> {
|
|
22397
|
+
const status = response.status;
|
|
22398
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22399
|
+
if (status === 200) {
|
|
22400
|
+
return response.text().then((_responseText) => {
|
|
22401
|
+
let result200: any = null;
|
|
22402
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
|
|
22403
|
+
return result200;
|
|
22404
|
+
});
|
|
22405
|
+
} else if (status !== 200 && status !== 204) {
|
|
22406
|
+
return response.text().then((_responseText) => {
|
|
22407
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22408
|
+
});
|
|
22409
|
+
}
|
|
22410
|
+
return Promise.resolve<PlannerPlanDto>(null as any);
|
|
22411
|
+
}
|
|
22412
|
+
|
|
22413
|
+
setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus> {
|
|
22414
|
+
let url_ = this.baseUrl + "/mes/planner/operations/program-status";
|
|
22415
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22416
|
+
|
|
22417
|
+
const content_ = JSON.stringify(command);
|
|
22418
|
+
|
|
22419
|
+
let options_: RequestInit = {
|
|
22420
|
+
body: content_,
|
|
22421
|
+
method: "PUT",
|
|
22422
|
+
headers: {
|
|
22423
|
+
"Content-Type": "application/json",
|
|
22424
|
+
"Accept": "application/json"
|
|
22425
|
+
}
|
|
22426
|
+
};
|
|
22427
|
+
|
|
22428
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22429
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22430
|
+
}).then((_response: Response) => {
|
|
22431
|
+
return this.processSetProgramStatus(_response);
|
|
22432
|
+
});
|
|
22433
|
+
}
|
|
22434
|
+
|
|
22435
|
+
protected processSetProgramStatus(response: Response): Promise<ProgramStatus> {
|
|
22436
|
+
const status = response.status;
|
|
22437
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22438
|
+
if (status === 200) {
|
|
22439
|
+
return response.text().then((_responseText) => {
|
|
22440
|
+
let result200: any = null;
|
|
22441
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProgramStatus;
|
|
22442
|
+
return result200;
|
|
22443
|
+
});
|
|
22444
|
+
} else if (status !== 200 && status !== 204) {
|
|
22445
|
+
return response.text().then((_responseText) => {
|
|
22446
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22447
|
+
});
|
|
22448
|
+
}
|
|
22449
|
+
return Promise.resolve<ProgramStatus>(null as any);
|
|
22450
|
+
}
|
|
22451
|
+
}
|
|
22452
|
+
|
|
22014
22453
|
export interface IMesProductionOrderAttachmentClient {
|
|
22015
22454
|
|
|
22016
22455
|
/**
|
|
@@ -35276,6 +35715,85 @@ export interface ListProductionOrdersRequest {
|
|
|
35276
35715
|
maxResults?: number | null;
|
|
35277
35716
|
}
|
|
35278
35717
|
|
|
35718
|
+
export interface PlannerPlanDto {
|
|
35719
|
+
resourceGroupId: string;
|
|
35720
|
+
sequence: PlannerOperationDto[];
|
|
35721
|
+
lockedCount: number;
|
|
35722
|
+
planSavedAt?: Date | null;
|
|
35723
|
+
isDraft: boolean;
|
|
35724
|
+
publishedETag?: string | null;
|
|
35725
|
+
weeklyCapacities: WeekCapacityDto[];
|
|
35726
|
+
}
|
|
35727
|
+
|
|
35728
|
+
export interface PlannerOperationDto {
|
|
35729
|
+
id: string;
|
|
35730
|
+
productionOrderNumber: string;
|
|
35731
|
+
operation: number;
|
|
35732
|
+
operationName: string;
|
|
35733
|
+
plannedStart: Date;
|
|
35734
|
+
plannedEnd?: Date | null;
|
|
35735
|
+
status: OperationStatusDto;
|
|
35736
|
+
resourceId: string;
|
|
35737
|
+
resourceName: string;
|
|
35738
|
+
resourceDepartmentNumber?: string | null;
|
|
35739
|
+
resourceDepartmentName?: string | null;
|
|
35740
|
+
partNumber: string;
|
|
35741
|
+
partName?: string | null;
|
|
35742
|
+
partMaterial?: string | null;
|
|
35743
|
+
quantity: number;
|
|
35744
|
+
producedQuantity: number;
|
|
35745
|
+
totalPlannedHours?: number;
|
|
35746
|
+
totalUsedHours?: number;
|
|
35747
|
+
customerName?: string | null;
|
|
35748
|
+
project?: WorkOrderProjectDto | null;
|
|
35749
|
+
sequenceNumber: number;
|
|
35750
|
+
isManuallyLocked: boolean;
|
|
35751
|
+
weekGroup: string;
|
|
35752
|
+
programStatus?: ProgramStatus | null;
|
|
35753
|
+
}
|
|
35754
|
+
|
|
35755
|
+
export type ProgramStatus = "Blank" | "NotOk" | "Ok";
|
|
35756
|
+
|
|
35757
|
+
export interface WeekCapacityDto {
|
|
35758
|
+
weekGroup: string;
|
|
35759
|
+
weekStart: Date;
|
|
35760
|
+
capacityHours: number;
|
|
35761
|
+
}
|
|
35762
|
+
|
|
35763
|
+
export interface PublishPlanRequest {
|
|
35764
|
+
/** ETag of the published plan the caller last read, used for optimistic
|
|
35765
|
+
concurrency. Null if the caller never observed a published plan. */
|
|
35766
|
+
publishedETag?: string | null;
|
|
35767
|
+
comment?: string | null;
|
|
35768
|
+
/** The caller's unsaved working sequence to publish. When null, the
|
|
35769
|
+
persisted active plan (draft, else published) is published instead. */
|
|
35770
|
+
sequence?: PlannerSequenceInput | null;
|
|
35771
|
+
}
|
|
35772
|
+
|
|
35773
|
+
export interface PlannerSequenceInput {
|
|
35774
|
+
orderedOperationKeys: string[];
|
|
35775
|
+
lockedCount: number;
|
|
35776
|
+
weekGroups?: { [key: string]: string; } | null;
|
|
35777
|
+
}
|
|
35778
|
+
|
|
35779
|
+
export interface PlannerPlanEventDto {
|
|
35780
|
+
id: string;
|
|
35781
|
+
eventType: PlannerEventType;
|
|
35782
|
+
occurredAt: Date;
|
|
35783
|
+
by?: string | null;
|
|
35784
|
+
comment?: string | null;
|
|
35785
|
+
operationCount: number;
|
|
35786
|
+
lockedCount: number;
|
|
35787
|
+
}
|
|
35788
|
+
|
|
35789
|
+
export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
35790
|
+
|
|
35791
|
+
export interface SetProgramStatus {
|
|
35792
|
+
workOrderId?: string;
|
|
35793
|
+
operationNumber?: number;
|
|
35794
|
+
status?: ProgramStatus;
|
|
35795
|
+
}
|
|
35796
|
+
|
|
35279
35797
|
export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
|
|
35280
35798
|
|
|
35281
35799
|
export interface WorkOrderAttachmentDto {
|
|
@@ -35566,6 +36084,7 @@ export interface ProductionScheduleOperationDto {
|
|
|
35566
36084
|
materialPickStatus: MaterialPickStatus;
|
|
35567
36085
|
productionStatus: OperationStatusDto;
|
|
35568
36086
|
setupStatus?: OperationStatusDto | null;
|
|
36087
|
+
programStatus?: ProgramStatus | null;
|
|
35569
36088
|
}
|
|
35570
36089
|
|
|
35571
36090
|
export interface SurroundingOperationDto {
|
|
@@ -38059,6 +38578,7 @@ export interface WorkorderDiscussionMessageDto {
|
|
|
38059
38578
|
operationName?: string | null;
|
|
38060
38579
|
resourceId?: string | null;
|
|
38061
38580
|
created?: Date;
|
|
38581
|
+
messageType?: DiscussionMessageType;
|
|
38062
38582
|
}
|
|
38063
38583
|
|
|
38064
38584
|
export interface WorkOrderDiscussionContent {
|
|
@@ -38068,11 +38588,14 @@ export interface WorkOrderDiscussionContent {
|
|
|
38068
38588
|
|
|
38069
38589
|
export type WorkOrderDiscussionContentType = 0 | 1;
|
|
38070
38590
|
|
|
38591
|
+
export type DiscussionMessageType = "Public" | "Planner";
|
|
38592
|
+
|
|
38071
38593
|
export interface AddDiscussionMessageRequest {
|
|
38072
38594
|
message: string;
|
|
38073
38595
|
operationId?: string | null;
|
|
38074
38596
|
operationName?: string | null;
|
|
38075
38597
|
resourceId?: string | null;
|
|
38598
|
+
messageType?: DiscussionMessageType;
|
|
38076
38599
|
}
|
|
38077
38600
|
|
|
38078
38601
|
export interface WorkorderDiscussionReadStatusDto {
|