/*****************************************************************************
* Tesseract OCR Pipeline Models                                              *
* Fetch requests for /contributions/tesseract-ocr-pipeline-models routes     *
*****************************************************************************/
Requests.contributions.tesseract_ocr_pipeline_models = {};

Requests.contributions.tesseract_ocr_pipeline_models.entity = {};

Requests.contributions.tesseract_ocr_pipeline_models.entity.delete = (tesseractOcrPipelineModelId) => {
  let input = `/contributions/tesseract-ocr-pipeline-models/${tesseractOcrPipelineModelId}`;
  let init = {
    method: 'DELETE'
  };
  return Requests.JSONfetch(input, init);
};

Requests.contributions.tesseract_ocr_pipeline_models.entity.isPublic = {};

Requests.contributions.tesseract_ocr_pipeline_models.entity.isPublic.update = (tesseractOcrPipelineModelId, value) => {
  let input = `/contributions/tesseract-ocr-pipeline-models/${tesseractOcrPipelineModelId}/is_public`;
  let init = {
    method: 'PUT',
    body: JSON.stringify(value)
  };
  return Requests.JSONfetch(input, init);
};
