@ignos/api-client 20260731.202.1-alpha → 20260803.203.1
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.
- package/lib/ignosportal-api.d.ts +9 -24
- package/lib/ignosportal-api.js +30 -55
- package/package.json +1 -1
- package/src/ignosportal-api.ts +36 -76
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -2521,14 +2521,10 @@ 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<
|
|
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>;
|
|
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>;
|
|
2530
2526
|
getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
|
|
2531
|
-
deleteAttachment(id: string, attachmentId: number): Promise<
|
|
2527
|
+
deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
|
|
2532
2528
|
}
|
|
2533
2529
|
export declare class MesProductionOrderAttachmentClient extends AuthorizedApiBase implements IMesProductionOrderAttachmentClient {
|
|
2534
2530
|
private http;
|
|
@@ -2544,19 +2540,14 @@ export declare class MesProductionOrderAttachmentClient extends AuthorizedApiBas
|
|
|
2544
2540
|
* @param notes (optional)
|
|
2545
2541
|
* @param url (optional)
|
|
2546
2542
|
*/
|
|
2547
|
-
upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<
|
|
2548
|
-
protected processUpload(response: Response): Promise<
|
|
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>;
|
|
2549
2545
|
getAttachments(id: string): Promise<WorkOrderAttachmentDto[]>;
|
|
2550
2546
|
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>;
|
|
2556
2547
|
getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
|
|
2557
2548
|
protected processGetAttachmentFile(response: Response): Promise<FileResponse>;
|
|
2558
|
-
deleteAttachment(id: string, attachmentId: number): Promise<
|
|
2559
|
-
protected processDeleteAttachment(response: Response): Promise<
|
|
2549
|
+
deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
|
|
2550
|
+
protected processDeleteAttachment(response: Response): Promise<FileResponse>;
|
|
2560
2551
|
}
|
|
2561
2552
|
export interface IMesProductionOrderClient {
|
|
2562
2553
|
getProductionOrder(id: string): Promise<ProductionOrderDto>;
|
|
@@ -7434,7 +7425,6 @@ export interface ListProductionOrdersRequest {
|
|
|
7434
7425
|
export interface PlannerPlanDto {
|
|
7435
7426
|
resourceGroupId: string;
|
|
7436
7427
|
sequence: PlannerOperationDto[];
|
|
7437
|
-
lockedCount: number;
|
|
7438
7428
|
planSavedAt?: Date | null;
|
|
7439
7429
|
isDraft: boolean;
|
|
7440
7430
|
publishedETag?: string | null;
|
|
@@ -7463,9 +7453,12 @@ export interface PlannerOperationDto {
|
|
|
7463
7453
|
project?: WorkOrderProjectDto | null;
|
|
7464
7454
|
sequenceNumber: number;
|
|
7465
7455
|
isManuallyLocked: boolean;
|
|
7456
|
+
lockType: PlannerLockType;
|
|
7457
|
+
isNewOperation: boolean;
|
|
7466
7458
|
weekGroup: string;
|
|
7467
7459
|
programStatus?: ProgramStatus | null;
|
|
7468
7460
|
}
|
|
7461
|
+
export type PlannerLockType = "None" | "Manual" | "Auto";
|
|
7469
7462
|
export type ProgramStatus = "Blank" | "NotOk" | "Ok";
|
|
7470
7463
|
export interface WeekCapacityDto {
|
|
7471
7464
|
weekGroup: string;
|
|
@@ -7483,7 +7476,6 @@ persisted active plan (draft, else published) is published instead. */
|
|
|
7483
7476
|
}
|
|
7484
7477
|
export interface PlannerSequenceInput {
|
|
7485
7478
|
orderedOperationKeys: string[];
|
|
7486
|
-
lockedCount: number;
|
|
7487
7479
|
weekGroups?: {
|
|
7488
7480
|
[key: string]: string;
|
|
7489
7481
|
} | null;
|
|
@@ -7495,7 +7487,6 @@ export interface PlannerPlanEventDto {
|
|
|
7495
7487
|
by?: string | null;
|
|
7496
7488
|
comment?: string | null;
|
|
7497
7489
|
operationCount: number;
|
|
7498
|
-
lockedCount: number;
|
|
7499
7490
|
}
|
|
7500
7491
|
export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
7501
7492
|
export interface SetProgramStatus {
|
|
@@ -7504,12 +7495,6 @@ export interface SetProgramStatus {
|
|
|
7504
7495
|
status?: ProgramStatus;
|
|
7505
7496
|
}
|
|
7506
7497
|
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
|
-
}
|
|
7513
7498
|
export interface WorkOrderAttachmentDto {
|
|
7514
7499
|
createdBy?: UserDto | null;
|
|
7515
7500
|
created?: Date | null;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -21046,7 +21046,9 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21046
21046
|
let options_ = {
|
|
21047
21047
|
body: content_,
|
|
21048
21048
|
method: "POST",
|
|
21049
|
-
headers: {
|
|
21049
|
+
headers: {
|
|
21050
|
+
"Accept": "application/octet-stream"
|
|
21051
|
+
}
|
|
21050
21052
|
};
|
|
21051
21053
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21052
21054
|
return this.http.fetch(url_, transformedOptions_);
|
|
@@ -21061,10 +21063,18 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21061
21063
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21062
21064
|
}
|
|
21063
21065
|
;
|
|
21064
|
-
if (status ===
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
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 }; });
|
|
21068
21078
|
}
|
|
21069
21079
|
else if (status !== 200 && status !== 204) {
|
|
21070
21080
|
return response.text().then((_responseText) => {
|
|
@@ -21112,51 +21122,6 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21112
21122
|
}
|
|
21113
21123
|
return Promise.resolve(null);
|
|
21114
21124
|
}
|
|
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
|
-
}
|
|
21160
21125
|
getAttachmentFile(id, attachmentId) {
|
|
21161
21126
|
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
21162
21127
|
if (id === undefined || id === null)
|
|
@@ -21216,7 +21181,9 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21216
21181
|
url_ = url_.replace(/[?&]$/, "");
|
|
21217
21182
|
let options_ = {
|
|
21218
21183
|
method: "DELETE",
|
|
21219
|
-
headers: {
|
|
21184
|
+
headers: {
|
|
21185
|
+
"Accept": "application/octet-stream"
|
|
21186
|
+
}
|
|
21220
21187
|
};
|
|
21221
21188
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
21222
21189
|
return this.http.fetch(url_, transformedOptions_);
|
|
@@ -21231,10 +21198,18 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
|
21231
21198
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
21232
21199
|
}
|
|
21233
21200
|
;
|
|
21234
|
-
if (status ===
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
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 }; });
|
|
21238
21213
|
}
|
|
21239
21214
|
else if (status !== 200 && status !== 204) {
|
|
21240
21215
|
return response.text().then((_responseText) => {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -22460,18 +22460,13 @@ 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<
|
|
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>;
|
|
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
|
-
|
|
22472
22467
|
getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse>;
|
|
22473
22468
|
|
|
22474
|
-
deleteAttachment(id: string, attachmentId: number): Promise<
|
|
22469
|
+
deleteAttachment(id: string, attachmentId: number): Promise<FileResponse>;
|
|
22475
22470
|
}
|
|
22476
22471
|
|
|
22477
22472
|
export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implements IMesProductionOrderAttachmentClient {
|
|
@@ -22492,7 +22487,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22492
22487
|
* @param notes (optional)
|
|
22493
22488
|
* @param url (optional)
|
|
22494
22489
|
*/
|
|
22495
|
-
upload(id: string, type: ProductionOrderAttachmentType | undefined, description: string | null | undefined, file: FileParameter | null | undefined, notes: string | null | undefined, url: string | null | undefined): Promise<
|
|
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> {
|
|
22496
22491
|
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments";
|
|
22497
22492
|
if (id === undefined || id === null)
|
|
22498
22493
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -22517,6 +22512,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22517
22512
|
body: content_,
|
|
22518
22513
|
method: "POST",
|
|
22519
22514
|
headers: {
|
|
22515
|
+
"Accept": "application/octet-stream"
|
|
22520
22516
|
}
|
|
22521
22517
|
};
|
|
22522
22518
|
|
|
@@ -22527,19 +22523,26 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22527
22523
|
});
|
|
22528
22524
|
}
|
|
22529
22525
|
|
|
22530
|
-
protected processUpload(response: Response): Promise<
|
|
22526
|
+
protected processUpload(response: Response): Promise<FileResponse> {
|
|
22531
22527
|
const status = response.status;
|
|
22532
22528
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22533
|
-
if (status ===
|
|
22534
|
-
|
|
22535
|
-
|
|
22536
|
-
|
|
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 }; });
|
|
22537
22540
|
} else if (status !== 200 && status !== 204) {
|
|
22538
22541
|
return response.text().then((_responseText) => {
|
|
22539
22542
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22540
22543
|
});
|
|
22541
22544
|
}
|
|
22542
|
-
return Promise.resolve<
|
|
22545
|
+
return Promise.resolve<FileResponse>(null as any);
|
|
22543
22546
|
}
|
|
22544
22547
|
|
|
22545
22548
|
getAttachments(id: string): Promise<WorkOrderAttachmentDto[]> {
|
|
@@ -22580,51 +22583,6 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22580
22583
|
return Promise.resolve<WorkOrderAttachmentDto[]>(null as any);
|
|
22581
22584
|
}
|
|
22582
22585
|
|
|
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
|
-
|
|
22628
22586
|
getAttachmentFile(id: string, attachmentId: number): Promise<FileResponse> {
|
|
22629
22587
|
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
22630
22588
|
if (id === undefined || id === null)
|
|
@@ -22671,7 +22629,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22671
22629
|
return Promise.resolve<FileResponse>(null as any);
|
|
22672
22630
|
}
|
|
22673
22631
|
|
|
22674
|
-
deleteAttachment(id: string, attachmentId: number): Promise<
|
|
22632
|
+
deleteAttachment(id: string, attachmentId: number): Promise<FileResponse> {
|
|
22675
22633
|
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
22676
22634
|
if (id === undefined || id === null)
|
|
22677
22635
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -22684,6 +22642,7 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22684
22642
|
let options_: RequestInit = {
|
|
22685
22643
|
method: "DELETE",
|
|
22686
22644
|
headers: {
|
|
22645
|
+
"Accept": "application/octet-stream"
|
|
22687
22646
|
}
|
|
22688
22647
|
};
|
|
22689
22648
|
|
|
@@ -22694,19 +22653,26 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase implem
|
|
|
22694
22653
|
});
|
|
22695
22654
|
}
|
|
22696
22655
|
|
|
22697
|
-
protected processDeleteAttachment(response: Response): Promise<
|
|
22656
|
+
protected processDeleteAttachment(response: Response): Promise<FileResponse> {
|
|
22698
22657
|
const status = response.status;
|
|
22699
22658
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
22700
|
-
if (status ===
|
|
22701
|
-
|
|
22702
|
-
|
|
22703
|
-
|
|
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 }; });
|
|
22704
22670
|
} else if (status !== 200 && status !== 204) {
|
|
22705
22671
|
return response.text().then((_responseText) => {
|
|
22706
22672
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22707
22673
|
});
|
|
22708
22674
|
}
|
|
22709
|
-
return Promise.resolve<
|
|
22675
|
+
return Promise.resolve<FileResponse>(null as any);
|
|
22710
22676
|
}
|
|
22711
22677
|
}
|
|
22712
22678
|
|
|
@@ -35752,7 +35718,6 @@ export interface ListProductionOrdersRequest {
|
|
|
35752
35718
|
export interface PlannerPlanDto {
|
|
35753
35719
|
resourceGroupId: string;
|
|
35754
35720
|
sequence: PlannerOperationDto[];
|
|
35755
|
-
lockedCount: number;
|
|
35756
35721
|
planSavedAt?: Date | null;
|
|
35757
35722
|
isDraft: boolean;
|
|
35758
35723
|
publishedETag?: string | null;
|
|
@@ -35782,10 +35747,14 @@ export interface PlannerOperationDto {
|
|
|
35782
35747
|
project?: WorkOrderProjectDto | null;
|
|
35783
35748
|
sequenceNumber: number;
|
|
35784
35749
|
isManuallyLocked: boolean;
|
|
35750
|
+
lockType: PlannerLockType;
|
|
35751
|
+
isNewOperation: boolean;
|
|
35785
35752
|
weekGroup: string;
|
|
35786
35753
|
programStatus?: ProgramStatus | null;
|
|
35787
35754
|
}
|
|
35788
35755
|
|
|
35756
|
+
export type PlannerLockType = "None" | "Manual" | "Auto";
|
|
35757
|
+
|
|
35789
35758
|
export type ProgramStatus = "Blank" | "NotOk" | "Ok";
|
|
35790
35759
|
|
|
35791
35760
|
export interface WeekCapacityDto {
|
|
@@ -35806,7 +35775,6 @@ persisted active plan (draft, else published) is published instead. */
|
|
|
35806
35775
|
|
|
35807
35776
|
export interface PlannerSequenceInput {
|
|
35808
35777
|
orderedOperationKeys: string[];
|
|
35809
|
-
lockedCount: number;
|
|
35810
35778
|
weekGroups?: { [key: string]: string; } | null;
|
|
35811
35779
|
}
|
|
35812
35780
|
|
|
@@ -35817,7 +35785,6 @@ export interface PlannerPlanEventDto {
|
|
|
35817
35785
|
by?: string | null;
|
|
35818
35786
|
comment?: string | null;
|
|
35819
35787
|
operationCount: number;
|
|
35820
|
-
lockedCount: number;
|
|
35821
35788
|
}
|
|
35822
35789
|
|
|
35823
35790
|
export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
@@ -35830,13 +35797,6 @@ export interface SetProgramStatus {
|
|
|
35830
35797
|
|
|
35831
35798
|
export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File";
|
|
35832
35799
|
|
|
35833
|
-
export interface UpdateProductionOrderAttachmentRequest {
|
|
35834
|
-
type?: ProductionOrderAttachmentType;
|
|
35835
|
-
description: string;
|
|
35836
|
-
notes?: string | null;
|
|
35837
|
-
url?: string | null;
|
|
35838
|
-
}
|
|
35839
|
-
|
|
35840
35800
|
export interface WorkOrderAttachmentDto {
|
|
35841
35801
|
createdBy?: UserDto | null;
|
|
35842
35802
|
created?: Date | null;
|