@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,73 @@
|
|
|
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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetNextNumber200ResponseData
|
|
20
|
+
*/
|
|
21
|
+
export interface GetNextNumber200ResponseData {
|
|
22
|
+
/**
|
|
23
|
+
* The next available e-NCF number (13 characters).
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetNextNumber200ResponseData
|
|
26
|
+
*/
|
|
27
|
+
nextNumber?: string;
|
|
28
|
+
/**
|
|
29
|
+
* How many numbers are left in the current sequence.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GetNextNumber200ResponseData
|
|
32
|
+
*/
|
|
33
|
+
remainingNumbers?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the GetNextNumber200ResponseData interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfGetNextNumber200ResponseData(value: object): value is GetNextNumber200ResponseData {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function GetNextNumber200ResponseDataFromJSON(json: any): GetNextNumber200ResponseData {
|
|
44
|
+
return GetNextNumber200ResponseDataFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function GetNextNumber200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetNextNumber200ResponseData {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'nextNumber': json['nextNumber'] == null ? undefined : json['nextNumber'],
|
|
54
|
+
'remainingNumbers': json['remainingNumbers'] == null ? undefined : json['remainingNumbers'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GetNextNumber200ResponseDataToJSON(json: any): GetNextNumber200ResponseData {
|
|
59
|
+
return GetNextNumber200ResponseDataToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function GetNextNumber200ResponseDataToJSONTyped(value?: GetNextNumber200ResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'nextNumber': value['nextNumber'],
|
|
70
|
+
'remainingNumbers': value['remainingNumbers'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
* e-NCF invoice type code as defined by the DGII:
|
|
18
|
+
* - `31`: Tax Credit Invoice (Factura de Crédito Fiscal)
|
|
19
|
+
* - `32`: Consumer Invoice (Factura de Consumo)
|
|
20
|
+
* - `33`: Debit Note (Nota de Débito)
|
|
21
|
+
* - `34`: Credit Note (Nota de Crédito)
|
|
22
|
+
* - `41`: Purchases (Compras)
|
|
23
|
+
* - `43`: Minor Expenses (Gastos Menores)
|
|
24
|
+
* - `44`: Special Regimes (Regímenes Especiales)
|
|
25
|
+
* - `45`: Governmental (Gubernamentales)
|
|
26
|
+
* - `46`: Exports (Exportaciones)
|
|
27
|
+
* - `47`: Overseas Payments (Pagos al Exterior)
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
export const InvoiceType = {
|
|
32
|
+
_31: '31',
|
|
33
|
+
_32: '32',
|
|
34
|
+
_33: '33',
|
|
35
|
+
_34: '34',
|
|
36
|
+
_41: '41',
|
|
37
|
+
_43: '43',
|
|
38
|
+
_44: '44',
|
|
39
|
+
_45: '45',
|
|
40
|
+
_46: '46',
|
|
41
|
+
_47: '47'
|
|
42
|
+
} as const;
|
|
43
|
+
export type InvoiceType = typeof InvoiceType[keyof typeof InvoiceType];
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export function instanceOfInvoiceType(value: any): boolean {
|
|
47
|
+
for (const key in InvoiceType) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(InvoiceType, key)) {
|
|
49
|
+
if (InvoiceType[key as keyof typeof InvoiceType] === value) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function InvoiceTypeFromJSON(json: any): InvoiceType {
|
|
58
|
+
return InvoiceTypeFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function InvoiceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceType {
|
|
62
|
+
return json as InvoiceType;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function InvoiceTypeToJSON(value?: InvoiceType | null): any {
|
|
66
|
+
return value as any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function InvoiceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): InvoiceType {
|
|
70
|
+
return value as InvoiceType;
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -0,0 +1,187 @@
|
|
|
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 { BillingIndicator } from './BillingIndicator';
|
|
17
|
+
import {
|
|
18
|
+
BillingIndicatorFromJSON,
|
|
19
|
+
BillingIndicatorFromJSONTyped,
|
|
20
|
+
BillingIndicatorToJSON,
|
|
21
|
+
BillingIndicatorToJSONTyped,
|
|
22
|
+
} from './BillingIndicator';
|
|
23
|
+
import type { ItemAdditionalTax } from './ItemAdditionalTax';
|
|
24
|
+
import {
|
|
25
|
+
ItemAdditionalTaxFromJSON,
|
|
26
|
+
ItemAdditionalTaxFromJSONTyped,
|
|
27
|
+
ItemAdditionalTaxToJSON,
|
|
28
|
+
ItemAdditionalTaxToJSONTyped,
|
|
29
|
+
} from './ItemAdditionalTax';
|
|
30
|
+
import type { Subquantity } from './Subquantity';
|
|
31
|
+
import {
|
|
32
|
+
SubquantityFromJSON,
|
|
33
|
+
SubquantityFromJSONTyped,
|
|
34
|
+
SubquantityToJSON,
|
|
35
|
+
SubquantityToJSONTyped,
|
|
36
|
+
} from './Subquantity';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A single line item in the electronic document.
|
|
40
|
+
* @export
|
|
41
|
+
* @interface Item
|
|
42
|
+
*/
|
|
43
|
+
export interface Item {
|
|
44
|
+
/**
|
|
45
|
+
* Sequential line number (1-based). Auto-assigned if omitted.
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof Item
|
|
48
|
+
*/
|
|
49
|
+
lineNumber?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Product or service name.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof Item
|
|
54
|
+
*/
|
|
55
|
+
name: string;
|
|
56
|
+
/**
|
|
57
|
+
* Item type:
|
|
58
|
+
* - `1`: Product (Bien)
|
|
59
|
+
* - `2`: Service (Servicio)
|
|
60
|
+
*
|
|
61
|
+
* @type {ItemTypeEnum}
|
|
62
|
+
* @memberof Item
|
|
63
|
+
*/
|
|
64
|
+
type: ItemTypeEnum;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {BillingIndicator}
|
|
68
|
+
* @memberof Item
|
|
69
|
+
*/
|
|
70
|
+
billingIndicator: BillingIndicator;
|
|
71
|
+
/**
|
|
72
|
+
* Quantity (as string to support decimals with precision).
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof Item
|
|
75
|
+
*/
|
|
76
|
+
quantity: string;
|
|
77
|
+
/**
|
|
78
|
+
* Unit price (as string to support decimals with precision).
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof Item
|
|
81
|
+
*/
|
|
82
|
+
unitPrice: string;
|
|
83
|
+
/**
|
|
84
|
+
* Total line amount (quantity × unitPrice, before discounts).
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof Item
|
|
87
|
+
*/
|
|
88
|
+
amount: number;
|
|
89
|
+
/**
|
|
90
|
+
* Discount amount applied to this line item.
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof Item
|
|
93
|
+
*/
|
|
94
|
+
discountAmount?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Additional taxes (e.g. ISC, IECS) for this line item.
|
|
97
|
+
* @type {Array<ItemAdditionalTax>}
|
|
98
|
+
* @memberof Item
|
|
99
|
+
*/
|
|
100
|
+
additionalTaxes?: Array<ItemAdditionalTax>;
|
|
101
|
+
/**
|
|
102
|
+
* Sub-quantities (for items with multiple units of measure).
|
|
103
|
+
* @type {Array<Subquantity>}
|
|
104
|
+
* @memberof Item
|
|
105
|
+
*/
|
|
106
|
+
subquantities?: Array<Subquantity>;
|
|
107
|
+
/**
|
|
108
|
+
* Alcohol degree (required for alcoholic beverages subject to ISC).
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @memberof Item
|
|
111
|
+
*/
|
|
112
|
+
alcoholDegree?: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @export
|
|
118
|
+
*/
|
|
119
|
+
export const ItemTypeEnum = {
|
|
120
|
+
_1: '1',
|
|
121
|
+
_2: '2'
|
|
122
|
+
} as const;
|
|
123
|
+
export type ItemTypeEnum = typeof ItemTypeEnum[keyof typeof ItemTypeEnum];
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Check if a given object implements the Item interface.
|
|
128
|
+
*/
|
|
129
|
+
export function instanceOfItem(value: object): value is Item {
|
|
130
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
131
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
132
|
+
if (!('billingIndicator' in value) || value['billingIndicator'] === undefined) return false;
|
|
133
|
+
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
134
|
+
if (!('unitPrice' in value) || value['unitPrice'] === undefined) return false;
|
|
135
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ItemFromJSON(json: any): Item {
|
|
140
|
+
return ItemFromJSONTyped(json, false);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function ItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): Item {
|
|
144
|
+
if (json == null) {
|
|
145
|
+
return json;
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
|
|
149
|
+
'lineNumber': json['lineNumber'] == null ? undefined : json['lineNumber'],
|
|
150
|
+
'name': json['name'],
|
|
151
|
+
'type': json['type'],
|
|
152
|
+
'billingIndicator': BillingIndicatorFromJSON(json['billingIndicator']),
|
|
153
|
+
'quantity': json['quantity'],
|
|
154
|
+
'unitPrice': json['unitPrice'],
|
|
155
|
+
'amount': json['amount'],
|
|
156
|
+
'discountAmount': json['discountAmount'] == null ? undefined : json['discountAmount'],
|
|
157
|
+
'additionalTaxes': json['additionalTaxes'] == null ? undefined : ((json['additionalTaxes'] as Array<any>).map(ItemAdditionalTaxFromJSON)),
|
|
158
|
+
'subquantities': json['subquantities'] == null ? undefined : ((json['subquantities'] as Array<any>).map(SubquantityFromJSON)),
|
|
159
|
+
'alcoholDegree': json['alcoholDegree'] == null ? undefined : json['alcoholDegree'],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function ItemToJSON(json: any): Item {
|
|
164
|
+
return ItemToJSONTyped(json, false);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function ItemToJSONTyped(value?: Item | null, ignoreDiscriminator: boolean = false): any {
|
|
168
|
+
if (value == null) {
|
|
169
|
+
return value;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
|
|
174
|
+
'lineNumber': value['lineNumber'],
|
|
175
|
+
'name': value['name'],
|
|
176
|
+
'type': value['type'],
|
|
177
|
+
'billingIndicator': BillingIndicatorToJSON(value['billingIndicator']),
|
|
178
|
+
'quantity': value['quantity'],
|
|
179
|
+
'unitPrice': value['unitPrice'],
|
|
180
|
+
'amount': value['amount'],
|
|
181
|
+
'discountAmount': value['discountAmount'],
|
|
182
|
+
'additionalTaxes': value['additionalTaxes'] == null ? undefined : ((value['additionalTaxes'] as Array<any>).map(ItemAdditionalTaxToJSON)),
|
|
183
|
+
'subquantities': value['subquantities'] == null ? undefined : ((value['subquantities'] as Array<any>).map(SubquantityToJSON)),
|
|
184
|
+
'alcoholDegree': value['alcoholDegree'],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
* An additional tax applied to a line item (e.g. ISC, IECS).
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ItemAdditionalTax
|
|
20
|
+
*/
|
|
21
|
+
export interface ItemAdditionalTax {
|
|
22
|
+
/**
|
|
23
|
+
* Tax code as defined by the DGII (e.g. "ISC", "IECS").
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ItemAdditionalTax
|
|
26
|
+
*/
|
|
27
|
+
code: string;
|
|
28
|
+
/**
|
|
29
|
+
* Tax amount.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ItemAdditionalTax
|
|
32
|
+
*/
|
|
33
|
+
amount: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ItemAdditionalTax interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfItemAdditionalTax(value: object): value is ItemAdditionalTax {
|
|
40
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
41
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ItemAdditionalTaxFromJSON(json: any): ItemAdditionalTax {
|
|
46
|
+
return ItemAdditionalTaxFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ItemAdditionalTaxFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemAdditionalTax {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'code': json['code'],
|
|
56
|
+
'amount': json['amount'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ItemAdditionalTaxToJSON(json: any): ItemAdditionalTax {
|
|
61
|
+
return ItemAdditionalTaxToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ItemAdditionalTaxToJSONTyped(value?: ItemAdditionalTax | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'code': value['code'],
|
|
72
|
+
'amount': value['amount'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -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 { TaxSequence } from './TaxSequence';
|
|
17
|
+
import {
|
|
18
|
+
TaxSequenceFromJSON,
|
|
19
|
+
TaxSequenceFromJSONTyped,
|
|
20
|
+
TaxSequenceToJSON,
|
|
21
|
+
TaxSequenceToJSONTyped,
|
|
22
|
+
} from './TaxSequence';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ListTaxSequences200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface ListTaxSequences200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof ListTaxSequences200Response
|
|
34
|
+
*/
|
|
35
|
+
success?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<TaxSequence>}
|
|
39
|
+
* @memberof ListTaxSequences200Response
|
|
40
|
+
*/
|
|
41
|
+
data?: Array<TaxSequence>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the ListTaxSequences200Response interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfListTaxSequences200Response(value: object): value is ListTaxSequences200Response {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ListTaxSequences200ResponseFromJSON(json: any): ListTaxSequences200Response {
|
|
52
|
+
return ListTaxSequences200ResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ListTaxSequences200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListTaxSequences200Response {
|
|
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 : ((json['data'] as Array<any>).map(TaxSequenceFromJSON)),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function ListTaxSequences200ResponseToJSON(json: any): ListTaxSequences200Response {
|
|
67
|
+
return ListTaxSequences200ResponseToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ListTaxSequences200ResponseToJSONTyped(value?: ListTaxSequences200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'success': value['success'],
|
|
78
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(TaxSequenceToJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
* Credentials for OAuth 2.0 Client Credentials authentication.
|
|
18
|
+
*
|
|
19
|
+
* Obtain `clientId` and `clientSecret` from the Pronesoft portal:
|
|
20
|
+
* - Sandbox: https://ecf.sandbox.pronesoft.com
|
|
21
|
+
* - Production: https://ecf.pronesoft.com
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
* @interface OAuthTokenRequest
|
|
25
|
+
*/
|
|
26
|
+
export interface OAuthTokenRequest {
|
|
27
|
+
/**
|
|
28
|
+
* Your application's client ID from the Pronesoft portal.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof OAuthTokenRequest
|
|
31
|
+
*/
|
|
32
|
+
clientId: string;
|
|
33
|
+
/**
|
|
34
|
+
* Your application's client secret. Keep this confidential.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof OAuthTokenRequest
|
|
37
|
+
*/
|
|
38
|
+
clientSecret: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the OAuthTokenRequest interface.
|
|
43
|
+
*/
|
|
44
|
+
export function instanceOfOAuthTokenRequest(value: object): value is OAuthTokenRequest {
|
|
45
|
+
if (!('clientId' in value) || value['clientId'] === undefined) return false;
|
|
46
|
+
if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function OAuthTokenRequestFromJSON(json: any): OAuthTokenRequest {
|
|
51
|
+
return OAuthTokenRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function OAuthTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthTokenRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'clientId': json['clientId'],
|
|
61
|
+
'clientSecret': json['clientSecret'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function OAuthTokenRequestToJSON(json: any): OAuthTokenRequest {
|
|
66
|
+
return OAuthTokenRequestToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function OAuthTokenRequestToJSONTyped(value?: OAuthTokenRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'clientId': value['clientId'],
|
|
77
|
+
'clientSecret': value['clientSecret'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|