@ignos/api-client 20250203.0.11065-alpha → 20250203.0.11069
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 +3 -0
- package/lib/ignosportal-api.js +41 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +42 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -1881,6 +1881,7 @@ export declare class MesPurchaseOrderClient extends AuthorizedApiBase implements
|
|
|
1881
1881
|
export interface IMesResourceClient {
|
|
1882
1882
|
listResourceGroups(includeResources: boolean | undefined): Promise<ResourceGroupDto[]>;
|
|
1883
1883
|
listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
|
|
1884
|
+
listDepartments(): Promise<DepartmentDto[]>;
|
|
1884
1885
|
}
|
|
1885
1886
|
export declare class MesResourceClient extends AuthorizedApiBase implements IMesResourceClient {
|
|
1886
1887
|
private http;
|
|
@@ -1893,6 +1894,8 @@ export declare class MesResourceClient extends AuthorizedApiBase implements IMes
|
|
|
1893
1894
|
protected processListResourceGroups(response: Response): Promise<ResourceGroupDto[]>;
|
|
1894
1895
|
listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
|
|
1895
1896
|
protected processListResourceGroupResources(response: Response): Promise<ProductionResourceDto[]>;
|
|
1897
|
+
listDepartments(): Promise<DepartmentDto[]>;
|
|
1898
|
+
protected processListDepartments(response: Response): Promise<DepartmentDto[]>;
|
|
1896
1899
|
}
|
|
1897
1900
|
export interface IMeasurementFormSchemasClient {
|
|
1898
1901
|
listMeasurmentFormSchemas(pageSize: number | undefined, customerId: string | null | undefined, customerName: string | null | undefined, partNumber: string | null | undefined, partRevision: string | null | undefined, drawing: string | null | undefined, drawingRevision: string | null | undefined, filter: string | null | undefined, continuationToken: string | null | undefined): Promise<PagedResultOfMeasurementFormListDto>;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -15344,6 +15344,47 @@ export class MesResourceClient extends AuthorizedApiBase {
|
|
|
15344
15344
|
}
|
|
15345
15345
|
return Promise.resolve(null);
|
|
15346
15346
|
}
|
|
15347
|
+
listDepartments() {
|
|
15348
|
+
let url_ = this.baseUrl + "/mes/departments";
|
|
15349
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
15350
|
+
let options_ = {
|
|
15351
|
+
method: "GET",
|
|
15352
|
+
headers: {
|
|
15353
|
+
"Accept": "application/json"
|
|
15354
|
+
}
|
|
15355
|
+
};
|
|
15356
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
15357
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
15358
|
+
}).then((_response) => {
|
|
15359
|
+
return this.processListDepartments(_response);
|
|
15360
|
+
});
|
|
15361
|
+
}
|
|
15362
|
+
processListDepartments(response) {
|
|
15363
|
+
const status = response.status;
|
|
15364
|
+
let _headers = {};
|
|
15365
|
+
if (response.headers && response.headers.forEach) {
|
|
15366
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
15367
|
+
}
|
|
15368
|
+
;
|
|
15369
|
+
if (status === 200) {
|
|
15370
|
+
return response.text().then((_responseText) => {
|
|
15371
|
+
let result200 = null;
|
|
15372
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
15373
|
+
if (Array.isArray(resultData200)) {
|
|
15374
|
+
result200 = [];
|
|
15375
|
+
for (let item of resultData200)
|
|
15376
|
+
result200.push(DepartmentDto.fromJS(item));
|
|
15377
|
+
}
|
|
15378
|
+
return result200;
|
|
15379
|
+
});
|
|
15380
|
+
}
|
|
15381
|
+
else if (status !== 200 && status !== 204) {
|
|
15382
|
+
return response.text().then((_responseText) => {
|
|
15383
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
15384
|
+
});
|
|
15385
|
+
}
|
|
15386
|
+
return Promise.resolve(null);
|
|
15387
|
+
}
|
|
15347
15388
|
}
|
|
15348
15389
|
export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
15349
15390
|
constructor(configuration, baseUrl, http) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -16318,6 +16318,8 @@ export interface IMesResourceClient {
|
|
|
16318
16318
|
listResourceGroups(includeResources: boolean | undefined): Promise<ResourceGroupDto[]>;
|
|
16319
16319
|
|
|
16320
16320
|
listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
|
|
16321
|
+
|
|
16322
|
+
listDepartments(): Promise<DepartmentDto[]>;
|
|
16321
16323
|
}
|
|
16322
16324
|
|
|
16323
16325
|
export class MesResourceClient extends AuthorizedApiBase implements IMesResourceClient {
|
|
@@ -16417,6 +16419,46 @@ export class MesResourceClient extends AuthorizedApiBase implements IMesResource
|
|
|
16417
16419
|
}
|
|
16418
16420
|
return Promise.resolve<ProductionResourceDto[]>(null as any);
|
|
16419
16421
|
}
|
|
16422
|
+
|
|
16423
|
+
listDepartments(): Promise<DepartmentDto[]> {
|
|
16424
|
+
let url_ = this.baseUrl + "/mes/departments";
|
|
16425
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
16426
|
+
|
|
16427
|
+
let options_: RequestInit = {
|
|
16428
|
+
method: "GET",
|
|
16429
|
+
headers: {
|
|
16430
|
+
"Accept": "application/json"
|
|
16431
|
+
}
|
|
16432
|
+
};
|
|
16433
|
+
|
|
16434
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
16435
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
16436
|
+
}).then((_response: Response) => {
|
|
16437
|
+
return this.processListDepartments(_response);
|
|
16438
|
+
});
|
|
16439
|
+
}
|
|
16440
|
+
|
|
16441
|
+
protected processListDepartments(response: Response): Promise<DepartmentDto[]> {
|
|
16442
|
+
const status = response.status;
|
|
16443
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
16444
|
+
if (status === 200) {
|
|
16445
|
+
return response.text().then((_responseText) => {
|
|
16446
|
+
let result200: any = null;
|
|
16447
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
16448
|
+
if (Array.isArray(resultData200)) {
|
|
16449
|
+
result200 = [] as any;
|
|
16450
|
+
for (let item of resultData200)
|
|
16451
|
+
result200!.push(DepartmentDto.fromJS(item));
|
|
16452
|
+
}
|
|
16453
|
+
return result200;
|
|
16454
|
+
});
|
|
16455
|
+
} else if (status !== 200 && status !== 204) {
|
|
16456
|
+
return response.text().then((_responseText) => {
|
|
16457
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
16458
|
+
});
|
|
16459
|
+
}
|
|
16460
|
+
return Promise.resolve<DepartmentDto[]>(null as any);
|
|
16461
|
+
}
|
|
16420
16462
|
}
|
|
16421
16463
|
|
|
16422
16464
|
export interface IMeasurementFormSchemasClient {
|