@ignos/api-client 20240820.0.10068 → 20240823.0.10114

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.
@@ -2085,6 +2085,35 @@ export declare class CustomerOrdersClient extends AuthorizedApiBase implements I
2085
2085
  listCustomerOrderLines(id: string): Promise<CustomerOrderLineDto[]>;
2086
2086
  protected processListCustomerOrderLines(response: Response): Promise<CustomerOrderLineDto[]>;
2087
2087
  }
2088
+ export interface IErpUsersClient {
2089
+ listUsers(request: ListErpUsers | undefined): Promise<PagedResultOfErpUserDto>;
2090
+ }
2091
+ export declare class ErpUsersClient extends AuthorizedApiBase implements IErpUsersClient {
2092
+ private http;
2093
+ private baseUrl;
2094
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
2095
+ constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
2096
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
2097
+ });
2098
+ listUsers(request: ListErpUsers | undefined): Promise<PagedResultOfErpUserDto>;
2099
+ protected processListUsers(response: Response): Promise<PagedResultOfErpUserDto>;
2100
+ }
2101
+ export interface IProductionPoolsClient {
2102
+ listProductionPools(): Promise<ProductionPoolDto[]>;
2103
+ setProductionPoolContactPerson(request: SetProductionPoolContactPerson): Promise<void>;
2104
+ }
2105
+ export declare class ProductionPoolsClient extends AuthorizedApiBase implements IProductionPoolsClient {
2106
+ private http;
2107
+ private baseUrl;
2108
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
2109
+ constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
2110
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
2111
+ });
2112
+ listProductionPools(): Promise<ProductionPoolDto[]>;
2113
+ protected processListProductionPools(response: Response): Promise<ProductionPoolDto[]>;
2114
+ setProductionPoolContactPerson(request: SetProductionPoolContactPerson): Promise<void>;
2115
+ protected processSetProductionPoolContactPerson(response: Response): Promise<void>;
2116
+ }
2088
2117
  export interface IResourcesClient {
2089
2118
  listAllMachines(): Promise<MachineDto[]>;
2090
2119
  }
