@ignos/api-client 20260731.201.1 → 20260731.202.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.
@@ -2521,10 +2521,14 @@ export interface IMesProductionOrderAttachmentClient {
2521
2521
  * @param notes (optional)
2522
2522
  * @param url (optional)
2523
2523
  */
2524
- upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<FileResponse>;
2524
+ upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<void>;
2525
2525
  getAttachments(id: string): Promise<WorkOrderAttachmentDto[]>;
2526
+ /**
2527
+ * Update an existing Note or Url attachment in place
2528
+ */
2529
+ updateAttachment(id: string, attachmentId: number, request: UpdateProductionOrderAttachmentRequest): Promise<void>;
2526
2530
  getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
2527
- deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
2531
+ deleteAttachment(id: string, attachmentId: number): Promise<void>;
2528
2532
  }
2529
2533
  export declare class MesProductionOrderAttachmentClient extends AuthorizedApiBase implements IMesProductionOrderAttachmentClient {
2530
2534
  private http;
@@ -2540,14 +2544,19 @@ export declare class MesProductionOrderAttachmentClient extends AuthorizedApiBas
2540
2544
  * @param notes (optional)
2541
2545
  * @param url (optional)
2542
2546
  */
2543
- upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<FileResponse>;
2544
- protected processUpload(response: Response): Promise<FileResponse>;
2547
+ upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<void>;
2548
+ protected processUpload(response: Response): Promise<void>;
2545
2549
  getAttachments(id: string): Promise<WorkOrderAttachmentDto[]>;
2546
2550
  protected processGetAttachments(response: Response): Promise<WorkOrderAttachmentDto[]>;
2551
+ /**
2552
+ * Update an existing Note or Url attachment in place
2553
+ */
2554
+ updateAttachment(id: string, attachmentId: number, request: UpdateProductionOrderAttachmentRequest): Promise<void>;
2555
+ protected processUpdateAttachment(response: Response): Promise<void>;
2547
2556
  getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
2548
2557
  protected processGetAttachmentFile(response: Response): Promise<FileResponse>;
2549
- deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
2550
- protected processDeleteAttachment(response: Response): Promise<FileResponse>;
2558
+ deleteAttachment(id: string, attachmentId: number): Promise<void>;
2559
+ protected processDeleteAttachment(response: Response): Promise<void>;
2551
2560
  }
