@ignos/api-client 20261009.301.1-alpha → 20261009.303.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.
@@ -3231,9 +3231,33 @@ export interface IMeasurementFormSchemasClient {
3231
3231
  IsValidDesignation/IsSupported flags carry invalid-input/
3232
3232
  unsupported-tolerance-class feedback, since that's expected user
3233
3233
  input, not a server error.
3234
+ elementType is optional for now (backward
3235
+ compatible with API clients generated before this parameter
3236
+ existed) - when provided, it's checked server-side against
3237
+ CalculateFitTolerance.Handler.Iso286EligibleElementTypes
3238
+ (Diameter/Length only) so an edited request payload can't get a
3239
+ fit tolerance back for a type ISO 286 doesn't apply to.
3234
3240
  * @param designation (optional)
3241
+ * @param elementType (optional)
3242
+ */
3243
+ calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto>;
3244
+ /**
3245
+ * Calculates +/- tolerance from the schema's ISO 2768 general
3246
+ tolerance setting, for a Nominal Text value that isn't an ISO 286
3247
+ fit designation (see fittolerance above) - e.g. a plain "12" on a
3248
+ Diameter element. Restricted server-side to Diameter/Length/
3249
+ Radius/Chamfer (CalculateGeneralTolerance.Handler.LegacyTypeByElementType)
3250
+ regardless of what elementType the request claims, so editing the
3251
+ request payload can't bypass the restriction. Always returns 200 -
3252
+ IsSupported/Message carry "not applicable to this type"/"no general
3253
+ tolerance set"/"out of range" feedback, since that's expected user
3254
+ input, not a server error.
3255
+ * @param elementType (optional)
3256
+ * @param nominal (optional)
3257
+ * @param unit (optional)
3258
+ * @param generalTolerance (optional)
3235
3259
  */
3236
- calculateFitTolerance(designation: string | undefined): Promise<FitToleranceResultDto>;
3260
+ calculateGeneralTolerance(elementType: string | undefined, nominal: number | undefined, unit: UnitOfMeasureDto | undefined, generalTolerance: GeneralToleranceDto | undefined): Promise<GeneralToleranceResultDto>;
3237
3261
  }
3238
3262
  export declare class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
3239
3263
  private http;
@@ -3256,10 +3280,35 @@ export declare class MeasurementFormSchemasClient extends AuthorizedApiBase impl
3256
3280
  IsValidDesignation/IsSupported flags carry invalid-input/
3257
3281
  unsupported-tolerance-class feedback, since that's expected user
3258
3282
  input, not a server error.
3283
+ elementType is optional for now (backward
3284
+ compatible with API clients generated before this parameter
3285
+ existed) - when provided, it's checked server-side against
3286
+ CalculateFitTolerance.Handler.Iso286EligibleElementTypes
3287
+ (Diameter/Length only) so an edited request payload can't get a
3288
+ fit tolerance back for a type ISO 286 doesn't apply to.
3259
3289
  * @param designation (optional)
3290
+ * @param elementType (optional)
3260
3291
  */
3261
- calculateFitTolerance(designation: string | undefined): Promise<FitToleranceResultDto>;
3292
+ calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto>;
3262
3293
  protected processCalculateFitTolerance(response: Response): Promise<FitToleranceResultDto>;
3294
+ /**
3295
+ * Calculates +/- tolerance from the schema's ISO 2768 general
3296
+ tolerance setting, for a Nominal Text value that isn't an ISO 286
3297
+ fit designation (see fittolerance above) - e.g. a plain "12" on a
3298
+ Diameter element. Restricted server-side to Diameter/Length/
3299
+ Radius/Chamfer (CalculateGeneralTolerance.Handler.LegacyTypeByElementType)
3300
+ regardless of what elementType the request claims, so editing the
3301
+ request payload can't bypass the restriction. Always returns 200 -
3302
+ IsSupported/Message carry "not applicable to this type"/"no general
3303
+ tolerance set"/"out of range" feedback, since that's expected user
3304
+ input, not a server error.
3305
+ * @param elementType (optional)
3306
+ * @param nominal (optional)
3307
+ * @param unit (optional)
3308
+ * @param generalTolerance (optional)
3309
+ */
3310
+ calculateGeneralTolerance(elementType: string | undefined, nominal: number | undefined, unit: UnitOfMeasureDto | undefined, generalTolerance: GeneralToleranceDto | undefined): Promise<GeneralToleranceResultDto>;
3311
+ protected processCalculateGeneralTolerance(response: Response): Promise<GeneralToleranceResultDto>;
3263
3312
  }
