Class

AmbienteGob

AmbienteGob()

AmbienteGob Class Represents a client for interacting with various endpoints of "Solicitudes Autorizaciones Ambientales". This class extends the FetchService class and provides methods for different use cases.

Full API specs: https://apisolicitudambiental.ambiente.gob.do
Constructor

# new AmbienteGob()

View Source services/gob.do/medio-ambiente.js, line 14

Extends

  • FetchService

Methods

# agregarComentario(comentarioDto) → {Promise}

Add comentario to solicitud.
Parameters:
Name Type Description
comentarioDto Object The comentario data.

View Source services/gob.do/medio-ambiente.js, line 932

A Promise that resolves with the result of adding the comentario.
Promise

# asignarSolicitud(asignacionDto) → {Promise}

Assign solicitud.
Parameters:
Name Type Description
asignacionDto Object The asignacion data.

View Source services/gob.do/medio-ambiente.js, line 984

A Promise that resolves with the result of the assignment.
Promise

# cambiarCategoriaById(id, operations) → {Promise}

Change solicitud categoria by ID.
Parameters:
Name Type Description
id number The solicitud ID.
operations Array The array of operations.

View Source services/gob.do/medio-ambiente.js, line 943

A Promise that resolves with the result of the categoria change.
Promise

# cambiarEstadoSolicitudByExternalId(externalId, statusId) → {Promise}

Change solicitud status by external ID.
Parameters:
Name Type Description
externalId string The external ID of the solicitud.
statusId number The status ID to change to.

View Source services/gob.do/medio-ambiente.js, line 894

A Promise that resolves with the result of the status change.
Promise

# cambiarEstadoSolicitudById(id, operations) → {Promise}

Change solicitud status by ID.
Parameters:
Name Type Description
id number The solicitud ID.
operations Array The array of operations.

View Source services/gob.do/medio-ambiente.js, line 919

A Promise that resolves with the result of the status change.
Promise

# cambiarMontoInversionById(id, operations) → {Promise}

Change solicitud monto inversion by ID.
Parameters:
Name Type Description
id number The solicitud ID.
operations Array The array of operations.

View Source services/gob.do/medio-ambiente.js, line 957

A Promise that resolves with the result of the monto inversion change.
Promise

# changeDocumentStateByIdUsingPatch(id, operations) → {Promise}

Change document state by ID using patch method.
Parameters:
Name Type Description
id number The document ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 273

A Promise that resolves with the result of the update.
Promise

# confirmPagoByExternalId(externalId, pagoExternalRequestDto) → {Promise}

Confirm payment by external ID.
Parameters:
Name Type Description
externalId string The external ID of the solicitud.
pagoExternalRequestDto Object The payment data.

View Source services/gob.do/medio-ambiente.js, line 908

A Promise that resolves with the result of the payment confirmation.
Promise

# confirmPaymentForInvoice(invoiceId, invoiceDtoBody) → {Promise}

Confirm payment for an invoice.
Parameters:
Name Type Description
invoiceId number The invoice ID.
invoiceDtoBody Object The invoice data.

View Source services/gob.do/medio-ambiente.js, line 478

A Promise that resolves with the result of the confirmation.
Promise

# createCategory(categoryDto) → {Promise}

Create a new category.
Parameters:
Name Type Description
categoryDto Object The category data.

View Source services/gob.do/medio-ambiente.js, line 76

A Promise that resolves with the result of the creation.
Promise

# createDocumentComment(commentDto) → {Promise}

Create a new document comment.
Parameters:
Name Type Description
commentDto Object The document comment data.

View Source services/gob.do/medio-ambiente.js, line 148

A Promise that resolves with the result of the creation.
Promise

# createDocumentRequest(documentSolicitudDto) → {Promise}

Create a new document request.
Parameters:
Name Type Description
documentSolicitudDto Object The document request data.

View Source services/gob.do/medio-ambiente.js, line 323

A Promise that resolves with the result of the creation.
Promise

# createGroup(gruposDto) → {Promise}

Create a new group.
Parameters:
Name Type Description
gruposDto Object The group data.

View Source services/gob.do/medio-ambiente.js, line 498

A Promise that resolves with the result of the creation.
Promise

# createHistoricalDocument(historicalDocumentDto) → {Promise}

Create a new historical document.
Parameters:
Name Type Description
historicalDocumentDto Object The historical document data.

