@pronesoft-rd/ecf-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +96 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +234 -0
- package/dist/apis/AssociatedCompaniesApi.d.ts +150 -0
- package/dist/apis/AssociatedCompaniesApi.js +229 -0
- package/dist/apis/AuthenticationApi.d.ts +64 -0
- package/dist/apis/AuthenticationApi.js +75 -0
- package/dist/apis/DigitalCertificatesApi.d.ts +70 -0
- package/dist/apis/DigitalCertificatesApi.js +113 -0
- package/dist/apis/ECFSubmissionApi.d.ts +70 -0
- package/dist/apis/ECFSubmissionApi.js +96 -0
- package/dist/apis/TaxSequencesApi.d.ts +152 -0
- package/dist/apis/TaxSequencesApi.js +214 -0
- package/dist/apis/WebhookConfigurationApi.d.ts +146 -0
- package/dist/apis/WebhookConfigurationApi.js +197 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/esm/apis/AssociatedCompaniesApi.d.ts +150 -0
- package/dist/esm/apis/AssociatedCompaniesApi.js +225 -0
- package/dist/esm/apis/AuthenticationApi.d.ts +64 -0
- package/dist/esm/apis/AuthenticationApi.js +71 -0
- package/dist/esm/apis/DigitalCertificatesApi.d.ts +70 -0
- package/dist/esm/apis/DigitalCertificatesApi.js +109 -0
- package/dist/esm/apis/ECFSubmissionApi.d.ts +70 -0
- package/dist/esm/apis/ECFSubmissionApi.js +92 -0
- package/dist/esm/apis/TaxSequencesApi.d.ts +152 -0
- package/dist/esm/apis/TaxSequencesApi.js +210 -0
- package/dist/esm/apis/WebhookConfigurationApi.d.ts +146 -0
- package/dist/esm/apis/WebhookConfigurationApi.js +193 -0
- package/dist/esm/apis/index.d.ts +6 -0
- package/dist/esm/apis/index.js +8 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/AccountType.d.ts +30 -0
- package/dist/esm/models/AccountType.js +48 -0
- package/dist/esm/models/AdditionalInfo.d.ts +50 -0
- package/dist/esm/models/AdditionalInfo.js +47 -0
- package/dist/esm/models/AlternativeCurrency.d.ts +46 -0
- package/dist/esm/models/AlternativeCurrency.js +49 -0
- package/dist/esm/models/AssociatedCompany.d.ts +125 -0
- package/dist/esm/models/AssociatedCompany.js +77 -0
- package/dist/esm/models/AssociatedCompanySubscription.d.ts +45 -0
- package/dist/esm/models/AssociatedCompanySubscription.js +46 -0
- package/dist/esm/models/AssociatedCompanySubscriptionPlan.d.ts +38 -0
- package/dist/esm/models/AssociatedCompanySubscriptionPlan.js +43 -0
- package/dist/esm/models/BillingIndicator.d.ts +34 -0
- package/dist/esm/models/BillingIndicator.js +52 -0
- package/dist/esm/models/Buyer.d.ts +68 -0
- package/dist/esm/models/Buyer.js +55 -0
- package/dist/esm/models/CreateAssociatedCompany201Response.d.ts +39 -0
- package/dist/esm/models/CreateAssociatedCompany201Response.js +44 -0
- package/dist/esm/models/CreateTaxSequenceRequest.d.ts +47 -0
- package/dist/esm/models/CreateTaxSequenceRequest.js +52 -0
- package/dist/esm/models/CreateWebhookConfig.d.ts +53 -0
- package/dist/esm/models/CreateWebhookConfig.js +52 -0
- package/dist/esm/models/DiscountOrSurcharge.d.ts +93 -0
- package/dist/esm/models/DiscountOrSurcharge.js +78 -0
- package/dist/esm/models/EcfSubmissionResponse.d.ts +56 -0
- package/dist/esm/models/EcfSubmissionResponse.js +53 -0
- package/dist/esm/models/ElectronicDocument.d.ts +252 -0
- package/dist/esm/models/ElectronicDocument.js +143 -0
- package/dist/esm/models/Environment.d.ts +30 -0
- package/dist/esm/models/Environment.js +48 -0
- package/dist/esm/models/ErrorResponse.d.ts +44 -0
- package/dist/esm/models/ErrorResponse.js +45 -0
- package/dist/esm/models/GetNextNumber200Response.d.ts +39 -0
- package/dist/esm/models/GetNextNumber200Response.js +44 -0
- package/dist/esm/models/GetNextNumber200ResponseData.d.ts +38 -0
- package/dist/esm/models/GetNextNumber200ResponseData.js +43 -0
- package/dist/esm/models/InvoiceType.d.ts +44 -0
- package/dist/esm/models/InvoiceType.js +62 -0
- package/dist/esm/models/Item.d.ts +106 -0
- package/dist/esm/models/Item.js +83 -0
- package/dist/esm/models/ItemAdditionalTax.d.ts +38 -0
- package/dist/esm/models/ItemAdditionalTax.js +47 -0
- package/dist/esm/models/ListTaxSequences200Response.d.ts +39 -0
- package/dist/esm/models/ListTaxSequences200Response.js +44 -0
- package/dist/esm/models/OAuthTokenRequest.d.ts +43 -0
- package/dist/esm/models/OAuthTokenRequest.js +47 -0
- package/dist/esm/models/OAuthTokenResponse.d.ts +46 -0
- package/dist/esm/models/OAuthTokenResponse.js +45 -0
- package/dist/esm/models/Page.d.ts +116 -0
- package/dist/esm/models/Page.js +75 -0
- package/dist/esm/models/PaymentMethod.d.ts +40 -0
- package/dist/esm/models/PaymentMethod.js +58 -0
- package/dist/esm/models/PrintFormat.d.ts +30 -0
- package/dist/esm/models/PrintFormat.js +48 -0
- package/dist/esm/models/ReferenceInfo.d.ts +76 -0
- package/dist/esm/models/ReferenceInfo.js +63 -0
- package/dist/esm/models/Subquantity.d.ts +38 -0
- package/dist/esm/models/Subquantity.js +47 -0
- package/dist/esm/models/Subtotal.d.ts +110 -0
- package/dist/esm/models/Subtotal.js +71 -0
- package/dist/esm/models/TaxSequence.d.ts +45 -0
- package/dist/esm/models/TaxSequence.js +46 -0
- package/dist/esm/models/Totals.d.ts +173 -0
- package/dist/esm/models/Totals.js +90 -0
- package/dist/esm/models/Transport.d.ts +62 -0
- package/dist/esm/models/Transport.js +51 -0
- package/dist/esm/models/UploadCertificate201Response.d.ts +44 -0
- package/dist/esm/models/UploadCertificate201Response.js +45 -0
- package/dist/esm/models/UploadCertificateResponse.d.ts +44 -0
- package/dist/esm/models/UploadCertificateResponse.js +45 -0
- package/dist/esm/models/WebhookConfigResponse.d.ts +63 -0
- package/dist/esm/models/WebhookConfigResponse.js +52 -0
- package/dist/esm/models/WebhookEventType.d.ts +40 -0
- package/dist/esm/models/WebhookEventType.js +58 -0
- package/dist/esm/models/WebhookNotificationPayload.d.ts +59 -0
- package/dist/esm/models/WebhookNotificationPayload.js +60 -0
- package/dist/esm/models/index.d.ts +37 -0
- package/dist/esm/models/index.js +39 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +349 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/AccountType.d.ts +30 -0
- package/dist/models/AccountType.js +56 -0
- package/dist/models/AdditionalInfo.d.ts +50 -0
- package/dist/models/AdditionalInfo.js +54 -0
- package/dist/models/AlternativeCurrency.d.ts +46 -0
- package/dist/models/AlternativeCurrency.js +56 -0
- package/dist/models/AssociatedCompany.d.ts +125 -0
- package/dist/models/AssociatedCompany.js +85 -0
- package/dist/models/AssociatedCompanySubscription.d.ts +45 -0
- package/dist/models/AssociatedCompanySubscription.js +53 -0
- package/dist/models/AssociatedCompanySubscriptionPlan.d.ts +38 -0
- package/dist/models/AssociatedCompanySubscriptionPlan.js +50 -0
- package/dist/models/BillingIndicator.d.ts +34 -0
- package/dist/models/BillingIndicator.js +60 -0
- package/dist/models/Buyer.d.ts +68 -0
- package/dist/models/Buyer.js +62 -0
- package/dist/models/CreateAssociatedCompany201Response.d.ts +39 -0
- package/dist/models/CreateAssociatedCompany201Response.js +51 -0
- package/dist/models/CreateTaxSequenceRequest.d.ts +47 -0
- package/dist/models/CreateTaxSequenceRequest.js +59 -0
- package/dist/models/CreateWebhookConfig.d.ts +53 -0
- package/dist/models/CreateWebhookConfig.js +59 -0
- package/dist/models/DiscountOrSurcharge.d.ts +93 -0
- package/dist/models/DiscountOrSurcharge.js +86 -0
- package/dist/models/EcfSubmissionResponse.d.ts +56 -0
- package/dist/models/EcfSubmissionResponse.js +60 -0
- package/dist/models/ElectronicDocument.d.ts +252 -0
- package/dist/models/ElectronicDocument.js +151 -0
- package/dist/models/Environment.d.ts +30 -0
- package/dist/models/Environment.js +56 -0
- package/dist/models/ErrorResponse.d.ts +44 -0
- package/dist/models/ErrorResponse.js +52 -0
- package/dist/models/GetNextNumber200Response.d.ts +39 -0
- package/dist/models/GetNextNumber200Response.js +51 -0
- package/dist/models/GetNextNumber200ResponseData.d.ts +38 -0
- package/dist/models/GetNextNumber200ResponseData.js +50 -0
- package/dist/models/InvoiceType.d.ts +44 -0
- package/dist/models/InvoiceType.js +70 -0
- package/dist/models/Item.d.ts +106 -0
- package/dist/models/Item.js +91 -0
- package/dist/models/ItemAdditionalTax.d.ts +38 -0
- package/dist/models/ItemAdditionalTax.js +54 -0
- package/dist/models/ListTaxSequences200Response.d.ts +39 -0
- package/dist/models/ListTaxSequences200Response.js +51 -0
- package/dist/models/OAuthTokenRequest.d.ts +43 -0
- package/dist/models/OAuthTokenRequest.js +54 -0
- package/dist/models/OAuthTokenResponse.d.ts +46 -0
- package/dist/models/OAuthTokenResponse.js +52 -0
- package/dist/models/Page.d.ts +116 -0
- package/dist/models/Page.js +82 -0
- package/dist/models/PaymentMethod.d.ts +40 -0
- package/dist/models/PaymentMethod.js +66 -0
- package/dist/models/PrintFormat.d.ts +30 -0
- package/dist/models/PrintFormat.js +56 -0
- package/dist/models/ReferenceInfo.d.ts +76 -0
- package/dist/models/ReferenceInfo.js +71 -0
- package/dist/models/Subquantity.d.ts +38 -0
- package/dist/models/Subquantity.js +54 -0
- package/dist/models/Subtotal.d.ts +110 -0
- package/dist/models/Subtotal.js +78 -0
- package/dist/models/TaxSequence.d.ts +45 -0
- package/dist/models/TaxSequence.js +53 -0
- package/dist/models/Totals.d.ts +173 -0
- package/dist/models/Totals.js +97 -0
- package/dist/models/Transport.d.ts +62 -0
- package/dist/models/Transport.js +58 -0
- package/dist/models/UploadCertificate201Response.d.ts +44 -0
- package/dist/models/UploadCertificate201Response.js +52 -0
- package/dist/models/UploadCertificateResponse.d.ts +44 -0
- package/dist/models/UploadCertificateResponse.js +52 -0
- package/dist/models/WebhookConfigResponse.d.ts +63 -0
- package/dist/models/WebhookConfigResponse.js +59 -0
- package/dist/models/WebhookEventType.d.ts +40 -0
- package/dist/models/WebhookEventType.js +66 -0
- package/dist/models/WebhookNotificationPayload.d.ts +59 -0
- package/dist/models/WebhookNotificationPayload.js +67 -0
- package/dist/models/index.d.ts +37 -0
- package/dist/models/index.js +55 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +365 -0
- package/docs/AccountType.md +33 -0
- package/docs/AdditionalInfo.md +41 -0
- package/docs/AlternativeCurrency.md +39 -0
- package/docs/AssociatedCompaniesApi.md +207 -0
- package/docs/AssociatedCompany.md +63 -0
- package/docs/AssociatedCompanySubscription.md +38 -0
- package/docs/AssociatedCompanySubscriptionPlan.md +36 -0
- package/docs/AuthenticationApi.md +77 -0
- package/docs/BillingIndicator.md +33 -0
- package/docs/Buyer.md +47 -0
- package/docs/CreateAssociatedCompany201Response.md +36 -0
- package/docs/CreateTaxSequenceRequest.md +39 -0
- package/docs/CreateWebhookConfig.md +41 -0
- package/docs/DigitalCertificatesApi.md +90 -0
- package/docs/DiscountOrSurcharge.md +49 -0
- package/docs/ECFSubmissionApi.md +90 -0
- package/docs/EcfSubmissionResponse.md +43 -0
- package/docs/ElectronicDocument.md +87 -0
- package/docs/Environment.md +33 -0
- package/docs/ErrorResponse.md +39 -0
- package/docs/GetNextNumber200Response.md +36 -0
- package/docs/GetNextNumber200ResponseData.md +36 -0
- package/docs/InvoiceType.md +33 -0
- package/docs/Item.md +55 -0
- package/docs/ItemAdditionalTax.md +37 -0
- package/docs/ListTaxSequences200Response.md +36 -0
- package/docs/OAuthTokenRequest.md +37 -0
- package/docs/OAuthTokenResponse.md +39 -0
- package/docs/Page.md +63 -0
- package/docs/PaymentMethod.md +33 -0
- package/docs/PrintFormat.md +33 -0
- package/docs/ReferenceInfo.md +43 -0
- package/docs/Subquantity.md +37 -0
- package/docs/Subtotal.md +61 -0
- package/docs/TaxSequence.md +39 -0
- package/docs/TaxSequencesApi.md +246 -0
- package/docs/Totals.md +81 -0
- package/docs/Transport.md +45 -0
- package/docs/UploadCertificate201Response.md +38 -0
- package/docs/UploadCertificateResponse.md +39 -0
- package/docs/WebhookConfigResponse.md +45 -0
- package/docs/WebhookConfigurationApi.md +241 -0
- package/docs/WebhookEventType.md +33 -0
- package/docs/WebhookNotificationPayload.md +43 -0
- package/package.json +21 -0
- package/src/apis/AssociatedCompaniesApi.ts +415 -0
- package/src/apis/AuthenticationApi.ts +122 -0
- package/src/apis/DigitalCertificatesApi.ts +175 -0
- package/src/apis/ECFSubmissionApi.ts +163 -0
- package/src/apis/TaxSequencesApi.ts +374 -0
- package/src/apis/WebhookConfigurationApi.ts +332 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/AccountType.ts +58 -0
- package/src/models/AdditionalInfo.ts +89 -0
- package/src/models/AlternativeCurrency.ts +85 -0
- package/src/models/AssociatedCompany.ts +196 -0
- package/src/models/AssociatedCompanySubscription.ts +89 -0
- package/src/models/AssociatedCompanySubscriptionPlan.ts +73 -0
- package/src/models/BillingIndicator.ts +62 -0
- package/src/models/Buyer.ts +114 -0
- package/src/models/CreateAssociatedCompany201Response.ts +81 -0
- package/src/models/CreateTaxSequenceRequest.ts +96 -0
- package/src/models/CreateWebhookConfig.ts +101 -0
- package/src/models/DiscountOrSurcharge.ts +155 -0
- package/src/models/EcfSubmissionResponse.ts +99 -0
- package/src/models/ElectronicDocument.ts +421 -0
- package/src/models/Environment.ts +58 -0
- package/src/models/ErrorResponse.ts +81 -0
- package/src/models/GetNextNumber200Response.ts +81 -0
- package/src/models/GetNextNumber200ResponseData.ts +73 -0
- package/src/models/InvoiceType.ts +72 -0
- package/src/models/Item.ts +187 -0
- package/src/models/ItemAdditionalTax.ts +75 -0
- package/src/models/ListTaxSequences200Response.ts +81 -0
- package/src/models/OAuthTokenRequest.ts +80 -0
- package/src/models/OAuthTokenResponse.ts +83 -0
- package/src/models/Page.ts +180 -0
- package/src/models/PaymentMethod.ts +68 -0
- package/src/models/PrintFormat.ts +58 -0
- package/src/models/ReferenceInfo.ts +122 -0
- package/src/models/Subquantity.ts +75 -0
- package/src/models/Subtotal.ts +171 -0
- package/src/models/TaxSequence.ts +91 -0
- package/src/models/Totals.ts +260 -0
- package/src/models/Transport.ts +105 -0
- package/src/models/UploadCertificate201Response.ts +81 -0
- package/src/models/UploadCertificateResponse.ts +81 -0
- package/src/models/WebhookConfigResponse.ts +113 -0
- package/src/models/WebhookEventType.ts +68 -0
- package/src/models/WebhookNotificationPayload.ts +114 -0
- package/src/models/index.ts +39 -0
- package/src/runtime.ts +450 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { AdditionalInfo } from './AdditionalInfo';
|
|
17
|
+
import {
|
|
18
|
+
AdditionalInfoFromJSON,
|
|
19
|
+
AdditionalInfoFromJSONTyped,
|
|
20
|
+
AdditionalInfoToJSON,
|
|
21
|
+
AdditionalInfoToJSONTyped,
|
|
22
|
+
} from './AdditionalInfo';
|
|
23
|
+
import type { Item } from './Item';
|
|
24
|
+
import {
|
|
25
|
+
ItemFromJSON,
|
|
26
|
+
ItemFromJSONTyped,
|
|
27
|
+
ItemToJSON,
|
|
28
|
+
ItemToJSONTyped,
|
|
29
|
+
} from './Item';
|
|
30
|
+
import type { Totals } from './Totals';
|
|
31
|
+
import {
|
|
32
|
+
TotalsFromJSON,
|
|
33
|
+
TotalsFromJSONTyped,
|
|
34
|
+
TotalsToJSON,
|
|
35
|
+
TotalsToJSONTyped,
|
|
36
|
+
} from './Totals';
|
|
37
|
+
import type { Subtotal } from './Subtotal';
|
|
38
|
+
import {
|
|
39
|
+
SubtotalFromJSON,
|
|
40
|
+
SubtotalFromJSONTyped,
|
|
41
|
+
SubtotalToJSON,
|
|
42
|
+
SubtotalToJSONTyped,
|
|
43
|
+
} from './Subtotal';
|
|
44
|
+
import type { AlternativeCurrency } from './AlternativeCurrency';
|
|
45
|
+
import {
|
|
46
|
+
AlternativeCurrencyFromJSON,
|
|
47
|
+
AlternativeCurrencyFromJSONTyped,
|
|
48
|
+
AlternativeCurrencyToJSON,
|
|
49
|
+
AlternativeCurrencyToJSONTyped,
|
|
50
|
+
} from './AlternativeCurrency';
|
|
51
|
+
import type { DiscountOrSurcharge } from './DiscountOrSurcharge';
|
|
52
|
+
import {
|
|
53
|
+
DiscountOrSurchargeFromJSON,
|
|
54
|
+
DiscountOrSurchargeFromJSONTyped,
|
|
55
|
+
DiscountOrSurchargeToJSON,
|
|
56
|
+
DiscountOrSurchargeToJSONTyped,
|
|
57
|
+
} from './DiscountOrSurcharge';
|
|
58
|
+
import type { Buyer } from './Buyer';
|
|
59
|
+
import {
|
|
60
|
+
BuyerFromJSON,
|
|
61
|
+
BuyerFromJSONTyped,
|
|
62
|
+
BuyerToJSON,
|
|
63
|
+
BuyerToJSONTyped,
|
|
64
|
+
} from './Buyer';
|
|
65
|
+
import type { Page } from './Page';
|
|
66
|
+
import {
|
|
67
|
+
PageFromJSON,
|
|
68
|
+
PageFromJSONTyped,
|
|
69
|
+
PageToJSON,
|
|
70
|
+
PageToJSONTyped,
|
|
71
|
+
} from './Page';
|
|
72
|
+
import type { Transport } from './Transport';
|
|
73
|
+
import {
|
|
74
|
+
TransportFromJSON,
|
|
75
|
+
TransportFromJSONTyped,
|
|
76
|
+
TransportToJSON,
|
|
77
|
+
TransportToJSONTyped,
|
|
78
|
+
} from './Transport';
|
|
79
|
+
import type { AccountType } from './AccountType';
|
|
80
|
+
import {
|
|
81
|
+
AccountTypeFromJSON,
|
|
82
|
+
AccountTypeFromJSONTyped,
|
|
83
|
+
AccountTypeToJSON,
|
|
84
|
+
AccountTypeToJSONTyped,
|
|
85
|
+
} from './AccountType';
|
|
86
|
+
import type { InvoiceType } from './InvoiceType';
|
|
87
|
+
import {
|
|
88
|
+
InvoiceTypeFromJSON,
|
|
89
|
+
InvoiceTypeFromJSONTyped,
|
|
90
|
+
InvoiceTypeToJSON,
|
|
91
|
+
InvoiceTypeToJSONTyped,
|
|
92
|
+
} from './InvoiceType';
|
|
93
|
+
import type { ReferenceInfo } from './ReferenceInfo';
|
|
94
|
+
import {
|
|
95
|
+
ReferenceInfoFromJSON,
|
|
96
|
+
ReferenceInfoFromJSONTyped,
|
|
97
|
+
ReferenceInfoToJSON,
|
|
98
|
+
ReferenceInfoToJSONTyped,
|
|
99
|
+
} from './ReferenceInfo';
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The main e-CF document payload. Build this object and submit it to
|
|
103
|
+
* `POST /{environment}/ecf/submit`.
|
|
104
|
+
*
|
|
105
|
+
* **Required fields:** `version`, `invoiceType`, `invoiceNumber`,
|
|
106
|
+
* `issueDate`, `items`, `totals`.
|
|
107
|
+
*
|
|
108
|
+
* Use `GET /tax-sequences/next` to obtain the correct `invoiceNumber`.
|
|
109
|
+
*
|
|
110
|
+
* @export
|
|
111
|
+
* @interface ElectronicDocument
|
|
112
|
+
*/
|
|
113
|
+
export interface ElectronicDocument {
|
|
114
|
+
/**
|
|
115
|
+
* Document schema version. Always "1.0".
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof ElectronicDocument
|
|
118
|
+
*/
|
|
119
|
+
version: string;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {InvoiceType}
|
|
123
|
+
* @memberof ElectronicDocument
|
|
124
|
+
*/
|
|
125
|
+
invoiceType: InvoiceType;
|
|
126
|
+
/**
|
|
127
|
+
* e-NCF number (13 alphanumeric characters).
|
|
128
|
+
* Obtain from `GET /tax-sequences/next`.
|
|
129
|
+
*
|
|
130
|
+
* @type {string}
|
|
131
|
+
* @memberof ElectronicDocument
|
|
132
|
+
*/
|
|
133
|
+
invoiceNumber: string;
|
|
134
|
+
/**
|
|
135
|
+
* Document issue date and time (ISO 8601).
|
|
136
|
+
* @type {Date}
|
|
137
|
+
* @memberof ElectronicDocument
|
|
138
|
+
*/
|
|
139
|
+
issueDate: Date;
|
|
140
|
+
/**
|
|
141
|
+
* Document expiration date (optional, for credit documents).
|
|
142
|
+
* @type {Date}
|
|
143
|
+
* @memberof ElectronicDocument
|
|
144
|
+
*/
|
|
145
|
+
expirationDate?: Date;
|
|
146
|
+
/**
|
|
147
|
+
* Income type code:
|
|
148
|
+
* - `01`: Operations Income
|
|
149
|
+
* - `02`: Financial Income
|
|
150
|
+
* - `03`: Extraordinary Income
|
|
151
|
+
* - `04`: Leasing Income
|
|
152
|
+
* - `05`: Income from Sales of Assets
|
|
153
|
+
* - `06`: Other Income
|
|
154
|
+
*
|
|
155
|
+
* @type {ElectronicDocumentIncomeTypeEnum}
|
|
156
|
+
* @memberof ElectronicDocument
|
|
157
|
+
*/
|
|
158
|
+
incomeType?: ElectronicDocumentIncomeTypeEnum;
|
|
159
|
+
/**
|
|
160
|
+
* Payment condition:
|
|
161
|
+
* - `1`: Cash (Al Contado)
|
|
162
|
+
* - `2`: Credit (Crédito)
|
|
163
|
+
* - `3`: Mixed (Mixto)
|
|
164
|
+
*
|
|
165
|
+
* @type {ElectronicDocumentPaymentTypeEnum}
|
|
166
|
+
* @memberof ElectronicDocument
|
|
167
|
+
*/
|
|
168
|
+
paymentType?: ElectronicDocumentPaymentTypeEnum;
|
|
169
|
+
/**
|
|
170
|
+
* Payment due date (required when paymentType is "2" or "3").
|
|
171
|
+
* @type {Date}
|
|
172
|
+
* @memberof ElectronicDocument
|
|
173
|
+
*/
|
|
174
|
+
paymentDeadline?: Date;
|
|
175
|
+
/**
|
|
176
|
+
* Payment terms description (e.g. "Net 30").
|
|
177
|
+
* @type {string}
|
|
178
|
+
* @memberof ElectronicDocument
|
|
179
|
+
*/
|
|
180
|
+
paymentTerms?: string;
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @type {AccountType}
|
|
184
|
+
* @memberof ElectronicDocument
|
|
185
|
+
*/
|
|
186
|
+
paymentAccountType?: AccountType;
|
|
187
|
+
/**
|
|
188
|
+
* Bank account number for payment reference.
|
|
189
|
+
* @type {string}
|
|
190
|
+
* @memberof ElectronicDocument
|
|
191
|
+
*/
|
|
192
|
+
paymentAccountNumber?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Bank name for payment reference.
|
|
195
|
+
* @type {string}
|
|
196
|
+
* @memberof ElectronicDocument
|
|
197
|
+
*/
|
|
198
|
+
paymentBank?: string;
|
|
199
|
+
/**
|
|
200
|
+
* For Credit Notes (type 34) only:
|
|
201
|
+
* - `0`: Affected invoice issued ≤ 30 days ago
|
|
202
|
+
* - `1`: Affected invoice issued > 30 days ago
|
|
203
|
+
*
|
|
204
|
+
* @type {ElectronicDocumentCreditNoteIndicatorEnum}
|
|
205
|
+
* @memberof ElectronicDocument
|
|
206
|
+
*/
|
|
207
|
+
creditNoteIndicator?: ElectronicDocumentCreditNoteIndicatorEnum;
|
|
208
|
+
/**
|
|
209
|
+
* RNC of the issuing company (overrides tenant default if provided).
|
|
210
|
+
* @type {string}
|
|
211
|
+
* @memberof ElectronicDocument
|
|
212
|
+
*/
|
|
213
|
+
issuerRNC?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Legal business name of the issuer.
|
|
216
|
+
* @type {string}
|
|
217
|
+
* @memberof ElectronicDocument
|
|
218
|
+
*/
|
|
219
|
+
issuerBusinessName?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Contact email of the issuer.
|
|
222
|
+
* @type {string}
|
|
223
|
+
* @memberof ElectronicDocument
|
|
224
|
+
*/
|
|
225
|
+
issuerEmail?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Issuer phone numbers in format "809-555-1234".
|
|
228
|
+
* @type {Array<string>}
|
|
229
|
+
* @memberof ElectronicDocument
|
|
230
|
+
*/
|
|
231
|
+
issuerPhones?: Array<string>;
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @type {Buyer}
|
|
235
|
+
* @memberof ElectronicDocument
|
|
236
|
+
*/
|
|
237
|
+
buyer?: Buyer;
|
|
238
|
+
/**
|
|
239
|
+
* Line items of the document. At least 1 required.
|
|
240
|
+
* @type {Array<Item>}
|
|
241
|
+
* @memberof ElectronicDocument
|
|
242
|
+
*/
|
|
243
|
+
items: Array<Item>;
|
|
244
|
+
/**
|
|
245
|
+
*
|
|
246
|
+
* @type {Totals}
|
|
247
|
+
* @memberof ElectronicDocument
|
|
248
|
+
*/
|
|
249
|
+
totals: Totals;
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @type {Transport}
|
|
253
|
+
* @memberof ElectronicDocument
|
|
254
|
+
*/
|
|
255
|
+
transport?: Transport;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @type {AdditionalInfo}
|
|
259
|
+
* @memberof ElectronicDocument
|
|
260
|
+
*/
|
|
261
|
+
additionalInfo?: AdditionalInfo;
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @type {AlternativeCurrency}
|
|
265
|
+
* @memberof ElectronicDocument
|
|
266
|
+
*/
|
|
267
|
+
alternativeCurrency?: AlternativeCurrency;
|
|
268
|
+
/**
|
|
269
|
+
*
|
|
270
|
+
* @type {ReferenceInfo}
|
|
271
|
+
* @memberof ElectronicDocument
|
|
272
|
+
*/
|
|
273
|
+
referenceInfo?: ReferenceInfo;
|
|
274
|
+
/**
|
|
275
|
+
* Page/section subtotals (for multi-page documents).
|
|
276
|
+
* @type {Array<Subtotal>}
|
|
277
|
+
* @memberof ElectronicDocument
|
|
278
|
+
*/
|
|
279
|
+
subtotals?: Array<Subtotal>;
|
|
280
|
+
/**
|
|
281
|
+
* Document-level discounts or surcharges.
|
|
282
|
+
* @type {Array<DiscountOrSurcharge>}
|
|
283
|
+
* @memberof ElectronicDocument
|
|
284
|
+
*/
|
|
285
|
+
discountsOrSurcharges?: Array<DiscountOrSurcharge>;
|
|
286
|
+
/**
|
|
287
|
+
* Page breakdown for multi-page documents.
|
|
288
|
+
* @type {Array<Page>}
|
|
289
|
+
* @memberof ElectronicDocument
|
|
290
|
+
*/
|
|
291
|
+
pages?: Array<Page>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @export
|
|
297
|
+
*/
|
|
298
|
+
export const ElectronicDocumentIncomeTypeEnum = {
|
|
299
|
+
_01: '01',
|
|
300
|
+
_02: '02',
|
|
301
|
+
_03: '03',
|
|
302
|
+
_04: '04',
|
|
303
|
+
_05: '05',
|
|
304
|
+
_06: '06'
|
|
305
|
+
} as const;
|
|
306
|
+
export type ElectronicDocumentIncomeTypeEnum = typeof ElectronicDocumentIncomeTypeEnum[keyof typeof ElectronicDocumentIncomeTypeEnum];
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @export
|
|
310
|
+
*/
|
|
311
|
+
export const ElectronicDocumentPaymentTypeEnum = {
|
|
312
|
+
_1: '1',
|
|
313
|
+
_2: '2',
|
|
314
|
+
_3: '3'
|
|
315
|
+
} as const;
|
|
316
|
+
export type ElectronicDocumentPaymentTypeEnum = typeof ElectronicDocumentPaymentTypeEnum[keyof typeof ElectronicDocumentPaymentTypeEnum];
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @export
|
|
320
|
+
*/
|
|
321
|
+
export const ElectronicDocumentCreditNoteIndicatorEnum = {
|
|
322
|
+
_0: '0',
|
|
323
|
+
_1: '1'
|
|
324
|
+
} as const;
|
|
325
|
+
export type ElectronicDocumentCreditNoteIndicatorEnum = typeof ElectronicDocumentCreditNoteIndicatorEnum[keyof typeof ElectronicDocumentCreditNoteIndicatorEnum];
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Check if a given object implements the ElectronicDocument interface.
|
|
330
|
+
*/
|
|
331
|
+
export function instanceOfElectronicDocument(value: object): value is ElectronicDocument {
|
|
332
|
+
if (!('version' in value) || value['version'] === undefined) return false;
|
|
333
|
+
if (!('invoiceType' in value) || value['invoiceType'] === undefined) return false;
|
|
334
|
+
if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined) return false;
|
|
335
|
+
if (!('issueDate' in value) || value['issueDate'] === undefined) return false;
|
|
336
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
337
|
+
if (!('totals' in value) || value['totals'] === undefined) return false;
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function ElectronicDocumentFromJSON(json: any): ElectronicDocument {
|
|
342
|
+
return ElectronicDocumentFromJSONTyped(json, false);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export function ElectronicDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ElectronicDocument {
|
|
346
|
+
if (json == null) {
|
|
347
|
+
return json;
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
|
|
351
|
+
'version': json['version'],
|
|
352
|
+
'invoiceType': InvoiceTypeFromJSON(json['invoiceType']),
|
|
353
|
+
'invoiceNumber': json['invoiceNumber'],
|
|
354
|
+
'issueDate': (new Date(json['issueDate'])),
|
|
355
|
+
'expirationDate': json['expirationDate'] == null ? undefined : (new Date(json['expirationDate'])),
|
|
356
|
+
'incomeType': json['incomeType'] == null ? undefined : json['incomeType'],
|
|
357
|
+
'paymentType': json['paymentType'] == null ? undefined : json['paymentType'],
|
|
358
|
+
'paymentDeadline': json['paymentDeadline'] == null ? undefined : (new Date(json['paymentDeadline'])),
|
|
359
|
+
'paymentTerms': json['paymentTerms'] == null ? undefined : json['paymentTerms'],
|
|
360
|
+
'paymentAccountType': json['paymentAccountType'] == null ? undefined : AccountTypeFromJSON(json['paymentAccountType']),
|
|
361
|
+
'paymentAccountNumber': json['paymentAccountNumber'] == null ? undefined : json['paymentAccountNumber'],
|
|
362
|
+
'paymentBank': json['paymentBank'] == null ? undefined : json['paymentBank'],
|
|
363
|
+
'creditNoteIndicator': json['creditNoteIndicator'] == null ? undefined : json['creditNoteIndicator'],
|
|
364
|
+
'issuerRNC': json['issuerRNC'] == null ? undefined : json['issuerRNC'],
|
|
365
|
+
'issuerBusinessName': json['issuerBusinessName'] == null ? undefined : json['issuerBusinessName'],
|
|
366
|
+
'issuerEmail': json['issuerEmail'] == null ? undefined : json['issuerEmail'],
|
|
367
|
+
'issuerPhones': json['issuerPhones'] == null ? undefined : json['issuerPhones'],
|
|
368
|
+
'buyer': json['buyer'] == null ? undefined : BuyerFromJSON(json['buyer']),
|
|
369
|
+
'items': ((json['items'] as Array<any>).map(ItemFromJSON)),
|
|
370
|
+
'totals': TotalsFromJSON(json['totals']),
|
|
371
|
+
'transport': json['transport'] == null ? undefined : TransportFromJSON(json['transport']),
|
|
372
|
+
'additionalInfo': json['additionalInfo'] == null ? undefined : AdditionalInfoFromJSON(json['additionalInfo']),
|
|
373
|
+
'alternativeCurrency': json['alternativeCurrency'] == null ? undefined : AlternativeCurrencyFromJSON(json['alternativeCurrency']),
|
|
374
|
+
'referenceInfo': json['referenceInfo'] == null ? undefined : ReferenceInfoFromJSON(json['referenceInfo']),
|
|
375
|
+
'subtotals': json['subtotals'] == null ? undefined : ((json['subtotals'] as Array<any>).map(SubtotalFromJSON)),
|
|
376
|
+
'discountsOrSurcharges': json['discountsOrSurcharges'] == null ? undefined : ((json['discountsOrSurcharges'] as Array<any>).map(DiscountOrSurchargeFromJSON)),
|
|
377
|
+
'pages': json['pages'] == null ? undefined : ((json['pages'] as Array<any>).map(PageFromJSON)),
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export function ElectronicDocumentToJSON(json: any): ElectronicDocument {
|
|
382
|
+
return ElectronicDocumentToJSONTyped(json, false);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export function ElectronicDocumentToJSONTyped(value?: ElectronicDocument | null, ignoreDiscriminator: boolean = false): any {
|
|
386
|
+
if (value == null) {
|
|
387
|
+
return value;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
return {
|
|
391
|
+
|
|
392
|
+
'version': value['version'],
|
|
393
|
+
'invoiceType': InvoiceTypeToJSON(value['invoiceType']),
|
|
394
|
+
'invoiceNumber': value['invoiceNumber'],
|
|
395
|
+
'issueDate': value['issueDate'].toISOString(),
|
|
396
|
+
'expirationDate': value['expirationDate'] == null ? value['expirationDate'] : value['expirationDate'].toISOString(),
|
|
397
|
+
'incomeType': value['incomeType'],
|
|
398
|
+
'paymentType': value['paymentType'],
|
|
399
|
+
'paymentDeadline': value['paymentDeadline'] == null ? value['paymentDeadline'] : value['paymentDeadline'].toISOString(),
|
|
400
|
+
'paymentTerms': value['paymentTerms'],
|
|
401
|
+
'paymentAccountType': AccountTypeToJSON(value['paymentAccountType']),
|
|
402
|
+
'paymentAccountNumber': value['paymentAccountNumber'],
|
|
403
|
+
'paymentBank': value['paymentBank'],
|
|
404
|
+
'creditNoteIndicator': value['creditNoteIndicator'],
|
|
405
|
+
'issuerRNC': value['issuerRNC'],
|
|
406
|
+
'issuerBusinessName': value['issuerBusinessName'],
|
|
407
|
+
'issuerEmail': value['issuerEmail'],
|
|
408
|
+
'issuerPhones': value['issuerPhones'],
|
|
409
|
+
'buyer': BuyerToJSON(value['buyer']),
|
|
410
|
+
'items': ((value['items'] as Array<any>).map(ItemToJSON)),
|
|
411
|
+
'totals': TotalsToJSON(value['totals']),
|
|
412
|
+
'transport': TransportToJSON(value['transport']),
|
|
413
|
+
'additionalInfo': AdditionalInfoToJSON(value['additionalInfo']),
|
|
414
|
+
'alternativeCurrency': AlternativeCurrencyToJSON(value['alternativeCurrency']),
|
|
415
|
+
'referenceInfo': ReferenceInfoToJSON(value['referenceInfo']),
|
|
416
|
+
'subtotals': value['subtotals'] == null ? undefined : ((value['subtotals'] as Array<any>).map(SubtotalToJSON)),
|
|
417
|
+
'discountsOrSurcharges': value['discountsOrSurcharges'] == null ? undefined : ((value['discountsOrSurcharges'] as Array<any>).map(DiscountOrSurchargeToJSON)),
|
|
418
|
+
'pages': value['pages'] == null ? undefined : ((value['pages'] as Array<any>).map(PageToJSON)),
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Target environment for e-CF submission.
|
|
18
|
+
* - `TesteCF`: Functional tests, no real DGII interaction.
|
|
19
|
+
* - `CerteCF`: DGII certification environment.
|
|
20
|
+
* - `eCF`: Production — issues real legal documents.
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const Environment = {
|
|
25
|
+
TesteCf: 'TesteCF',
|
|
26
|
+
CerteCf: 'CerteCF',
|
|
27
|
+
ECf: 'eCF'
|
|
28
|
+
} as const;
|
|
29
|
+
export type Environment = typeof Environment[keyof typeof Environment];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function instanceOfEnvironment(value: any): boolean {
|
|
33
|
+
for (const key in Environment) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(Environment, key)) {
|
|
35
|
+
if (Environment[key as keyof typeof Environment] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function EnvironmentFromJSON(json: any): Environment {
|
|
44
|
+
return EnvironmentFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function EnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Environment {
|
|
48
|
+
return json as Environment;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function EnvironmentToJSON(value?: Environment | null): any {
|
|
52
|
+
return value as any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function EnvironmentToJSONTyped(value: any, ignoreDiscriminator: boolean): Environment {
|
|
56
|
+
return value as Environment;
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Standard error response returned by all endpoints on failure.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ErrorResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ErrorResponse {
|
|
22
|
+
/**
|
|
23
|
+
* HTTP status code.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ErrorResponse
|
|
26
|
+
*/
|
|
27
|
+
statusCode?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Human-readable error description.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ErrorResponse
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
* When the error occurred.
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof ErrorResponse
|
|
38
|
+
*/
|
|
39
|
+
timestamp?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfErrorResponse(value: object): value is ErrorResponse {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ErrorResponseFromJSON(json: any): ErrorResponse {
|
|
50
|
+
return ErrorResponseFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'statusCode': json['statusCode'] == null ? undefined : json['statusCode'],
|
|
60
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
61
|
+
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ErrorResponseToJSON(json: any): ErrorResponse {
|
|
66
|
+
return ErrorResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'statusCode': value['statusCode'],
|
|
77
|
+
'message': value['message'],
|
|
78
|
+
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { GetNextNumber200ResponseData } from './GetNextNumber200ResponseData';
|
|
17
|
+
import {
|
|
18
|
+
GetNextNumber200ResponseDataFromJSON,
|
|
19
|
+
GetNextNumber200ResponseDataFromJSONTyped,
|
|
20
|
+
GetNextNumber200ResponseDataToJSON,
|
|
21
|
+
GetNextNumber200ResponseDataToJSONTyped,
|
|
22
|
+
} from './GetNextNumber200ResponseData';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetNextNumber200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface GetNextNumber200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof GetNextNumber200Response
|
|
34
|
+
*/
|
|
35
|
+
success?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {GetNextNumber200ResponseData}
|
|
39
|
+
* @memberof GetNextNumber200Response
|
|
40
|
+
*/
|
|
41
|
+
data?: GetNextNumber200ResponseData;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the GetNextNumber200Response interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfGetNextNumber200Response(value: object): value is GetNextNumber200Response {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function GetNextNumber200ResponseFromJSON(json: any): GetNextNumber200Response {
|
|
52
|
+
return GetNextNumber200ResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function GetNextNumber200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetNextNumber200Response {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
62
|
+
'data': json['data'] == null ? undefined : GetNextNumber200ResponseDataFromJSON(json['data']),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function GetNextNumber200ResponseToJSON(json: any): GetNextNumber200Response {
|
|
67
|
+
return GetNextNumber200ResponseToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function GetNextNumber200ResponseToJSONTyped(value?: GetNextNumber200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'success': value['success'],
|
|
78
|
+
'data': GetNextNumber200ResponseDataToJSON(value['data']),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|