@ignos/api-client 20261009.302.1 → 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.
- package/lib/ignosportal-api.d.ts +90 -1
- package/lib/ignosportal-api.js +128 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +182 -1
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -3222,6 +3222,42 @@ export interface IMeasurementFormSchemasClient {
|
|
|
3222
3222
|
getMeasurementFormSchema(id: string): Promise<MeasurementFormSchemaDto>;
|
|
3223
3223
|
postListMeasurementFormSchemas(request: ListMeasurementFormSchemasRequest | undefined): Promise<PagedResultOfMeasurementFormListDto>;
|
|
3224
3224
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
3225
|
+
/**
|
|
3226
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
3227
|
+
typed into a measurement's Nominal Text field. Used by both Schema
|
|
3228
|
+
Creator and the legacy schema builder - it's a stateless, no-op
|
|
3229
|
+
calculation with no data access, not tied to any specific schema
|
|
3230
|
+
version or instance. Always returns 200 - the DTO's
|
|
3231
|
+
IsValidDesignation/IsSupported flags carry invalid-input/
|
|
3232
|
+
unsupported-tolerance-class feedback, since that's expected user
|
|
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.
|
|
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>;
|
|
3225
3261
|
}
|
|
3226
3262
|
export declare class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
|
|
3227
3263
|
private http;
|
|
@@ -3235,6 +3271,44 @@ export declare class MeasurementFormSchemasClient extends AuthorizedApiBase impl
|
|
|
3235
3271
|
protected processPostListMeasurementFormSchemas(response: Response): Promise<PagedResultOfMeasurementFormListDto>;
|
|
3236
3272
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
3237
3273
|
protected processListFrequencies(response: Response): Promise<MeasurementFrequencyDto[]>;
|
|
3274
|
+
/**
|
|
3275
|
+
* Calculates +/- tolerance for an ISO fit designation (e.g. "12H7")
|
|
3276
|
+
typed into a measurement's Nominal Text field. Used by both Schema
|
|
3277
|
+
Creator and the legacy schema builder - it's a stateless, no-op
|
|
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>;
|
|
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>;
|
|
3238
3312
|
}
|
|
3239
3313
|
export interface IMeasurementFormSettingsClient {
|
|
3240
3314
|
getMeasurementFormSettings(): Promise<InspectCompanySettingsDto>;
|
|
@@ -7801,7 +7875,6 @@ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
|
7801
7875
|
export interface SetProgramStatus {
|
|
7802
7876
|
workOrderId?: string;
|
|
7803
7877
|
operationNumber?: number;
|
|
7804
|
-
resourceId?: string;
|
|
7805
7878
|
status?: ProgramStatus;
|
|
7806
7879
|
}
|
|
7807
7880
|
export type ProductionOrderAttachmentType = "Url" | "Note" | "Image" | "File" | "OperationText";
|
|
@@ -9997,6 +10070,22 @@ export interface MeasurementFrequencyDto {
|
|
|
9997
10070
|
id: number;
|
|
9998
10071
|
name: string;
|
|
9999
10072
|
}
|
|
10073
|
+
export interface FitToleranceResultDto {
|
|
10074
|
+
isValidDesignation?: boolean;
|
|
10075
|
+
isSupported?: boolean;
|
|
10076
|
+
nominalSizeMm?: number | null;
|
|
10077
|
+
toleranceClassLetter?: string | null;
|
|
10078
|
+
itGrade?: number | null;
|
|
10079
|
+
tolerancePlusMm?: number | null;
|
|
10080
|
+
toleranceMinusMm?: number | null;
|
|
10081
|
+
message?: string | null;
|
|
10082
|
+
}
|
|
10083
|
+
export interface GeneralToleranceResultDto {
|
|
10084
|
+
isSupported?: boolean;
|
|
10085
|
+
tolerancePlus?: number | null;
|
|
10086
|
+
toleranceMinus?: number | null;
|
|
10087
|
+
message?: string | null;
|
|
10088
|
+
}
|
|
10000
10089
|
export interface MeasurementFormInstanceDto {
|
|
10001
10090
|
id: string;
|
|
10002
10091
|
readonly: boolean;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -27350,6 +27350,134 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27350
27350
|
}
|
|
27351
27351
|
return Promise.resolve(null);
|
|
27352
27352
|
}
|
|
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)
|
|
27370
|
+
*/
|
|
27371
|
+
calculateFitTolerance(designation, elementType) {
|
|
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) + "&";
|
|
27379
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
27380
|
+
let options_ = {
|
|
27381
|
+
method: "GET",
|
|
27382
|
+
headers: {
|
|
27383
|
+
"Accept": "application/json"
|
|
27384
|
+
}
|
|
27385
|
+
};
|
|
27386
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
27387
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
27388
|
+
}).then((_response) => {
|
|
27389
|
+
return this.processCalculateFitTolerance(_response);
|
|
27390
|
+
});
|
|
27391
|
+
}
|
|
27392
|
+
processCalculateFitTolerance(response) {
|
|
27393
|
+
const status = response.status;
|
|
27394
|
+
let _headers = {};
|
|
27395
|
+
if (response.headers && response.headers.forEach) {
|
|
27396
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
27397
|
+
}
|
|
27398
|
+
;
|
|
27399
|
+
if (status === 200) {
|
|
27400
|
+
return response.text().then((_responseText) => {
|
|
27401
|
+
let result200 = null;
|
|
27402
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
27403
|
+
return result200;
|
|
27404
|
+
});
|
|
27405
|
+
}
|
|
27406
|
+
else if (status !== 200 && status !== 204) {
|
|
27407
|
+
return response.text().then((_responseText) => {
|
|
27408
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
27409
|
+
});
|
|
27410
|
+
}
|
|
27411
|
+
return Promise.resolve(null);
|
|
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
|
+
}
|
|
27353
27481
|
}
|
|
27354
27482
|
export class MeasurementFormSettingsClient extends AuthorizedApiBase {
|
|
27355
27483
|
http;
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -28903,6 +28903,44 @@ export interface IMeasurementFormSchemasClient {
|
|
|
28903
28903
|
postListMeasurementFormSchemas(request: ListMeasurementFormSchemasRequest | undefined): Promise<PagedResultOfMeasurementFormListDto>;
|
|
28904
28904
|
|
|
28905
28905
|
listFrequencies(): Promise<MeasurementFrequencyDto[]>;
|
|
28906
|
+
|
|
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)
|
|
28924
|
+
*/
|
|
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>;
|
|
28906
28944
|
}
|
|
28907
28945
|
|
|
28908
28946
|
export class MeasurementFormSchemasClient extends AuthorizedApiBase implements IMeasurementFormSchemasClient {
|
|
@@ -29026,6 +29064,132 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase implements I
|
|
|
29026
29064
|
}
|
|
29027
29065
|
return Promise.resolve<MeasurementFrequencyDto[]>(null as any);
|
|
29028
29066
|
}
|
|
29067
|
+
|
|
29068
|
+
/**
|
|
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)
|
|
29085
|
+
*/
|
|
29086
|
+
calculateFitTolerance(designation: string | undefined, elementType: string | null | undefined): Promise<FitToleranceResultDto> {
|
|
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) + "&";
|
|
29094
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
29095
|
+
|
|
29096
|
+
let options_: RequestInit = {
|
|
29097
|
+
method: "GET",
|
|
29098
|
+
headers: {
|
|
29099
|
+
"Accept": "application/json"
|
|
29100
|
+
}
|
|
29101
|
+
};
|
|
29102
|
+
|
|
29103
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29104
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
29105
|
+
}).then((_response: Response) => {
|
|
29106
|
+
return this.processCalculateFitTolerance(_response);
|
|
29107
|
+
});
|
|
29108
|
+
}
|
|
29109
|
+
|
|
29110
|
+
protected processCalculateFitTolerance(response: Response): Promise<FitToleranceResultDto> {
|
|
29111
|
+
const status = response.status;
|
|
29112
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
29113
|
+
if (status === 200) {
|
|
29114
|
+
return response.text().then((_responseText) => {
|
|
29115
|
+
let result200: any = null;
|
|
29116
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as FitToleranceResultDto;
|
|
29117
|
+
return result200;
|
|
29118
|
+
});
|
|
29119
|
+
} else if (status !== 200 && status !== 204) {
|
|
29120
|
+
return response.text().then((_responseText) => {
|
|
29121
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29122
|
+
});
|
|
29123
|
+
}
|
|
29124
|
+
return Promise.resolve<FitToleranceResultDto>(null as any);
|
|
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
|
+
}
|
|
29029
29193
|
}
|
|
29030
29194
|
|
|
29031
29195
|
export interface IMeasurementFormSettingsClient {
|
|
@@ -37371,7 +37535,6 @@ export type PlannerEventType = "Published" | "DraftSaved" | "ResetToErp";
|
|
|
37371
37535
|
export interface SetProgramStatus {
|
|
37372
37536
|
workOrderId?: string;
|
|
37373
37537
|
operationNumber?: number;
|
|
37374
|
-
resourceId?: string;
|
|
37375
37538
|
status?: ProgramStatus;
|
|
37376
37539
|
}
|
|
37377
37540
|
|
|
@@ -39830,6 +39993,24 @@ export interface MeasurementFrequencyDto {
|
|
|
39830
39993
|
name: string;
|
|
39831
39994
|
}
|
|
39832
39995
|
|
|
39996
|
+
export interface FitToleranceResultDto {
|
|
39997
|
+
isValidDesignation?: boolean;
|
|
39998
|
+
isSupported?: boolean;
|
|
39999
|
+
nominalSizeMm?: number | null;
|
|
40000
|
+
toleranceClassLetter?: string | null;
|
|
40001
|
+
itGrade?: number | null;
|
|
40002
|
+
tolerancePlusMm?: number | null;
|
|
40003
|
+
toleranceMinusMm?: number | null;
|
|
40004
|
+
message?: string | null;
|
|
40005
|
+
}
|
|
40006
|
+
|
|
40007
|
+
export interface GeneralToleranceResultDto {
|
|
40008
|
+
isSupported?: boolean;
|
|
40009
|
+
tolerancePlus?: number | null;
|
|
40010
|
+
toleranceMinus?: number | null;
|
|
40011
|
+
message?: string | null;
|
|
40012
|
+
}
|
|
40013
|
+
|
|
39833
40014
|
export interface MeasurementFormInstanceDto {
|
|
39834
40015
|
id: string;
|
|
39835
40016
|
readonly: boolean;
|