@pronesoft-rd/ecf-sdk
v0.0.9
Published
OpenAPI client for @pronesoft-rd/ecf-sdk
Readme
@pronesoft-rd/[email protected]
A TypeScript SDK client for the api.ecf.sandbox.pronesoft.com API.
Usage
First, install the SDK from npm.
npm install @pronesoft-rd/ecf-sdk --saveNext, try it out.
import {
Configuration,
AssociatedCompaniesApi,
} from '@pronesoft-rd/ecf-sdk';
import type { CreateAssociatedCompanyRequest } from '@pronesoft-rd/ecf-sdk';
async function example() {
console.log("🚀 Testing @pronesoft-rd/ecf-sdk SDK...");
const config = new Configuration({
// To configure OAuth2 access token for authorization: oauth2 application
accessToken: "YOUR ACCESS TOKEN",
});
const api = new AssociatedCompaniesApi(config);
const body = {
// string
email: email_example,
// string
password: password_example,
// string
name: name_example,
// string
rnc: rnc_example,
// string
phone: phone_example,
// string
address: address_example,
// string
city: city_example,
// string
country: country_example,
// PrintFormat
printerType: ...,
// string (optional)
firstName: firstName_example,
// string (optional)
lastName: lastName_example,
// string (optional)
jobTitle: jobTitle_example,
// string (optional)
website: website_example,
// string (optional)
category: category_example,
// string (optional)
monthlySalesRange: monthlySalesRange_example,
// Blob (optional)
logo: BINARY_DATA_HERE,
} satisfies CreateAssociatedCompanyRequest;
try {
const data = await api.createAssociatedCompany(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to https://api.ecf.sandbox.pronesoft.com/api/v1
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- AssociatedCompaniesApi | createAssociatedCompany | POST /associated-companies | Crear empresa asociada / sucursal AssociatedCompaniesApi | deleteAssociatedCompany | DELETE /associated-companies/{companyId} | Eliminar empresa asociada AssociatedCompaniesApi | getCompanyDocumentMetrics | GET /associated-companies/{companyId}/documents-metrics | Métricas de documentos de la empresa AssociatedCompaniesApi | getCompanyMetrics | GET /associated-companies/{companyId}/metrics | Métricas de la empresa AssociatedCompaniesApi | listAssociatedCompanies | GET /associated-companies | Listar empresas asociadas / sucursales AssociatedCompaniesApi | updateAssociatedCompany | PUT /associated-companies/{companyId} | Actualizar empresa asociada AuthenticationApi | getAccessToken | POST /oauth/token | Obtener token de acceso (OAuth 2.0) AutomatedCertificationApi | downloadCertification | GET /dgii-ecf/automated-certification/{id}/download | Descargar ZIP de certificación AutomatedCertificationApi | getCertificationStatus | GET /dgii-ecf/automated-certification/{id}/status | Estado del proceso de certificación AutomatedCertificationApi | listCertificationNiches | GET /dgii-ecf/automated-certification/niches | Listar nichos de certificación AutomatedCertificationApi | startCertification | POST /dgii-ecf/automated-certification/start | Iniciar proceso de certificación CommercialApprovalsApi | getCommercialApprovalById | GET /documents/approvals/{id} | Obtener aprobación comercial por ID CommercialApprovalsApi | listCommercialApprovals | GET /documents/approvals | Listar aprobaciones comerciales DigitalCertificatesApi | uploadCertificate | POST /{rnc}/certificates | Subir certificado digital (P12/PFX) DocumentsReceivedApi | getReceivedDocumentById | GET /documents/received/{id} | Obtener documento recibido por ID DocumentsReceivedApi | getReceivedDocumentStatsBySupplier | GET /documents/received/stats/by-supplier | Top 10 proveedores por volumen de documentos recibidos DocumentsReceivedApi | getReceivedDocumentStatsSummary | GET /documents/received/stats/summary | Estadísticas de documentos recibidos DocumentsReceivedApi | listReceivedDocuments | GET /documents/received | Listar documentos recibidos DocumentsSentApi | downloadSentDocumentXml | GET /documents/download | Descargar XML del documento DocumentsSentApi | getSentDocumentById | GET /documents/{id} | Obtener detalle del documento DocumentsSentApi | getSentDocumentLogs | GET /documents/logs/{id} | Logs de procesamiento del documento DocumentsSentApi | getSentDocumentStats | GET /documents/stats/summary | Estadísticas de documentos enviados DocumentsSentApi | getSentDocumentStatsByEnvironment | GET /documents/stats/by-environment | Estadísticas agrupadas por ambiente y estado DocumentsSentApi | getSentDocumentStatusOptions | GET /documents/status-options | Opciones de filtro de estado disponibles DocumentsSentApi | getSentDocumentXml | GET /documents/sent/{id}/xml | Descargar XML del documento por ID DocumentsSentApi | listSentDocuments | GET /documents/sent | Listar documentos enviados ECFSubmissionApi | getEcfStats | GET /{environment}/ecf/responses/stats | Obtener estadísticas de envíos (últimos 30 días) ECFSubmissionApi | getEcfStatus | GET /{environment}/ecf/status/{id} | Consultar estado del documento por ID interno ECFSubmissionApi | getEcfSubmissionHistory | GET /{environment}/ecf/responses/history | Historial de envíos (paginado) ECFSubmissionApi | submitEcf | POST /{environment}/ecf/submit | Enviar documento e-CF a la DGII ReportsApi | export606 | GET /dgii/606/export | Exportar Formato 606 (Compras) ReportsApi | exportSentDocuments | GET /dgii/sent/export | Exportar reporte de documentos enviados TaxSequencesApi | createTaxSequence | POST /tax-sequences/create | Crear nueva secuencia de NCF TaxSequencesApi | getNextNumber | GET /tax-sequences/next | Obtener siguiente número fiscal disponible TaxSequencesApi | listTaxSequences | GET /tax-sequences | Listar secuencias de NCF TaxSequencesApi | updateTaxSequence | PATCH /tax-sequences/update | Actualizar secuencia de NCF TaxSequencesApi | voidTaxSequence | POST /tax-sequences/void | Anular rango de números fiscales WebhookConfigurationApi | getWebhook | GET /{rnc}/webhooks/{webhookId} | Detalle de un webhook WebhookConfigurationApi | getWebhookStats | GET /{rnc}/webhooks/{webhookId}/stats | Estadísticas de entregas del webhook WebhookConfigurationApi | listWebhooks | GET /{rnc}/webhooks | Listar configuraciones de webhooks
Models
- AccountType
- AdditionalInfo
- AdditionalTax
- AlternativeCurrency
- ApprovalItem
- ApprovalListResponse
- AssociatedCompany
- AssociatedCompanySubscription
- AssociatedCompanySubscriptionPlan
- BillingIndicator
- BillingInvoiceReadyPayload
- BranchCreatedPayload
- BranchStatusChangedPayload
- Buyer
- CertificateExpiringPayload
- CertificationCompletedPayload
- CertificationNiche
- CertificationNicheNicheItemsInner
- CertificationStatus
- CommercialApprovalPayload
- CompanyDocumentMetrics
- CompanyDocumentMetricsGroupByStatusInner
- CompanyDocumentMetricsGroupByStatusInnerCount
- CompanyDocumentMetricsMainBusiness
- CompanyDocumentMetricsTotals
- CompanyMetrics
- CompanyMetricsDocumentsStatus
- ContingencyActivatedPayload
- CreateAssociatedCompany201Response
- CreateTaxSequence201Response
- CreateTaxSequenceRequest
- DeleteAssociatedCompany200Response
- DgiiMessage
- DiscountOrSurcharge
- DocumentReceivedPayload
- DocumentStatsResponse
- DocumentStatsResponseByStatusValue
- DocumentStatus
- DocumentStatusChangedPayload
- DocumentValidationErrorPayload
- EcfHistoryItem
- EcfStatsResponse
- EcfStatusResponse
- EcfSubmitResponse
- EcfSubmitResponseCompanyIdentification
- ElectronicDocument
- Environment
- ErrorResponse
- GetEcfSubmissionHistory200Response
- GetNextNumber200Response
- GetNextNumber200ResponseData
- GetReceivedDocumentStatsBySupplier200ResponseInner
- GetSentDocumentLogs200ResponseInner
- GetSentDocumentStatusOptions200ResponseInner
- InvoiceType
- InvoiceTypeSequence
- Item
- ItemAdditionalTax
- ItemAlternativeCurrency
- ItemAmount
- ItemCodesInner
- ItemDiscountInner
- ItemMiningInfo
- ItemQuantity
- ItemSurchargeInner
- ItemUnitPrice
- ItemWithheldITBISAmount
- LegalStatus
- ListTaxSequences200Response
- MemberInvitedPayload
- MemberJoinedPayload
- MemberRemovedPayload
- OAuthTokenRequest
- OAuthTokenResponse
- Page
- PaginationMeta
- PaymentForm
- PaymentMethod
- PlanPaymentFailedPayload
- PlanUsageAlertPayload
- PrintFormat
- ProcessingLog
- PublicDocumentStatus
- RateLimitErrorResponse
- ReceivedDocument
- ReceivedDocumentListResponse
- ReceivedDocumentStatsResponse
- ReferenceInfo
- SecurityApiKeyRotatedPayload
- SecurityNewLoginPayload
- SentDocumentDetail
- SentDocumentListResponse
- SentDocumentSummary
- SentDocumentSummaryBusiness
- SequenceDepletedPayload
- SequenceVoidedPayload
- StartCertification200Response
- StartCertificationRequest
- Subquantity
- Subtotal
- TaxSequence
- TaxSequenceCreated
- Totals
- TotalsItbisRate1
- TotalsItbisRate2
- TotalsItbisRate3
- TotalsTotalAmount
- Transport
- UpdateTaxSequenceRequest
- UploadCertificateResponse
- VoidTaxSequence200Response
- VoidTaxSequence200ResponseData
- VoidTaxSequenceRequest
- WebhookConfigDetail
- WebhookConfigResponse
- WebhookEventType
- WebhookNotificationPayload
- WebhookNotificationPayloadData
- WebhookStats
- WebhookStatsStats
Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: HTTP Bearer Token authentication (JWT)
oauth2 application
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
business:read: Consultar datos de la empresa.business:create: Crear una nueva empresa.business:update: Actualizar datos de la empresa.members:read: Ver miembros del equipo.members:invite: Invitar nuevos miembros.members:revoke: Revocar acceso de miembros.certificates:read: Ver certificados digitales.certificates:upload: Subir nuevos certificados.certificates:update: Actualizar certificados existentes.documents:read: Listar y consultar detalles de documentos.documents:create: Crear borradores o documentos internos.documents:send: Enviar e-CF a la DGII.documents:receive: Recibir e-CF de terceros.documents:update: Modificar metadatos de documentos.approvals:read: Ver estados de aprobación.approvals:commercial: Realizar aprobaciones o rechazos comerciales.sequences:read: Ver rangos de NCF/e-NCF.sequences:create: Solicitar o agregar nuevas secuencias.sequences:update: Modificar configuraciones de secuencias.sequences:cancel: Cancelar secuencias no utilizadas.business_info:read: Acceder a estadísticas y métricas del dashboard.certification:read: Ver progreso de certificación DGII.certification:write: Ejecutar pruebas de certificación automática DGII.reports:read: Generar y exportar reportes (ej. formato 606).
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.2.0 - Package version:
0.0.6 - Generator version:
7.21.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
For more information, please visit https://pronesoft.com
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish