@ignos/api-client 20260715.189.1 → 20260715.190.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.
@@ -2470,6 +2470,45 @@ export declare class MesOrMoveClient extends AuthorizedApiBase implements IMesOr
2470
2470
  getPrintableLabels(request: GeneratePrintableLabel): Promise<DownloadDto>;
2471
2471
  protected processGetPrintableLabels(response: Response): Promise<DownloadDto>;
2472
2472
  }
2473
+ export interface IMesPlannerClient {
2474
+ getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
2475
+ publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
2476
+ updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
2477
+ reset(resourceGroupId: string): Promise<PlannerPlanDto>;
2478
+ saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
2479
+ discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
2480
+ getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
2481
+ getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
2482
+ getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
2483
+ setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
2484
+ }
2485
+ export declare class MesPlannerClient extends AuthorizedApiBase implements IMesPlannerClient {
2486
+ private http;
2487
+ private baseUrl;
2488
+ constructor(configuration: IApiClientConfig, baseUrl?: string, http?: {
2489
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
2490
+ });
2491
+ getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
2492
+ protected processGetPlan(response: Response): Promise<PlannerPlanDto>;
2493
+ publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
2494
+ protected processPublish(response: Response): Promise<PlannerPlanDto>;
2495
+ updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
2496
+ protected processUpdateSequence(response: Response): Promise<PlannerPlanDto>;
2497
+ reset(resourceGroupId: string): Promise<PlannerPlanDto>;
2498
+ protected processReset(response: Response): Promise<PlannerPlanDto>;
2499
+ saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
2500
+ protected processSaveDraft(response: Response): Promise<PlannerPlanDto>;
2501
+ discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
2502
+ protected processDiscardDraft(response: Response): Promise<PlannerPlanDto>;
2503
+ getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
2504
+ protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]>;
2505
+ getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
2506
+ protected processGetVersions(response: Response): Promise<PlannerPlanEventDto[]>;
2507
+ getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
2508
+ protected processGetVersion(response: Response): Promise<PlannerPlanDto>;
2509
+ setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
2510
+ protected processSetProgramStatus(response: Response): Promise<ProgramStatus>;
2511
+ }
2473
2512
  export interface IMesProductionOrderAttachmentClient {
2474
2513
  /**
2475
2514
  * Upload a new attachment (with or without a file)
@@ -5000,7 +5039,6 @@ export interface MrbCompanySettingsDto {
5000
5039
  detailedTransactionsMissingInErp: boolean;
5001
5040
  allowMaterialReplacementOnConsumptions: boolean;
5002
5041
  nonSplittableTraceUnits: string[];
5003
- disableTraceEditing: boolean;
5004
5042
  }
5005
5043
  export interface UpsertMrbCompanySettings {
5006
5044
  stampWithLot: boolean;
@@ -5018,7 +5056,6 @@ export interface UpsertMrbCompanySettings {
5018
5056
  detailedTransactionsMissingInErp: boolean;
5019
5057
  allowMaterialReplacementOnConsumptions: boolean;
5020
5058
  nonSplittableTraceUnits: string[];
5021
- disableTraceEditing: boolean;
5022
5059
  }
5023
5060
  export interface TraceDto {
5024
5061
  id: string;
@@ -7349,6 +7386,78 @@ export interface LabelId {
7349
7386
  parcelId: string;
7350
7387
  trackingId?: string | null;
7351
7388
  }
7389
+ export interface PlannerPlanDto {
7390
+ resourceGroupId: string;
7391
+ sequence: PlannerOperationDto[];
7392
+ lockedCount: number;
7393
+ planSavedAt?: Date | null;
7394
+ isDraft: boolean;
7395
+ publishedETag?: string | null;
7396
+ }
7397
+ export interface PlannerOperationDto {
7398
+ id: string;
7399
+ productionOrderNumber: string;
7400
+ operation: number;
7401
+ operationName: string;
7402
+ plannedStart: Date;
7403
+ plannedEnd?: Date | null;
7404
+ status: OperationStatusDto;
7405
+ resourceId: string;
7406
+ resourceName: string;
7407
+ resourceDepartmentNumber?: string | null;
7408
+ resourceDepartmentName?: string | null;
7409
+ partNumber: string;
7410
+ partName?: string | null;
7411
+ partMaterial?: string | null;
7412
+ quantity: number;
7413
+ producedQuantity: number;
7414
+ totalPlannedHours?: number;
7415
+ totalUsedHours?: number;
7416
+ customerName?: string | null;
7417
+ project?: WorkOrderProjectDto | null;
7418
+ sequenceNumber: number;
7419
+ isManuallyLocked: boolean;
7420
+ weekGroup: string;
7421
+ programStatus?: ProgramStatus | null;
7422
+ }
7423
+ export type ProgramStatus = "Blank" | "NotOk" | "Ok";
7424
+ export interface PublishPlanRequest {
7425
+ /** ETag of the published plan the caller last read, used for optimistic
7426
+ concurrency. Null if the caller never observed a published plan. */
7427
+ publishedETag?: string | null;
7428
+ comment?: string | null;
7429
+ /** The caller's unsaved working sequence to publish. When null, the
7430
+ persisted active plan (draft, else published) is published instead. */
7431
+ sequence?: PlannerSequenceInput | null;
7432
+ }
7433
+ export interface PlannerSequenceInput {
7434
+ orderedOperationKeys: string[];
7435
+ lockedCount: number;
7436
+ weekGroups?: {
7437
+ [key: string]: string;
7438
+ } | null;
7439
+ }
7440
+ export interface WeekCapacityDto {
7441
+ weekGroup: string;
7442
+ weekStart: Date;
7443
+ capacityHours: number;
7444
+ }
7445
+ export interface PlannerPlanEventDto {
7446
+ id: string;
7447
+ eventType: PlannerEventType;
7448
+ occurredAt: Date;
7449
+ by?: string | null;
7450
+ comment?: string | null;
7451
+ operationCount: number;
7452
+ lockedCount: number;
7453
+ }
7454
+ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp" | "AutoRollover";
7455
+ export interface SetProgramStatus {
7456
+ workOrderId?: string;
7457
+ operationNumber?: number;
7458
+ status?: ProgramStatus;
7459
+ resourceId?: string;
7460
+ }
7352
7461
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
7353
7462
  export interface WorkOrderAttachmentDto {
7354
7463
  createdBy?: UserDto | null;
@@ -7624,6 +7733,7 @@ export interface ProductionScheduleOperationDto {
7624
7733
  materialPickStatus: MaterialPickStatus;
7625
7734
  productionStatus: OperationStatusDto;
7626
7735
  setupStatus?: OperationStatusDto | null;
7736
+ programStatus?: ProgramStatus | null;
7627
7737
  }
7628
7738
  export interface SurroundingOperationDto {
7629
7739
  id: string;
@@ -9779,17 +9889,20 @@ export interface WorkorderDiscussionMessageDto {
9779
9889
  operationName?: string | null;
9780
9890
  resourceId?: string | null;
9781
9891
  created?: Date;
9892
+ visibility?: DiscussionVisibility;
9782
9893
  }
9783
9894
  export interface WorkOrderDiscussionContent {
9784
9895
  type?: WorkOrderDiscussionContentType;
9785
9896
  value?: string;
9786
9897
  }
9787
9898
  export type WorkOrderDiscussionContentType = 0 | 1;
9899
+ export type DiscussionVisibility = "Public" | "Planner";
9788
9900
  export interface AddDiscussionMessageRequest {
9789
9901
  message: string;
9790
9902
  operationId?: string | null;
9791
9903
  operationName?: string | null;
9792
9904
  resourceId?: string | null;
9905
+ visibility?: DiscussionVisibility;
9793
9906
  }
9794
9907
  export interface WorkorderDiscussionReadStatusDto {
9795
9908
  workorderId: string;
@@ -20553,6 +20553,424 @@ export class MesOrMoveClient extends AuthorizedApiBase {
20553
20553
  return Promise.resolve(null);
20554
20554
  }
20555
20555
  }
20556
+ export class MesPlannerClient extends AuthorizedApiBase {
20557
+ constructor(configuration, baseUrl, http) {
20558
+ super(configuration);
20559
+ this.http = http ? http : window;
20560
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
20561
+ }
20562
+ getPlan(resourceGroupId) {
20563
+ let url_ = this.baseUrl + "/mes/planner/plan?";
20564
+ if (resourceGroupId === null)
20565
+ throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
20566
+ else if (resourceGroupId !== undefined)
20567
+ url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
20568
+ url_ = url_.replace(/[?&]$/, "");
20569
+ let options_ = {
20570
+ method: "GET",
20571
+ headers: {
20572
+ "Accept": "application/json"
20573
+ }
20574
+ };
20575
+ return this.transformOptions(options_).then(transformedOptions_ => {
20576
+ return this.http.fetch(url_, transformedOptions_);
20577
+ }).then((_response) => {
20578
+ return this.processGetPlan(_response);
20579
+ });
20580
+ }
20581
+ processGetPlan(response) {
20582
+ const status = response.status;
20583
+ let _headers = {};
20584
+ if (response.headers && response.headers.forEach) {
20585
+ response.headers.forEach((v, k) => _headers[k] = v);
20586
+ }
20587
+ ;
20588
+ if (status === 200) {
20589
+ return response.text().then((_responseText) => {
20590
+ let result200 = null;
20591
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20592
+ return result200;
20593
+ });
20594
+ }
20595
+ else if (status !== 200 && status !== 204) {
20596
+ return response.text().then((_responseText) => {
20597
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20598
+ });
20599
+ }
20600
+ return Promise.resolve(null);
20601
+ }
20602
+ publish(resourceGroupId, request) {
20603
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/publish";
20604
+ if (resourceGroupId === undefined || resourceGroupId === null)
20605
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20606
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20607
+ url_ = url_.replace(/[?&]$/, "");
20608
+ const content_ = JSON.stringify(request);
20609
+ let options_ = {
20610
+ body: content_,
20611
+ method: "POST",
20612
+ headers: {
20613
+ "Content-Type": "application/json",
20614
+ "Accept": "application/json"
20615
+ }
20616
+ };
20617
+ return this.transformOptions(options_).then(transformedOptions_ => {
20618
+ return this.http.fetch(url_, transformedOptions_);
20619
+ }).then((_response) => {
20620
+ return this.processPublish(_response);
20621
+ });
20622
+ }
20623
+ processPublish(response) {
20624
+ const status = response.status;
20625
+ let _headers = {};
20626
+ if (response.headers && response.headers.forEach) {
20627
+ response.headers.forEach((v, k) => _headers[k] = v);
20628
+ }
20629
+ ;
20630
+ if (status === 200) {
20631
+ return response.text().then((_responseText) => {
20632
+ let result200 = null;
20633
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20634
+ return result200;
20635
+ });
20636
+ }
20637
+ else if (status !== 200 && status !== 204) {
20638
+ return response.text().then((_responseText) => {
20639
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20640
+ });
20641
+ }
20642
+ return Promise.resolve(null);
20643
+ }
20644
+ updateSequence(resourceGroupId, sequence) {
20645
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/sequence";
20646
+ if (resourceGroupId === undefined || resourceGroupId === null)
20647
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20648
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20649
+ url_ = url_.replace(/[?&]$/, "");
20650
+ const content_ = JSON.stringify(sequence);
20651
+ let options_ = {
20652
+ body: content_,
20653
+ method: "PUT",
20654
+ headers: {
20655
+ "Content-Type": "application/json",
20656
+ "Accept": "application/json"
20657
+ }
20658
+ };
20659
+ return this.transformOptions(options_).then(transformedOptions_ => {
20660
+ return this.http.fetch(url_, transformedOptions_);
20661
+ }).then((_response) => {
20662
+ return this.processUpdateSequence(_response);
20663
+ });
20664
+ }
20665
+ processUpdateSequence(response) {
20666
+ const status = response.status;
20667
+ let _headers = {};
20668
+ if (response.headers && response.headers.forEach) {
20669
+ response.headers.forEach((v, k) => _headers[k] = v);
20670
+ }
20671
+ ;
20672
+ if (status === 200) {
20673
+ return response.text().then((_responseText) => {
20674
+ let result200 = null;
20675
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20676
+ return result200;
20677
+ });
20678
+ }
20679
+ else if (status !== 200 && status !== 204) {
20680
+ return response.text().then((_responseText) => {
20681
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20682
+ });
20683
+ }
20684
+ return Promise.resolve(null);
20685
+ }
20686
+ reset(resourceGroupId) {
20687
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/reset";
20688
+ if (resourceGroupId === undefined || resourceGroupId === null)
20689
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20690
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20691
+ url_ = url_.replace(/[?&]$/, "");
20692
+ let options_ = {
20693
+ method: "POST",
20694
+ headers: {
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.processReset(_response);
20702
+ });
20703
+ }
20704
+ processReset(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
+ saveDraft(resourceGroupId, sequence) {
20726
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
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
+ const content_ = JSON.stringify(sequence);
20732
+ let options_ = {
20733
+ body: content_,
20734
+ method: "POST",
20735
+ headers: {
20736
+ "Content-Type": "application/json",
20737
+ "Accept": "application/json"
20738
+ }
20739
+ };
20740
+ return this.transformOptions(options_).then(transformedOptions_ => {
20741
+ return this.http.fetch(url_, transformedOptions_);
20742
+ }).then((_response) => {
20743
+ return this.processSaveDraft(_response);
20744
+ });
20745
+ }
20746
+ processSaveDraft(response) {
20747
+ const status = response.status;
20748
+ let _headers = {};
20749
+ if (response.headers && response.headers.forEach) {
20750
+ response.headers.forEach((v, k) => _headers[k] = v);
20751
+ }
20752
+ ;
20753
+ if (status === 200) {
20754
+ return response.text().then((_responseText) => {
20755
+ let result200 = null;
20756
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20757
+ return result200;
20758
+ });
20759
+ }
20760
+ else if (status !== 200 && status !== 204) {
20761
+ return response.text().then((_responseText) => {
20762
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20763
+ });
20764
+ }
20765
+ return Promise.resolve(null);
20766
+ }
20767
+ discardDraft(resourceGroupId) {
20768
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
20769
+ if (resourceGroupId === undefined || resourceGroupId === null)
20770
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20771
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20772
+ url_ = url_.replace(/[?&]$/, "");
20773
+ let options_ = {
20774
+ method: "DELETE",
20775
+ headers: {
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.processDiscardDraft(_response);
20783
+ });
20784
+ }
20785
+ processDiscardDraft(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
+ getCapacity(resourceGroupId, from, to) {
20807
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
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
+ if (from === null)
20812
+ throw new globalThis.Error("The parameter 'from' cannot be null.");
20813
+ else if (from !== undefined)
20814
+ url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
20815
+ if (to === null)
20816
+ throw new globalThis.Error("The parameter 'to' cannot be null.");
20817
+ else if (to !== undefined)
20818
+ url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
20819
+ url_ = url_.replace(/[?&]$/, "");
20820
+ let options_ = {
20821
+ method: "GET",
20822
+ headers: {
20823
+ "Accept": "application/json"
20824
+ }
20825
+ };
20826
+ return this.transformOptions(options_).then(transformedOptions_ => {
20827
+ return this.http.fetch(url_, transformedOptions_);
20828
+ }).then((_response) => {
20829
+ return this.processGetCapacity(_response);
20830
+ });
20831
+ }
20832
+ processGetCapacity(response) {
20833
+ const status = response.status;
20834
+ let _headers = {};
20835
+ if (response.headers && response.headers.forEach) {
20836
+ response.headers.forEach((v, k) => _headers[k] = v);
20837
+ }
20838
+ ;
20839
+ if (status === 200) {
20840
+ return response.text().then((_responseText) => {
20841
+ let result200 = null;
20842
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20843
+ return result200;
20844
+ });
20845
+ }
20846
+ else if (status !== 200 && status !== 204) {
20847
+ return response.text().then((_responseText) => {
20848
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20849
+ });
20850
+ }
20851
+ return Promise.resolve(null);
20852
+ }
20853
+ getVersions(resourceGroupId) {
20854
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
20855
+ if (resourceGroupId === undefined || resourceGroupId === null)
20856
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20857
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
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.processGetVersions(_response);
20869
+ });
20870
+ }
20871
+ processGetVersions(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
+ getVersion(resourceGroupId, eventId) {
20893
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
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
+ if (eventId === undefined || eventId === null)
20898
+ throw new globalThis.Error("The parameter 'eventId' must be defined.");
20899
+ url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
20900
+ url_ = url_.replace(/[?&]$/, "");
20901
+ let options_ = {
20902
+ method: "GET",
20903
+ headers: {
20904
+ "Accept": "application/json"
20905
+ }
20906
+ };
20907
+ return this.transformOptions(options_).then(transformedOptions_ => {
20908
+ return this.http.fetch(url_, transformedOptions_);
20909
+ }).then((_response) => {
20910
+ return this.processGetVersion(_response);
20911
+ });
20912
+ }
20913
+ processGetVersion(response) {
20914
+ const status = response.status;
20915
+ let _headers = {};
20916
+ if (response.headers && response.headers.forEach) {
20917
+ response.headers.forEach((v, k) => _headers[k] = v);
20918
+ }
20919
+ ;
20920
+ if (status === 200) {
20921
+ return response.text().then((_responseText) => {
20922
+ let result200 = null;
20923
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20924
+ return result200;
20925
+ });
20926
+ }
20927
+ else if (status !== 200 && status !== 204) {
20928
+ return response.text().then((_responseText) => {
20929
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20930
+ });
20931
+ }
20932
+ return Promise.resolve(null);
20933
+ }
20934
+ setProgramStatus(command) {
20935
+ let url_ = this.baseUrl + "/mes/planner/operations/program-status";
20936
+ url_ = url_.replace(/[?&]$/, "");
20937
+ const content_ = JSON.stringify(command);
20938
+ let options_ = {
20939
+ body: content_,
20940
+ method: "PUT",
20941
+ headers: {
20942
+ "Content-Type": "application/json",
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.processSetProgramStatus(_response);
20950
+ });
20951
+ }
20952
+ processSetProgramStatus(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
+ }
20556
20974
  export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
20557
20975
  constructor(configuration, baseUrl, http) {
20558
20976
  super(configuration);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20260715.189.1",
3
+ "version": "20260715.190.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21970,6 +21970,445 @@ export class MesOrMoveClient extends AuthorizedApiBase implements IMesOrMoveClie
21970
21970
  }
21971
21971
  }
21972
21972
 
21973
+ export interface IMesPlannerClient {
21974
+
21975
+ getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto>;
21976
+
21977
+ publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto>;
21978
+
21979
+ updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
21980
+
21981
+ reset(resourceGroupId: string): Promise<PlannerPlanDto>;
21982
+
21983
+ saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto>;
21984
+
21985
+ discardDraft(resourceGroupId: string): Promise<PlannerPlanDto>;
21986
+
21987
+ getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]>;
21988
+
21989
+ getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]>;
21990
+
21991
+ getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto>;
21992
+
21993
+ setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus>;
21994
+ }
21995
+
21996
+ export class MesPlannerClient extends AuthorizedApiBase implements IMesPlannerClient {
21997
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
21998
+ private baseUrl: string;
21999
+
22000
+ constructor(configuration: IApiClientConfig, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
22001
+ super(configuration);
22002
+ this.http = http ? http : window as any;
22003
+ this.baseUrl = baseUrl ?? "";
22004
+ }
22005
+
22006
+ getPlan(resourceGroupId: string | undefined): Promise<PlannerPlanDto> {
22007
+ let url_ = this.baseUrl + "/mes/planner/plan?";
22008
+ if (resourceGroupId === null)
22009
+ throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
22010
+ else if (resourceGroupId !== undefined)
22011
+ url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
22012
+ url_ = url_.replace(/[?&]$/, "");
22013
+
22014
+ let options_: RequestInit = {
22015
+ method: "GET",
22016
+ headers: {
22017
+ "Accept": "application/json"
22018
+ }
22019
+ };
22020
+
22021
+ return this.transformOptions(options_).then(transformedOptions_ => {
22022
+ return this.http.fetch(url_, transformedOptions_);
22023
+ }).then((_response: Response) => {
22024
+ return this.processGetPlan(_response);
22025
+ });
22026
+ }
22027
+
22028
+ protected processGetPlan(response: Response): Promise<PlannerPlanDto> {
22029
+ const status = response.status;
22030
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22031
+ if (status === 200) {
22032
+ return response.text().then((_responseText) => {
22033
+ let result200: any = null;
22034
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22035
+ return result200;
22036
+ });
22037
+ } else if (status !== 200 && status !== 204) {
22038
+ return response.text().then((_responseText) => {
22039
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22040
+ });
22041
+ }
22042
+ return Promise.resolve<PlannerPlanDto>(null as any);
22043
+ }
22044
+
22045
+ publish(resourceGroupId: string, request: PublishPlanRequest): Promise<PlannerPlanDto> {
22046
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/publish";
22047
+ if (resourceGroupId === undefined || resourceGroupId === null)
22048
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22049
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22050
+ url_ = url_.replace(/[?&]$/, "");
22051
+
22052
+ const content_ = JSON.stringify(request);
22053
+
22054
+ let options_: RequestInit = {
22055
+ body: content_,
22056
+ method: "POST",
22057
+ headers: {
22058
+ "Content-Type": "application/json",
22059
+ "Accept": "application/json"
22060
+ }
22061
+ };
22062
+
22063
+ return this.transformOptions(options_).then(transformedOptions_ => {
22064
+ return this.http.fetch(url_, transformedOptions_);
22065
+ }).then((_response: Response) => {
22066
+ return this.processPublish(_response);
22067
+ });
22068
+ }
22069
+
22070
+ protected processPublish(response: Response): Promise<PlannerPlanDto> {
22071
+ const status = response.status;
22072
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22073
+ if (status === 200) {
22074
+ return response.text().then((_responseText) => {
22075
+ let result200: any = null;
22076
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22077
+ return result200;
22078
+ });
22079
+ } else if (status !== 200 && status !== 204) {
22080
+ return response.text().then((_responseText) => {
22081
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22082
+ });
22083
+ }
22084
+ return Promise.resolve<PlannerPlanDto>(null as any);
22085
+ }
22086
+
22087
+ updateSequence(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto> {
22088
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/sequence";
22089
+ if (resourceGroupId === undefined || resourceGroupId === null)
22090
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22091
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22092
+ url_ = url_.replace(/[?&]$/, "");
22093
+
22094
+ const content_ = JSON.stringify(sequence);
22095
+
22096
+ let options_: RequestInit = {
22097
+ body: content_,
22098
+ method: "PUT",
22099
+ headers: {
22100
+ "Content-Type": "application/json",
22101
+ "Accept": "application/json"
22102
+ }
22103
+ };
22104
+
22105
+ return this.transformOptions(options_).then(transformedOptions_ => {
22106
+ return this.http.fetch(url_, transformedOptions_);
22107
+ }).then((_response: Response) => {
22108
+ return this.processUpdateSequence(_response);
22109
+ });
22110
+ }
22111
+
22112
+ protected processUpdateSequence(response: Response): Promise<PlannerPlanDto> {
22113
+ const status = response.status;
22114
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22115
+ if (status === 200) {
22116
+ return response.text().then((_responseText) => {
22117
+ let result200: any = null;
22118
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22119
+ return result200;
22120
+ });
22121
+ } else if (status !== 200 && status !== 204) {
22122
+ return response.text().then((_responseText) => {
22123
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22124
+ });
22125
+ }
22126
+ return Promise.resolve<PlannerPlanDto>(null as any);
22127
+ }
22128
+
22129
+ reset(resourceGroupId: string): Promise<PlannerPlanDto> {
22130
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/reset";
22131
+ if (resourceGroupId === undefined || resourceGroupId === null)
22132
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22133
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22134
+ url_ = url_.replace(/[?&]$/, "");
22135
+
22136
+ let options_: RequestInit = {
22137
+ method: "POST",
22138
+ headers: {
22139
+ "Accept": "application/json"
22140
+ }
22141
+ };
22142
+
22143
+ return this.transformOptions(options_).then(transformedOptions_ => {
22144
+ return this.http.fetch(url_, transformedOptions_);
22145
+ }).then((_response: Response) => {
22146
+ return this.processReset(_response);
22147
+ });
22148
+ }
22149
+
22150
+ protected processReset(response: Response): Promise<PlannerPlanDto> {
22151
+ const status = response.status;
22152
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22153
+ if (status === 200) {
22154
+ return response.text().then((_responseText) => {
22155
+ let result200: any = null;
22156
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22157
+ return result200;
22158
+ });
22159
+ } else if (status !== 200 && status !== 204) {
22160
+ return response.text().then((_responseText) => {
22161
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22162
+ });
22163
+ }
22164
+ return Promise.resolve<PlannerPlanDto>(null as any);
22165
+ }
22166
+
22167
+ saveDraft(resourceGroupId: string, sequence: PlannerSequenceInput): Promise<PlannerPlanDto> {
22168
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
22169
+ if (resourceGroupId === undefined || resourceGroupId === null)
22170
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22171
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22172
+ url_ = url_.replace(/[?&]$/, "");
22173
+
22174
+ const content_ = JSON.stringify(sequence);
22175
+
22176
+ let options_: RequestInit = {
22177
+ body: content_,
22178
+ method: "POST",
22179
+ headers: {
22180
+ "Content-Type": "application/json",
22181
+ "Accept": "application/json"
22182
+ }
22183
+ };
22184
+
22185
+ return this.transformOptions(options_).then(transformedOptions_ => {
22186
+ return this.http.fetch(url_, transformedOptions_);
22187
+ }).then((_response: Response) => {
22188
+ return this.processSaveDraft(_response);
22189
+ });
22190
+ }
22191
+
22192
+ protected processSaveDraft(response: Response): Promise<PlannerPlanDto> {
22193
+ const status = response.status;
22194
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22195
+ if (status === 200) {
22196
+ return response.text().then((_responseText) => {
22197
+ let result200: any = null;
22198
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22199
+ return result200;
22200
+ });
22201
+ } else if (status !== 200 && status !== 204) {
22202
+ return response.text().then((_responseText) => {
22203
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22204
+ });
22205
+ }
22206
+ return Promise.resolve<PlannerPlanDto>(null as any);
22207
+ }
22208
+
22209
+ discardDraft(resourceGroupId: string): Promise<PlannerPlanDto> {
22210
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
22211
+ if (resourceGroupId === undefined || resourceGroupId === null)
22212
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22213
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22214
+ url_ = url_.replace(/[?&]$/, "");
22215
+
22216
+ let options_: RequestInit = {
22217
+ method: "DELETE",
22218
+ headers: {
22219
+ "Accept": "application/json"
22220
+ }
22221
+ };
22222
+
22223
+ return this.transformOptions(options_).then(transformedOptions_ => {
22224
+ return this.http.fetch(url_, transformedOptions_);
22225
+ }).then((_response: Response) => {
22226
+ return this.processDiscardDraft(_response);
22227
+ });
22228
+ }
22229
+
22230
+ protected processDiscardDraft(response: Response): Promise<PlannerPlanDto> {
22231
+ const status = response.status;
22232
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22233
+ if (status === 200) {
22234
+ return response.text().then((_responseText) => {
22235
+ let result200: any = null;
22236
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanDto;
22237
+ return result200;
22238
+ });
22239
+ } else if (status !== 200 && status !== 204) {
22240
+ return response.text().then((_responseText) => {
22241
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22242
+ });
22243
+ }
22244
+ return Promise.resolve<PlannerPlanDto>(null as any);
22245
+ }
22246
+
22247
+ getCapacity(resourceGroupId: string, from: Date | undefined, to: Date | undefined): Promise<WeekCapacityDto[]> {
22248
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
22249
+ if (resourceGroupId === undefined || resourceGroupId === null)
22250
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22251
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22252
+ if (from === null)
22253
+ throw new globalThis.Error("The parameter 'from' cannot be null.");
22254
+ else if (from !== undefined)
22255
+ url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
22256
+ if (to === null)
22257
+ throw new globalThis.Error("The parameter 'to' cannot be null.");
22258
+ else if (to !== undefined)
22259
+ url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
22260
+ url_ = url_.replace(/[?&]$/, "");
22261
+
22262
+ let options_: RequestInit = {
22263
+ method: "GET",
22264
+ headers: {
22265
+ "Accept": "application/json"
22266
+ }
22267
+ };
22268
+
22269
+ return this.transformOptions(options_).then(transformedOptions_ => {
22270
+ return this.http.fetch(url_, transformedOptions_);
22271
+ }).then((_response: Response) => {
22272
+ return this.processGetCapacity(_response);
22273
+ });
22274
+ }
22275
+
22276
+ protected processGetCapacity(response: Response): Promise<WeekCapacityDto[]> {
22277
+ const status = response.status;
22278
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22279
+ if (status === 200) {
22280
+ return response.text().then((_responseText) => {
22281
+ let result200: any = null;
22282
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as WeekCapacityDto[];
22283
+ return result200;
22284
+ });
22285
+ } else if (status !== 200 && status !== 204) {
22286
+ return response.text().then((_responseText) => {
22287
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22288
+ });
22289
+ }
22290
+ return Promise.resolve<WeekCapacityDto[]>(null as any);
22291
+ }
22292
+
22293
+ getVersions(resourceGroupId: string): Promise<PlannerPlanEventDto[]> {
22294
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
22295
+ if (resourceGroupId === undefined || resourceGroupId === null)
22296
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22297
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22298
+ url_ = url_.replace(/[?&]$/, "");
22299
+
22300
+ let options_: RequestInit = {
22301
+ method: "GET",
22302
+ headers: {
22303
+ "Accept": "application/json"
22304
+ }
22305
+ };
22306
+
22307
+ return this.transformOptions(options_).then(transformedOptions_ => {
22308
+ return this.http.fetch(url_, transformedOptions_);
22309
+ }).then((_response: Response) => {
22310
+ return this.processGetVersions(_response);
22311
+ });
22312
+ }
22313
+
22314
+ protected processGetVersions(response: Response): Promise<PlannerPlanEventDto[]> {
22315
+ const status = response.status;
22316
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22317
+ if (status === 200) {
22318
+ return response.text().then((_responseText) => {
22319
+ let result200: any = null;
22320
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as PlannerPlanEventDto[];
22321
+ return result200;
22322
+ });
22323
+ } else if (status !== 200 && status !== 204) {
22324
+ return response.text().then((_responseText) => {
22325
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22326
+ });
22327
+ }
22328
+ return Promise.resolve<PlannerPlanEventDto[]>(null as any);
22329
+ }
22330
+
22331
+ getVersion(resourceGroupId: string, eventId: string): Promise<PlannerPlanDto> {
22332
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
22333
+ if (resourceGroupId === undefined || resourceGroupId === null)
22334
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
22335
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
22336
+ if (eventId === undefined || eventId === null)
22337
+ throw new globalThis.Error("The parameter 'eventId' must be defined.");
22338
+ url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
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.processGetVersion(_response);
22352
+ });
22353
+ }
22354
+
22355
+ protected processGetVersion(response: Response): Promise<PlannerPlanDto> {
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 PlannerPlanDto;
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<PlannerPlanDto>(null as any);
22370
+ }
22371
+
22372
+ setProgramStatus(command: SetProgramStatus): Promise<ProgramStatus> {
22373
+ let url_ = this.baseUrl + "/mes/planner/operations/program-status";
22374
+ url_ = url_.replace(/[?&]$/, "");
22375
+
22376
+ const content_ = JSON.stringify(command);
22377
+
22378
+ let options_: RequestInit = {
22379
+ body: content_,
22380
+ method: "PUT",
22381
+ headers: {
22382
+ "Content-Type": "application/json",
22383
+ "Accept": "application/json"
22384
+ }
22385
+ };
22386
+
22387
+ return this.transformOptions(options_).then(transformedOptions_ => {
22388
+ return this.http.fetch(url_, transformedOptions_);
22389
+ }).then((_response: Response) => {
22390
+ return this.processSetProgramStatus(_response);
22391
+ });
22392
+ }
22393
+
22394
+ protected processSetProgramStatus(response: Response): Promise<ProgramStatus> {
22395
+ const status = response.status;
22396
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22397
+ if (status === 200) {
22398
+ return response.text().then((_responseText) => {
22399
+ let result200: any = null;
22400
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ProgramStatus;
22401
+ return result200;
22402
+ });
22403
+ } else if (status !== 200 && status !== 204) {
22404
+ return response.text().then((_responseText) => {
22405
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22406
+ });
22407
+ }
22408
+ return Promise.resolve<ProgramStatus>(null as any);
22409
+ }
22410
+ }
22411
+
21973
22412
  export interface IMesProductionOrderAttachmentClient {
21974
22413
 
21975
22414
  /**
@@ -32515,7 +32954,6 @@ export interface MrbCompanySettingsDto {
32515
32954
  detailedTransactionsMissingInErp: boolean;
32516
32955
  allowMaterialReplacementOnConsumptions: boolean;
32517
32956
  nonSplittableTraceUnits: string[];
32518
- disableTraceEditing: boolean;
32519
32957
  }
32520
32958
 
32521
32959
  export interface UpsertMrbCompanySettings {
@@ -32534,7 +32972,6 @@ export interface UpsertMrbCompanySettings {
32534
32972
  detailedTransactionsMissingInErp: boolean;
32535
32973
  allowMaterialReplacementOnConsumptions: boolean;
32536
32974
  nonSplittableTraceUnits: string[];
32537
- disableTraceEditing: boolean;
32538
32975
  }
32539
32976
 
32540
32977
  export interface TraceDto {
@@ -35200,6 +35637,85 @@ export interface LabelId {
35200
35637
  trackingId?: string | null;
35201
35638
  }
35202
35639
 
35640
+ export interface PlannerPlanDto {
35641
+ resourceGroupId: string;
35642
+ sequence: PlannerOperationDto[];
35643
+ lockedCount: number;
35644
+ planSavedAt?: Date | null;
35645
+ isDraft: boolean;
35646
+ publishedETag?: string | null;
35647
+ }
35648
+
35649
+ export interface PlannerOperationDto {
35650
+ id: string;
35651
+ productionOrderNumber: string;
35652
+ operation: number;
35653
+ operationName: string;
35654
+ plannedStart: Date;
35655
+ plannedEnd?: Date | null;
35656
+ status: OperationStatusDto;
35657
+ resourceId: string;
35658
+ resourceName: string;
35659
+ resourceDepartmentNumber?: string | null;
35660
+ resourceDepartmentName?: string | null;
35661
+ partNumber: string;
35662
+ partName?: string | null;
35663
+ partMaterial?: string | null;
35664
+ quantity: number;
35665
+ producedQuantity: number;
35666
+ totalPlannedHours?: number;
35667
+ totalUsedHours?: number;
35668
+ customerName?: string | null;
35669
+ project?: WorkOrderProjectDto | null;
35670
+ sequenceNumber: number;
35671
+ isManuallyLocked: boolean;
35672
+ weekGroup: string;
35673
+ programStatus?: ProgramStatus | null;
35674
+ }
35675
+
35676
+ export type ProgramStatus = "Blank" | "NotOk" | "Ok";
35677
+
35678
+ export interface PublishPlanRequest {
35679
+ /** ETag of the published plan the caller last read, used for optimistic
35680
+ concurrency. Null if the caller never observed a published plan. */
35681
+ publishedETag?: string | null;
35682
+ comment?: string | null;
35683
+ /** The caller's unsaved working sequence to publish. When null, the
35684
+ persisted active plan (draft, else published) is published instead. */
35685
+ sequence?: PlannerSequenceInput | null;
35686
+ }
35687
+
35688
+ export interface PlannerSequenceInput {
35689
+ orderedOperationKeys: string[];
35690
+ lockedCount: number;
35691
+ weekGroups?: { [key: string]: string; } | null;
35692
+ }
35693
+
35694
+ export interface WeekCapacityDto {
35695
+ weekGroup: string;
35696
+ weekStart: Date;
35697
+ capacityHours: number;
35698
+ }
35699
+
35700
+ export interface PlannerPlanEventDto {
35701
+ id: string;
35702
+ eventType: PlannerEventType;
35703
+ occurredAt: Date;
35704
+ by?: string | null;
35705
+ comment?: string | null;
35706
+ operationCount: number;
35707
+ lockedCount: number;
35708
+ }
35709
+
35710
+ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp" | "AutoRollover";
35711
+
35712
+ export interface SetProgramStatus {
35713
+ workOrderId?: string;
35714
+ operationNumber?: number;
35715
+ status?: ProgramStatus;
35716
+ resourceId?: string;
35717
+ }
35718
+
35203
35719
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
35204
35720
 