3264
3313
  export interface IMeasurementFormSettingsClient {
3265
3314
  getMeasurementFormSettings(): Promise<InspectCompanySettingsDto>;
@@ -10031,6 +10080,12 @@ export interface FitToleranceResultDto {
10031
10080
  toleranceMinusMm?: number | null;
10032
10081
  message?: string | null;
10033
10082
  }
10083
+ export interface GeneralToleranceResultDto {
10084
+ isSupported?: boolean;
10085
+ tolerancePlus?: number | null;
10086
+ toleranceMinus?: number | null;
10087
+ message?: string | null;
10088
+ }
10034
10089
  export interface MeasurementFormInstanceDto {
10035
10090
  id: string;
10036
10091
  readonly: boolean;
@@ -27359,14 +27359,23 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
27359
27359
  IsValidDesignation/IsSupported flags carry invalid-input/
27360
27360
  unsupported-tolerance-class feedback, since that's expected user
27361
27361
  input, not a server error.
27362
+ elementType is optional for now (backward
27363
+ compatible with API clients generated before this parameter
27364
+ existed) - when provided, it's checked server-side against
27365
+ CalculateFitTolerance.Handler.Iso286EligibleElementTypes
27366
+ (Diameter/Length only) so an edited request payload can't get a
27367
+ fit tolerance back for a type ISO 286 doesn't apply to.
27362
27368
  * @param designation (optional)
27369
+ * @param elementType (optional)
27363
27370
  */
27364
- calculateFitTolerance(designation) {
27371
+ calculateFitTolerance(designation, elementType) {
27365
27372
  let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance?";
27366
27373
  if (designation === null)
27367
27374
  throw new globalThis.Error("The parameter 'designation' cannot be null.");
27368
27375
  else if (designation !== undefined)
27369
27376
  url_ += "designation=" + encodeURIComponent("" + designation) + "&";
27377
+ if (elementType !== undefined && elementType !== null)
27378
+ url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
27370
27379
  url_ = url_.replace(/[?&]$/, "");
27371
27380
  let options_ = {
27372
27381
  method: "GET",
@@ -27401,6 +27410,74 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
27401
27410
  }
27402
27411
  return Promise.resolve(null);
27403
27412
  }
27413
+ /**
27414
+ * Calculates +/- tolerance from the schema's ISO 2768 general
27415
+ tolerance setting, for a Nominal Text value that isn't an ISO 286
27416
+ fit designation (see fittolerance above) - e.g. a plain "12" on a
27417
+ Diameter element. Restricted server-side to Diameter/Length/
27418
+ Radius/Chamfer (CalculateGeneralTolerance.Handler.LegacyTypeByElementType)
27419
+ regardless of what elementType the request claims, so editing the
27420
+ request payload can't bypass the restriction. Always returns 200 -
27421
+ IsSupported/Message carry "not applicable to this type"/"no general
27422
+ tolerance set"/"out of range" feedback, since that's expected user
27423
+ input, not a server error.
27424
+ * @param elementType (optional)
27425
+ * @param nominal (optional)
27426
+ * @param unit (optional)
27427
+ * @param generalTolerance (optional)
27428
+ */
27429
+ calculateGeneralTolerance(elementType, nominal, unit, generalTolerance) {
27430
+ let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance?";
27431
+ if (elementType === null)
27432
+ throw new globalThis.Error("The parameter 'elementType' cannot be null.");
27433
+ else if (elementType !== undefined)
27434
+ url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
27435
+ if (nominal === null)
27436
+ throw new globalThis.Error("The parameter 'nominal' cannot be null.");
27437
+ else if (nominal !== undefined)
27438
+ url_ += "nominal=" + encodeURIComponent("" + nominal) + "&";
27439
+ if (unit === null)
27440
+ throw new globalThis.Error("The parameter 'unit' cannot be null.");
27441
+ else if (unit !== undefined)
27442
+ url_ += "unit=" + encodeURIComponent("" + unit) + "&";
27443
+ if (generalTolerance === null)
27444
+ throw new globalThis.Error("The parameter 'generalTolerance' cannot be null.");
27445
+ else if (generalTolerance !== undefined)
27446
+ url_ += "generalTolerance=" + encodeURIComponent("" + generalTolerance) + "&";
27447
+ url_ = url_.replace(/[?&]$/, "");
27448
+ let options_ = {
27449
+ method: "GET",
27450
+ headers: {
27451
+ "Accept": "application/json"
27452
+ }
27453
+ };
27454
+ return this.transformOptions(options_).then(transformedOptions_ => {
27455
+ return this.http.fetch(url_, transformedOptions_);
27456
+ }).then((_response) => {
27457
+ return this.processCalculateGeneralTolerance(_response);
27458
+ });
27459
+ }
27460
+ processCalculateGeneralTolerance(response) {
27461
+ const status = response.status;
27462
+ let _headers = {};
27463
+ if (response.headers && response.headers.forEach) {
27464
+ response.headers.forEach((v, k) => _headers[k] = v);
27465
+ }
27466
+ ;
27467
+ if (status === 200) {
27468
+ return response.text().then((_responseText) => {
27469
+ let result200 = null;
27470
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
27471
+ return result200;
27472
+ });
27473
+ }
27474
+ else if (status !== 200 && status !== 204) {
27475
+ return response.text().then((_responseText) => {
27476
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
27477
+ });
27478
+ }
27479
+ return Promise.resolve(null);
27480
+ }
27404
27481
  }
27405
27482
  export class MeasurementFormSettingsClient extends AuthorizedApiBase {
27406
27483
  http;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261009.301.1-alpha",
3
+ "version": "20261009.303.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -28913,9 +28913,34 @@ export interface IMeasurementFormSchemasClient {
28913
28913
  IsValidDesignation/IsSupported flags carry invalid-input/
28914
28914
  unsupported-tolerance-class feedback, since that's expected user
28915
28915
  input, not a server error.
28916
+ elementType is optional for now (backward
28917
+ compatible with API clients generated before this parameter
28918
+ existed) - when provided, it's checked server-side against
28919
+ CalculateFitTolerance.Handler.Iso286EligibleElementTypes
28920
+ (Diameter/Length only) so an edited request payload can't get a
28921
+ fit tolerance back for a type ISO 286 doesn't apply to.
28916
28922
  * @param designation (optional)
28923
+ * @param elementType (optional)
28917
28924
  */
28918
- calculateFitTolerance(designation: string | undefined): Promise<FitToleranceResultDto>;
28925
+ calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto>;
28926
+
28927
+ /**
28928
+ * Calculates +/- tolerance from the schema's ISO 2768 general
28929
+ tolerance setting, for a Nominal Text value that isn't an ISO 286
28930
+ fit designation (see fittolerance above) - e.g. a plain "12" on a
28931
+ Diameter element. Restricted server-side to Diameter/Length/
28932
+ Radius/Chamfer (CalculateGeneralTolerance.Handler.LegacyTypeByElementType)
28933
+ regardless of what elementType the request claims, so editing the
28934
+ request payload can't bypass the restriction. Always returns 200 -
28935
+ IsSupported/Message carry "not applicable to this type"/"no general
28936
+ tolerance set"/"out of range" feedback, since that's expected user
28937
+ input, not a server error.
28938
+ * @param elementType (optional)
28939
+ * @param nominal (optional)
28940
+ * @param unit (optional)
28941
+ * @param generalTolerance (optional)
28942
+ */
28943
+ calculateGeneralTolerance(elementType: string | undefined, nominal: number | undefined, unit: UnitOfMeasureDto | undefined, generalTolerance: GeneralToleranceDto | undefined): Promise<GeneralToleranceResultDto>;
28919
28944
  }
28920
28945
 
28921
28946
  export class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
@@ -29049,14 +29074,23 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
29049
29074
  IsValidDesignation/IsSupported flags carry invalid-input/
29050
29075
  unsupported-tolerance-class feedback, since that's expected user
29051
29076
  input, not a server error.
29077
+ elementType is optional for now (backward
29078
+ compatible with API clients generated before this parameter
29079
+ existed) - when provided, it's checked server-side against
29080
+ CalculateFitTolerance.Handler.Iso286EligibleElementTypes
29081
+ (Diameter/Length only) so an edited request payload can't get a
29082
+ fit tolerance back for a type ISO 286 doesn't apply to.
29052
29083
  * @param designation (optional)
29084
+ * @param elementType (optional)
29053
29085
  */
29054
- calculateFitTolerance(designation: string | undefined): Promise<FitToleranceResultDto> {
29086
+ calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto> {
29055
29087
  let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance?";
29056
29088
  if (designation === null)
29057
29089
  throw new globalThis.Error("The parameter 'designation' cannot be null.");
29058
29090
  else if (designation !== undefined)
29059
29091
  url_ += "designation=" + encodeURIComponent("" + designation) + "&";
29092
+ if (elementType !== undefined && elementType !== null)
29093
+ url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
29060
29094
  url_ = url_.replace(/[?&]$/, "");
29061
29095
 
29062
29096
  let options_: RequestInit = {
@@ -29089,6 +29123,73 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
29089
29123
  }
29090
29124
  return Promise.resolve<FitToleranceResultDto>(null as any);
29091
29125
  }
29126
+
29127
+ /**
29128
+ * Calculates +/- tolerance from the schema's ISO 2768 general
29129
+ tolerance setting, for a Nominal Text value that isn't an ISO 286
29130
+ fit designation (see fittolerance above) - e.g. a plain "12" on a
29131
+ Diameter element. Restricted server-side to Diameter/Length/
29132
+ Radius/Chamfer (CalculateGeneralTolerance.Handler.LegacyTypeByElementType)
29133
+ regardless of what elementType the request claims, so editing the
29134
+ request payload can't bypass the restriction. Always returns 200 -
29135
+ IsSupported/Message carry "not applicable to this type"/"no general
29136
+ tolerance set"/"out of range" feedback, since that's expected user
29137
+ input, not a server error.
29138
+ * @param elementType (optional)
29139
+ * @param nominal (optional)
29140
+ * @param unit (optional)
29141
+ * @param generalTolerance (optional)
29142
+ */
29143
+ calculateGeneralTolerance(elementType: string | undefined, nominal: number | undefined, unit: UnitOfMeasureDto | undefined, generalTolerance: GeneralToleranceDto | undefined): Promise<GeneralToleranceResultDto> {
29144
+ let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance?";
29145
+ if (elementType === null)
29146
+ throw new globalThis.Error("The parameter 'elementType' cannot be null.");
29147
+ else if (elementType !== undefined)
29148
+ url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
29149
+ if (nominal === null)
29150
+ throw new globalThis.Error("The parameter 'nominal' cannot be null.");
29151
+ else if (nominal !== undefined)
29152
+ url_ += "nominal=" + encodeURIComponent("" + nominal) + "&";
29153
+ if (unit === null)
29154
+ throw new globalThis.Error("The parameter 'unit' cannot be null.");
29155
+ else if (unit !== undefined)
29156
+ url_ += "unit=" + encodeURIComponent("" + unit) + "&";
29157
+ if (generalTolerance === null)
29158
+ throw new globalThis.Error("The parameter 'generalTolerance' cannot be null.");
29159
+ else if (generalTolerance !== undefined)
29160
+ url_ += "generalTolerance=" + encodeURIComponent("" + generalTolerance) + "&";
29161
+ url_ = url_.replace(/[?&]$/, "");
29162
+
29163
+ let options_: RequestInit = {
29164
+ method: "GET",
29165
+ headers: {
29166
+ "Accept": "application/json"
29167
+ }
29168
+ };
29169
+
29170
+ return this.transformOptions(options_).then(transformedOptions_ => {
29171
+ return this.http.fetch(url_, transformedOptions_);
29172
+ }).then((_response: Response) => {
29173
+ return this.processCalculateGeneralTolerance(_response);
29174
+ });
29175
+ }
29176
+
29177
+ protected processCalculateGeneralTolerance(response: Response): Promise<GeneralToleranceResultDto> {
29178
+ const status = response.status;
29179
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
29180
+ if (status === 200) {
29181
+ return response.text().then((_responseText) => {
29182
+ let result200: any = null;
29183
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as GeneralToleranceResultDto;
29184
+ return result200;
29185
+ });
29186
+ } else if (status !== 200 && status !== 204) {
29187
+ return response.text().then((_responseText) => {
29188
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
29189
+ });
29190
+ }
29191
+ return Promise.resolve<GeneralToleranceResultDto>(null as any);
29192
+ }
29092
29193
  }
29093
29194
 
29094
29195
  export interface IMeasurementFormSettingsClient {
@@ -39903,6 +40004,13 @@ export interface FitToleranceResultDto {
39903
40004
  message?: string | null;
39904
40005
  }
39905
40006
 
40007
+ export interface GeneralToleranceResultDto {
40008
+ isSupported?: boolean;
40009
+ tolerancePlus?: number | null;
40010
+ toleranceMinus?: number | null;
40011
+ message?: string | null;
40012
+ }
40013
+
39906
40014
  export interface MeasurementFormInstanceDto {
39907
40015
  id: string;
39908
40016
  readonly: boolean;