View Source services/gob.do/medio-ambiente.js, line 210

A Promise that resolves with the result of the creation.
Promise

# createInvoice(invoiceDto) → {Promise}

Create a new invoice.
Parameters:
Name Type Description
invoiceDto Object The invoice data.

View Source services/gob.do/medio-ambiente.js, line 560

A Promise that resolves with the result of the creation.
Promise

# createSolicitud(solicitudDto) → {Promise}

Create a new solicitud.
Parameters:
Name Type Description
solicitudDto Object The solicitud data.

View Source services/gob.do/medio-ambiente.js, line 622

A Promise that resolves with the result of the creation.
Promise

# createState(estadoDto) → {Promise}

Create a new state.
Parameters:
Name Type Description
estadoDto Object The state data.

View Source services/gob.do/medio-ambiente.js, line 405

A Promise that resolves with the result of the creation.
Promise

# deleteCategoryById(id) → {Promise}

Delete category by ID.
Parameters:
Name Type Description
id number The category ID.

View Source services/gob.do/medio-ambiente.js, line 107

A Promise that resolves with the result of the deletion.
Promise

# deleteDocumentById(id) → {Promise}

Delete document by ID.
Parameters:
Name Type Description
id number The document ID.

View Source services/gob.do/medio-ambiente.js, line 354

A Promise that resolves with the result of the deletion.
Promise

# deleteDocumentCommentById(id) → {Promise}

Delete document comment by ID.
Parameters:
Name Type Description
id number The document comment ID.

View Source services/gob.do/medio-ambiente.js, line 179

A Promise that resolves with the result of the deletion.
Promise

# deleteGroupById(id) → {Promise}

Delete group by ID.
Parameters:
Name Type Description
id number The group ID.

View Source services/gob.do/medio-ambiente.js, line 529

A Promise that resolves with the result of the deletion.
Promise

# deleteHistoricalDocumentById(id) → {Promise}

Delete historical document by ID.
Parameters:
Name Type Description
id number The document ID.

View Source services/gob.do/medio-ambiente.js, line 251

A Promise that resolves with the result of the deletion.
Promise

# deleteInvoiceById(id) → {Promise}

Delete invoice by ID.
Parameters:
Name Type Description
id number The invoice ID.

View Source services/gob.do/medio-ambiente.js, line 591

A Promise that resolves with the result of the deletion.
Promise

# deleteSolicitudById(id) → {Promise}

Delete solicitud by ID.
Parameters:
Name Type Description
id number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 653

A Promise that resolves with the result of the deletion.
Promise

# deleteStateById(id) → {Promise}

Delete state by ID.
Parameters:
Name Type Description
id number The state ID.

View Source services/gob.do/medio-ambiente.js, line 436

A Promise that resolves with the result of the deletion.
Promise

# documentCallback(callbackDto) → {Promise}

Callback for document.
Parameters:
Name Type Description
callbackDto Object The callback data.

View Source services/gob.do/medio-ambiente.js, line 294

A Promise that resolves with the result of the callback.
Promise

# eliminarAsignacionById(idAsignacion) → {Promise}

Delete asignacion by ID.
Parameters:
Name Type Description
idAsignacion number The asignacion ID.

View Source services/gob.do/medio-ambiente.js, line 994

A Promise that resolves with the result of the deletion.
Promise

# exonerarPagoById(id, operations) → {Promise}

Exonerate payment by ID.
Parameters:
Name Type Description
id number The solicitud ID.
operations Array The array of operations.

View Source services/gob.do/medio-ambiente.js, line 971

A Promise that resolves with the result of the payment exoneration.
Promise

# generateDocumentos(generarDocumento) → {Promise}

Generate documents for solicitud.
Parameters:
Name Type Description
generarDocumento Object The generarDocumento data.

View Source services/gob.do/medio-ambiente.js, line 754

A Promise that resolves with the result of the generation.
Promise

# getArchivosBySolicitudId(solicitudId) → {Promise}

Get archivos by solicitud ID.
Parameters:
Name Type Description
solicitudId number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 683

A Promise that resolves with the archivos data.
Promise

# getAsignacionesBySolicitudId(solicitudId) → {Promise}

Get asignaciones by solicitud ID.
Parameters:
Name Type Description
solicitudId number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 1004

A Promise that resolves with the asignaciones data.
Promise