35205
35721
  export interface WorkOrderAttachmentDto {
@@ -35498,6 +36014,7 @@ export interface ProductionScheduleOperationDto {
35498
36014
  materialPickStatus: MaterialPickStatus;
35499
36015
  productionStatus: OperationStatusDto;
35500
36016
  setupStatus?: OperationStatusDto | null;
36017
+ programStatus?: ProgramStatus | null;
35501
36018
  }
35502
36019
 
35503
36020
  export interface SurroundingOperationDto {
@@ -37928,6 +38445,7 @@ export interface WorkorderDiscussionMessageDto {
37928
38445
  operationName?: string | null;
37929
38446
  resourceId?: string | null;
37930
38447
  created?: Date;
38448
+ visibility?: DiscussionVisibility;
37931
38449
  }
37932
38450
 
37933
38451
  export interface WorkOrderDiscussionContent {
@@ -37937,11 +38455,14 @@ export interface WorkOrderDiscussionContent {
37937
38455
 
37938
38456
  export type WorkOrderDiscussionContentType = 0 | 1;
37939
38457
 
38458
+ export type DiscussionVisibility = "Public" | "Planner";
38459
+
37940
38460
  export interface AddDiscussionMessageRequest {
37941
38461
  message: string;
37942
38462
  operationId?: string | null;
37943
38463
  operationName?: string | null;
37944
38464
  resourceId?: string | null;
38465
+ visibility?: DiscussionVisibility;
37945
38466
  }
37946
38467
 
37947
38468
  export interface WorkorderDiscussionReadStatusDto {