caution
This section refers to the old versions of the MonkJs SDK (version 3.X.X
and below). For the v4 docs, please refer to
this page.
Image
yarn add @monkvision/corejs
import monk from '@monkvision/corejs'
const { getMany, createOne } = monk.entity.image;
getMany
GET /inspections/${inspectionId}/images
Get all images from an inspection.
await monk.image.getMany(inspectionId, options);
name | type | default |
---|---|---|
inspectionId | string | |
options | GetManyImagesOptions | |
- options.limit | number | 100 |
- options.before | string | |
- options.after | string | |
- options.paginationOrder | PaginationOrder | 'desc' |
{
"axiosResponse": {
"data": [],
"paging": {
"cursors": {},
"previous": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"next": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"entities": {
"images": {
"3fa85f64-5717-4562-b3fc-2c963f66afa6": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"path": "string",
"name": "string",
"imageHeight": 0,
"imageWidth": 0,
"binarySize": 0,
"mimetype": "string"
}
}
}
}
addOne
POST /inspections/${inspectionId}/images
Add image to an inspection.
await monk.image.addOne({ inspectionId, data });
name | type | default |
---|---|---|
inspectionId | string | |
data | CreateImage | |
- data.name | string | |
- data.acquisition | ImageAcquisition | |
- data.tasks | [CreateImageTask] | |
- data.damageArea | number / string / DamageArea | |
- data.additionalData | Object | |
- data.compliances | Compliance |
ImageAcquisition
name | type | default |
---|---|---|
strategy | string | |
fileKey | string | |
url | string |
CreateImageTask
NoParametersImageTaskName | CreateImageWheelTaskWithParam | CreateImageOcrTaskWithParam | CreateImageDamageTaskWithParam
NoParametersImageTaskName
string
NoParametersImageTaskName is an enumeration of the task type and can be:
- "damage_detection"
- "wheel_analysis"
- "repair_estimate"
- "image_ocr"
CreateImageWheelTaskWithParams
name | type | default |
---|---|---|
name | string | |
imageDetails | WheelAnalysisDetails | |
- imageDetails.wheelName | string |
CreateImageOcrTaskWithParams
name | type | default |
---|---|---|
name | string | |
imageDetails | ImageOCRTaskImageDetails | |
- imageDetails.imageType | string | |
- imageDetails.documentId | number | |
- imageDetails.locationDetails | string |
CreateImageDamageTaskWithParams
name | type | default |
---|---|---|
name | string | |
imageDetails | DamageDetectionTaskImageDetails | |
- imageDetails.viewpointName | string | |
- imageDetails.viewpointDetails | unknown |
DamageArea
name | type | default |
---|---|---|
id | string | |
relevantElements | [string] |
Compliance
name | type | default |
---|---|---|
imageQualityAssessment | ComplianceParameters | |
coverage360 | Coverage360Parameters | |
- coverage360.sightId | string |
{
"axiosResponse": {},
"entities": {
"images": {
"3fa85f64-5717-4562-b3fc-2c963f66afa6": {
"name": "string",
"rotateImageBeforeUpload": "NO_ROTATION",
"tasks": [],
"compliances": {
"image_quality_assessment": {},
"coverage_360": {
"sight_id": "GHbWVnMB"
}
},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"inspection": {}
}
}
},
"result": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Enums
PaginationOrder
string
enum PaginationOrder {
ASC = 'asc',
DESC = 'desc',
}