# getAvailableStatesBySolicitudId(solicitudId) → {Promise}

Get available states by solicitud ID.
Parameters:
Name Type Description
solicitudId number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 385

A Promise that resolves with the available states data.
Promise

# getCategories(params) → {Promise}

Get categories with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 66

A Promise that resolves with the categories data.
Promise

# getCategoryById(id) → {Promise}

Get category by ID.
Parameters:
Name Type Description
id number The category ID.

View Source services/gob.do/medio-ambiente.js, line 86

A Promise that resolves with the category data.
Promise

# getDocument(documentTypeId, document) → {Promise}

Get document by documentTypeId and document.
Parameters:
Name Type Description
documentTypeId number The document type ID.
document string The document value.

View Source services/gob.do/medio-ambiente.js, line 36

A Promise that resolves with the document data.
Promise

# getDocumentByDocument(document) → {Promise}

Get document by document.
Parameters:
Name Type Description
document string The document value.

View Source services/gob.do/medio-ambiente.js, line 46

A Promise that resolves with the document data.
Promise

# getDocumentById(id) → {Promise}

Get document by ID.
Parameters:
Name Type Description
id number The document ID.

View Source services/gob.do/medio-ambiente.js, line 333

A Promise that resolves with the document data.
Promise

# getDocumentCommentById(id) → {Promise}

Get document comment by ID.
Parameters:
Name Type Description
id number The document comment ID.

View Source services/gob.do/medio-ambiente.js, line 158

A Promise that resolves with the document comment data.
Promise

# getDocumentComments(params) → {Promise}

Get document comments with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 138

A Promise that resolves with the document comments data.
Promise

# getDocumentCommentsByExternalId(externalId) → {Promise}

Get comments for a document with external ID.
Parameters:
Name Type Description
externalId string The external ID of the document.

View Source services/gob.do/medio-ambiente.js, line 128

A Promise that resolves with the comments data.
Promise

# getDocumentRequests(params) → {Promise}

Get document requests with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 313

A Promise that resolves with the document requests data.
Promise

# getDocumentoByExternalId(externalId) → {Promise}

Get documento by external ID.
Parameters:
Name Type Description
externalId string The external ID of the documento.

View Source services/gob.do/medio-ambiente.js, line 693

A Promise that resolves with the documento data.
Promise

# getDocumentosFaltantesById(id) → {Promise}

Get missing documents by ID.
Parameters:
Name Type Description
id number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 764

A Promise that resolves with the missing documents data.
Promise

# getFileById(id) → {Promise}

Get file by ID.
Parameters:
Name Type Description
id string The file ID.

View Source services/gob.do/medio-ambiente.js, line 734

A Promise that resolves with the file data.
Promise

# getGroupById(id) → {Promise}

Get group by ID.
Parameters:
Name Type Description
id number The group ID.

View Source services/gob.do/medio-ambiente.js, line 508

A Promise that resolves with the group data.
Promise

# getGroups(params) → {Promise}

Get groups with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 488

A Promise that resolves with the groups data.
Promise

# getHistoricalDocumentByDocumentId(documentoSolicitudId) → {Promise}

Get historical document by document ID.
Parameters:
Name Type Description
documentoSolicitudId number The document ID.

View Source services/gob.do/medio-ambiente.js, line 220

A Promise that resolves with the historical document data.
Promise

# getHistoricalDocumentById(id) → {Promise}

Get historical document by ID.
Parameters:
Name Type Description
id number The document ID.

View Source services/gob.do/medio-ambiente.js, line 230

A Promise that resolves with the historical document data.
Promise

# getHistoricalDocuments(params) → {Promise}

Get historical documents with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 200

A Promise that resolves with the historical documents data.
Promise

# getHistoricoSolicitudById(solicitudId) → {Promise}

Get historical solicitud by ID.
Parameters:
Name Type Description
solicitudId number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 744

A Promise that resolves with the historical solicitud data.
Promise

# getInvoiceById(id) → {Promise}

Get invoice by ID.
Parameters:
Name Type Description
id number The invoice ID.

View Source services/gob.do/medio-ambiente.js, line 570

A Promise that resolves with the invoice data.
Promise

# getInvoices(params) → {Promise}

Get invoices with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 550

A Promise that resolves with the invoices data.
Promise

# getPersonByCedula(document) → {Promise}

