@ignos/api-client 20240819.0.10050 → 20240819.0.10052
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 +33 -0
- package/lib/ignosportal-api.js +89 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +117 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -1568,6 +1568,19 @@ export declare class MesDocumentsClient extends AuthorizedApiBase implements IMe
|
|
|
1568
1568
|
getDocument(drawingNumber: string, id: string): Promise<DocumentLinkDto>;
|
|
1569
1569
|
protected processGetDocument(response: Response): Promise<DocumentLinkDto>;
|
|
1570
1570
|
}
|
|
1571
|
+
export interface IMesEngineeringChangeOrdersClient {
|
|
1572
|
+
getEngineeringChangeOrders(partNumber: string | undefined): Promise<EngineeringChangeOrderDto[]>;
|
|
1573
|
+
}
|
|
1574
|
+
export declare class MesEngineeringChangeOrdersClient extends AuthorizedApiBase implements IMesEngineeringChangeOrdersClient {
|
|
1575
|
+
private http;
|
|
1576
|
+
private baseUrl;
|
|
1577
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
1578
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
|
|
1579
|
+
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
1580
|
+
});
|
|
1581
|
+
getEngineeringChangeOrders(partNumber: string | undefined): Promise<EngineeringChangeOrderDto[]>;
|
|
1582
|
+
protected processGetEngineeringChangeOrders(response: Response): Promise<EngineeringChangeOrderDto[]>;
|
|
1583
|
+
}
|
|
1571
1584
|
export interface IMesLinksClient {
|
|
1572
1585
|
addMesLink(request: AddMesLink): Promise<void>;
|
|
1573
1586
|
listMesLinks(types: MesLinkTypeDto[] | null | undefined, workOrderId: string | null | undefined, operation: number | null | undefined): Promise<MesLinkDto[]>;
|
|
@@ -8320,6 +8333,26 @@ export declare class DocumentLinkDto implements IDocumentLinkDto {
|
|
|
8320
8333
|
export interface IDocumentLinkDto {
|
|
8321
8334
|
url: string;
|
|
8322
8335
|
}
|
|
8336
|
+
export declare class EngineeringChangeOrderDto implements IEngineeringChangeOrderDto {
|
|
8337
|
+
orderNumber: string;
|
|
8338
|
+
title: string;
|
|
8339
|
+
category?: string | null;
|
|
8340
|
+
description?: string | null;
|
|
8341
|
+
project?: string | null;
|
|
8342
|
+
status?: string | null;
|
|
8343
|
+
constructor(data?: IEngineeringChangeOrderDto);
|
|
8344
|
+
init(_data?: any): void;
|
|
8345
|
+
static fromJS(data: any): EngineeringChangeOrderDto;
|
|
8346
|
+
toJSON(data?: any): any;
|
|
8347
|
+
}
|
|
8348
|
+
export interface IEngineeringChangeOrderDto {
|
|
8349
|
+
orderNumber: string;
|
|
8350
|
+
title: string;
|
|
8351
|
+
category?: string | null;
|
|
8352
|
+
description?: string | null;
|
|
8353
|
+
project?: string | null;
|
|
8354
|
+
status?: string | null;
|
|
8355
|
+
}
|
|
8323
8356
|
export declare class AddMesLink implements IAddMesLink {
|
|
8324
8357
|
uri?: string | null;
|
|
8325
8358
|
name?: string | null;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -12837,6 +12837,59 @@ export class MesDocumentsClient extends AuthorizedApiBase {
|
|
|
12837
12837
|
return Promise.resolve(null);
|
|
12838
12838
|
}
|
|
12839
12839
|
}
|
|
12840
|
+
export class MesEngineeringChangeOrdersClient extends AuthorizedApiBase {
|
|
12841
|
+
constructor(configuration, baseUrl, http) {
|
|
12842
|
+
super(configuration);
|
|
12843
|
+
this.jsonParseReviver = undefined;
|
|
12844
|
+
this.http = http ? http : window;
|
|
12845
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
12846
|
+
}
|
|
12847
|
+
getEngineeringChangeOrders(partNumber) {
|
|
12848
|
+
let url_ = this.baseUrl + "/mes/mesengineeringchangeorders?";
|
|
12849
|
+
if (partNumber === null)
|
|
12850
|
+
throw new Error("The parameter 'partNumber' cannot be null.");
|
|
12851
|
+
else if (partNumber !== undefined)
|
|
12852
|
+
url_ += "partNumber=" + encodeURIComponent("" + partNumber) + "&";
|
|
12853
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12854
|
+
let options_ = {
|
|
12855
|
+
method: "GET",
|
|
12856
|
+
headers: {
|
|
12857
|
+
"Accept": "application/json"
|
|
12858
|
+
}
|
|
12859
|
+
};
|
|
12860
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12861
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12862
|
+
}).then((_response) => {
|
|
12863
|
+
return this.processGetEngineeringChangeOrders(_response);
|
|
12864
|
+
});
|
|
12865
|
+
}
|
|
12866
|
+
processGetEngineeringChangeOrders(response) {
|
|
12867
|
+
const status = response.status;
|
|
12868
|
+
let _headers = {};
|
|
12869
|
+
if (response.headers && response.headers.forEach) {
|
|
12870
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12871
|
+
}
|
|
12872
|
+
;
|
|
12873
|
+
if (status === 200) {
|
|
12874
|
+
return response.text().then((_responseText) => {
|
|
12875
|
+
let result200 = null;
|
|
12876
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12877
|
+
if (Array.isArray(resultData200)) {
|
|
12878
|
+
result200 = [];
|
|
12879
|
+
for (let item of resultData200)
|
|
12880
|
+
result200.push(EngineeringChangeOrderDto.fromJS(item));
|
|
12881
|
+
}
|
|
12882
|
+
return result200;
|
|
12883
|
+
});
|
|
12884
|
+
}
|
|
12885
|
+
else if (status !== 200 && status !== 204) {
|
|
12886
|
+
return response.text().then((_responseText) => {
|
|
12887
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12888
|
+
});
|
|
12889
|
+
}
|
|
12890
|
+
return Promise.resolve(null);
|
|
12891
|
+
}
|
|
12892
|
+
}
|
|
12840
12893
|
export class MesLinksClient extends AuthorizedApiBase {
|
|
12841
12894
|
constructor(configuration, baseUrl, http) {
|
|
12842
12895
|
super(configuration);
|
|
@@ -31528,6 +31581,42 @@ export class DocumentLinkDto {
|
|
|
31528
31581
|
return data;
|
|
31529
31582
|
}
|
|
31530
31583
|
}
|
|
31584
|
+
export class EngineeringChangeOrderDto {
|
|
31585
|
+
constructor(data) {
|
|
31586
|
+
if (data) {
|
|
31587
|
+
for (var property in data) {
|
|
31588
|
+
if (data.hasOwnProperty(property))
|
|
31589
|
+
this[property] = data[property];
|
|
31590
|
+
}
|
|
31591
|
+
}
|
|
31592
|
+
}
|
|
31593
|
+
init(_data) {
|
|
31594
|
+
if (_data) {
|
|
31595
|
+
this.orderNumber = _data["orderNumber"];
|
|
31596
|
+
this.title = _data["title"];
|
|
31597
|
+
this.category = _data["category"];
|
|
31598
|
+
this.description = _data["description"];
|
|
31599
|
+
this.project = _data["project"];
|
|
31600
|
+
this.status = _data["status"];
|
|
31601
|
+
}
|
|
31602
|
+
}
|
|
31603
|
+
static fromJS(data) {
|
|
31604
|
+
data = typeof data === 'object' ? data : {};
|
|
31605
|
+
let result = new EngineeringChangeOrderDto();
|
|
31606
|
+
result.init(data);
|
|
31607
|
+
return result;
|
|
31608
|
+
}
|
|
31609
|
+
toJSON(data) {
|
|
31610
|
+
data = typeof data === 'object' ? data : {};
|
|
31611
|
+
data["orderNumber"] = this.orderNumber;
|
|
31612
|
+
data["title"] = this.title;
|
|
31613
|
+
data["category"] = this.category;
|
|
31614
|
+
data["description"] = this.description;
|
|
31615
|
+
data["project"] = this.project;
|
|
31616
|
+
data["status"] = this.status;
|
|
31617
|
+
return data;
|
|
31618
|
+
}
|
|
31619
|
+
}
|
|
31531
31620
|
export class AddMesLink {
|
|
31532
31621
|
constructor(data) {
|
|
31533
31622
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -13726,6 +13726,67 @@ export class MesDocumentsClient extends AuthorizedApiBase implements IMesDocumen
|
|
|
13726
13726
|
}
|
|
13727
13727
|
}
|
|
13728
13728
|
|
|
13729
|
+
export interface IMesEngineeringChangeOrdersClient {
|
|
13730
|
+
|
|
13731
|
+
getEngineeringChangeOrders(partNumber: string | undefined): Promise<EngineeringChangeOrderDto[]>;
|
|
13732
|
+
}
|
|
13733
|
+
|
|
13734
|
+
export class MesEngineeringChangeOrdersClient extends AuthorizedApiBase implements IMesEngineeringChangeOrdersClient {
|
|
13735
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
13736
|
+
private baseUrl: string;
|
|
13737
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
13738
|
+
|
|
13739
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
13740
|
+
super(configuration);
|
|
13741
|
+
this.http = http ? http : window as any;
|
|
13742
|
+
this.baseUrl = baseUrl ?? "";
|
|
13743
|
+
}
|
|
13744
|
+
|
|
13745
|
+
getEngineeringChangeOrders(partNumber: string | undefined): Promise<EngineeringChangeOrderDto[]> {
|
|
13746
|
+
let url_ = this.baseUrl + "/mes/mesengineeringchangeorders?";
|
|
13747
|
+
if (partNumber === null)
|
|
13748
|
+
throw new Error("The parameter 'partNumber' cannot be null.");
|
|
13749
|
+
else if (partNumber !== undefined)
|
|
13750
|
+
url_ += "partNumber=" + encodeURIComponent("" + partNumber) + "&";
|
|
13751
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13752
|
+
|
|
13753
|
+
let options_: RequestInit = {
|
|
13754
|
+
method: "GET",
|
|
13755
|
+
headers: {
|
|
13756
|
+
"Accept": "application/json"
|
|
13757
|
+
}
|
|
13758
|
+
};
|
|
13759
|
+
|
|
13760
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13761
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13762
|
+
}).then((_response: Response) => {
|
|
13763
|
+
return this.processGetEngineeringChangeOrders(_response);
|
|
13764
|
+
});
|
|
13765
|
+
}
|
|
13766
|
+
|
|
13767
|
+
protected processGetEngineeringChangeOrders(response: Response): Promise<EngineeringChangeOrderDto[]> {
|
|
13768
|
+
const status = response.status;
|
|
13769
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13770
|
+
if (status === 200) {
|
|
13771
|
+
return response.text().then((_responseText) => {
|
|
13772
|
+
let result200: any = null;
|
|
13773
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13774
|
+
if (Array.isArray(resultData200)) {
|
|
13775
|
+
result200 = [] as any;
|
|
13776
|
+
for (let item of resultData200)
|
|
13777
|
+
result200!.push(EngineeringChangeOrderDto.fromJS(item));
|
|
13778
|
+
}
|
|
13779
|
+
return result200;
|
|
13780
|
+
});
|
|
13781
|
+
} else if (status !== 200 && status !== 204) {
|
|
13782
|
+
return response.text().then((_responseText) => {
|
|
13783
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13784
|
+
});
|
|
13785
|
+
}
|
|
13786
|
+
return Promise.resolve<EngineeringChangeOrderDto[]>(null as any);
|
|
13787
|
+
}
|
|
13788
|
+
}
|
|
13789
|
+
|
|
13729
13790
|
export interface IMesLinksClient {
|
|
13730
13791
|
|
|
13731
13792
|
addMesLink(request: AddMesLink): Promise<void>;
|
|
@@ -38862,6 +38923,62 @@ export interface IDocumentLinkDto {
|
|
|
38862
38923
|
url: string;
|
|
38863
38924
|
}
|
|
38864
38925
|
|
|
38926
|
+
export class EngineeringChangeOrderDto implements IEngineeringChangeOrderDto {
|
|
38927
|
+
orderNumber!: string;
|
|
38928
|
+
title!: string;
|
|
38929
|
+
category?: string | null;
|
|
38930
|
+
description?: string | null;
|
|
38931
|
+
project?: string | null;
|
|
38932
|
+
status?: string | null;
|
|
38933
|
+
|
|
38934
|
+
constructor(data?: IEngineeringChangeOrderDto) {
|
|
38935
|
+
if (data) {
|
|
38936
|
+
for (var property in data) {
|
|
38937
|
+
if (data.hasOwnProperty(property))
|
|
38938
|
+
(<any>this)[property] = (<any>data)[property];
|
|
38939
|
+
}
|
|
38940
|
+
}
|
|
38941
|
+
}
|
|
38942
|
+
|
|
38943
|
+
init(_data?: any) {
|
|
38944
|
+
if (_data) {
|
|
38945
|
+
this.orderNumber = _data["orderNumber"];
|
|
38946
|
+
this.title = _data["title"];
|
|
38947
|
+
this.category = _data["category"];
|
|
38948
|
+
this.description = _data["description"];
|
|
38949
|
+
this.project = _data["project"];
|
|
38950
|
+
this.status = _data["status"];
|
|
38951
|
+
}
|
|
38952
|
+
}
|
|
38953
|
+
|
|
38954
|
+
static fromJS(data: any): EngineeringChangeOrderDto {
|
|
38955
|
+
data = typeof data === 'object' ? data : {};
|
|
38956
|
+
let result = new EngineeringChangeOrderDto();
|
|
38957
|
+
result.init(data);
|
|
38958
|
+
return result;
|
|
38959
|
+
}
|
|
38960
|
+
|
|
38961
|
+
toJSON(data?: any) {
|
|
38962
|
+
data = typeof data === 'object' ? data : {};
|
|
38963
|
+
data["orderNumber"] = this.orderNumber;
|
|
38964
|
+
data["title"] = this.title;
|
|
38965
|
+
data["category"] = this.category;
|
|
38966
|
+
data["description"] = this.description;
|
|
38967
|
+
data["project"] = this.project;
|
|
38968
|
+
data["status"] = this.status;
|
|
38969
|
+
return data;
|
|
38970
|
+
}
|
|
38971
|
+
}
|
|
38972
|
+
|
|
38973
|
+
export interface IEngineeringChangeOrderDto {
|
|
38974
|
+
orderNumber: string;
|
|
38975
|
+
title: string;
|
|
38976
|
+
category?: string | null;
|
|
38977
|
+
description?: string | null;
|
|
38978
|
+
project?: string | null;
|
|
38979
|
+
status?: string | null;
|
|
38980
|
+
}
|
|
38981
|
+
|
|
38865
38982
|
export class AddMesLink implements IAddMesLink {
|
|
38866
38983
|
uri?: string | null;
|
|
38867
38984
|
name?: string | null;
|