Skip to main content
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

npm latest package

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);

Try it on api.monk.ai

nametypedefault
inspectionIdstring
optionsGetManyImagesOptions
- options.limitnumber100
- options.beforestring
- options.afterstring
- options.paginationOrderPaginationOrder'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 });

Try it on api.monk.ai

nametypedefault
inspectionIdstring
dataCreateImage
- data.namestring
- data.acquisitionImageAcquisition
- data.tasks[CreateImageTask]
- data.damageAreanumber / string / DamageArea
- data.additionalDataObject
- data.compliancesCompliance

ImageAcquisition

nametypedefault
strategystring
fileKeystring
urlstring

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

nametypedefault
namestring
imageDetailsWheelAnalysisDetails
- imageDetails.wheelNamestring

CreateImageOcrTaskWithParams

nametypedefault
namestring
imageDetailsImageOCRTaskImageDetails
- imageDetails.imageTypestring
- imageDetails.documentIdnumber
- imageDetails.locationDetailsstring

CreateImageDamageTaskWithParams

nametypedefault
namestring
imageDetailsDamageDetectionTaskImageDetails
- imageDetails.viewpointNamestring
- imageDetails.viewpointDetailsunknown

DamageArea

nametypedefault
idstring
relevantElements[string]

Compliance

nametypedefault
imageQualityAssessmentComplianceParameters
coverage360Coverage360Parameters
- coverage360.sightIdstring
{
"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',
}