Get person by cedula.
Parameters:
Name Type Description
document string The document value (cedula).

View Source services/gob.do/medio-ambiente.js, line 56

A Promise that resolves with the person data.
Promise

# getSancionByDocument(Documento) → {Promise}

Get sancion by document.
Parameters:
Name Type Description
Documento string The document.

View Source services/gob.do/medio-ambiente.js, line 1052

A Promise that resolves with the sancion details.
Promise

# getSolicitud(params) → {Promise}

Get solicitud with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 612

A Promise that resolves with the solicitud data.
Promise

# getSolicitudByExternalId(externalId) → {Promise}

Get solicitud by external ID.
Parameters:
Name Type Description
externalId string The external ID of the solicitud.

View Source services/gob.do/medio-ambiente.js, line 663

A Promise that resolves with the solicitud data.
Promise

# getSolicitudById(id) → {Promise}

Get solicitud by ID.
Parameters:
Name Type Description
id number The solicitud ID.

View Source services/gob.do/medio-ambiente.js, line 632

A Promise that resolves with the solicitud data.
Promise

# getSolicitudStatsFiltersGraph() → {Promise}

Get solicitud stats filters graph.

View Source services/gob.do/medio-ambiente.js, line 1032

A Promise that resolves with the stats filters graph data.
Promise

# getSolicitudStatsFiltersTable() → {Promise}

Get solicitud stats filters table.

View Source services/gob.do/medio-ambiente.js, line 1023

A Promise that resolves with the stats filters table data.
Promise

# getSolicitudStatsGraphs(solicitudGraphsRequestParameters) → {Promise}

Get solicitud stats graphs.
Parameters:
Name Type Description
solicitudGraphsRequestParameters Object The request parameters for the stats graphs.

View Source services/gob.do/medio-ambiente.js, line 1042

A Promise that resolves with the stats graphs data.
Promise

# getSolicitudStatsTable(solicitudTableRequestParameters) → {Promise}

Get solicitud stats table.
Parameters:
Name Type Description
solicitudTableRequestParameters Object The request parameters for the stats table.

View Source services/gob.do/medio-ambiente.js, line 1014

A Promise that resolves with the stats table data.
Promise

# getSolicitudesByUsuario(documento) → {Promise}

Get solicitudes by usuario.
Parameters:
Name Type Description
documento string The documento of the usuario.

View Source services/gob.do/medio-ambiente.js, line 673

A Promise that resolves with the solicitud data.
Promise

# getStateById(id) → {Promise}

Get state by ID.
Parameters:
Name Type Description
id number The state ID.

View Source services/gob.do/medio-ambiente.js, line 415

A Promise that resolves with the state data.
Promise

# getStates(params) → {Promise}

Get states with optional parameters.
Parameters:
Name Type Description
params Object Additional parameters for the request.

View Source services/gob.do/medio-ambiente.js, line 395

A Promise that resolves with the states data.
Promise

# getTotalToPayForSolicitud(solicitudConsultaDto) → {Promise}

Get total to pay for a solicitud.
Parameters:
Name Type Description
solicitudConsultaDto Object The solicitud data.

View Source services/gob.do/medio-ambiente.js, line 467

A Promise that resolves with the total to pay data.
Promise

# getUsersViafirma() → {Promise}

Get users viafirma.

View Source services/gob.do/medio-ambiente.js, line 303

A Promise that resolves with the users data.
Promise

# saveInvoice(invoicePdfB64Dto) → {Promise}

Save invoice.
Parameters:
Name Type Description
invoicePdfB64Dto Object The invoice data in base64 format.

View Source services/gob.do/medio-ambiente.js, line 714

A Promise that resolves with the result of the save operation.
Promise

# signDocumentById(id, documentDto) → {Promise}

Sign document by ID.
Parameters:
Name Type Description
id string The document ID.
documentDto Array.<Object> The document data.

View Source services/gob.do/medio-ambiente.js, line 284

A Promise that resolves with the result of the signing.
Promise

# ulticabinetLogin(authRequest) → {Promise}

Authenticate user with UlticabinetLogin.
Parameters:
Name Type Description
authRequest Object The authentication request data.

View Source services/gob.do/medio-ambiente.js, line 25

A Promise that resolves with the authentication result.
Promise

# updateCategoryById(id, categoryDto) → {Promise}