@@ -8709,6 +8738,9 @@ export declare class NonConformanceDto implements INonConformanceDto {
8709
8738
  closed: boolean;
8710
8739
  approved: boolean;
8711
8740
  url?: string | null;
8741
+ rootCause?: NonConformanceAttachmentDto | null;
8742
+ decision?: NonConformanceAttachmentDto | null;
8743
+ correctiveAction?: NonConformanceAttachmentDto | null;
8712
8744
  constructor(data?: INonConformanceDto);
8713
8745
  init(_data?: any): void;
8714
8746
  static fromJS(data: any): NonConformanceDto;
@@ -8730,8 +8762,27 @@ export interface INonConformanceDto {
8730
8762
  closed: boolean;
8731
8763
  approved: boolean;
8732
8764
  url?: string | null;
8765
+ rootCause?: NonConformanceAttachmentDto | null;
8766
+ decision?: NonConformanceAttachmentDto | null;
8767
+ correctiveAction?: NonConformanceAttachmentDto | null;
8733
8768
  }
8734
8769
  export type NonConformanceType = 1;
8770
+ export declare class NonConformanceAttachmentDto implements INonConformanceAttachmentDto {
8771
+ title?: string | null;
8772
+ description?: string | null;
8773
+ created?: Date;
8774
+ modified?: Date | null;
8775
+ constructor(data?: INonConformanceAttachmentDto);
8776
+ init(_data?: any): void;
8777
+ static fromJS(data: any): NonConformanceAttachmentDto;
8778
+ toJSON(data?: any): any;
8779
+ }
8780
+ export interface INonConformanceAttachmentDto {
8781
+ title?: string | null;
8782
+ description?: string | null;
8783
+ created?: Date;
8784
+ modified?: Date | null;
8785
+ }
8735
8786
  export declare class MaterialPickListResultDto implements IMaterialPickListResultDto {
8736
8787
  results: MaterialPickListResultEntryDto[];
8737
8788
  constructor(data?: IMaterialPickListResultDto);
@@ -11769,6 +11820,82 @@ export interface ICreateCustomerMapping {
11769
11820
  existingCustomerId: string;
11770
11821
  newCustomerId: string;
11771
11822
  }
11823
+ export declare class PagedResultOfErpUserDto implements IPagedResultOfErpUserDto {
11824
+ results: ErpUserDto[];
11825
+ continuationToken?: string | null;
11826
+ constructor(data?: IPagedResultOfErpUserDto);
11827
+ init(_data?: any): void;
11828
+ static fromJS(data: any): PagedResultOfErpUserDto;
11829
+ toJSON(data?: any): any;
11830
+ }
11831
+ export interface IPagedResultOfErpUserDto {
11832
+ results: ErpUserDto[];
11833
+ continuationToken?: string | null;
11834
+ }
11835
+ export declare class ErpUserDto implements IErpUserDto {
11836
+ azureAdObjectId?: string | null;
11837
+ name?: string | null;
11838
+ upn: string;
11839
+ companyId?: string | null;
11840
+ userSelectedCompanyId?: string | null;
11841
+ personnelNumber?: string | null;
11842
+ badgeId?: string | null;
11843
+ email?: string | null;
11844
+ constructor(data?: IErpUserDto);
11845
+ init(_data?: any): void;
11846
+ static fromJS(data: any): ErpUserDto;
11847
+ toJSON(data?: any): any;
11848
+ }
11849
+ export interface IErpUserDto {
11850
+ azureAdObjectId?: string | null;
11851
+ name?: string | null;
11852
+ upn: string;
11853
+ companyId?: string | null;
11854
+ userSelectedCompanyId?: string | null;
11855
+ personnelNumber?: string | null;
11856
+ badgeId?: string | null;
11857
+ email?: string | null;
11858
+ }
11859
+ export declare class ListErpUsers implements IListErpUsers {
11860
+ pageSize?: number;
11861
+ filter?: string | null;
11862
+ continuationToken?: string | null;
11863
+ constructor(data?: IListErpUsers);
11864
+ init(_data?: any): void;
11865
+ static fromJS(data: any): ListErpUsers;
11866
+ toJSON(data?: any): any;
11867
+ }
11868
+ export interface IListErpUsers {
11869
+ pageSize?: number;
11870
+ filter?: string | null;
11871
+ continuationToken?: string | null;
11872
+ }
11873
+ export declare class ProductionPoolDto implements IProductionPoolDto {
11874
+ name: string;
11875
+ contactPersonUpn?: string | null;
11876
+ id?: string;
11877
+ constructor(data?: IProductionPoolDto);
11878
+ init(_data?: any): void;
11879
+ static fromJS(data: any): ProductionPoolDto;
11880
+ toJSON(data?: any): any;
11881
+ }
11882
+ export interface IProductionPoolDto {
11883
+ name: string;
11884
+ contactPersonUpn?: string | null;
11885
+ id?: string;
11886
+ }
11887
+ export declare class SetProductionPoolContactPerson implements ISetProductionPoolContactPerson {
11888
+ poolId: string;
11889
+ contactPersonUpn?: string | null;
11890
+ constructor(data?: ISetProductionPoolContactPerson);
11891
+ init(_data?: any): void;
11892
+ static fromJS(data: any): SetProductionPoolContactPerson;
11893
+ toJSON(data?: any): any;
11894
+ }
11895
+ export interface ISetProductionPoolContactPerson {
11896
+ poolId: string;
11897
+ contactPersonUpn?: string | null;
11898
+ }
11772
11899
  export declare class UpsertWorkorder implements IUpsertWorkorder {
11773
11900
  workorder: string;
11774
11901
  part: PartDto;
@@ -18002,6 +18002,139 @@ export class CustomerOrdersClient extends AuthorizedApiBase {
18002
18002
  return Promise.resolve(null);
18003
18003
  }
18004
18004
  }
18005
+ export class ErpUsersClient extends AuthorizedApiBase {
18006
+ constructor(configuration, baseUrl, http) {
18007
+ super(configuration);
18008
+ this.jsonParseReviver = undefined;
18009
+ this.http = http ? http : window;
18010
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
18011
+ }
18012
+ listUsers(request) {
18013
+ let url_ = this.baseUrl + "/erp/users/list";
18014
+ url_ = url_.replace(/[?&]$/, "");
18015
+ const content_ = JSON.stringify(request);
18016
+ let options_ = {
18017
+ body: content_,
18018
+ method: "POST",
18019
+ headers: {
18020
+ "Content-Type": "application/json",
18021
+ "Accept": "application/json"
18022
+ }
18023
+ };
18024
+ return this.transformOptions(options_).then(transformedOptions_ => {
18025
+ return this.http.fetch(url_, transformedOptions_);
18026
+ }).then((_response) => {
18027
+ return this.processListUsers(_response);
18028
+ });
18029
+ }
18030
+ processListUsers(response) {
18031
+ const status = response.status;
18032
+ let _headers = {};
18033
+ if (response.headers && response.headers.forEach) {
18034
+ response.headers.forEach((v, k) => _headers[k] = v);
18035
+ }
18036
+ ;
18037
+ if (status === 200) {
18038
+ return response.text().then((_responseText) => {
18039
+ let result200 = null;
18040
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18041
+ result200 = PagedResultOfErpUserDto.fromJS(resultData200);
18042
+ return result200;
18043
+ });
18044
+ }
18045
+ else if (status !== 200 && status !== 204) {
18046
+ return response.text().then((_responseText) => {
18047
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18048
+ });
18049
+ }
18050
+ return Promise.resolve(null);
18051
+ }
18052
+ }
18053
+ export class ProductionPoolsClient extends AuthorizedApiBase {
18054
+ constructor(configuration, baseUrl, http) {
18055
+ super(configuration);
18056
+ this.jsonParseReviver = undefined;
18057
+ this.http = http ? http : window;
18058
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
18059
+ }
18060
+ listProductionPools() {
18061
+ let url_ = this.baseUrl + "/erp/productionpools";
18062
+ url_ = url_.replace(/[?&]$/, "");
18063
+ let options_ = {
18064
+ method: "GET",
18065
+ headers: {
18066
+ "Accept": "application/json"
18067
+ }
18068
+ };
18069
+ return this.transformOptions(options_).then(transformedOptions_ => {
18070
+ return this.http.fetch(url_, transformedOptions_);
18071
+ }).then((_response) => {
18072
+ return this.processListProductionPools(_response);
18073
+ });
18074
+ }
18075
+ processListProductionPools(response) {
18076
+ const status = response.status;
18077
+ let _headers = {};
18078
+ if (response.headers && response.headers.forEach) {
18079
+ response.headers.forEach((v, k) => _headers[k] = v);
18080
+ }
18081
+ ;
18082
+ if (status === 200) {
18083
+ return response.text().then((_responseText) => {
18084
+ let result200 = null;
18085
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18086
+ if (Array.isArray(resultData200)) {
18087
+ result200 = [];
18088
+ for (let item of resultData200)
18089
+ result200.push(ProductionPoolDto.fromJS(item));
18090
+ }
18091
+ return result200;
18092
+ });
18093
+ }
18094
+ else if (status !== 200 && status !== 204) {
18095
+ return response.text().then((_responseText) => {
18096
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18097
+ });
18098
+ }
18099
+ return Promise.resolve(null);
18100
+ }
18101
+ setProductionPoolContactPerson(request) {
18102
+ let url_ = this.baseUrl + "/erp/productionpools";
18103
+ url_ = url_.replace(/[?&]$/, "");
18104
+ const content_ = JSON.stringify(request);
18105
+ let options_ = {
18106
+ body: content_,
18107
+ method: "PATCH",
18108
+ headers: {
18109
+ "Content-Type": "application/json",
18110
+ }
18111
+ };
18112
+ return this.transformOptions(options_).then(transformedOptions_ => {
18113
+ return this.http.fetch(url_, transformedOptions_);
18114
+ }).then((_response) => {
18115
+ return this.processSetProductionPoolContactPerson(_response);
18116
+ });
18117
+ }
18118
+ processSetProductionPoolContactPerson(response) {
18119
+ const status = response.status;
18120
+ let _headers = {};
18121
+ if (response.headers && response.headers.forEach) {
18122
+ response.headers.forEach((v, k) => _headers[k] = v);
18123
+ }
18124
+ ;
18125
+ if (status === 200) {
18126
+ return response.text().then((_responseText) => {
18127
+ return;
18128
+ });
18129
+ }
18130
+ else if (status !== 200 && status !== 204) {
18131
+ return response.text().then((_responseText) => {
18132
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18133
+ });
18134
+ }
18135
+ return Promise.resolve(null);
18136
+ }
18137
+ }
18005
18138
  export class ResourcesClient extends AuthorizedApiBase {
18006
18139
  constructor(configuration, baseUrl, http) {
18007
18140
  super(configuration);
@@ -32073,6 +32206,9 @@ export class NonConformanceDto {
32073
32206
  this.closed = _data["closed"];
32074
32207
  this.approved = _data["approved"];
32075
32208
  this.url = _data["url"];
32209
+ this.rootCause = _data["rootCause"] ? NonConformanceAttachmentDto.fromJS(_data["rootCause"]) : undefined;
32210
+ this.decision = _data["decision"] ? NonConformanceAttachmentDto.fromJS(_data["decision"]) : undefined;
32211
+ this.correctiveAction = _data["correctiveAction"] ? NonConformanceAttachmentDto.fromJS(_data["correctiveAction"]) : undefined;
32076
32212
  }
32077
32213
  }
32078
32214
  static fromJS(data) {
@@ -32098,6 +32234,41 @@ export class NonConformanceDto {
32098
32234
  data["closed"] = this.closed;
32099
32235
  data["approved"] = this.approved;
32100
32236
  data["url"] = this.url;
32237
+ data["rootCause"] = this.rootCause ? this.rootCause.toJSON() : undefined;
32238
+ data["decision"] = this.decision ? this.decision.toJSON() : undefined;
32239
+ data["correctiveAction"] = this.correctiveAction ? this.correctiveAction.toJSON() : undefined;
32240
+ return data;
32241
+ }
32242
+ }
32243
+ export class NonConformanceAttachmentDto {
32244
+ constructor(data) {
32245
+ if (data) {
32246
+ for (var property in data) {
32247
+ if (data.hasOwnProperty(property))
32248
+ this[property] = data[property];
32249
+ }
32250
+ }
32251
+ }
32252
+ init(_data) {
32253
+ if (_data) {
32254
+ this.title = _data["title"];
32255
+ this.description = _data["description"];
32256
+ this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
32257
+ this.modified = _data["modified"] ? new Date(_data["modified"].toString()) : undefined;
32258
+ }
32259
+ }
32260
+ static fromJS(data) {
32261
+ data = typeof data === 'object' ? data : {};
32262
+ let result = new NonConformanceAttachmentDto();
32263
+ result.init(data);
32264
+ return result;
32265
+ }
32266
+ toJSON(data) {
32267
+ data = typeof data === 'object' ? data : {};
32268
+ data["title"] = this.title;
32269
+ data["description"] = this.description;
32270
+ data["created"] = this.created ? this.created.toISOString() : undefined;
32271
+ data["modified"] = this.modified ? this.modified.toISOString() : undefined;
32101
32272
  return data;
32102
32273
  }
32103
32274
  }
@@ -38173,6 +38344,173 @@ export class CreateCustomerMapping {
38173
38344
  return data;
38174
38345
  }
38175
38346
  }
38347
+ export class PagedResultOfErpUserDto {
38348
+ constructor(data) {
38349
+ if (data) {
38350
+ for (var property in data) {
38351
+ if (data.hasOwnProperty(property))
38352
+ this[property] = data[property];
38353
+ }
38354
+ }
38355
+ if (!data) {
38356
+ this.results = [];
38357
+ }
38358
+ }
38359
+ init(_data) {
38360
+ if (_data) {
38361
+ if (Array.isArray(_data["results"])) {
38362
+ this.results = [];
38363
+ for (let item of _data["results"])
38364
+ this.results.push(ErpUserDto.fromJS(item));
38365
+ }
38366
+ this.continuationToken = _data["continuationToken"];
38367
+ }
38368
+ }
38369
+ static fromJS(data) {
38370
+ data = typeof data === 'object' ? data : {};
38371
+ let result = new PagedResultOfErpUserDto();
38372
+ result.init(data);
38373
+ return result;
38374
+ }
38375
+ toJSON(data) {
38376
+ data = typeof data === 'object' ? data : {};
38377
+ if (Array.isArray(this.results)) {
38378
+ data["results"] = [];
38379
+ for (let item of this.results)
38380
+ data["results"].push(item.toJSON());
38381
+ }
38382
+ data["continuationToken"] = this.continuationToken;
38383
+ return data;
38384
+ }
38385
+ }
38386
+ export class ErpUserDto {
38387
+ constructor(data) {
38388
+ if (data) {
38389
+ for (var property in data) {
38390
+ if (data.hasOwnProperty(property))
38391
+ this[property] = data[property];
38392
+ }
38393
+ }
38394
+ }
38395
+ init(_data) {
38396
+ if (_data) {
38397
+ this.azureAdObjectId = _data["azureAdObjectId"];
38398
+ this.name = _data["name"];
38399
+ this.upn = _data["upn"];
38400
+ this.companyId = _data["companyId"];
38401
+ this.userSelectedCompanyId = _data["userSelectedCompanyId"];
38402
+ this.personnelNumber = _data["personnelNumber"];
38403
+ this.badgeId = _data["badgeId"];
38404
+ this.email = _data["email"];
38405
+ }
38406
+ }
38407
+ static fromJS(data) {
38408
+ data = typeof data === 'object' ? data : {};
38409
+ let result = new ErpUserDto();
38410
+ result.init(data);
38411
+ return result;
38412
+ }
38413
+ toJSON(data) {
38414
+ data = typeof data === 'object' ? data : {};
38415
+ data["azureAdObjectId"] = this.azureAdObjectId;
38416
+ data["name"] = this.name;
38417
+ data["upn"] = this.upn;
38418
+ data["companyId"] = this.companyId;
38419
+ data["userSelectedCompanyId"] = this.userSelectedCompanyId;
38420
+ data["personnelNumber"] = this.personnelNumber;
38421
+ data["badgeId"] = this.badgeId;
38422
+ data["email"] = this.email;
38423
+ return data;
38424
+ }
38425
+ }
38426
+ export class ListErpUsers {
38427
+ constructor(data) {
38428
+ if (data) {
38429
+ for (var property in data) {
38430
+ if (data.hasOwnProperty(property))
38431
+ this[property] = data[property];
38432
+ }
38433
+ }
38434
+ }
38435
+ init(_data) {
38436
+ if (_data) {
38437
+ this.pageSize = _data["pageSize"];
38438
+ this.filter = _data["filter"];
38439
+ this.continuationToken = _data["continuationToken"];
38440
+ }
38441
+ }
38442
+ static fromJS(data) {
38443
+ data = typeof data === 'object' ? data : {};
38444
+ let result = new ListErpUsers();
38445
+ result.init(data);
38446
+ return result;
38447
+ }
38448
+ toJSON(data) {
38449
+ data = typeof data === 'object' ? data : {};
38450
+ data["pageSize"] = this.pageSize;
38451
+ data["filter"] = this.filter;
38452
+ data["continuationToken"] = this.continuationToken;
38453
+ return data;
38454
+ }
38455
+ }
38456
+ export class ProductionPoolDto {
38457
+ constructor(data) {
38458
+ if (data) {
38459
+ for (var property in data) {
38460
+ if (data.hasOwnProperty(property))
38461
+ this[property] = data[property];
38462
+ }
38463
+ }
38464
+ }
38465
+ init(_data) {
38466
+ if (_data) {
38467
+ this.name = _data["name"];
38468
+ this.contactPersonUpn = _data["contactPersonUpn"];
38469
+ this.id = _data["id"];
38470
+ }
38471
+ }
38472
+ static fromJS(data) {
38473
+ data = typeof data === 'object' ? data : {};
38474
+ let result = new ProductionPoolDto();
38475
+ result.init(data);
38476
+ return result;
38477
+ }
38478
+ toJSON(data) {
38479
+ data = typeof data === 'object' ? data : {};
38480
+ data["name"] = this.name;
38481
+ data["contactPersonUpn"] = this.contactPersonUpn;
38482
+ data["id"] = this.id;
38483
+ return data;
38484
+ }
38485
+ }
38486
+ export class SetProductionPoolContactPerson {
38487
+ constructor(data) {
38488
+ if (data) {
38489
+ for (var property in data) {
38490
+ if (data.hasOwnProperty(property))
38491
+ this[property] = data[property];
38492
+ }
38493
+ }
38494
+ }
38495
+ init(_data) {
38496
+ if (_data) {
38497
+ this.poolId = _data["poolId"];
38498
+ this.contactPersonUpn = _data["contactPersonUpn"];
38499
+ }
38500
+ }
38501
+ static fromJS(data) {
38502
+ data = typeof data === 'object' ? data : {};
38503
+ let result = new SetProductionPoolContactPerson();
38504
+ result.init(data);
38505
+ return result;
38506
+ }
38507
+ toJSON(data) {
38508
+ data = typeof data === 'object' ? data : {};
38509
+ data["poolId"] = this.poolId;
38510
+ data["contactPersonUpn"] = this.contactPersonUpn;
38511
+ return data;
38512
+ }
38513
+ }
38176
38514
  export class UpsertWorkorder {
38177
38515
  constructor(data) {
38178
38516
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20240820.0.10068",
3
+ "version": "20240823.0.10114",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -19170,6 +19170,158 @@ export class CustomerOrdersClient extends AuthorizedApiBase implements ICustomer
19170
19170
  }
19171
19171
  }
19172
19172
 
19173
+ export interface IErpUsersClient {
19174
+
19175
+ listUsers(request: ListErpUsers | undefined): Promise<PagedResultOfErpUserDto>;
19176
+ }
19177
+
19178
+ export class ErpUsersClient extends AuthorizedApiBase implements IErpUsersClient {
19179
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
19180
+ private baseUrl: string;
19181
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
19182
+
19183
+ constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
19184
+ super(configuration);
19185
+ this.http = http ? http : window as any;
19186
+ this.baseUrl = baseUrl ?? "";
19187
+ }
19188
+
19189
+ listUsers(request: ListErpUsers | undefined): Promise<PagedResultOfErpUserDto> {
19190
+ let url_ = this.baseUrl + "/erp/users/list";
19191
+ url_ = url_.replace(/[?&]$/, "");
19192
+
19193
+ const content_ = JSON.stringify(request);
19194
+
19195
+ let options_: RequestInit = {
19196
+ body: content_,
19197
+ method: "POST",
19198
+ headers: {
19199
+ "Content-Type": "application/json",
19200
+ "Accept": "application/json"
19201
+ }
19202
+ };
19203
+
19204
+ return this.transformOptions(options_).then(transformedOptions_ => {
19205
+ return this.http.fetch(url_, transformedOptions_);
19206
+ }).then((_response: Response) => {
19207
+ return this.processListUsers(_response);
19208
+ });
19209
+ }
19210
+
19211
+ protected processListUsers(response: Response): Promise<PagedResultOfErpUserDto> {
19212
+ const status = response.status;
19213
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
19214
+ if (status === 200) {
19215
+ return response.text().then((_responseText) => {
19216
+ let result200: any = null;
19217
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
19218
+ result200 = PagedResultOfErpUserDto.fromJS(resultData200);
19219
+ return result200;
19220
+ });
19221
+ } else if (status !== 200 && status !== 204) {
19222
+ return response.text().then((_responseText) => {
19223
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
19224
+ });
19225
+ }
19226
+ return Promise.resolve<PagedResultOfErpUserDto>(null as any);
19227
+ }
19228
+ }
19229
+
19230
+ export interface IProductionPoolsClient {
19231
+
19232
+ listProductionPools(): Promise<ProductionPoolDto[]>;
19233
+
19234
+ setProductionPoolContactPerson(request: SetProductionPoolContactPerson): Promise<void>;
19235
+ }
19236
+
19237
+ export class ProductionPoolsClient extends AuthorizedApiBase implements IProductionPoolsClient {
19238
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
19239
+ private baseUrl: string;
19240
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
19241
+
19242
+ constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
19243
+ super(configuration);
19244
+ this.http = http ? http : window as any;
19245
+ this.baseUrl = baseUrl ?? "";
19246
+ }
19247
+
19248
+ listProductionPools(): Promise<ProductionPoolDto[]> {
19249
+ let url_ = this.baseUrl + "/erp/productionpools";
19250
+ url_ = url_.replace(/[?&]$/, "");
19251
+
19252
+ let options_: RequestInit = {
19253
+ method: "GET",
19254
+ headers: {
19255
+ "Accept": "application/json"
19256
+ }
19257
+ };
19258
+
19259
+ return this.transformOptions(options_).then(transformedOptions_ => {
19260
+ return this.http.fetch(url_, transformedOptions_);
19261
+ }).then((_response: Response) => {
19262
+ return this.processListProductionPools(_response);
19263
+ });
19264
+ }
19265
+
19266
+ protected processListProductionPools(response: Response): Promise<ProductionPoolDto[]> {
19267
+ const status = response.status;
19268
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
19269
+ if (status === 200) {
19270
+ return response.text().then((_responseText) => {
19271
+ let result200: any = null;
19272
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
19273
+ if (Array.isArray(resultData200)) {
19274
+ result200 = [] as any;
19275
+ for (let item of resultData200)
19276
+ result200!.push(ProductionPoolDto.fromJS(item));
19277
+ }
19278
+ return result200;
19279
+ });
19280
+ } else if (status !== 200 && status !== 204) {
19281
+ return response.text().then((_responseText) => {
19282
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
19283
+ });
19284
+ }
19285
+ return Promise.resolve<ProductionPoolDto[]>(null as any);
19286
+ }
19287
+
19288
+ setProductionPoolContactPerson(request: SetProductionPoolContactPerson): Promise<void> {
19289
+ let url_ = this.baseUrl + "/erp/productionpools";
19290
+ url_ = url_.replace(/[?&]$/, "");
19291
+
19292
+ const content_ = JSON.stringify(request);
19293
+
19294
+ let options_: RequestInit = {
19295
+ body: content_,
19296
+ method: "PATCH",
19297
+ headers: {
19298
+ "Content-Type": "application/json",
19299
+ }
19300
+ };
19301
+
19302
+ return this.transformOptions(options_).then(transformedOptions_ => {
19303
+ return this.http.fetch(url_, transformedOptions_);
19304
+ }).then((_response: Response) => {
19305
+ return this.processSetProductionPoolContactPerson(_response);
19306
+ });
19307
+ }
19308
+
19309
+ protected processSetProductionPoolContactPerson(response: Response): Promise<void> {
19310
+ const status = response.status;
19311
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
19312
+ if (status === 200) {
19313
+ return response.text().then((_responseText) => {
19314
+ return;
19315
+ });
19316
+ } else if (status !== 200 && status !== 204) {
19317
+ return response.text().then((_responseText) => {
19318
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
19319
+ });
19320
+ }
19321
+ return Promise.resolve<void>(null as any);
19322
+ }
19323
+ }
19324
+
19173
19325
  export interface IResourcesClient {
19174
19326
 
19175
19327
  listAllMachines(): Promise<MachineDto[]>;
@@ -39771,6 +39923,9 @@ export class NonConformanceDto implements INonConformanceDto {
39771
39923
  closed!: boolean;
39772
39924
  approved!: boolean;
39773
39925
  url?: string | null;
39926
+ rootCause?: NonConformanceAttachmentDto | null;
39927
+ decision?: NonConformanceAttachmentDto | null;
39928
+ correctiveAction?: NonConformanceAttachmentDto | null;
39774
39929
 
39775
39930
  constructor(data?: INonConformanceDto) {
39776
39931
  if (data) {
@@ -39798,6 +39953,9 @@ export class NonConformanceDto implements INonConformanceDto {
39798
39953
  this.closed = _data["closed"];
39799
39954
  this.approved = _data["approved"];
39800
39955
  this.url = _data["url"];
39956
+ this.rootCause = _data["rootCause"] ? NonConformanceAttachmentDto.fromJS(_data["rootCause"]) : <any>undefined;
39957
+ this.decision = _data["decision"] ? NonConformanceAttachmentDto.fromJS(_data["decision"]) : <any>undefined;
39958
+ this.correctiveAction = _data["correctiveAction"] ? NonConformanceAttachmentDto.fromJS(_data["correctiveAction"]) : <any>undefined;
39801
39959
  }
39802
39960
  }
39803
39961
 
@@ -39825,6 +39983,9 @@ export class NonConformanceDto implements INonConformanceDto {
39825
39983
  data["closed"] = this.closed;
39826
39984
  data["approved"] = this.approved;
39827
39985
  data["url"] = this.url;
39986
+ data["rootCause"] = this.rootCause ? this.rootCause.toJSON() : <any>undefined;
39987
+ data["decision"] = this.decision ? this.decision.toJSON() : <any>undefined;
39988
+ data["correctiveAction"] = this.correctiveAction ? this.correctiveAction.toJSON() : <any>undefined;
39828
39989
  return data;
39829
39990
  }
39830
39991
  }
@@ -39845,10 +40006,61 @@ export interface INonConformanceDto {
39845
40006
  closed: boolean;
39846
40007
  approved: boolean;
39847
40008
  url?: string | null;
40009
+ rootCause?: NonConformanceAttachmentDto | null;
40010
+ decision?: NonConformanceAttachmentDto | null;
40011
+ correctiveAction?: NonConformanceAttachmentDto | null;
39848
40012
  }
39849
40013
 
39850
40014
  export type NonConformanceType = 1;
39851
40015
 
40016
+ export class NonConformanceAttachmentDto implements INonConformanceAttachmentDto {
40017
+ title?: string | null;
40018
+ description?: string | null;
40019
+ created?: Date;
40020
+ modified?: Date | null;
40021
+
40022
+ constructor(data?: INonConformanceAttachmentDto) {
40023
+ if (data) {
40024
+ for (var property in data) {
40025
+ if (data.hasOwnProperty(property))
40026
+ (<any>this)[property] = (<any>data)[property];
40027
+ }
40028
+ }
40029
+ }
40030
+
40031
+ init(_data?: any) {
40032
+ if (_data) {
40033
+ this.title = _data["title"];
40034
+ this.description = _data["description"];
40035
+ this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
40036
+ this.modified = _data["modified"] ? new Date(_data["modified"].toString()) : <any>undefined;
40037
+ }
40038
+ }
40039
+
40040
+ static fromJS(data: any): NonConformanceAttachmentDto {
40041
+ data = typeof data === 'object' ? data : {};
40042
+ let result = new NonConformanceAttachmentDto();
40043
+ result.init(data);
40044
+ return result;
40045
+ }
40046
+
40047
+ toJSON(data?: any) {
40048
+ data = typeof data === 'object' ? data : {};
40049
+ data["title"] = this.title;
40050
+ data["description"] = this.description;
40051
+ data["created"] = this.created ? this.created.toISOString() : <any>undefined;
40052
+ data["modified"] = this.modified ? this.modified.toISOString() : <any>undefined;
40053
+ return data;
40054
+ }
40055
+ }
40056
+
40057
+ export interface INonConformanceAttachmentDto {
40058
+ title?: string | null;
40059
+ description?: string | null;
40060
+ created?: Date;
40061
+ modified?: Date | null;
40062
+ }
40063
+
39852
40064
  export class MaterialPickListResultDto implements IMaterialPickListResultDto {
39853
40065
  results!: MaterialPickListResultEntryDto[];
39854
40066
 
@@ -48973,6 +49185,249 @@ export interface ICreateCustomerMapping {
48973
49185
  newCustomerId: string;
48974
49186
  }
48975
49187
 
49188
+ export class PagedResultOfErpUserDto implements IPagedResultOfErpUserDto {
49189
+ results!: ErpUserDto[];
49190
+ continuationToken?: string | null;
49191
+
49192
+ constructor(data?: IPagedResultOfErpUserDto) {
49193
+ if (data) {
49194
+ for (var property in data) {
49195
+ if (data.hasOwnProperty(property))
49196
+ (<any>this)[property] = (<any>data)[property];
49197
+ }
49198
+ }
49199
+ if (!data) {
49200
+ this.results = [];
49201
+ }
49202
+ }
49203
+
49204
+ init(_data?: any) {
49205
+ if (_data) {
49206
+ if (Array.isArray(_data["results"])) {
49207
+ this.results = [] as any;
49208
+ for (let item of _data["results"])
49209
+ this.results!.push(ErpUserDto.fromJS(item));
49210
+ }
49211
+ this.continuationToken = _data["continuationToken"];
49212
+ }
49213
+ }
49214
+
49215
+ static fromJS(data: any): PagedResultOfErpUserDto {
49216
+ data = typeof data === 'object' ? data : {};
49217
+ let result = new PagedResultOfErpUserDto();
49218
+ result.init(data);
49219
+ return result;
49220
+ }
49221
+
49222
+ toJSON(data?: any) {
49223
+ data = typeof data === 'object' ? data : {};
49224
+ if (Array.isArray(this.results)) {
49225
+ data["results"] = [];
49226
+ for (let item of this.results)
49227
+ data["results"].push(item.toJSON());
49228
+ }
49229
+ data["continuationToken"] = this.continuationToken;
49230
+ return data;
49231
+ }
49232
+ }
49233
+
49234
+ export interface IPagedResultOfErpUserDto {
49235
+ results: ErpUserDto[];
49236
+ continuationToken?: string | null;
49237
+ }
49238
+
49239
+ export class ErpUserDto implements IErpUserDto {
49240
+ azureAdObjectId?: string | null;
49241
+ name?: string | null;
49242
+ upn!: string;
49243
+ companyId?: string | null;
49244
+ userSelectedCompanyId?: string | null;
49245
+ personnelNumber?: string | null;
49246
+ badgeId?: string | null;
49247
+ email?: string | null;
49248
+
49249
+ constructor(data?: IErpUserDto) {
49250
+ if (data) {
49251
+ for (var property in data) {
49252
+ if (data.hasOwnProperty(property))
49253
+ (<any>this)[property] = (<any>data)[property];
49254
+ }
49255
+ }
49256
+ }
49257
+
49258
+ init(_data?: any) {
49259
+ if (_data) {
49260
+ this.azureAdObjectId = _data["azureAdObjectId"];
49261
+ this.name = _data["name"];
49262
+ this.upn = _data["upn"];
49263
+ this.companyId = _data["companyId"];
49264
+ this.userSelectedCompanyId = _data["userSelectedCompanyId"];
49265
+ this.personnelNumber = _data["personnelNumber"];
49266
+ this.badgeId = _data["badgeId"];
49267
+ this.email = _data["email"];
49268
+ }
49269
+ }
49270
+
49271
+ static fromJS(data: any): ErpUserDto {
49272
+ data = typeof data === 'object' ? data : {};
49273
+ let result = new ErpUserDto();
49274
+ result.init(data);
49275
+ return result;
49276
+ }
49277
+
49278
+ toJSON(data?: any) {
49279
+ data = typeof data === 'object' ? data : {};
49280
+ data["azureAdObjectId"] = this.azureAdObjectId;
49281
+ data["name"] = this.name;
49282
+ data["upn"] = this.upn;
49283
+ data["companyId"] = this.companyId;
49284
+ data["userSelectedCompanyId"] = this.userSelectedCompanyId;
49285
+ data["personnelNumber"] = this.personnelNumber;
49286
+ data["badgeId"] = this.badgeId;
49287
+ data["email"] = this.email;
49288
+ return data;
49289
+ }
49290
+ }
49291
+
49292
+ export interface IErpUserDto {
49293
+ azureAdObjectId?: string | null;
49294
+ name?: string | null;
49295
+ upn: string;
49296
+ companyId?: string | null;
49297
+ userSelectedCompanyId?: string | null;
49298
+ personnelNumber?: string | null;
49299
+ badgeId?: string | null;
49300
+ email?: string | null;
49301
+ }
49302
+
49303
+ export class ListErpUsers implements IListErpUsers {
49304
+ pageSize?: number;
49305
+ filter?: string | null;
49306
+ continuationToken?: string | null;
49307
+
49308
+ constructor(data?: IListErpUsers) {
49309
+ if (data) {
49310
+ for (var property in data) {
49311
+ if (data.hasOwnProperty(property))
49312
+ (<any>this)[property] = (<any>data)[property];
49313
+ }
49314
+ }
49315
+ }
49316
+
49317
+ init(_data?: any) {
49318
+ if (_data) {
49319
+ this.pageSize = _data["pageSize"];
49320
+ this.filter = _data["filter"];
49321
+ this.continuationToken = _data["continuationToken"];
49322
+ }
49323
+ }
49324
+
49325
+ static fromJS(data: any): ListErpUsers {
49326
+ data = typeof data === 'object' ? data : {};
49327
+ let result = new ListErpUsers();
49328
+ result.init(data);
49329
+ return result;
49330
+ }
49331
+
49332
+ toJSON(data?: any) {
49333
+ data = typeof data === 'object' ? data : {};
49334
+ data["pageSize"] = this.pageSize;
49335
+ data["filter"] = this.filter;
49336
+ data["continuationToken"] = this.continuationToken;
49337
+ return data;
49338
+ }
49339
+ }
49340
+
49341
+ export interface IListErpUsers {
49342
+ pageSize?: number;
49343
+ filter?: string | null;
49344
+ continuationToken?: string | null;
49345
+ }
49346
+
49347
+ export class ProductionPoolDto implements IProductionPoolDto {
49348
+ name!: string;
49349
+ contactPersonUpn?: string | null;
49350
+ id?: string;
49351
+
49352
+ constructor(data?: IProductionPoolDto) {
49353
+ if (data) {
49354
+ for (var property in data) {
49355
+ if (data.hasOwnProperty(property))
49356
+ (<any>this)[property] = (<any>data)[property];
49357
+ }
49358
+ }
49359
+ }
49360
+
49361
+ init(_data?: any) {
49362
+ if (_data) {
49363
+ this.name = _data["name"];
49364
+ this.contactPersonUpn = _data["contactPersonUpn"];
49365
+ this.id = _data["id"];
49366
+ }
49367
+ }
49368
+
49369
+ static fromJS(data: any): ProductionPoolDto {
49370
+ data = typeof data === 'object' ? data : {};
49371
+ let result = new ProductionPoolDto();
49372
+ result.init(data);
49373
+ return result;
49374
+ }
49375
+
49376
+ toJSON(data?: any) {
49377
+ data = typeof data === 'object' ? data : {};
49378
+ data["name"] = this.name;
49379
+ data["contactPersonUpn"] = this.contactPersonUpn;
49380
+ data["id"] = this.id;
49381
+ return data;
49382
+ }
49383
+ }
49384
+
49385
+ export interface IProductionPoolDto {
49386
+ name: string;
49387
+ contactPersonUpn?: string | null;
49388
+ id?: string;
49389
+ }
49390
+
49391
+ export class SetProductionPoolContactPerson implements ISetProductionPoolContactPerson {
49392
+ poolId!: string;
49393
+ contactPersonUpn?: string | null;
49394
+
49395
+ constructor(data?: ISetProductionPoolContactPerson) {
49396
+ if (data) {
49397
+ for (var property in data) {
49398
+ if (data.hasOwnProperty(property))
49399
+ (<any>this)[property] = (<any>data)[property];
49400
+ }
49401
+ }
49402
+ }
49403
+
49404
+ init(_data?: any) {
49405
+ if (_data) {
49406
+ this.poolId = _data["poolId"];
49407
+ this.contactPersonUpn = _data["contactPersonUpn"];
49408
+ }
49409
+ }
49410
+
49411
+ static fromJS(data: any): SetProductionPoolContactPerson {
49412
+ data = typeof data === 'object' ? data : {};
49413
+ let result = new SetProductionPoolContactPerson();
49414
+ result.init(data);
49415
+ return result;
49416
+ }
49417
+
49418
+ toJSON(data?: any) {
49419
+ data = typeof data === 'object' ? data : {};
49420
+ data["poolId"] = this.poolId;
49421
+ data["contactPersonUpn"] = this.contactPersonUpn;
49422
+ return data;
49423
+ }
49424
+ }
49425
+
49426
+ export interface ISetProductionPoolContactPerson {
49427
+ poolId: string;
49428
+ contactPersonUpn?: string | null;
49429
+ }
49430
+
48976
49431
  export class UpsertWorkorder implements IUpsertWorkorder {
48977
49432
  workorder!: string;
48978
49433
  part!: PartDto;