@ignos/api-client 20261009.303.1-alpha → 20261009.304.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.
- package/lib/ignosportal-api.d.ts +52 -69
- package/lib/ignosportal-api.js +56 -58
- package/package.json +1 -1
- package/src/ignosportal-api.ts +103 -90
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -3223,41 +3223,17 @@ export interface IMeasurementFormSchemasClient {
|
|
|
3223
3223
|
postListMeasurementFormSchemas(request: ListMeasurementFormSchemasRequest | undefined): Promise<PagedResultOfMeasurementFormListDto>;
|
|
3224
3224
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
3225
3225
|
/**
|
|
3226
|
-
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
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.
|
|
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)
|
|
3259
|
-
*/
|
|
3260
|
-
calculateGeneralTolerance(elementType: string | undefined, nominal: number | undefined, unit: UnitOfMeasureDto | undefined, generalTolerance: GeneralToleranceDto | undefined): Promise<GeneralToleranceResultDto>;
|
|
3226
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7") typed into a Nominal Text field.
|
|
3227
|
+
*/
|
|
3228
|
+
calculateFitTolerance(request: CalculateFitToleranceRequest): Promise<FitToleranceResultDto>;
|
|
3229
|
+
/**
|
|
3230
|
+
* Calculates +/- tolerance from the schema's ISO 2768 general tolerance setting.
|
|
3231
|
+
*/
|
|
3232
|
+
calculateGeneralTolerance(request: CalculateGeneralToleranceRequest): Promise<GeneralToleranceResultDto>;
|
|
3233
|
+
/**
|
|
3234
|
+
* Batch form of generaltolerance above - calculates tolerances for many elements in one request.
|
|
3235
|
+
*/
|
|
3236
|
+
calculateGeneralToleranceBatch(request: CalculateGeneralToleranceBatchRequest): Promise<GeneralToleranceBatchResultDto>;
|
|
3261
3237
|
}
|
|
3262
3238
|
export declare class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
|
|
3263
3239
|
private http;
|
|
@@ -3272,43 +3248,20 @@ export declare class MeasurementFormSchemasClient extends AuthorizedApiBase impl
|
|
|
3272
3248
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
3273
3249
|
protected processListFrequencies(response: Response): Promise<MeasurementFrequencyDto[]>;
|
|
3274
3250
|
/**
|
|
3275
|
-
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
calculation with no data access, not tied to any specific schema
|
|
3279
|
-
version or instance. Always returns 200 - the DTO's
|
|
3280
|
-
IsValidDesignation/IsSupported flags carry invalid-input/
|
|
3281
|
-
unsupported-tolerance-class feedback, since that's expected user
|
|
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.
|
|
3289
|
-
* @param designation (optional)
|
|
3290
|
-
* @param elementType (optional)
|
|
3291
|
-
*/
|
|
3292
|
-
calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto>;
|
|
3251
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7") typed into a Nominal Text field.
|
|
3252
|
+
*/
|
|
3253
|
+
calculateFitTolerance(request: CalculateFitToleranceRequest): Promise<FitToleranceResultDto>;
|
|
3293
3254
|
protected processCalculateFitTolerance(response: Response): Promise<FitToleranceResultDto>;
|
|
3294
3255
|
/**
|
|
3295
|
-
* Calculates +/- tolerance from the schema's ISO 2768 general
|
|
3296
|
-
|
|
3297
|
-
|
|
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>;
|
|
3256
|
+
* Calculates +/- tolerance from the schema's ISO 2768 general tolerance setting.
|
|
3257
|
+
*/
|
|
3258
|
+
calculateGeneralTolerance(request: CalculateGeneralToleranceRequest): Promise<GeneralToleranceResultDto>;
|
|
3311
3259
|
protected processCalculateGeneralTolerance(response: Response): Promise<GeneralToleranceResultDto>;
|
|
3260
|
+
/**
|
|
3261
|
+
* Batch form of generaltolerance above - calculates tolerances for many elements in one request.
|
|
3262
|
+
*/
|
|
3263
|
+
calculateGeneralToleranceBatch(request: CalculateGeneralToleranceBatchRequest): Promise<GeneralToleranceBatchResultDto>;
|
|
3264
|
+
protected processCalculateGeneralToleranceBatch(response: Response): Promise<GeneralToleranceBatchResultDto>;
|
|
3312
3265
|
}
|
|
3313
3266
|
export interface IMeasurementFormSettingsClient {
|
|
3314
3267
|
getMeasurementFormSettings(): Promise<InspectCompanySettingsDto>;
|
|
@@ -10080,12 +10033,42 @@ export interface FitToleranceResultDto {
|
|
|
10080
10033
|
toleranceMinusMm?: number | null;
|
|
10081
10034
|
message?: string | null;
|
|
10082
10035
|
}
|
|
10036
|
+
export interface CalculateFitToleranceRequest {
|
|
10037
|
+
designation: string;
|
|
10038
|
+
elementType: string;
|
|
10039
|
+
}
|
|
10083
10040
|
export interface GeneralToleranceResultDto {
|
|
10084
10041
|
isSupported?: boolean;
|
|
10085
10042
|
tolerancePlus?: number | null;
|
|
10086
10043
|
toleranceMinus?: number | null;
|
|
10087
10044
|
message?: string | null;
|
|
10088
10045
|
}
|
|
10046
|
+
export interface CalculateGeneralToleranceRequest {
|
|
10047
|
+
elementType: string;
|
|
10048
|
+
nominal: number;
|
|
10049
|
+
unit: UnitOfMeasureDto;
|
|
10050
|
+
generalTolerance: GeneralToleranceDto;
|
|
10051
|
+
}
|
|
10052
|
+
export interface GeneralToleranceBatchResultDto {
|
|
10053
|
+
results: GeneralToleranceBatchItemResultDto[];
|
|
10054
|
+
}
|
|
10055
|
+
export interface GeneralToleranceBatchItemResultDto {
|
|
10056
|
+
id: string;
|
|
10057
|
+
isSupported?: boolean;
|
|
10058
|
+
tolerancePlus?: number | null;
|
|
10059
|
+
toleranceMinus?: number | null;
|
|
10060
|
+
message?: string | null;
|
|
10061
|
+
}
|
|
10062
|
+
export interface CalculateGeneralToleranceBatchRequest {
|
|
10063
|
+
items: GeneralToleranceBatchItemDto[];
|
|
10064
|
+
generalTolerance: GeneralToleranceDto;
|
|
10065
|
+
}
|
|
10066
|
+
export interface GeneralToleranceBatchItemDto {
|
|
10067
|
+
id: string;
|
|
10068
|
+
elementType: string;
|
|
10069
|
+
nominal: number;
|
|
10070
|
+
unit: UnitOfMeasureDto;
|
|
10071
|
+
}
|
|
10089
10072
|
export interface MeasurementFormInstanceDto {
|
|
10090
10073
|
id: string;
|
|
10091
10074
|
readonly: boolean;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -27351,35 +27351,17 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27351
27351
|
return Promise.resolve(null);
|
|
27352
27352
|
}
|
|
27353
27353
|
/**
|
|
27354
|
-
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
27355
|
-
typed into a measurement's Nominal Text field. Used by both Schema
|
|
27356
|
-
Creator and the legacy schema builder - it's a stateless, no-op
|
|
27357
|
-
calculation with no data access, not tied to any specific schema
|
|
27358
|
-
version or instance. Always returns 200 - the DTO's
|
|
27359
|
-
IsValidDesignation/IsSupported flags carry invalid-input/
|
|
27360
|
-
unsupported-tolerance-class feedback, since that's expected user
|
|
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.
|
|
27368
|
-
* @param designation (optional)
|
|
27369
|
-
* @param elementType (optional)
|
|
27354
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7") typed into a Nominal Text field.
|
|
27370
27355
|
*/
|
|
27371
|
-
calculateFitTolerance(
|
|
27372
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance
|
|
27373
|
-
if (designation === null)
|
|
27374
|
-
throw new globalThis.Error("The parameter 'designation' cannot be null.");
|
|
27375
|
-
else if (designation !== undefined)
|
|
27376
|
-
url_ += "designation=" + encodeURIComponent("" + designation) + "&";
|
|
27377
|
-
if (elementType !== undefined && elementType !== null)
|
|
27378
|
-
url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
|
|
27356
|
+
calculateFitTolerance(request) {
|
|
27357
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance";
|
|
27379
27358
|
url_ = url_.replace(/[?&]$/, "");
|
|
27359
|
+
const content_ = JSON.stringify(request);
|
|
27380
27360
|
let options_ = {
|
|
27381
|
-
|
|
27361
|
+
body: content_,
|
|
27362
|
+
method: "POST",
|
|
27382
27363
|
headers: {
|
|
27364
|
+
"Content-Type": "application/json",
|
|
27383
27365
|
"Accept": "application/json"
|
|
27384
27366
|
}
|
|
27385
27367
|
};
|
|
@@ -27411,43 +27393,17 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27411
27393
|
return Promise.resolve(null);
|
|
27412
27394
|
}
|
|
27413
27395
|
/**
|
|
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)
|
|
27396
|
+
* Calculates +/- tolerance from the schema's ISO 2768 general tolerance setting.
|
|
27428
27397
|
*/
|
|
27429
|
-
calculateGeneralTolerance(
|
|
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) + "&";
|
|
27398
|
+
calculateGeneralTolerance(request) {
|
|
27399
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance";
|
|
27447
27400
|
url_ = url_.replace(/[?&]$/, "");
|
|
27401
|
+
const content_ = JSON.stringify(request);
|
|
27448
27402
|
let options_ = {
|
|
27449
|
-
|
|
27403
|
+
body: content_,
|
|
27404
|
+
method: "POST",
|
|
27450
27405
|
headers: {
|
|
27406
|
+
"Content-Type": "application/json",
|
|
27451
27407
|
"Accept": "application/json"
|
|
27452
27408
|
}
|
|
27453
27409
|
};
|
|
@@ -27478,6 +27434,48 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27478
27434
|
}
|
|
27479
27435
|
return Promise.resolve(null);
|
|
27480
27436
|
}
|
|
27437
|
+
/**
|
|
27438
|
+
* Batch form of generaltolerance above - calculates tolerances for many elements in one request.
|
|
27439
|
+
*/
|
|
27440
|
+
calculateGeneralToleranceBatch(request) {
|
|
27441
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance/batch";
|
|
27442
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
27443
|
+
const content_ = JSON.stringify(request);
|
|
27444
|
+
let options_ = {
|
|
27445
|
+
body: content_,
|
|
27446
|
+
method: "POST",
|
|
27447
|
+
headers: {
|
|
27448
|
+
"Content-Type": "application/json",
|
|
27449
|
+
"Accept": "application/json"
|
|
27450
|
+
}
|
|
27451
|
+
};
|
|
27452
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
27453
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
27454
|
+
}).then((_response) => {
|
|
27455
|
+
return this.processCalculateGeneralToleranceBatch(_response);
|
|
27456
|
+
});
|
|
27457
|
+
}
|
|
27458
|
+
processCalculateGeneralToleranceBatch(response) {
|
|
27459
|
+
const status = response.status;
|
|
27460
|
+
let _headers = {};
|
|
27461
|
+
if (response.headers && response.headers.forEach) {
|
|
27462
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
27463
|
+
}
|
|
27464
|
+
;
|
|
27465
|
+
if (status === 200) {
|
|
27466
|
+
return response.text().then((_responseText) => {
|
|
27467
|
+
let result200 = null;
|
|
27468
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
27469
|
+
return result200;
|
|
27470
|
+
});
|
|
27471
|
+
}
|
|
27472
|
+
else if (status !== 200 && status !== 204) {
|
|
27473
|
+
return response.text().then((_responseText) => {
|
|
27474
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
27475
|
+
});
|
|
27476
|
+
}
|
|
27477
|
+
return Promise.resolve(null);
|
|
27478
|
+
}
|
|
27481
27479
|
}
|
|
27482
27480
|
export class MeasurementFormSettingsClient extends AuthorizedApiBase {
|
|
27483
27481
|
http;
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -28905,42 +28905,19 @@ export interface IMeasurementFormSchemasClient {
|
|
|
28905
28905
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
28906
28906
|
|
|
28907
28907
|
/**
|
|
28908
|
-
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
28909
|
-
typed into a measurement's Nominal Text field. Used by both Schema
|
|
28910
|
-
Creator and the legacy schema builder - it's a stateless, no-op
|
|
28911
|
-
calculation with no data access, not tied to any specific schema
|
|
28912
|
-
version or instance. Always returns 200 - the DTO's
|
|
28913
|
-
IsValidDesignation/IsSupported flags carry invalid-input/
|
|
28914
|
-
unsupported-tolerance-class feedback, since that's expected user
|
|
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.
|
|
28922
|
-
* @param designation (optional)
|
|
28923
|
-
* @param elementType (optional)
|
|
28908
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7") typed into a Nominal Text field.
|
|
28924
28909
|
*/
|
|
28925
|
-
calculateFitTolerance(
|
|
28910
|
+
calculateFitTolerance(request: CalculateFitToleranceRequest): Promise<FitToleranceResultDto>;
|
|
28926
28911
|
|
|
28927
28912
|
/**
|
|
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)
|
|
28913
|
+
* Calculates +/- tolerance from the schema's ISO 2768 general tolerance setting.
|
|
28942
28914
|
*/
|
|
28943
|
-
calculateGeneralTolerance(
|
|
28915
|
+
calculateGeneralTolerance(request: CalculateGeneralToleranceRequest): Promise<GeneralToleranceResultDto>;
|
|
28916
|
+
|
|
28917
|
+
/**
|
|
28918
|
+
* Batch form of generaltolerance above - calculates tolerances for many elements in one request.
|
|
28919
|
+
*/
|
|
28920
|
+
calculateGeneralToleranceBatch(request: CalculateGeneralToleranceBatchRequest): Promise<GeneralToleranceBatchResultDto>;
|
|
28944
28921
|
}
|
|
28945
28922
|
|
|
28946
28923
|
export class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
|
|
@@ -29066,36 +29043,19 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
|
|
|
29066
29043
|
}
|
|
29067
29044
|
|
|
29068
29045
|
/**
|
|
29069
|
-
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
29070
|
-
typed into a measurement's Nominal Text field. Used by both Schema
|
|
29071
|
-
Creator and the legacy schema builder - it's a stateless, no-op
|
|
29072
|
-
calculation with no data access, not tied to any specific schema
|
|
29073
|
-
version or instance. Always returns 200 - the DTO's
|
|
29074
|
-
IsValidDesignation/IsSupported flags carry invalid-input/
|
|
29075
|
-
unsupported-tolerance-class feedback, since that's expected user
|
|
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.
|
|
29083
|
-
* @param designation (optional)
|
|
29084
|
-
* @param elementType (optional)
|
|
29046
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7") typed into a Nominal Text field.
|
|
29085
29047
|
*/
|
|
29086
|
-
calculateFitTolerance(
|
|
29087
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance
|
|
29088
|
-
if (designation === null)
|
|
29089
|
-
throw new globalThis.Error("The parameter 'designation' cannot be null.");
|
|
29090
|
-
else if (designation !== undefined)
|
|
29091
|
-
url_ += "designation=" + encodeURIComponent("" + designation) + "&";
|
|
29092
|
-
if (elementType !== undefined && elementType !== null)
|
|
29093
|
-
url_ += "elementType=" + encodeURIComponent("" + elementType) + "&";
|
|
29048
|
+
calculateFitTolerance(request: CalculateFitToleranceRequest): Promise<FitToleranceResultDto> {
|
|
29049
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/fittolerance";
|
|
29094
29050
|
url_ = url_.replace(/[?&]$/, "");
|
|
29095
29051
|
|
|
29052
|
+
const content_ = JSON.stringify(request);
|
|
29053
|
+
|
|
29096
29054
|
let options_: RequestInit = {
|
|
29097
|
-
|
|
29055
|
+
body: content_,
|
|
29056
|
+
method: "POST",
|
|
29098
29057
|
headers: {
|
|
29058
|
+
"Content-Type": "application/json",
|
|
29099
29059
|
"Accept": "application/json"
|
|
29100
29060
|
}
|
|
29101
29061
|
};
|
|
@@ -29125,44 +29085,19 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
|
|
|
29125
29085
|
}
|
|
29126
29086
|
|
|
29127
29087
|
/**
|
|
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)
|
|
29088
|
+
* Calculates +/- tolerance from the schema's ISO 2768 general tolerance setting.
|
|
29142
29089
|
*/
|
|
29143
|
-
calculateGeneralTolerance(
|
|
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) + "&";
|
|
29090
|
+
calculateGeneralTolerance(request: CalculateGeneralToleranceRequest): Promise<GeneralToleranceResultDto> {
|
|
29091
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance";
|
|
29161
29092
|
url_ = url_.replace(/[?&]$/, "");
|
|
29162
29093
|
|
|
29094
|
+
const content_ = JSON.stringify(request);
|
|
29095
|
+
|
|
29163
29096
|
let options_: RequestInit = {
|
|
29164
|
-
|
|
29097
|
+
body: content_,
|
|
29098
|
+
method: "POST",
|
|
29165
29099
|
headers: {
|
|
29100
|
+
"Content-Type": "application/json",
|
|
29166
29101
|
"Accept": "application/json"
|
|
29167
29102
|
}
|
|
29168
29103
|
};
|
|
@@ -29190,6 +29125,48 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
|
|
|
29190
29125
|
}
|
|
29191
29126
|
return Promise.resolve<GeneralToleranceResultDto>(null as any);
|
|
29192
29127
|
}
|
|
29128
|
+
|
|
29129
|
+
/**
|
|
29130
|
+
* Batch form of generaltolerance above - calculates tolerances for many elements in one request.
|
|
29131
|
+
*/
|
|
29132
|
+
calculateGeneralToleranceBatch(request: CalculateGeneralToleranceBatchRequest): Promise<GeneralToleranceBatchResultDto> {
|
|
29133
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/generaltolerance/batch";
|
|
29134
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
29135
|
+
|
|
29136
|
+
const content_ = JSON.stringify(request);
|
|
29137
|
+
|
|
29138
|
+
let options_: RequestInit = {
|
|
29139
|
+
body: content_,
|
|
29140
|
+
method: "POST",
|
|
29141
|
+
headers: {
|
|
29142
|
+
"Content-Type": "application/json",
|
|
29143
|
+
"Accept": "application/json"
|
|
29144
|
+
}
|
|
29145
|
+
};
|
|
29146
|
+
|
|
29147
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29148
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
29149
|
+
}).then((_response: Response) => {
|
|
29150
|
+
return this.processCalculateGeneralToleranceBatch(_response);
|
|
29151
|
+
});
|
|
29152
|
+
}
|
|
29153
|
+
|
|
29154
|
+
protected processCalculateGeneralToleranceBatch(response: Response): Promise<GeneralToleranceBatchResultDto> {
|
|
29155
|
+
const status = response.status;
|
|
29156
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
29157
|
+
if (status === 200) {
|
|
29158
|
+
return response.text().then((_responseText) => {
|
|
29159
|
+
let result200: any = null;
|
|
29160
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as GeneralToleranceBatchResultDto;
|
|
29161
|
+
return result200;
|
|
29162
|
+
});
|
|
29163
|
+
} else if (status !== 200 && status !== 204) {
|
|
29164
|
+
return response.text().then((_responseText) => {
|
|
29165
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29166
|
+
});
|
|
29167
|
+
}
|
|
29168
|
+
return Promise.resolve<GeneralToleranceBatchResultDto>(null as any);
|
|
29169
|
+
}
|
|
29193
29170
|
}
|
|
29194
29171
|
|
|
29195
29172
|
export interface IMeasurementFormSettingsClient {
|
|
@@ -40004,6 +39981,11 @@ export interface FitToleranceResultDto {
|
|
|
40004
39981
|
message?: string | null;
|
|
40005
39982
|
}
|
|
40006
39983
|
|
|
39984
|
+
export interface CalculateFitToleranceRequest {
|
|
39985
|
+
designation: string;
|
|
39986
|
+
elementType: string;
|
|
39987
|
+
}
|
|
39988
|
+
|
|
40007
39989
|
export interface GeneralToleranceResultDto {
|
|
40008
39990
|
isSupported?: boolean;
|
|
40009
39991
|
tolerancePlus?: number | null;
|
|
@@ -40011,6 +39993,37 @@ export interface GeneralToleranceResultDto {
|
|
|
40011
39993
|
message?: string | null;
|
|
40012
39994
|
}
|
|
40013
39995
|
|
|
39996
|
+
export interface CalculateGeneralToleranceRequest {
|
|
39997
|
+
elementType: string;
|
|
39998
|
+
nominal: number;
|
|
39999
|
+
unit: UnitOfMeasureDto;
|
|
40000
|
+
generalTolerance: GeneralToleranceDto;
|
|
40001
|
+
}
|
|
40002
|
+
|
|
40003
|
+
export interface GeneralToleranceBatchResultDto {
|
|
40004
|
+
results: GeneralToleranceBatchItemResultDto[];
|
|
40005
|
+
}
|
|
40006
|
+
|
|
40007
|
+
export interface GeneralToleranceBatchItemResultDto {
|
|
40008
|
+
id: string;
|
|
40009
|
+
isSupported?: boolean;
|
|
40010
|
+
tolerancePlus?: number | null;
|
|
40011
|
+
toleranceMinus?: number | null;
|
|
40012
|
+
message?: string | null;
|
|
40013
|
+
}
|
|
40014
|
+
|
|
40015
|
+
export interface CalculateGeneralToleranceBatchRequest {
|
|
40016
|
+
items: GeneralToleranceBatchItemDto[];
|
|
40017
|
+
generalTolerance: GeneralToleranceDto;
|
|
40018
|
+
}
|
|
40019
|
+
|
|
40020
|
+
export interface GeneralToleranceBatchItemDto {
|
|
40021
|
+
id: string;
|
|
40022
|
+
elementType: string;
|
|
40023
|
+
nominal: number;
|
|
40024
|
+
unit: UnitOfMeasureDto;
|
|
40025
|
+
}
|
|
40026
|
+
|
|
40014
40027
|
export interface MeasurementFormInstanceDto {
|
|
40015
40028
|
id: string;
|
|
40016
40029
|
readonly: boolean;
|