2552
2561
  export interface IMesProductionOrderClient {
2553
2562
  getProductionOrder(id: string): Promise<ProductionOrderDto>;
@@ -7495,6 +7504,12 @@ export interface SetProgramStatus {
7495
7504
  status?: ProgramStatus;
7496
7505
  }
7497
7506
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
7507
+ export interface UpdateProductionOrderAttachmentRequest {
7508
+ type?: ProductionOrderAttachmentType;
7509
+ description: string;
7510
+ notes?: string | null;
7511
+ url?: string | null;
7512
+ }
7498
7513
  export interface WorkOrderAttachmentDto {
7499
7514
  createdBy?: UserDto | null;
7500
7515
  created?: Date | null;
@@ -21046,9 +21046,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
21046
21046
  let options_ = {
21047
21047
  body: content_,
21048
21048
  method: "POST",
21049
- headers: {
21050
- "Accept": "application/octet-stream"
21051
- }
21049
+ headers: {}
21052
21050
  };
21053
21051
  return this.transformOptions(options_).then(transformedOptions_ => {
21054
21052
  return this.http.fetch(url_, transformedOptions_);
@@ -21063,18 +21061,10 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
21063
21061
  response.headers.forEach((v, k) => _headers[k] = v);
21064
21062
  }
21065
21063
  ;
21066
- if (status === 200 || status === 206) {
21067
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
21068
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
21069
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
21070
- if (fileName) {
21071
- fileName = decodeURIComponent(fileName);
21072
- }
21073
- else {
21074
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
21075
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
21076
- }
21077
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
21064
+ if (status === 204) {
21065
+ return response.text().then((_responseText) => {
21066
+ return;
21067
+ });
21078
21068
  }
21079
21069
  else if (status !== 200 && status !== 204) {
21080
21070
  return response.text().then((_responseText) => {
@@ -21122,6 +21112,51 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
21122
21112
  }
21123
21113
  return Promise.resolve(null);
21124
21114
  }
21115
+ /**
21116
+ * Update an existing Note or Url attachment in place
21117
+ */
21118
+ updateAttachment(id, attachmentId, request) {
21119
+ let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
21120
+ if (id === undefined || id === null)
21121
+ throw new globalThis.Error("The parameter 'id' must be defined.");
21122
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
21123
+ if (attachmentId === undefined || attachmentId === null)
21124
+ throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
21125
+ url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
21126
+ url_ = url_.replace(/[?&]$/, "");
21127
+ const content_ = JSON.stringify(request);
21128
+ let options_ = {
21129
+ body: content_,
21130
+ method: "PUT",
21131
+ headers: {
21132
+ "Content-Type": "application/json",
21133
+ }
21134
+ };
21135
+ return this.transformOptions(options_).then(transformedOptions_ => {
21136
+ return this.http.fetch(url_, transformedOptions_);
21137
+ }).then((_response) => {
21138
+ return this.processUpdateAttachment(_response);
21139
+ });
21140
+ }
21141
+ processUpdateAttachment(response) {
21142
+ const status = response.status;
21143
+ let _headers = {};
21144
+ if (response.headers && response.headers.forEach) {
21145
+ response.headers.forEach((v, k) => _headers[k] = v);
21146
+ }
21147
+ ;
21148
+ if (status === 204) {
21149
+ return response.text().then((_responseText) => {
21150
+ return;
21151
+ });
21152
+ }
21153
+ else if (status !== 200 && status !== 204) {
21154
+ return response.text().then((_responseText) => {
21155
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
21156
+ });
21157
+ }
21158
+ return Promise.resolve(null);
21159
+ }
21125
21160
  getAttachmentFile(id, attachmentId) {
21126
21161
  let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
21127
21162
  if (id === undefined || id === null)
@@ -21181,9 +21216,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
21181
21216
  url_ = url_.replace(/[?&]$/, "");
21182
21217
  let options_ = {
21183
21218
  method: "DELETE",
21184
- headers: {
21185
- "Accept": "application/octet-stream"
21186
- }
21219
+ headers: {}
21187
21220
  };
21188
21221
  return this.transformOptions(options_).then(transformedOptions_ => {
21189
21222
  return this.http.fetch(url_, transformedOptions_);
@@ -21198,18 +21231,10 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
21198
21231
  response.headers.forEach((v, k) => _headers[k] = v);
21199
21232
  }
21200
21233
  ;
21201
- if (status === 200 || status === 206) {
21202
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
21203
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
21204
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
21205
- if (fileName) {
21206
- fileName = decodeURIComponent(fileName);
21207
- }
21208
- else {
21209
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
21210
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
21211
- }
21212
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
21234
+ if (status === 204) {
21235
+ return response.text().then((_responseText) => {
21236
+ return;
21237
+ });
21213
21238
  }
21214
21239
  else if (status !== 200 && status !== 204) {
21215
21240
  return response.text().then((_responseText) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20260731.201.1",
3
+ "version": "20260731.202.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -22460,13 +22460,18 @@ export interface IMesProductionOrderAttachmentClient {
22460
22460
  * @param notes (optional)
22461
22461
  * @param url (optional)
22462
22462
  */
22463
- upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<FileResponse>;
22463
+ upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<void>;
22464
22464
 
22465
22465
  getAttachments(id: string): Promise<WorkOrderAttachmentDto[]>;
22466
22466
 
22467
+ /**
22468
+ * Update an existing Note or Url attachment in place
22469
+ */
22470
+ updateAttachment(id: string, attachmentId: number, request: UpdateProductionOrderAttachmentRequest): Promise<void>;
22471
+
22467
22472
  getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
22468
22473
 
22469
- deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
22474
+ deleteAttachment(id: string, attachmentId: number): Promise<void>;
22470
22475
  }
22471
22476
 
22472
22477
  export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implements IMesProductionOrderAttachmentClient {
@@ -22487,7 +22492,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22487
22492
  * @param notes (optional)
22488
22493
  * @param url (optional)
22489
22494
  */
22490
- upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<FileResponse> {
22495
+ upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<void> {
22491
22496
  let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments";
22492
22497
  if (id === undefined || id === null)
22493
22498
  throw new globalThis.Error("The parameter 'id' must be defined.");
@@ -22512,7 +22517,6 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22512
22517
  body: content_,
22513
22518
  method: "POST",
22514
22519
  headers: {
22515
- "Accept": "application/octet-stream"
22516
22520
  }
22517
22521
  };
22518
22522
 
@@ -22523,26 +22527,19 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22523
22527
  });
22524
22528
  }
22525
22529
 
22526
- protected processUpload(response: Response): Promise<FileResponse> {
22530
+ protected processUpload(response: Response): Promise<void> {
22527
22531
  const status = response.status;
22528
22532
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22529
- if (status === 200 || status === 206) {
22530
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
22531
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
22532
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
22533
- if (fileName) {
22534
- fileName = decodeURIComponent(fileName);
22535
- } else {
22536
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
22537
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
22538
- }
22539
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
22533
+ if (status === 204) {
22534
+ return response.text().then((_responseText) => {
22535
+ return;
22536
+ });
22540
22537
  } else if (status !== 200 && status !== 204) {
22541
22538
  return response.text().then((_responseText) => {
22542
22539
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22543
22540
  });
22544
22541
  }
22545
- return Promise.resolve<FileResponse>(null as any);
22542
+ return Promise.resolve<void>(null as any);
22546
22543
  }
22547
22544
 
22548
22545
  getAttachments(id: string): Promise<WorkOrderAttachmentDto[]> {
@@ -22583,6 +22580,51 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22583
22580
  return Promise.resolve<WorkOrderAttachmentDto[]>(null as any);
22584
22581
  }
22585
22582
 
22583
+ /**
22584
+ * Update an existing Note or Url attachment in place
22585
+ */
22586
+ updateAttachment(id: string, attachmentId: number, request: UpdateProductionOrderAttachmentRequest): Promise<void> {
22587
+ let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
22588
+ if (id === undefined || id === null)
22589
+ throw new globalThis.Error("The parameter 'id' must be defined.");
22590
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
22591
+ if (attachmentId === undefined || attachmentId === null)
22592
+ throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
22593
+ url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
22594
+ url_ = url_.replace(/[?&]$/, "");
22595
+
22596
+ const content_ = JSON.stringify(request);
22597
+
22598
+ let options_: RequestInit = {
22599
+ body: content_,
22600
+ method: "PUT",
22601
+ headers: {
22602
+ "Content-Type": "application/json",
22603
+ }
22604
+ };
22605
+
22606
+ return this.transformOptions(options_).then(transformedOptions_ => {
22607
+ return this.http.fetch(url_, transformedOptions_);
22608
+ }).then((_response: Response) => {
22609
+ return this.processUpdateAttachment(_response);
22610
+ });
22611
+ }
22612
+
22613
+ protected processUpdateAttachment(response: Response): Promise<void> {
22614
+ const status = response.status;
22615
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22616
+ if (status === 204) {
22617
+ return response.text().then((_responseText) => {
22618
+ return;
22619
+ });
22620
+ } else if (status !== 200 && status !== 204) {
22621
+ return response.text().then((_responseText) => {
22622
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22623
+ });
22624
+ }
22625
+ return Promise.resolve<void>(null as any);
22626
+ }
22627
+
22586
22628
  getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse> {
22587
22629
  let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
22588
22630
  if (id === undefined || id === null)
@@ -22629,7 +22671,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22629
22671
  return Promise.resolve<FileResponse>(null as any);
22630
22672
  }
22631
22673
 
22632
- deleteAttachment(id: string, attachmentId: number): Promise<FileResponse> {
22674
+ deleteAttachment(id: string, attachmentId: number): Promise<void> {
22633
22675
  let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
22634
22676
  if (id === undefined || id === null)
22635
22677
  throw new globalThis.Error("The parameter 'id' must be defined.");
@@ -22642,7 +22684,6 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22642
22684
  let options_: RequestInit = {
22643
22685
  method: "DELETE",
22644
22686
  headers: {
22645
- "Accept": "application/octet-stream"
22646
22687
  }
22647
22688
  };
22648
22689
 
@@ -22653,26 +22694,19 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
22653
22694
  });
22654
22695
  }
22655
22696
 
22656
- protected processDeleteAttachment(response: Response): Promise<FileResponse> {
22697
+ protected processDeleteAttachment(response: Response): Promise<void> {
22657
22698
  const status = response.status;
22658
22699
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
22659
- if (status === 200 || status === 206) {
22660
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
22661
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
22662
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
22663
- if (fileName) {
22664
- fileName = decodeURIComponent(fileName);
22665
- } else {
22666
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
22667
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
22668
- }
22669
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
22700
+ if (status === 204) {
22701
+ return response.text().then((_responseText) => {
22702
+ return;
22703
+ });
22670
22704
  } else if (status !== 200 && status !== 204) {
22671
22705
  return response.text().then((_responseText) => {
22672
22706
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22673
22707
  });
22674
22708
  }
22675
- return Promise.resolve<FileResponse>(null as any);
22709
+ return Promise.resolve<void>(null as any);
22676
22710
  }
22677
22711
  }
22678
22712
 
@@ -35796,6 +35830,13 @@ export interface SetProgramStatus {
35796
35830
 
35797
35831
  export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
35798
35832
 
35833
+ export interface UpdateProductionOrderAttachmentRequest {
35834
+ type?: ProductionOrderAttachmentType;
35835
+ description: string;
35836
+ notes?: string | null;
35837
+ url?: string | null;
35838
+ }
35839
+
35799
35840
  export interface WorkOrderAttachmentDto {
35800
35841
  createdBy?: UserDto | null;
35801
35842
  created?: Date | null;