@monkvision/network 4.1.0 → 4.2.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/README.md +15 -0
- package/lib/package.json +9 -9
- package/lib/src/api/inspection/mappers.js +33 -9
- package/lib/src/api/models/vehicle.d.ts +1 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -41,6 +41,21 @@ every entity that has been fetched using this API call.
|
|
|
41
41
|
|-----------|----------------------|-----------------------------|----------|
|
|
42
42
|
| options | GetInspectionOptions | The options of the request. | ✔️ |
|
|
43
43
|
|
|
44
|
+
|
|
45
|
+
### createInspection
|
|
46
|
+
```typescript
|
|
47
|
+
import { MonkApi } from '@monkvision/network';
|
|
48
|
+
|
|
49
|
+
MonkApi.createInspection(options, apiConfig);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Create a new inspection. This request does not modify the local state. To fetch the inspection details, use the
|
|
53
|
+
`getInspection` request after creating one, using the ID returned by this request.
|
|
54
|
+
|
|
55
|
+
| Parameter | Type | Description | Required |
|
|
56
|
+
|-----------|-------------------------|-----------------------------|----------|
|
|
57
|
+
| options | CreateInspectionOptions | The options of the request. | ✔️ |
|
|
58
|
+
|
|
44
59
|
### addImage
|
|
45
60
|
```typescript
|
|
46
61
|
import { MonkApi } from '@monkvision/network';
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.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.0
|
|
32
|
-
"@monkvision/sights": "4.0
|
|
31
|
+
"@monkvision/common": "4.1.0",
|
|
32
|
+
"@monkvision/sights": "4.1.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.0
|
|
46
|
-
"@monkvision/eslint-config-typescript": "4.0
|
|
47
|
-
"@monkvision/jest-config": "4.0
|
|
48
|
-
"@monkvision/prettier-config": "4.0
|
|
49
|
-
"@monkvision/types": "4.0
|
|
50
|
-
"@monkvision/typescript-config": "4.0
|
|
45
|
+
"@monkvision/eslint-config-base": "4.1.0",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.1.0",
|
|
47
|
+
"@monkvision/jest-config": "4.1.0",
|
|
48
|
+
"@monkvision/prettier-config": "4.1.0",
|
|
49
|
+
"@monkvision/types": "4.1.0",
|
|
50
|
+
"@monkvision/typescript-config": "4.1.0",
|
|
51
51
|
"@types/jest": "^29.2.2",
|
|
52
52
|
"@types/jsonwebtoken": "^9.0.5",
|
|
53
53
|
"@types/node": "^18.11.9",
|
|
@@ -378,17 +378,41 @@ function mapApiInspectionPost(options) {
|
|
|
378
378
|
var _a, _b;
|
|
379
379
|
return {
|
|
380
380
|
tasks: getTasksOptions(options),
|
|
381
|
-
vehicle: options.
|
|
381
|
+
vehicle: options.vehicle
|
|
382
|
+
? {
|
|
383
|
+
brand: options.vehicle.brand,
|
|
384
|
+
model: options.vehicle.model,
|
|
385
|
+
plate: options.vehicle.plate,
|
|
386
|
+
vehicle_type: options.vehicle.type,
|
|
387
|
+
mileage: options.vehicle.mileageUnit && options.vehicle.mileageValue
|
|
388
|
+
? {
|
|
389
|
+
value: options.vehicle.mileageValue,
|
|
390
|
+
unit: options.vehicle.mileageUnit,
|
|
391
|
+
}
|
|
392
|
+
: undefined,
|
|
393
|
+
market_value: options.vehicle.marketValueUnit && options.vehicle.marketValue
|
|
394
|
+
? {
|
|
395
|
+
value: options.vehicle.marketValue,
|
|
396
|
+
unit: options.vehicle.marketValueUnit,
|
|
397
|
+
}
|
|
398
|
+
: undefined,
|
|
399
|
+
vin: options.vehicle.vin,
|
|
400
|
+
color: options.vehicle.color,
|
|
401
|
+
exterior_cleanliness: options.vehicle.exteriorCleanliness,
|
|
402
|
+
interior_cleanliness: options.vehicle.interiorCleanliness,
|
|
403
|
+
date_of_circulation: options.vehicle.dateOfCirculation,
|
|
404
|
+
duplicate_keys: options.vehicle.duplicateKeys,
|
|
405
|
+
expertise_requested: options.vehicle.expertiseRequested,
|
|
406
|
+
car_registration: options.vehicle.carRegistration,
|
|
407
|
+
vehicle_quotation: options.vehicle.vehicleQuotation,
|
|
408
|
+
trade_in_offer: options.vehicle.tradeInOffer,
|
|
409
|
+
owner_info: options.vehicle.ownerInfo,
|
|
410
|
+
additional_data: options.vehicle.additionalData,
|
|
411
|
+
}
|
|
412
|
+
: undefined,
|
|
382
413
|
damage_severity: { output_format: 'toyota' },
|
|
383
414
|
pricing: options.usePricingV2 ? { output_format: 'toyota' } : undefined,
|
|
384
|
-
additional_data: {
|
|
385
|
-
user_agent: navigator.userAgent,
|
|
386
|
-
connection: navigator.connection,
|
|
387
|
-
monk_sdk_version: config_1.sdkVersion,
|
|
388
|
-
damage_detection_version: 'v2',
|
|
389
|
-
use_dynamic_crops: (_a = options.useDynamicCrops) !== null && _a !== void 0 ? _a : true,
|
|
390
|
-
is_video_capture: (_b = options.isVideoCapture) !== null && _b !== void 0 ? _b : false,
|
|
391
|
-
},
|
|
415
|
+
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),
|
|
392
416
|
};
|
|
393
417
|
}
|
|
394
418
|
exports.mapApiInspectionPost = mapApiInspectionPost;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.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.2.0",
|
|
32
|
+
"@monkvision/sights": "4.2.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.2.0",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.2.0",
|
|
47
|
+
"@monkvision/jest-config": "4.2.0",
|
|
48
|
+
"@monkvision/prettier-config": "4.2.0",
|
|
49
|
+
"@monkvision/types": "4.2.0",
|
|
50
|
+
"@monkvision/typescript-config": "4.2.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": "68bce4b15bcd2db64421c9269bbc4a2b24af1d0c"
|
|
88
88
|
}
|