@ignos/api-client 20240318.0.8999 → 20240319.0.9016

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.
@@ -645,6 +645,9 @@ export interface IMachinesClient {
645
645
  getMachineErpData(id: number): Promise<MachineErpDataDto>;
646
646
  getMachineUtilizationSummary(): Promise<UtilizationSummaryDto>;
647
647
  listCurrentMachineOperators(machineExternalId: string | null | undefined, operatorNameQuery: string | null | undefined): Promise<OperatorAndMachineDto[]>;
648
+ createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<FileResponse>;
649
+ createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<FileResponse>;
650
+ createResourceWithMachine(request: CreateResourceWithMachine): Promise<FileResponse>;
648
651
  }
649
652
  export declare class MachinesClient extends AuthorizedApiBase implements IMachinesClient {
650
653
  private http;
@@ -677,6 +680,12 @@ export declare class MachinesClient extends AuthorizedApiBase implements IMachin
677
680
  protected processGetMachineUtilizationSummary(response: Response): Promise<UtilizationSummaryDto>;
678
681
  listCurrentMachineOperators(machineExternalId: string | null | undefined, operatorNameQuery: string | null | undefined): Promise<OperatorAndMachineDto[]>;
679
682
  protected processListCurrentMachineOperators(response: Response): Promise<OperatorAndMachineDto[]>;
683
+ createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<FileResponse>;
684
+ protected processCreateMachineWithoutResource(response: Response): Promise<FileResponse>;
685
+ createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<FileResponse>;
686
+ protected processCreateResourceWithoutMachine(response: Response): Promise<FileResponse>;
687
+ createResourceWithMachine(request: CreateResourceWithMachine): Promise<FileResponse>;
688
+ protected processCreateResourceWithMachine(response: Response): Promise<FileResponse>;
680
689
  }