Update category by ID.
Parameters:
Name Type Description
id number The category ID.
categoryDto Object The updated category data.

View Source services/gob.do/medio-ambiente.js, line 97

A Promise that resolves with the result of the update.
Promise

# updateCategoryPartiallyById(id, operations) → {Promise}

Partially update category by ID.
Parameters:
Name Type Description
id number The category ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 118

A Promise that resolves with the result of the partial update.
Promise

# updateDocumentById(id, documentDto) → {Promise}

Update document by ID.
Parameters:
Name Type Description
id number The document ID.
documentDto Object The updated document data.

View Source services/gob.do/medio-ambiente.js, line 344

A Promise that resolves with the result of the update.
Promise

# updateDocumentByIdUsingPatch(id, operations) → {Promise}

Update document by ID using patch method.
Parameters:
Name Type Description
id number The document ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 365

A Promise that resolves with the result of the update.
Promise

# updateDocumentCommentById(id, commentDto) → {Promise}

Update document comment by ID.
Parameters:
Name Type Description
id number The document comment ID.
commentDto Object The updated document comment data.

View Source services/gob.do/medio-ambiente.js, line 169

A Promise that resolves with the result of the update.
Promise

# updateDocumentCommentPartiallyById(id, operations) → {Promise}

Partially update document comment by ID.
Parameters:
Name Type Description
id number The document comment ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 190

A Promise that resolves with the result of the partial update.
Promise

# updateGroupById(id, gruposDto) → {Promise}

Update group by ID.
Parameters:
Name Type Description
id number The group ID.
gruposDto Object The updated group data.

View Source services/gob.do/medio-ambiente.js, line 519

A Promise that resolves with the result of the update.
Promise

# updateGroupByIdUsingPatch(id, operations) → {Promise}

Update group by ID using patch method.
Parameters:
Name Type Description
id number The group ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 540

A Promise that resolves with the result of the update.
Promise

# updateHistoricalDocumentById(id, documentDto) → {Promise}

Update historical document by ID.
Parameters:
Name Type Description
id number The document ID.
documentDto Object The updated historical document data.

View Source services/gob.do/medio-ambiente.js, line 241

A Promise that resolves with the result of the update.
Promise

# updateHistoricalDocumentByIdUsingPatch(id, operations) → {Promise}

Update historical document by ID using patch method.
Parameters:
Name Type Description
id number The document ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 262

A Promise that resolves with the result of the update.
Promise

# updateInvoiceById(id, invoiceDto) → {Promise}

Update invoice by ID.
Parameters:
Name Type Description
id number The invoice ID.
invoiceDto Object The updated invoice data.

View Source services/gob.do/medio-ambiente.js, line 581

A Promise that resolves with the result of the update.
Promise

# updateInvoiceByIdUsingPatch(id, operations) → {Promise}

Update invoice by ID using patch method.
Parameters:
Name Type Description
id number The invoice ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 602

A Promise that resolves with the result of the update.
Promise

# updateSolicitudById(id, operations) → {Promise}

Update solicitud by ID.
Parameters:
Name Type Description
id number The solicitud ID.
operations Array The array of operations.

View Source services/gob.do/medio-ambiente.js, line 1063

A Promise that resolves with the result of the update.
Promise

# updateStateById(id, estadoDto) → {Promise}

Update state by ID.
Parameters:
Name Type Description
id number The state ID.
estadoDto Object The updated state data.

View Source services/gob.do/medio-ambiente.js, line 426

A Promise that resolves with the result of the update.
Promise

# updateStateByIdUsingPatch(id, operations) → {Promise}

Update state by ID using patch method.
Parameters:
Name Type Description
id number The state ID.
operations Array.<Object> The update operations.

View Source services/gob.do/medio-ambiente.js, line 447

A Promise that resolves with the result of the update.
Promise

# uploadDocumento(formData) → {Promise}

Upload document.
Parameters:
Name Type Description
formData Object The form data containing the document information.

View Source services/gob.do/medio-ambiente.js, line 724

A Promise that resolves with the result of the upload.
Promise

# uploadDocumentoB64ByExternalId(externalId, fileDto) → {Promise}

Upload documento as base64 by external ID.
Parameters:
Name Type Description
externalId string The external ID of the documento.
fileDto Object The file data in base64 format.

View Source services/gob.do/medio-ambiente.js, line 704

A Promise that resolves with the result of the upload.
Promise