@ignos/api-client 20260715.189.1 → 20260721.191.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)
@@ -2544,7 +2583,7 @@ export declare class MesProductionOrderClient extends AuthorizedApiBase implemen
2544
2583
  protected processListProductionOrderActivities(response: Response): Promise<ProductionOrderOperationActivityDto[]>;
2545
2584
  }
2546
2585
  export interface IMesProductionScheduleClient {
2547
- listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2586
+ listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined, includeDiscussionSummary: boolean | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2548
2587
  postListProductionScheduleOperations(request: ListProductionScheduleOperationsRequest | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2549
2588
  getAvailableProductionScheduleFilters(request: GetAvailableProductionScheduleFiltersRequest | undefined): Promise<ProductionScheduleFiltersDto>;
2550
2589
  listMyCurrentWorkActivities(): Promise<CurrentWorkActivityDto>;
@@ -2558,7 +2597,7 @@ export declare class MesProductionScheduleClient extends AuthorizedApiBase imple
2558
2597
  constructor(configuration: IApiClientConfig, baseUrl?: string, http?: {
2559
2598
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
2560
2599
  });
2561
- listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2600
+ listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined, includeDiscussionSummary: boolean | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2562
2601
  protected processListProductionScheduleOperations(response: Response): Promise<PagedResultOfProductionScheduleOperationDto>;
2563
2602
  postListProductionScheduleOperations(request: ListProductionScheduleOperationsRequest | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
2564
2603
  protected processPostListProductionScheduleOperations(response: Response): Promise<PagedResultOfProductionScheduleOperationDto>;
@@ -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,81 @@ 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
+ weeklyCapacities: WeekCapacityDto[];
7397
+ }
7398
+ export interface PlannerOperationDto {
7399
+ id: string;
7400
+ productionOrderNumber: string;
7401
+ operation: number;
7402
+ operationName: string;
7403
+ plannedStart: Date;
7404
+ plannedEnd?: Date | null;
7405
+ status: OperationStatusDto;
7406
+ resourceId: string;
7407
+ resourceName: string;
7408
+ resourceDepartmentNumber?: string | null;
7409
+ resourceDepartmentName?: string | null;
7410
+ partNumber: string;
7411
+ partName?: string | null;
7412
+ partMaterial?: string | null;
7413
+ quantity: number;
7414
+ producedQuantity: number;
7415
+ totalPlannedHours?: number;
7416
+ totalUsedHours?: number;
7417
+ customerName?: string | null;
7418
+ project?: WorkOrderProjectDto | null;
7419
+ sequenceNumber: number;
7420
+ isManuallyLocked: boolean;
7421
+ weekGroup: string;
7422
+ programStatus?: ProgramStatus | null;
7423
+ hasNotes?: boolean;
7424
+ notesUnread?: boolean;
7425
+ }
7426
+ export type ProgramStatus = "Blank" | "NotOk" | "Ok";
7427
+ export interface WeekCapacityDto {
7428
+ weekGroup: string;
7429
+ weekStart: Date;
7430
+ capacityHours: number;
7431
+ }
7432
+ export interface PublishPlanRequest {
7433
+ /** ETag of the published plan the caller last read, used for optimistic
7434
+ concurrency. Null if the caller never observed a published plan. */
7435
+ publishedETag?: string | null;
7436
+ comment?: string | null;
7437
+ /** The caller's unsaved working sequence to publish. When null, the
7438
+ persisted active plan (draft, else published) is published instead. */
7439
+ sequence?: PlannerSequenceInput | null;
7440
+ }
7441
+ export interface PlannerSequenceInput {
7442
+ orderedOperationKeys: string[];
7443
+ lockedCount: number;
7444
+ weekGroups?: {
7445
+ [key: string]: string;
7446
+ } | null;
7447
+ }
7448
+ export interface PlannerPlanEventDto {
7449
+ id: string;
7450
+ eventType: PlannerEventType;
7451
+ occurredAt: Date;
7452
+ by?: string | null;
7453
+ comment?: string | null;
7454
+ operationCount: number;
7455
+ lockedCount: number;
7456
+ }
7457
+ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
7458
+ export interface SetProgramStatus {
7459
+ workOrderId?: string;
7460
+ operationNumber?: number;
7461
+ status?: ProgramStatus;
7462
+ resourceId?: string;
7463
+ }
7352
7464
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
7353
7465
  export interface WorkOrderAttachmentDto {
7354
7466
  createdBy?: UserDto | null;
@@ -7624,6 +7736,9 @@ export interface ProductionScheduleOperationDto {
7624
7736
  materialPickStatus: MaterialPickStatus;
7625
7737
  productionStatus: OperationStatusDto;
7626
7738
  setupStatus?: OperationStatusDto | null;
7739
+ programStatus?: ProgramStatus | null;
7740
+ hasNotes: boolean;
7741
+ notesUnread: boolean;
7627
7742
  }
7628
7743
  export interface SurroundingOperationDto {
7629
7744
  id: string;
@@ -7685,6 +7800,7 @@ export interface ListProductionScheduleOperationsRequest {
7685
7800
  operationStatuses?: OperationStatusDto[] | null;
7686
7801
  after?: Date | null;
7687
7802
  before?: Date | null;
7803
+ includeDiscussionSummary?: boolean;
7688
7804
  }
7689
7805
  export interface ProductionScheduleFiltersDto {
7690
7806
  partNumbers?: FilterValueWithQuantity[];
@@ -9779,17 +9895,20 @@ export interface WorkorderDiscussionMessageDto {
9779
9895
  operationName?: string | null;
9780
9896
  resourceId?: string | null;
9781
9897
  created?: Date;
9898
+ visibility?: DiscussionVisibility;
9782
9899
  }
9783
9900
  export interface WorkOrderDiscussionContent {
9784
9901
  type?: WorkOrderDiscussionContentType;
9785
9902
  value?: string;
9786
9903
  }
9787
9904
  export type WorkOrderDiscussionContentType = 0 | 1;
9905
+ export type DiscussionVisibility = "Public" | "Planner";
9788
9906
  export interface AddDiscussionMessageRequest {
9789
9907
  message: string;
9790
9908
  operationId?: string | null;
9791
9909
  operationName?: string | null;
9792
9910
  resourceId?: string | null;
9911
+ visibility?: DiscussionVisibility;
9793
9912
  }
9794
9913
  export interface WorkorderDiscussionReadStatusDto {
9795
9914
  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);
@@ -21144,7 +21562,7 @@ export class MesProductionScheduleClient extends AuthorizedApiBase {
21144
21562
  this.http = http ? http : window;
21145
21563
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
21146
21564
  }
21147
- listProductionScheduleOperations(resourceGroup, resourceId, departmentNumber, pageSize, continuationToken, workOrderId, projectId, partNumber, partName, material) {
21565
+ listProductionScheduleOperations(resourceGroup, resourceId, departmentNumber, pageSize, continuationToken, workOrderId, projectId, partNumber, partName, material, includeDiscussionSummary) {
21148
21566
  let url_ = this.baseUrl + "/mes/productionschedule?";
21149
21567
  if (resourceGroup !== undefined && resourceGroup !== null)
21150
21568
  url_ += "resourceGroup=" + encodeURIComponent("" + resourceGroup) + "&";
@@ -21168,6 +21586,10 @@ export class MesProductionScheduleClient extends AuthorizedApiBase {
21168
21586
  url_ += "partName=" + encodeURIComponent("" + partName) + "&";
21169
21587
  if (material !== undefined && material !== null)
21170
21588
  url_ += "material=" + encodeURIComponent("" + material) + "&";
21589
+ if (includeDiscussionSummary === null)
21590
+ throw new globalThis.Error("The parameter 'includeDiscussionSummary' cannot be null.");
21591
+ else if (includeDiscussionSummary !== undefined)
21592
+ url_ += "includeDiscussionSummary=" + encodeURIComponent("" + includeDiscussionSummary) + "&";
21171
21593
  url_ = url_.replace(/[?&]$/, "");
21172
21594
  let options_ = {
21173
21595
  method: "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20260715.189.1",
3
+ "version": "20260721.191.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
  /**
@@ -22591,7 +23030,7 @@ export class MesProductionOrderClient extends AuthorizedApiBase implements IMesP
22591
23030
 
22592
23031
  export interface IMesProductionScheduleClient {
22593
23032
 
22594
- listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
23033
+ listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined, includeDiscussionSummary: boolean | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
22595
23034
 
22596
23035
  postListProductionScheduleOperations(request: ListProductionScheduleOperationsRequest | undefined): Promise<PagedResultOfProductionScheduleOperationDto>;
22597
23036
 
@@ -22616,7 +23055,7 @@ export class MesProductionScheduleClient extends AuthorizedApiBase implements IM
22616
23055
  this.baseUrl = baseUrl ?? "";
22617
23056
  }
22618
23057
 
22619
- listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined): Promise<PagedResultOfProductionScheduleOperationDto> {
23058
+ listProductionScheduleOperations(resourceGroup: string | null | undefined, resourceId: string | null | undefined, departmentNumber: string | null | undefined, pageSize: number | undefined, continuationToken: string | null | undefined, workOrderId: string | null | undefined, projectId: string | null | undefined, partNumber: string | null | undefined, partName: string | null | undefined, material: string | null | undefined, includeDiscussionSummary: boolean | undefined): Promise<PagedResultOfProductionScheduleOperationDto> {
22620
23059
  let url_ = this.baseUrl + "/mes/productionschedule?";
22621
23060
  if (resourceGroup !== undefined && resourceGroup !== null)
22622
23061
  url_ += "resourceGroup=" + encodeURIComponent("" + resourceGroup) + "&";
@@ -22640,6 +23079,10 @@ export class MesProductionScheduleClient extends AuthorizedApiBase implements IM
22640
23079
  url_ += "partName=" + encodeURIComponent("" + partName) + "&";
22641
23080
  if (material !== undefined && material !== null)
22642
23081
  url_ += "material=" + encodeURIComponent("" + material) + "&";
23082
+ if (includeDiscussionSummary === null)
23083
+ throw new globalThis.Error("The parameter 'includeDiscussionSummary' cannot be null.");
23084
+ else if (includeDiscussionSummary !== undefined)
23085
+ url_ += "includeDiscussionSummary=" + encodeURIComponent("" + includeDiscussionSummary) + "&";
22643
23086
  url_ = url_.replace(/[?&]$/, "");
22644
23087
 
22645
23088
  let options_: RequestInit = {
@@ -32515,7 +32958,6 @@ export interface MrbCompanySettingsDto {
32515
32958
  detailedTransactionsMissingInErp: boolean;
32516
32959
  allowMaterialReplacementOnConsumptions: boolean;
32517
32960
  nonSplittableTraceUnits: string[];
32518
- disableTraceEditing: boolean;
32519
32961
  }
32520
32962
 
32521
32963
  export interface UpsertMrbCompanySettings {
@@ -32534,7 +32976,6 @@ export interface UpsertMrbCompanySettings {
32534
32976
  detailedTransactionsMissingInErp: boolean;
32535
32977
  allowMaterialReplacementOnConsumptions: boolean;
32536
32978
  nonSplittableTraceUnits: string[];
32537
- disableTraceEditing: boolean;
32538
32979
  }
32539
32980
 
32540
32981
  export interface TraceDto {
@@ -35200,6 +35641,88 @@ export interface LabelId {
35200
35641
  trackingId?: string | null;
35201
35642
  }
35202
35643
 
35644
+ export interface PlannerPlanDto {
35645
+ resourceGroupId: string;
35646
+ sequence: PlannerOperationDto[];
35647
+ lockedCount: number;
35648
+ planSavedAt?: Date | null;
35649
+ isDraft: boolean;
35650
+ publishedETag?: string | null;
35651
+ weeklyCapacities: WeekCapacityDto[];
35652
+ }
35653
+
35654
+ export interface PlannerOperationDto {
35655
+ id: string;
35656
+ productionOrderNumber: string;
35657
+ operation: number;
35658
+ operationName: string;
35659
+ plannedStart: Date;
35660
+ plannedEnd?: Date | null;
35661
+ status: OperationStatusDto;
35662
+ resourceId: string;
35663
+ resourceName: string;
35664
+ resourceDepartmentNumber?: string | null;
35665
+ resourceDepartmentName?: string | null;
35666
+ partNumber: string;
35667
+ partName?: string | null;
35668
+ partMaterial?: string | null;
35669
+ quantity: number;
35670
+ producedQuantity: number;
35671
+ totalPlannedHours?: number;
35672
+ totalUsedHours?: number;
35673
+ customerName?: string | null;
35674
+ project?: WorkOrderProjectDto | null;
35675
+ sequenceNumber: number;
35676
+ isManuallyLocked: boolean;
35677
+ weekGroup: string;
35678
+ programStatus?: ProgramStatus | null;
35679
+ hasNotes?: boolean;
35680
+ notesUnread?: boolean;
35681
+ }
35682
+
35683
+ export type ProgramStatus = "Blank" | "NotOk" | "Ok";
35684
+
35685
+ export interface WeekCapacityDto {
35686
+ weekGroup: string;
35687
+ weekStart: Date;
35688
+ capacityHours: number;
35689
+ }
35690
+
35691
+ export interface PublishPlanRequest {
35692
+ /** ETag of the published plan the caller last read, used for optimistic
35693
+ concurrency. Null if the caller never observed a published plan. */
35694
+ publishedETag?: string | null;
35695
+ comment?: string | null;
35696
+ /** The caller's unsaved working sequence to publish. When null, the
35697
+ persisted active plan (draft, else published) is published instead. */
35698
+ sequence?: PlannerSequenceInput | null;
35699
+ }
35700
+
35701
+ export interface PlannerSequenceInput {
35702
+ orderedOperationKeys: string[];
35703
+ lockedCount: number;
35704
+ weekGroups?: { [key: string]: string; } | null;
35705
+ }
35706
+
35707
+ export interface PlannerPlanEventDto {
35708
+ id: string;
35709
+ eventType: PlannerEventType;
35710
+ occurredAt: Date;
35711
+ by?: string | null;
35712
+ comment?: string | null;
35713
+ operationCount: number;
35714
+ lockedCount: number;
35715
+ }
35716
+
35717
+ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
35718
+
35719
+ export interface SetProgramStatus {
35720
+ workOrderId?: string;
35721
+ operationNumber?: number;
35722
+ status?: ProgramStatus;
35723
+ resourceId?: string;
35724
+ }
35725
+
35203
35726
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
35204
35727
 
35205
35728
  export interface WorkOrderAttachmentDto {
@@ -35498,6 +36021,9 @@ export interface ProductionScheduleOperationDto {
35498
36021
  materialPickStatus: MaterialPickStatus;
35499
36022
  productionStatus: OperationStatusDto;
35500
36023
  setupStatus?: OperationStatusDto | null;
36024
+ programStatus?: ProgramStatus | null;
36025
+ hasNotes: boolean;
36026
+ notesUnread: boolean;
35501
36027
  }
35502
36028
 
35503
36029
  export interface SurroundingOperationDto {
@@ -35565,6 +36091,7 @@ export interface ListProductionScheduleOperationsRequest {
35565
36091
  operationStatuses?: OperationStatusDto[] | null;
35566
36092
  after?: Date | null;
35567
36093
  before?: Date | null;
36094
+ includeDiscussionSummary?: boolean;
35568
36095
  }
35569
36096
 
35570
36097
  export interface ProductionScheduleFiltersDto {
@@ -37928,6 +38455,7 @@ export interface WorkorderDiscussionMessageDto {
37928
38455
  operationName?: string | null;
37929
38456
  resourceId?: string | null;
37930
38457
  created?: Date;
38458
+ visibility?: DiscussionVisibility;
37931
38459
  }
37932
38460
 
37933
38461
  export interface WorkOrderDiscussionContent {
@@ -37937,11 +38465,14 @@ export interface WorkOrderDiscussionContent {
37937
38465
 
37938
38466
  export type WorkOrderDiscussionContentType = 0 | 1;
37939
38467
 
38468
+ export type DiscussionVisibility = "Public" | "Planner";
38469
+
37940
38470
  export interface AddDiscussionMessageRequest {
37941
38471
  message: string;
37942
38472
  operationId?: string | null;
37943
38473
  operationName?: string | null;
37944
38474
  resourceId?: string | null;
38475
+ visibility?: DiscussionVisibility;
37945
38476
  }
37946
38477
 
37947
38478
  export interface WorkorderDiscussionReadStatusDto {