@monkvision/network 4.2.9 → 4.3.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.9",
|
|
4
4
|
"license": "BSD-3-Clause-Clear",
|
|
5
5
|
"packageManager": "yarn@3.2.4",
|
|
6
6
|
"description": "MonkJs core package used to communicate with the API",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@monkvision/common": "4.2.
|
|
32
|
-
"@monkvision/sights": "4.2.
|
|
31
|
+
"@monkvision/common": "4.2.9",
|
|
32
|
+
"@monkvision/sights": "4.2.9",
|
|
33
33
|
"jsonwebtoken": "^9.0.2",
|
|
34
34
|
"jwt-decode": "^4.0.0",
|
|
35
35
|
"ky": "^1.2.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"react-router-dom": "^6.22.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@monkvision/eslint-config-base": "4.2.
|
|
46
|
-
"@monkvision/eslint-config-typescript": "4.2.
|
|
47
|
-
"@monkvision/jest-config": "4.2.
|
|
48
|
-
"@monkvision/prettier-config": "4.2.
|
|
49
|
-
"@monkvision/types": "4.2.
|
|
50
|
-
"@monkvision/typescript-config": "4.2.
|
|
45
|
+
"@monkvision/eslint-config-base": "4.2.9",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.2.9",
|
|
47
|
+
"@monkvision/jest-config": "4.2.9",
|
|
48
|
+
"@monkvision/prettier-config": "4.2.9",
|
|
49
|
+
"@monkvision/types": "4.2.9",
|
|
50
|
+
"@monkvision/typescript-config": "4.2.9",
|
|
51
51
|
"@types/jest": "^29.2.2",
|
|
52
52
|
"@types/jsonwebtoken": "^9.0.5",
|
|
53
53
|
"@types/node": "^18.11.9",
|
|
@@ -367,12 +367,29 @@ function getImagesOCROptions(options) {
|
|
|
367
367
|
}
|
|
368
368
|
: undefined;
|
|
369
369
|
}
|
|
370
|
+
function getPricingOptions(options) {
|
|
371
|
+
var _a;
|
|
372
|
+
if (options.tasks.includes(types_1.TaskName.PRICING)) {
|
|
373
|
+
return {
|
|
374
|
+
status: types_1.ProgressStatus.TODO,
|
|
375
|
+
output_format: 'default',
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
var taskOptions = options.tasks.find(function (task) { return typeof task === 'object' && task.name === types_1.TaskName.PRICING; });
|
|
379
|
+
return taskOptions
|
|
380
|
+
? {
|
|
381
|
+
status: types_1.ProgressStatus.TODO,
|
|
382
|
+
output_format: (_a = taskOptions.outputFormat) !== null && _a !== void 0 ? _a : 'default',
|
|
383
|
+
}
|
|
384
|
+
: undefined;
|
|
385
|
+
}
|
|
370
386
|
function getTasksOptions(options) {
|
|
371
387
|
return {
|
|
372
388
|
damage_detection: getDamageDetectionOptions(options),
|
|
373
389
|
wheel_analysis: getWheelAnalysisOptions(options),
|
|
374
390
|
images_ocr: getImagesOCROptions(options),
|
|
375
391
|
human_in_the_loop: getHumanInTheLoopOptions(options),
|
|
392
|
+
pricing: getPricingOptions(options),
|
|
376
393
|
};
|
|
377
394
|
}
|
|
378
395
|
function mapApiInspectionPost(options) {
|
|
@@ -412,8 +429,7 @@ function mapApiInspectionPost(options) {
|
|
|
412
429
|
additional_data: options.vehicle.additionalData,
|
|
413
430
|
}
|
|
414
431
|
: undefined,
|
|
415
|
-
damage_severity: { output_format: '
|
|
416
|
-
pricing: options.usePricingV2 ? { output_format: 'default' } : undefined,
|
|
432
|
+
damage_severity: { output_format: 'toyota' },
|
|
417
433
|
additional_data: __assign({ user_agent: navigator.userAgent, connection: navigator.connection, monk_sdk_version: config_1.sdkVersion, damage_detection_version: 'v2', use_dynamic_crops: (_a = options.useDynamicCrops) !== null && _a !== void 0 ? _a : true, is_video_capture: (_b = options.isVideoCapture) !== null && _b !== void 0 ? _b : false }, options.additionalData),
|
|
418
434
|
};
|
|
419
435
|
}
|
|
@@ -4,7 +4,7 @@ import type { ApiImagePost, ApiImages } from './image';
|
|
|
4
4
|
import type { ApiParts } from './part';
|
|
5
5
|
import type { ApiPricingV2 } from './pricingV2';
|
|
6
6
|
import type { ApiSeverityResults } from './severityResult';
|
|
7
|
-
import type { ApiTasks } from './task';
|
|
7
|
+
import type { ApiBusinessClients, ApiTasks } from './task';
|
|
8
8
|
import type { ApiVehicleComponent } from './vehicle';
|
|
9
9
|
import type { ApiWheelAnalysis } from './wheelAnalysis';
|
|
10
10
|
import { ApiVehiclePostPatch } from './vehicle';
|
|
@@ -26,7 +26,6 @@ export interface ApiInspectionGet {
|
|
|
26
26
|
vehicle?: ApiVehicleComponent;
|
|
27
27
|
wheel_analysis?: ApiWheelAnalysis;
|
|
28
28
|
}
|
|
29
|
-
export type ApiBusinessClients = 'default' | 'toyota' | 'veb';
|
|
30
29
|
export interface ApiDamageSeverity {
|
|
31
30
|
output_format: ApiBusinessClients;
|
|
32
31
|
}
|
|
@@ -36,5 +35,4 @@ export interface ApiInspectionPost {
|
|
|
36
35
|
images?: ApiImagePost[];
|
|
37
36
|
vehicle?: ApiVehiclePostPatch;
|
|
38
37
|
damage_severity?: ApiDamageSeverity;
|
|
39
|
-
pricing?: ApiDamageSeverity;
|
|
40
38
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type ApiBusinessClients = 'default' | 'toyota' | 'veb' | 'tesla';
|
|
1
2
|
export interface ApiImageInTask {
|
|
2
3
|
image_id: string;
|
|
3
4
|
}
|
|
@@ -68,9 +69,15 @@ export interface ApiHinlTaskPostComponent {
|
|
|
68
69
|
status?: ApiTaskPostProgressStatus;
|
|
69
70
|
callbacks?: ApiCallbacks;
|
|
70
71
|
}
|
|
72
|
+
export interface ApiPricingTaskPostComponent {
|
|
73
|
+
status?: ApiTaskPostProgressStatus;
|
|
74
|
+
callbacks?: ApiCallbacks;
|
|
75
|
+
output_format?: ApiBusinessClients;
|
|
76
|
+
}
|
|
71
77
|
export interface ApiTasksComponent {
|
|
72
78
|
damage_detection?: ApiDamageDetectionTaskPostComponent;
|
|
73
79
|
wheel_analysis?: ApiWheelAnalysisTaskPostComponent;
|
|
74
80
|
images_ocr?: ApiImagesOCRTaskPostComponent;
|
|
75
81
|
human_in_the_loop?: ApiHinlTaskPostComponent;
|
|
82
|
+
pricing?: ApiPricingTaskPostComponent;
|
|
76
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"license": "BSD-3-Clause-Clear",
|
|
5
5
|
"packageManager": "yarn@3.2.4",
|
|
6
6
|
"description": "MonkJs core package used to communicate with the API",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@monkvision/common": "4.
|
|
32
|
-
"@monkvision/sights": "4.
|
|
31
|
+
"@monkvision/common": "4.3.0",
|
|
32
|
+
"@monkvision/sights": "4.3.0",
|
|
33
33
|
"jsonwebtoken": "^9.0.2",
|
|
34
34
|
"jwt-decode": "^4.0.0",
|
|
35
35
|
"ky": "^1.2.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"react-router-dom": "^6.22.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@monkvision/eslint-config-base": "4.
|
|
46
|
-
"@monkvision/eslint-config-typescript": "4.
|
|
47
|
-
"@monkvision/jest-config": "4.
|
|
48
|
-
"@monkvision/prettier-config": "4.
|
|
49
|
-
"@monkvision/types": "4.
|
|
50
|
-
"@monkvision/typescript-config": "4.
|
|
45
|
+
"@monkvision/eslint-config-base": "4.3.0",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.3.0",
|
|
47
|
+
"@monkvision/jest-config": "4.3.0",
|
|
48
|
+
"@monkvision/prettier-config": "4.3.0",
|
|
49
|
+
"@monkvision/types": "4.3.0",
|
|
50
|
+
"@monkvision/typescript-config": "4.3.0",
|
|
51
51
|
"@types/jest": "^29.2.2",
|
|
52
52
|
"@types/jsonwebtoken": "^9.0.5",
|
|
53
53
|
"@types/node": "^18.11.9",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"url": "https://github.com/monkvision/monkjs/issues"
|
|
85
85
|
},
|
|
86
86
|
"homepage": "https://github.com/monkvision/monkjs",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "afd80da7a5eaa1c16fd1f81e9b889d960f1b0c26"
|
|
88
88
|
}
|