681
690
  export interface ILinksClient {
682
691
  getAllLinks(scope: string | null | undefined): Promise<LinkDto[]>;
@@ -4907,6 +4916,86 @@ export interface IEmployeeDto {
4907
4916
  upn?: string | null;
4908
4917
  azureAdObjectId?: string | null;
4909
4918
  }
4919
+ export declare class CreateMachineWithoutResource implements ICreateMachineWithoutResource {
4920
+ id: string;
4921
+ name: string;
4922
+ description: string;
4923
+ type: string;
4924
+ displayName?: string | null;
4925
+ manufacturer?: string | null;
4926
+ location?: string | null;
4927
+ serialNumber?: string | null;
4928
+ year?: string | null;
4929
+ model?: string | null;
4930
+ constructor(data?: ICreateMachineWithoutResource);
4931
+ init(_data?: any): void;
4932
+ static fromJS(data: any): CreateMachineWithoutResource;
4933
+ toJSON(data?: any): any;
4934
+ }
4935
+ export interface ICreateMachineWithoutResource {
4936
+ id: string;
4937
+ name: string;
4938
+ description: string;
4939
+ type: string;
4940
+ displayName?: string | null;
4941
+ manufacturer?: string | null;
4942
+ location?: string | null;
4943
+ serialNumber?: string | null;
4944
+ year?: string | null;
4945
+ model?: string | null;
4946
+ }
4947
+ export declare class CreateResourceWithoutMachine implements ICreateResourceWithoutMachine {
4948
+ id: string;
4949
+ name: string;
4950
+ type: string;
4951
+ description?: string | null;
4952
+ displayName?: string | null;
4953
+ constructor(data?: ICreateResourceWithoutMachine);
4954
+ init(_data?: any): void;
4955
+ static fromJS(data: any): CreateResourceWithoutMachine;
4956
+ toJSON(data?: any): any;
4957
+ }
4958
+ export interface ICreateResourceWithoutMachine {
4959
+ id: string;
4960
+ name: string;
4961
+ type: string;
4962
+ description?: string | null;
4963
+ displayName?: string | null;
4964
+ }
4965
+ export declare class CreateResourceWithMachine implements ICreateResourceWithMachine {
4966
+ resourceId: string;
4967
+ resourceName: string;
4968
+ resourceDescription?: string | null;
4969
+ displayName?: string | null;
4970
+ machineId: string;
4971
+ machineName: string;
4972
+ machineDescription: string;
4973
+ machineType: string;
4974
+ manufacturer?: string | null;
4975
+ location?: string | null;
4976
+ serialNumber?: string | null;
4977
+ year?: string | null;
4978
+ model?: string | null;
4979
+ constructor(data?: ICreateResourceWithMachine);
4980
+ init(_data?: any): void;
4981
+ static fromJS(data: any): CreateResourceWithMachine;
4982
+ toJSON(data?: any): any;
4983
+ }
4984
+ export interface ICreateResourceWithMachine {
4985
+ resourceId: string;
4986
+ resourceName: string;
4987
+ resourceDescription?: string | null;
4988
+ displayName?: string | null;
4989
+ machineId: string;
4990
+ machineName: string;
4991
+ machineDescription: string;
4992
+ machineType: string;
4993
+ manufacturer?: string | null;
4994
+ location?: string | null;
4995
+ serialNumber?: string | null;
4996
+ year?: string | null;
4997
+ model?: string | null;
4998
+ }
4910
4999
  export declare class LinkDto implements ILinkDto {
4911
5000
  id: string;
4912
5001
  uri: string;
@@ -7942,6 +8031,7 @@ export interface IActiveWorkDto {
7942
8031
  operation: ProductionScheduleOperationDto;
7943
8032
  }
7944
8033
  export declare class CurrentWorkDto implements ICurrentWorkDto {
8034
+ resourceId: string;
7945
8035
  upn?: string | null;
7946
8036
  personnelNumber: string;
7947
8037
  active: boolean;
@@ -7956,6 +8046,7 @@ export declare class CurrentWorkDto implements ICurrentWorkDto {
7956
8046
  toJSON(data?: any): any;
7957
8047
  }
7958
8048
  export interface ICurrentWorkDto {
8049
+ resourceId: string;
7959
8050
  upn?: string | null;
7960
8051
  personnelNumber: string;
7961
8052
  active: boolean;
@@ -5250,6 +5250,141 @@ export class MachinesClient extends AuthorizedApiBase {
5250
5250
  }
5251
5251
  return Promise.resolve(null);
5252
5252
  }
5253
+ createMachineWithoutResource(request) {
5254
+ let url_ = this.baseUrl + "/machines/machine-without-resource";
5255
+ url_ = url_.replace(/[?&]$/, "");
5256
+ const content_ = JSON.stringify(request);
5257
+ let options_ = {
5258
+ body: content_,
5259
+ method: "POST",
5260
+ headers: {
5261
+ "Content-Type": "application/json",
5262
+ "Accept": "application/octet-stream"
5263
+ }
5264
+ };
5265
+ return this.transformOptions(options_).then(transformedOptions_ => {
5266
+ return this.http.fetch(url_, transformedOptions_);
5267
+ }).then((_response) => {
5268
+ return this.processCreateMachineWithoutResource(_response);
5269
+ });
5270
+ }
5271
+ processCreateMachineWithoutResource(response) {
5272
+ const status = response.status;
5273
+ let _headers = {};
5274
+ if (response.headers && response.headers.forEach) {
5275
+ response.headers.forEach((v, k) => _headers[k] = v);
5276
+ }
5277
+ ;
5278
+ if (status === 200 || status === 206) {
5279
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5280
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5281
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5282
+ if (fileName) {
5283
+ fileName = decodeURIComponent(fileName);
5284
+ }
5285
+ else {
5286
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5287
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5288
+ }
5289
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5290
+ }
5291
+ else if (status !== 200 && status !== 204) {
5292
+ return response.text().then((_responseText) => {
5293
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5294
+ });
5295
+ }
5296
+ return Promise.resolve(null);
5297
+ }
5298
+ createResourceWithoutMachine(request) {
5299
+ let url_ = this.baseUrl + "/machines/resource-without-machine";
5300
+ url_ = url_.replace(/[?&]$/, "");
5301
+ const content_ = JSON.stringify(request);
5302
+ let options_ = {
5303
+ body: content_,
5304
+ method: "POST",
5305
+ headers: {
5306
+ "Content-Type": "application/json",
5307
+ "Accept": "application/octet-stream"
5308
+ }
5309
+ };
5310
+ return this.transformOptions(options_).then(transformedOptions_ => {
5311
+ return this.http.fetch(url_, transformedOptions_);
5312
+ }).then((_response) => {
5313
+ return this.processCreateResourceWithoutMachine(_response);
5314
+ });
5315
+ }
5316
+ processCreateResourceWithoutMachine(response) {
5317
+ const status = response.status;
5318
+ let _headers = {};
5319
+ if (response.headers && response.headers.forEach) {
5320
+ response.headers.forEach((v, k) => _headers[k] = v);
5321
+ }
5322
+ ;
5323
+ if (status === 200 || status === 206) {
5324
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5325
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5326
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5327
+ if (fileName) {
5328
+ fileName = decodeURIComponent(fileName);
5329
+ }
5330
+ else {
5331
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5332
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5333
+ }
5334
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5335
+ }
5336
+ else if (status !== 200 && status !== 204) {
5337
+ return response.text().then((_responseText) => {
5338
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5339
+ });
5340
+ }
5341
+ return Promise.resolve(null);
5342
+ }
5343
+ createResourceWithMachine(request) {
5344
+ let url_ = this.baseUrl + "/machines/resource-with-machine";
5345
+ url_ = url_.replace(/[?&]$/, "");
5346
+ const content_ = JSON.stringify(request);
5347
+ let options_ = {
5348
+ body: content_,
5349
+ method: "POST",
5350
+ headers: {
5351
+ "Content-Type": "application/json",
5352
+ "Accept": "application/octet-stream"
5353
+ }
5354
+ };
5355
+ return this.transformOptions(options_).then(transformedOptions_ => {
5356
+ return this.http.fetch(url_, transformedOptions_);
5357
+ }).then((_response) => {
5358
+ return this.processCreateResourceWithMachine(_response);
5359
+ });
5360
+ }
5361
+ processCreateResourceWithMachine(response) {
5362
+ const status = response.status;
5363
+ let _headers = {};
5364
+ if (response.headers && response.headers.forEach) {
5365
+ response.headers.forEach((v, k) => _headers[k] = v);
5366
+ }
5367
+ ;
5368
+ if (status === 200 || status === 206) {
5369
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5370
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5371
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5372
+ if (fileName) {
5373
+ fileName = decodeURIComponent(fileName);
5374
+ }
5375
+ else {
5376
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5377
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5378
+ }
5379
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5380
+ }
5381
+ else if (status !== 200 && status !== 204) {
5382
+ return response.text().then((_responseText) => {
5383
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5384
+ });
5385
+ }
5386
+ return Promise.resolve(null);
5387
+ }
5253
5388
  }
5254
5389
  export class LinksClient extends AuthorizedApiBase {
5255
5390
  constructor(configuration, baseUrl, http) {
@@ -23028,6 +23163,134 @@ export class EmployeeDto {
23028
23163
  return data;
23029
23164
  }
23030
23165
  }
23166
+ export class CreateMachineWithoutResource {
23167
+ constructor(data) {
23168
+ if (data) {
23169
+ for (var property in data) {
23170
+ if (data.hasOwnProperty(property))
23171
+ this[property] = data[property];
23172
+ }
23173
+ }
23174
+ }
23175
+ init(_data) {
23176
+ if (_data) {
23177
+ this.id = _data["id"];
23178
+ this.name = _data["name"];
23179
+ this.description = _data["description"];
23180
+ this.type = _data["type"];
23181
+ this.displayName = _data["displayName"];
23182
+ this.manufacturer = _data["manufacturer"];
23183
+ this.location = _data["location"];
23184
+ this.serialNumber = _data["serialNumber"];
23185
+ this.year = _data["year"];
23186
+ this.model = _data["model"];
23187
+ }
23188
+ }
23189
+ static fromJS(data) {
23190
+ data = typeof data === 'object' ? data : {};
23191
+ let result = new CreateMachineWithoutResource();
23192
+ result.init(data);
23193
+ return result;
23194
+ }
23195
+ toJSON(data) {
23196
+ data = typeof data === 'object' ? data : {};
23197
+ data["id"] = this.id;
23198
+ data["name"] = this.name;
23199
+ data["description"] = this.description;
23200
+ data["type"] = this.type;
23201
+ data["displayName"] = this.displayName;
23202
+ data["manufacturer"] = this.manufacturer;
23203
+ data["location"] = this.location;
23204
+ data["serialNumber"] = this.serialNumber;
23205
+ data["year"] = this.year;
23206
+ data["model"] = this.model;
23207
+ return data;
23208
+ }
23209
+ }
23210
+ export class CreateResourceWithoutMachine {
23211
+ constructor(data) {
23212
+ if (data) {
23213
+ for (var property in data) {
23214
+ if (data.hasOwnProperty(property))
23215
+ this[property] = data[property];
23216
+ }
23217
+ }
23218
+ }
23219
+ init(_data) {
23220
+ if (_data) {
23221
+ this.id = _data["id"];
23222
+ this.name = _data["name"];
23223
+ this.type = _data["type"];
23224
+ this.description = _data["description"];
23225
+ this.displayName = _data["displayName"];
23226
+ }
23227
+ }
23228
+ static fromJS(data) {
23229
+ data = typeof data === 'object' ? data : {};
23230
+ let result = new CreateResourceWithoutMachine();
23231
+ result.init(data);
23232
+ return result;
23233
+ }
23234
+ toJSON(data) {
23235
+ data = typeof data === 'object' ? data : {};
23236
+ data["id"] = this.id;
23237
+ data["name"] = this.name;
23238
+ data["type"] = this.type;
23239
+ data["description"] = this.description;
23240
+ data["displayName"] = this.displayName;
23241
+ return data;
23242
+ }
23243
+ }
23244
+ export class CreateResourceWithMachine {
23245
+ constructor(data) {
23246
+ if (data) {
23247
+ for (var property in data) {
23248
+ if (data.hasOwnProperty(property))
23249
+ this[property] = data[property];
23250
+ }
23251
+ }
23252
+ }
23253
+ init(_data) {
23254
+ if (_data) {
23255
+ this.resourceId = _data["resourceId"];
23256
+ this.resourceName = _data["resourceName"];
23257
+ this.resourceDescription = _data["resourceDescription"];
23258
+ this.displayName = _data["displayName"];
23259
+ this.machineId = _data["machineId"];
23260
+ this.machineName = _data["machineName"];
23261
+ this.machineDescription = _data["machineDescription"];
23262
+ this.machineType = _data["machineType"];
23263
+ this.manufacturer = _data["manufacturer"];
23264
+ this.location = _data["location"];
23265
+ this.serialNumber = _data["serialNumber"];
23266
+ this.year = _data["year"];
23267
+ this.model = _data["model"];
23268
+ }
23269
+ }
23270
+ static fromJS(data) {
23271
+ data = typeof data === 'object' ? data : {};
23272
+ let result = new CreateResourceWithMachine();
23273
+ result.init(data);
23274
+ return result;
23275
+ }
23276
+ toJSON(data) {
23277
+ data = typeof data === 'object' ? data : {};
23278
+ data["resourceId"] = this.resourceId;
23279
+ data["resourceName"] = this.resourceName;
23280
+ data["resourceDescription"] = this.resourceDescription;
23281
+ data["displayName"] = this.displayName;
23282
+ data["machineId"] = this.machineId;
23283
+ data["machineName"] = this.machineName;
23284
+ data["machineDescription"] = this.machineDescription;
23285
+ data["machineType"] = this.machineType;
23286
+ data["manufacturer"] = this.manufacturer;
23287
+ data["location"] = this.location;
23288
+ data["serialNumber"] = this.serialNumber;
23289
+ data["year"] = this.year;
23290
+ data["model"] = this.model;
23291
+ return data;
23292
+ }
23293
+ }
23031
23294
  export class LinkDto {
23032
23295
  constructor(data) {
23033
23296
  if (data) {
@@ -28893,6 +29156,7 @@ export class CurrentWorkDto {
28893
29156
  }
28894
29157
  init(_data) {
28895
29158
  if (_data) {
29159
+ this.resourceId = _data["resourceId"];
28896
29160
  this.upn = _data["upn"];
28897
29161
  this.personnelNumber = _data["personnelNumber"];
28898
29162
  this.active = _data["active"];
@@ -28911,6 +29175,7 @@ export class CurrentWorkDto {
28911
29175
  }
28912
29176
  toJSON(data) {
28913
29177
  data = typeof data === 'object' ? data : {};
29178
+ data["resourceId"] = this.resourceId;
28914
29179
  data["upn"] = this.upn;
28915
29180
  data["personnelNumber"] = this.personnelNumber;
28916
29181
  data["active"] = this.active;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20240318.0.8999",
3
+ "version": "20240319.0.9016",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -5128,6 +5128,12 @@ export interface IMachinesClient {
5128
5128
  getMachineUtilizationSummary(): Promise<UtilizationSummaryDto>;
5129
5129
 
5130
5130
  listCurrentMachineOperators(machineExternalId: string | null | undefined, operatorNameQuery: string | null | undefined): Promise<OperatorAndMachineDto[]>;
5131
+
5132
+ createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<FileResponse>;
5133
+
5134
+ createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<FileResponse>;
5135
+
5136
+ createResourceWithMachine(request: CreateResourceWithMachine): Promise<FileResponse>;
5131
5137
  }
5132
5138
 
5133
5139
  export class MachinesClient extends AuthorizedApiBase implements IMachinesClient {
@@ -5617,6 +5623,138 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
5617
5623
  }
5618
5624
  return Promise.resolve<OperatorAndMachineDto[]>(null as any);
5619
5625
  }
5626
+
5627
+ createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<FileResponse> {
5628
+ let url_ = this.baseUrl + "/machines/machine-without-resource";
5629
+ url_ = url_.replace(/[?&]$/, "");
5630
+
5631
+ const content_ = JSON.stringify(request);
5632
+
5633
+ let options_: RequestInit = {
5634
+ body: content_,
5635
+ method: "POST",
5636
+ headers: {
5637
+ "Content-Type": "application/json",
5638
+ "Accept": "application/octet-stream"
5639
+ }
5640
+ };
5641
+
5642
+ return this.transformOptions(options_).then(transformedOptions_ => {
5643
+ return this.http.fetch(url_, transformedOptions_);
5644
+ }).then((_response: Response) => {
5645
+ return this.processCreateMachineWithoutResource(_response);
5646
+ });
5647
+ }
5648
+
5649
+ protected processCreateMachineWithoutResource(response: Response): Promise<FileResponse> {
5650
+ const status = response.status;
5651
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5652
+ if (status === 200 || status === 206) {
5653
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5654
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5655
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5656
+ if (fileName) {
5657
+ fileName = decodeURIComponent(fileName);
5658
+ } else {
5659
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5660
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5661
+ }
5662
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5663
+ } else if (status !== 200 && status !== 204) {
5664
+ return response.text().then((_responseText) => {
5665
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5666
+ });
5667
+ }
5668
+ return Promise.resolve<FileResponse>(null as any);
5669
+ }
5670
+
5671
+ createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<FileResponse> {
5672
+ let url_ = this.baseUrl + "/machines/resource-without-machine";
5673
+ url_ = url_.replace(/[?&]$/, "");
5674
+
5675
+ const content_ = JSON.stringify(request);
5676
+
5677
+ let options_: RequestInit = {
5678
+ body: content_,
5679
+ method: "POST",
5680
+ headers: {
5681
+ "Content-Type": "application/json",
5682
+ "Accept": "application/octet-stream"
5683
+ }
5684
+ };
5685
+
5686
+ return this.transformOptions(options_).then(transformedOptions_ => {
5687
+ return this.http.fetch(url_, transformedOptions_);
5688
+ }).then((_response: Response) => {
5689
+ return this.processCreateResourceWithoutMachine(_response);
5690
+ });
5691
+ }
5692
+
5693
+ protected processCreateResourceWithoutMachine(response: Response): Promise<FileResponse> {
5694
+ const status = response.status;
5695
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5696
+ if (status === 200 || status === 206) {
5697
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5698
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5699
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5700
+ if (fileName) {
5701
+ fileName = decodeURIComponent(fileName);
5702
+ } else {
5703
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5704
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5705
+ }
5706
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5707
+ } else if (status !== 200 && status !== 204) {
5708
+ return response.text().then((_responseText) => {
5709
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5710
+ });
5711
+ }
5712
+ return Promise.resolve<FileResponse>(null as any);
5713
+ }
5714
+
5715
+ createResourceWithMachine(request: CreateResourceWithMachine): Promise<FileResponse> {
5716
+ let url_ = this.baseUrl + "/machines/resource-with-machine";
5717
+ url_ = url_.replace(/[?&]$/, "");
5718
+
5719
+ const content_ = JSON.stringify(request);
5720
+
5721
+ let options_: RequestInit = {
5722
+ body: content_,
5723
+ method: "POST",
5724
+ headers: {
5725
+ "Content-Type": "application/json",
5726
+ "Accept": "application/octet-stream"
5727
+ }
5728
+ };
5729
+
5730
+ return this.transformOptions(options_).then(transformedOptions_ => {
5731
+ return this.http.fetch(url_, transformedOptions_);
5732
+ }).then((_response: Response) => {
5733
+ return this.processCreateResourceWithMachine(_response);
5734
+ });
5735
+ }
5736
+
5737
+ protected processCreateResourceWithMachine(response: Response): Promise<FileResponse> {
5738
+ const status = response.status;
5739
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5740
+ if (status === 200 || status === 206) {
5741
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5742
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5743
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5744
+ if (fileName) {
5745
+ fileName = decodeURIComponent(fileName);
5746
+ } else {
5747
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5748
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5749
+ }
5750
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5751
+ } else if (status !== 200 && status !== 204) {
5752
+ return response.text().then((_responseText) => {
5753
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5754
+ });
5755
+ }
5756
+ return Promise.resolve<FileResponse>(null as any);
5757
+ }
5620
5758
  }
5621
5759
 
5622
5760
  export interface ILinksClient {
@@ -27027,6 +27165,214 @@ export interface IEmployeeDto {
27027
27165
  azureAdObjectId?: string | null;
27028
27166
  }
27029
27167
 
27168
+ export class CreateMachineWithoutResource implements ICreateMachineWithoutResource {
27169
+ id!: string;
27170
+ name!: string;
27171
+ description!: string;
27172
+ type!: string;
27173
+ displayName?: string | null;
27174
+ manufacturer?: string | null;
27175
+ location?: string | null;
27176
+ serialNumber?: string | null;
27177
+ year?: string | null;
27178
+ model?: string | null;
27179
+
27180
+ constructor(data?: ICreateMachineWithoutResource) {
27181
+ if (data) {
27182
+ for (var property in data) {
27183
+ if (data.hasOwnProperty(property))
27184
+ (<any>this)[property] = (<any>data)[property];
27185
+ }
27186
+ }
27187
+ }
27188
+
27189
+ init(_data?: any) {
27190
+ if (_data) {
27191
+ this.id = _data["id"];
27192
+ this.name = _data["name"];
27193
+ this.description = _data["description"];
27194
+ this.type = _data["type"];
27195
+ this.displayName = _data["displayName"];
27196
+ this.manufacturer = _data["manufacturer"];
27197
+ this.location = _data["location"];
27198
+ this.serialNumber = _data["serialNumber"];
27199
+ this.year = _data["year"];
27200
+ this.model = _data["model"];
27201
+ }
27202
+ }
27203
+
27204
+ static fromJS(data: any): CreateMachineWithoutResource {
27205
+ data = typeof data === 'object' ? data : {};
27206
+ let result = new CreateMachineWithoutResource();
27207
+ result.init(data);
27208
+ return result;
27209
+ }
27210
+
27211
+ toJSON(data?: any) {
27212
+ data = typeof data === 'object' ? data : {};
27213
+ data["id"] = this.id;
27214
+ data["name"] = this.name;
27215
+ data["description"] = this.description;
27216
+ data["type"] = this.type;
27217
+ data["displayName"] = this.displayName;
27218
+ data["manufacturer"] = this.manufacturer;
27219
+ data["location"] = this.location;
27220
+ data["serialNumber"] = this.serialNumber;
27221
+ data["year"] = this.year;
27222
+ data["model"] = this.model;
27223
+ return data;
27224
+ }
27225
+ }
27226
+
27227
+ export interface ICreateMachineWithoutResource {
27228
+ id: string;
27229
+ name: string;
27230
+ description: string;
27231
+ type: string;
27232
+ displayName?: string | null;
27233
+ manufacturer?: string | null;
27234
+ location?: string | null;
27235
+ serialNumber?: string | null;
27236
+ year?: string | null;
27237
+ model?: string | null;
27238
+ }
27239
+
27240
+ export class CreateResourceWithoutMachine implements ICreateResourceWithoutMachine {
27241
+ id!: string;
27242
+ name!: string;
27243
+ type!: string;
27244
+ description?: string | null;
27245
+ displayName?: string | null;
27246
+
27247
+ constructor(data?: ICreateResourceWithoutMachine) {
27248
+ if (data) {
27249
+ for (var property in data) {
27250
+ if (data.hasOwnProperty(property))
27251
+ (<any>this)[property] = (<any>data)[property];
27252
+ }
27253
+ }
27254
+ }
27255
+
27256
+ init(_data?: any) {
27257
+ if (_data) {
27258
+ this.id = _data["id"];
27259
+ this.name = _data["name"];
27260
+ this.type = _data["type"];
27261
+ this.description = _data["description"];
27262
+ this.displayName = _data["displayName"];
27263
+ }
27264
+ }
27265
+
27266
+ static fromJS(data: any): CreateResourceWithoutMachine {
27267
+ data = typeof data === 'object' ? data : {};
27268
+ let result = new CreateResourceWithoutMachine();
27269
+ result.init(data);
27270
+ return result;
27271
+ }
27272
+
27273
+ toJSON(data?: any) {
27274
+ data = typeof data === 'object' ? data : {};
27275
+ data["id"] = this.id;
27276
+ data["name"] = this.name;
27277
+ data["type"] = this.type;
27278
+ data["description"] = this.description;
27279
+ data["displayName"] = this.displayName;
27280
+ return data;
27281
+ }
27282
+ }
27283
+
27284
+ export interface ICreateResourceWithoutMachine {
27285
+ id: string;
27286
+ name: string;
27287
+ type: string;
27288
+ description?: string | null;
27289
+ displayName?: string | null;
27290
+ }
27291
+
27292
+ export class CreateResourceWithMachine implements ICreateResourceWithMachine {
27293
+ resourceId!: string;
27294
+ resourceName!: string;
27295
+ resourceDescription?: string | null;
27296
+ displayName?: string | null;
27297
+ machineId!: string;
27298
+ machineName!: string;
27299
+ machineDescription!: string;
27300
+ machineType!: string;
27301
+ manufacturer?: string | null;
27302
+ location?: string | null;
27303
+ serialNumber?: string | null;
27304
+ year?: string | null;
27305
+ model?: string | null;
27306
+
27307
+ constructor(data?: ICreateResourceWithMachine) {
27308
+ if (data) {
27309
+ for (var property in data) {
27310
+ if (data.hasOwnProperty(property))
27311
+ (<any>this)[property] = (<any>data)[property];
27312
+ }
27313
+ }
27314
+ }
27315
+
27316
+ init(_data?: any) {
27317
+ if (_data) {
27318
+ this.resourceId = _data["resourceId"];
27319
+ this.resourceName = _data["resourceName"];
27320
+ this.resourceDescription = _data["resourceDescription"];
27321
+ this.displayName = _data["displayName"];
27322
+ this.machineId = _data["machineId"];
27323
+ this.machineName = _data["machineName"];
27324
+ this.machineDescription = _data["machineDescription"];
27325
+ this.machineType = _data["machineType"];
27326
+ this.manufacturer = _data["manufacturer"];
27327
+ this.location = _data["location"];
27328
+ this.serialNumber = _data["serialNumber"];
27329
+ this.year = _data["year"];
27330
+ this.model = _data["model"];
27331
+ }
27332
+ }
27333
+
27334
+ static fromJS(data: any): CreateResourceWithMachine {
27335
+ data = typeof data === 'object' ? data : {};
27336
+ let result = new CreateResourceWithMachine();
27337
+ result.init(data);
27338
+ return result;
27339
+ }
27340
+
27341
+ toJSON(data?: any) {
27342
+ data = typeof data === 'object' ? data : {};
27343
+ data["resourceId"] = this.resourceId;
27344
+ data["resourceName"] = this.resourceName;
27345
+ data["resourceDescription"] = this.resourceDescription;
27346
+ data["displayName"] = this.displayName;
27347
+ data["machineId"] = this.machineId;
27348
+ data["machineName"] = this.machineName;
27349
+ data["machineDescription"] = this.machineDescription;
27350
+ data["machineType"] = this.machineType;
27351
+ data["manufacturer"] = this.manufacturer;
27352
+ data["location"] = this.location;
27353
+ data["serialNumber"] = this.serialNumber;
27354
+ data["year"] = this.year;
27355
+ data["model"] = this.model;
27356
+ return data;
27357
+ }
27358
+ }
27359
+
27360
+ export interface ICreateResourceWithMachine {
27361
+ resourceId: string;
27362
+ resourceName: string;
27363
+ resourceDescription?: string | null;
27364
+ displayName?: string | null;
27365
+ machineId: string;
27366
+ machineName: string;
27367
+ machineDescription: string;
27368
+ machineType: string;
27369
+ manufacturer?: string | null;
27370
+ location?: string | null;
27371
+ serialNumber?: string | null;
27372
+ year?: string | null;
27373
+ model?: string | null;
27374
+ }
27375
+
27030
27376
  export class LinkDto implements ILinkDto {
27031
27377
  id!: string;
27032
27378
  uri!: string;
@@ -35922,6 +36268,7 @@ export interface IActiveWorkDto {
35922
36268
  }
35923
36269
 
35924
36270
  export class CurrentWorkDto implements ICurrentWorkDto {
36271
+ resourceId!: string;
35925
36272
  upn?: string | null;
35926
36273
  personnelNumber!: string;
35927
36274
  active!: boolean;
@@ -35942,6 +36289,7 @@ export class CurrentWorkDto implements ICurrentWorkDto {
35942
36289
 
35943
36290
  init(_data?: any) {
35944
36291
  if (_data) {
36292
+ this.resourceId = _data["resourceId"];
35945
36293
  this.upn = _data["upn"];
35946
36294
  this.personnelNumber = _data["personnelNumber"];
35947
36295
  this.active = _data["active"];
@@ -35962,6 +36310,7 @@ export class CurrentWorkDto implements ICurrentWorkDto {
35962
36310
 
35963
36311
  toJSON(data?: any) {
35964
36312
  data = typeof data === 'object' ? data : {};
36313
+ data["resourceId"] = this.resourceId;
35965
36314
  data["upn"] = this.upn;
35966
36315
  data["personnelNumber"] = this.personnelNumber;
35967
36316
  data["active"] = this.active;
@@ -35975,6 +36324,7 @@ export class CurrentWorkDto implements ICurrentWorkDto {
35975
36324
  }
35976
36325
 
35977
36326
  export interface ICurrentWorkDto {
36327
+ resourceId: string;
35978
36328
  upn?: string | null;
35979
36329
  personnelNumber: string;
35980
36330
  active: boolean;