@dnv-plant/typescriptpws 1.0.77 → 1.0.78-alpha.1946028
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/index.ts +2 -2
- package/package.json +6 -6
- package/src/calculations/applicationTools.ts +22 -25
- package/src/calculations/discharge.ts +155 -176
- package/src/calculations/dispersion.ts +24 -27
- package/src/calculations/dispersionView.ts +151 -172
- package/src/calculations/fireball.ts +23 -26
- package/src/calculations/jetFire.ts +43 -49
- package/src/calculations/lateExplosion.ts +44 -50
- package/src/calculations/linkedRunners.ts +165 -177
- package/src/calculations/poolFire.ts +23 -26
- package/src/calculations/properties.ts +22 -25
- package/src/calculations/radiation.ts +228 -261
- package/src/calculations/standalones.ts +23 -26
- package/src/calculations/toxics.ts +22 -25
- package/src/calculations/utilities.ts +248 -284
- package/src/constants.ts +2 -2
- package/src/entities.ts +2 -2
- package/src/entity-schemas.ts +2 -2
- package/src/enums.ts +2 -2
- package/src/materials.ts +41 -73
- package/src/utilities.ts +36 -95
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time:
|
|
3
|
+
* Version: 1.0.78
|
|
4
|
+
* Date/time: 20 Jun 2025 16:35:08
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -243,33 +243,30 @@ to obtain the fluid properties.
|
|
|
243
243
|
|
|
244
244
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
245
245
|
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
261
|
-
}
|
|
246
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
247
|
+
|
|
248
|
+
const responseSchema = new FlashCalculationResponseSchema();
|
|
249
|
+
const validatedResponse = responseSchema.validate(data);
|
|
250
|
+
|
|
251
|
+
this.resultCode = validatedResponse.resultCode;
|
|
252
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
253
|
+
Object.assign(this, {
|
|
254
|
+
flashResult: validatedResponse.flashResult,
|
|
255
|
+
resultCode: validatedResponse.resultCode,
|
|
256
|
+
messages: validatedResponse.messages ?? [],
|
|
257
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
258
|
+
operationId: validatedResponse.operationId,
|
|
259
|
+
});
|
|
262
260
|
} else {
|
|
263
|
-
this.
|
|
261
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
264
262
|
}
|
|
265
|
-
} catch (
|
|
266
|
-
if (
|
|
267
|
-
this.
|
|
263
|
+
} catch (err: any) {
|
|
264
|
+
if ((err as any)?.response) {
|
|
265
|
+
this.handleFailedResponse((err as any).response);
|
|
268
266
|
} else {
|
|
269
|
-
|
|
267
|
+
throw err;
|
|
270
268
|
}
|
|
271
|
-
console.error(
|
|
272
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
269
|
+
console.error(err);
|
|
273
270
|
}
|
|
274
271
|
|
|
275
272
|
return this.resultCode;
|