@ignos/api-client 20261112.367.1-alpha → 20261113.368.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.
@@ -1192,6 +1192,7 @@ export declare class TraceClient extends AuthorizedApiBase implements ITraceClie
1192
1192
  export interface IMeasuringToolsClient {
1193
1193
  listMeasuringTools(page: number | undefined, pageSize: number | undefined, toolId: string | null | undefined, toolName: string | null | undefined, typeIds: string[] | null | undefined, subTypeIds: string[] | null | undefined, typeId: string | null | undefined, subTypeId: string | null | undefined, orderBy: string | null | undefined, sortDirection: string | null | undefined, includeDeprecated: boolean | null | undefined): Promise<PagedDataOfMeasuringToolDto>;
1194
1194
  createMeasuringTool(request: CreateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
1195
+ listMeasuringToolCounts(search: string | null | undefined, typeIds: string[] | null | undefined, subTypeIds: string[] | null | undefined, includeDeprecated: boolean | undefined): Promise<MeasuringToolCountsDto>;
1195
1196
  updateMeasuringTool(id: string, request: UpdateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
1196
1197
  getMeasuringTool(id: string): Promise<MeasuringToolDetailDto>;
1197
1198
  listCalibrations(id: string): Promise<MeasuringToolCalibrationDto[]>;
@@ -1240,6 +1241,8 @@ export declare class MeasuringToolsClient extends AuthorizedApiBase implements I
1240
1241
  protected processListMeasuringTools(response: Response): Promise<PagedDataOfMeasuringToolDto>;
1241
1242
  createMeasuringTool(request: CreateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
1242
1243
  protected processCreateMeasuringTool(response: Response): Promise<MeasuringToolDetailDto>;
1244
+ listMeasuringToolCounts(search: string | null | undefined, typeIds: string[] | null | undefined, subTypeIds: string[] | null | undefined, includeDeprecated: boolean | undefined): Promise<MeasuringToolCountsDto>;
1245
+ protected processListMeasuringToolCounts(response: Response): Promise<MeasuringToolCountsDto>;
1243
1246
  updateMeasuringTool(id: string, request: UpdateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
1244
1247
  protected processUpdateMeasuringTool(response: Response): Promise<MeasuringToolDetailDto>;
1245
1248
  getMeasuringTool(id: string): Promise<MeasuringToolDetailDto>;
@@ -5806,6 +5809,14 @@ export interface MeasuringToolLastUsedByDto {
5806
5809
  displayName?: string | null;
5807
5810
  }
5808
5811
  export type CalibrationStatusDto = "Uncalibrated" | "Deprecated" | "Expired" | "SoonDue" | "Valid";
5812
+ export interface MeasuringToolCountsDto {
5813
+ types: MeasuringToolFacetCountDto[];
5814
+ subTypes: MeasuringToolFacetCountDto[];
5815
+ }
5816
+ export interface MeasuringToolFacetCountDto {
5817
+ id: string;
5818
+ count: number;
5819
+ }
5809
5820
  export interface MeasuringToolDetailDto {
5810
5821
  id: string;
5811
5822
  toolId: string;
@@ -9688,6 +9688,52 @@ export class MeasuringToolsClient extends AuthorizedApiBase {
9688
9688
  }
9689
9689
  return Promise.resolve(null);
9690
9690
  }
9691
+ listMeasuringToolCounts(search, typeIds, subTypeIds, includeDeprecated) {
9692
+ let url_ = this.baseUrl + "/measuringtools/counts?";
9693
+ if (search !== undefined && search !== null)
9694
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
9695
+ if (typeIds !== undefined && typeIds !== null)
9696
+ typeIds && typeIds.forEach(item => { url_ += "typeIds=" + encodeURIComponent("" + item) + "&"; });
9697
+ if (subTypeIds !== undefined && subTypeIds !== null)
9698
+ subTypeIds && subTypeIds.forEach(item => { url_ += "subTypeIds=" + encodeURIComponent("" + item) + "&"; });
9699
+ if (includeDeprecated === null)
9700
+ throw new globalThis.Error("The parameter 'includeDeprecated' cannot be null.");
9701
+ else if (includeDeprecated !== undefined)
9702
+ url_ += "includeDeprecated=" + encodeURIComponent("" + includeDeprecated) + "&";
9703
+ url_ = url_.replace(/[?&]$/, "");
9704
+ let options_ = {
9705
+ method: "GET",
9706
+ headers: {
9707
+ "Accept": "application/json"
9708
+ }
9709
+ };
9710
+ return this.transformOptions(options_).then(transformedOptions_ => {
9711
+ return this.http.fetch(url_, transformedOptions_);
9712
+ }).then((_response) => {
9713
+ return this.processListMeasuringToolCounts(_response);
9714
+ });
9715
+ }
9716
+ processListMeasuringToolCounts(response) {
9717
+ const status = response.status;
9718
+ let _headers = {};
9719
+ if (response.headers && response.headers.forEach) {
9720
+ response.headers.forEach((v, k) => _headers[k] = v);
9721
+ }
9722
+ ;
9723
+ if (status === 200) {
9724
+ return response.text().then((_responseText) => {
9725
+ let result200 = null;
9726
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
9727
+ return result200;
9728
+ });
9729
+ }
9730
+ else if (status !== 200 && status !== 204) {
9731
+ return response.text().then((_responseText) => {
9732
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
9733
+ });
9734
+ }
9735
+ return Promise.resolve(null);
9736
+ }
9691
9737
  updateMeasuringTool(id, request) {
9692
9738
  let url_ = this.baseUrl + "/measuringtools/{id}";
9693
9739
  if (id === undefined || id === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261112.367.1-alpha",
3
+ "version": "20261113.368.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -10194,6 +10194,8 @@ export interface IMeasuringToolsClient {
10194
10194
 
10195
10195
  createMeasuringTool(request: CreateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
10196
10196
 
10197
+ listMeasuringToolCounts(search: string | null | undefined, typeIds: string[] | null | undefined, subTypeIds: string[] | null | undefined, includeDeprecated: boolean | undefined): Promise<MeasuringToolCountsDto>;
10198
+
10197
10199
  updateMeasuringTool(id: string, request: UpdateMeasuringToolRequest): Promise<MeasuringToolDetailDto>;
10198
10200
 
10199
10201
  getMeasuringTool(id: string): Promise<MeasuringToolDetailDto>;
@@ -10375,6 +10377,51 @@ export class MeasuringToolsClient extends AuthorizedApiBase implements IMeasurin
10375
10377
  return Promise.resolve<MeasuringToolDetailDto>(null as any);
10376
10378
  }
10377
10379
 
10380
+ listMeasuringToolCounts(search: string | null | undefined, typeIds: string[] | null | undefined, subTypeIds: string[] | null | undefined, includeDeprecated: boolean | undefined): Promise<MeasuringToolCountsDto> {
10381
+ let url_ = this.baseUrl + "/measuringtools/counts?";
10382
+ if (search !== undefined && search !== null)
10383
+ url_ += "search=" + encodeURIComponent("" + search) + "&";
10384
+ if (typeIds !== undefined && typeIds !== null)
10385
+ typeIds && typeIds.forEach(item => { url_ += "typeIds=" + encodeURIComponent("" + item) + "&"; });
10386
+ if (subTypeIds !== undefined && subTypeIds !== null)
10387
+ subTypeIds && subTypeIds.forEach(item => { url_ += "subTypeIds=" + encodeURIComponent("" + item) + "&"; });
10388
+ if (includeDeprecated === null)
10389
+ throw new globalThis.Error("The parameter 'includeDeprecated' cannot be null.");
10390
+ else if (includeDeprecated !== undefined)
10391
+ url_ += "includeDeprecated=" + encodeURIComponent("" + includeDeprecated) + "&";
10392
+ url_ = url_.replace(/[?&]$/, "");
10393
+
10394
+ let options_: RequestInit = {
10395
+ method: "GET",
10396
+ headers: {
10397
+ "Accept": "application/json"
10398
+ }
10399
+ };
10400
+
10401
+ return this.transformOptions(options_).then(transformedOptions_ => {
10402
+ return this.http.fetch(url_, transformedOptions_);
10403
+ }).then((_response: Response) => {
10404
+ return this.processListMeasuringToolCounts(_response);
10405
+ });
10406
+ }
10407
+
10408
+ protected processListMeasuringToolCounts(response: Response): Promise<MeasuringToolCountsDto> {
10409
+ const status = response.status;
10410
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
10411
+ if (status === 200) {
10412
+ return response.text().then((_responseText) => {
10413
+ let result200: any = null;
10414
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as MeasuringToolCountsDto;
10415
+ return result200;
10416
+ });
10417
+ } else if (status !== 200 && status !== 204) {
10418
+ return response.text().then((_responseText) => {
10419
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
10420
+ });
10421
+ }
10422
+ return Promise.resolve<MeasuringToolCountsDto>(null as any);
10423
+ }
10424
+
10378
10425
  updateMeasuringTool(id: string, request: UpdateMeasuringToolRequest): Promise<MeasuringToolDetailDto> {
10379
10426
  let url_ = this.baseUrl + "/measuringtools/{id}";
10380
10427
  if (id === undefined || id === null)
@@ -36397,6 +36444,16 @@ export interface MeasuringToolLastUsedByDto {
36397
36444
 
36398
36445
  export type CalibrationStatusDto = "Uncalibrated" | "Deprecated" | "Expired" | "SoonDue" | "Valid";
36399
36446
 
36447
+ export interface MeasuringToolCountsDto {
36448
+ types: MeasuringToolFacetCountDto[];
36449
+ subTypes: MeasuringToolFacetCountDto[];
36450
+ }
36451
+
36452
+ export interface MeasuringToolFacetCountDto {
36453
+ id: string;
36454
+ count: number;
36455
+ }
36456
+
36400
36457
  export interface MeasuringToolDetailDto {
36401
36458
  id: string;
36402
36459
  toolId: string;