@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,53 @@
|
|
|
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
|
+
* Check if a given object implements the EcfSubmissionResponse interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfEcfSubmissionResponse(value) {
|
|
18
|
+
if (!('success' in value) || value['success'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('documentId' in value) || value['documentId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function EcfSubmissionResponseFromJSON(json) {
|
|
25
|
+
return EcfSubmissionResponseFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function EcfSubmissionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'success': json['success'],
|
|
33
|
+
'documentId': json['documentId'],
|
|
34
|
+
'encf': json['encf'] == null ? undefined : json['encf'],
|
|
35
|
+
'trackId': json['trackId'] == null ? undefined : json['trackId'],
|
|
36
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function EcfSubmissionResponseToJSON(json) {
|
|
40
|
+
return EcfSubmissionResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function EcfSubmissionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'success': value['success'],
|
|
48
|
+
'documentId': value['documentId'],
|
|
49
|
+
'encf': value['encf'],
|
|
50
|
+
'trackId': value['trackId'],
|
|
51
|
+
'message': value['message'],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eCF-Pronesoft Integration API
|
|
3
|
+
* ## 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) |
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: contacto@pronesoft.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdditionalInfo } from './AdditionalInfo';
|
|
13
|
+
import type { Item } from './Item';
|
|
14
|
+
import type { Totals } from './Totals';
|
|
15
|
+
import type { Subtotal } from './Subtotal';
|
|
16
|
+
import type { AlternativeCurrency } from './AlternativeCurrency';
|
|
17
|
+
import type { DiscountOrSurcharge } from './DiscountOrSurcharge';
|
|
18
|
+
import type { Buyer } from './Buyer';
|
|
19
|
+
import type { Page } from './Page';
|
|
20
|
+
import type { Transport } from './Transport';
|
|
21
|
+
import type { AccountType } from './AccountType';
|
|
22
|
+
import type { InvoiceType } from './InvoiceType';
|
|
23
|
+
import type { ReferenceInfo } from './ReferenceInfo';
|
|
24
|
+
/**
|
|
25
|
+
* The main e-CF document payload. Build this object and submit it to
|
|
26
|
+
* `POST /{environment}/ecf/submit`.
|
|
27
|
+
*
|
|
28
|
+
* **Required fields:** `version`, `invoiceType`, `invoiceNumber`,
|
|
29
|
+
* `issueDate`, `items`, `totals`.
|
|
30
|
+
*
|
|
31
|
+
* Use `GET /tax-sequences/next` to obtain the correct `invoiceNumber`.
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ElectronicDocument
|
|
35
|
+
*/
|
|
36
|
+
export interface ElectronicDocument {
|
|
37
|
+
/**
|
|
38
|
+
* Document schema version. Always "1.0".
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ElectronicDocument
|
|
41
|
+
*/
|
|
42
|
+
version: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {InvoiceType}
|
|
46
|
+
* @memberof ElectronicDocument
|
|
47
|
+
*/
|
|
48
|
+
invoiceType: InvoiceType;
|
|
49
|
+
/**
|
|
50
|
+
* e-NCF number (13 alphanumeric characters).
|
|
51
|
+
* Obtain from `GET /tax-sequences/next`.
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ElectronicDocument
|
|
55
|
+
*/
|
|
56
|
+
invoiceNumber: string;
|
|
57
|
+
/**
|
|
58
|
+
* Document issue date and time (ISO 8601).
|
|
59
|
+
* @type {Date}
|
|
60
|
+
* @memberof ElectronicDocument
|
|
61
|
+
*/
|
|
62
|
+
issueDate: Date;
|
|
63
|
+
/**
|
|
64
|
+
* Document expiration date (optional, for credit documents).
|
|
65
|
+
* @type {Date}
|
|
66
|
+
* @memberof ElectronicDocument
|
|
67
|
+
*/
|
|
68
|
+
expirationDate?: Date;
|
|
69
|
+
/**
|
|
70
|
+
* Income type code:
|
|
71
|
+
* - `01`: Operations Income
|
|
72
|
+
* - `02`: Financial Income
|
|
73
|
+
* - `03`: Extraordinary Income
|
|
74
|
+
* - `04`: Leasing Income
|
|
75
|
+
* - `05`: Income from Sales of Assets
|
|
76
|
+
* - `06`: Other Income
|
|
77
|
+
*
|
|
78
|
+
* @type {ElectronicDocumentIncomeTypeEnum}
|
|
79
|
+
* @memberof ElectronicDocument
|
|
80
|
+
*/
|
|
81
|
+
incomeType?: ElectronicDocumentIncomeTypeEnum;
|
|
82
|
+
/**
|
|
83
|
+
* Payment condition:
|
|
84
|
+
* - `1`: Cash (Al Contado)
|
|
85
|
+
* - `2`: Credit (Crédito)
|
|
86
|
+
* - `3`: Mixed (Mixto)
|
|
87
|
+
*
|
|
88
|
+
* @type {ElectronicDocumentPaymentTypeEnum}
|
|
89
|
+
* @memberof ElectronicDocument
|
|
90
|
+
*/
|
|
91
|
+
paymentType?: ElectronicDocumentPaymentTypeEnum;
|
|
92
|
+
/**
|
|
93
|
+
* Payment due date (required when paymentType is "2" or "3").
|
|
94
|
+
* @type {Date}
|
|
95
|
+
* @memberof ElectronicDocument
|
|
96
|
+
*/
|
|
97
|
+
paymentDeadline?: Date;
|
|
98
|
+
/**
|
|
99
|
+
* Payment terms description (e.g. "Net 30").
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof ElectronicDocument
|
|
102
|
+
*/
|
|
103
|
+
paymentTerms?: string;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {AccountType}
|
|
107
|
+
* @memberof ElectronicDocument
|
|
108
|
+
*/
|
|
109
|
+
paymentAccountType?: AccountType;
|
|
110
|
+
/**
|
|
111
|
+
* Bank account number for payment reference.
|
|
112
|
+
* @type {string}
|
|
113
|
+
* @memberof ElectronicDocument
|
|
114
|
+
*/
|
|
115
|
+
paymentAccountNumber?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Bank name for payment reference.
|
|
118
|
+
* @type {string}
|
|
119
|
+
* @memberof ElectronicDocument
|
|
120
|
+
*/
|
|
121
|
+
paymentBank?: string;
|
|
122
|
+
/**
|
|
123
|
+
* For Credit Notes (type 34) only:
|
|
124
|
+
* - `0`: Affected invoice issued ≤ 30 days ago
|
|
125
|
+
* - `1`: Affected invoice issued > 30 days ago
|
|
126
|
+
*
|
|
127
|
+
* @type {ElectronicDocumentCreditNoteIndicatorEnum}
|
|
128
|
+
* @memberof ElectronicDocument
|
|
129
|
+
*/
|
|
130
|
+
creditNoteIndicator?: ElectronicDocumentCreditNoteIndicatorEnum;
|
|
131
|
+
/**
|
|
132
|
+
* RNC of the issuing company (overrides tenant default if provided).
|
|
133
|
+
* @type {string}
|
|
134
|
+
* @memberof ElectronicDocument
|
|
135
|
+
*/
|
|
136
|
+
issuerRNC?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Legal business name of the issuer.
|
|
139
|
+
* @type {string}
|
|
140
|
+
* @memberof ElectronicDocument
|
|
141
|
+
*/
|
|
142
|
+
issuerBusinessName?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Contact email of the issuer.
|
|
145
|
+
* @type {string}
|
|
146
|
+
* @memberof ElectronicDocument
|
|
147
|
+
*/
|
|
148
|
+
issuerEmail?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Issuer phone numbers in format "809-555-1234".
|
|
151
|
+
* @type {Array<string>}
|
|
152
|
+
* @memberof ElectronicDocument
|
|
153
|
+
*/
|
|
154
|
+
issuerPhones?: Array<string>;
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
* @type {Buyer}
|
|
158
|
+
* @memberof ElectronicDocument
|
|
159
|
+
*/
|
|
160
|
+
buyer?: Buyer;
|
|
161
|
+
/**
|
|
162
|
+
* Line items of the document. At least 1 required.
|
|
163
|
+
* @type {Array<Item>}
|
|
164
|
+
* @memberof ElectronicDocument
|
|
165
|
+
*/
|
|
166
|
+
items: Array<Item>;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @type {Totals}
|
|
170
|
+
* @memberof ElectronicDocument
|
|
171
|
+
*/
|
|
172
|
+
totals: Totals;
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @type {Transport}
|
|
176
|
+
* @memberof ElectronicDocument
|
|
177
|
+
*/
|
|
178
|
+
transport?: Transport;
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @type {AdditionalInfo}
|
|
182
|
+
* @memberof ElectronicDocument
|
|
183
|
+
*/
|
|
184
|
+
additionalInfo?: AdditionalInfo;
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @type {AlternativeCurrency}
|
|
188
|
+
* @memberof ElectronicDocument
|
|
189
|
+
*/
|
|
190
|
+
alternativeCurrency?: AlternativeCurrency;
|
|
191
|
+
/**
|
|
192
|
+
*
|
|
193
|
+
* @type {ReferenceInfo}
|
|
194
|
+
* @memberof ElectronicDocument
|
|
195
|
+
*/
|
|
196
|
+
referenceInfo?: ReferenceInfo;
|
|
197
|
+
/**
|
|
198
|
+
* Page/section subtotals (for multi-page documents).
|
|
199
|
+
* @type {Array<Subtotal>}
|
|
200
|
+
* @memberof ElectronicDocument
|
|
201
|
+
*/
|
|
202
|
+
subtotals?: Array<Subtotal>;
|
|
203
|
+
/**
|
|
204
|
+
* Document-level discounts or surcharges.
|
|
205
|
+
* @type {Array<DiscountOrSurcharge>}
|
|
206
|
+
* @memberof ElectronicDocument
|
|
207
|
+
*/
|
|
208
|
+
discountsOrSurcharges?: Array<DiscountOrSurcharge>;
|
|
209
|
+
/**
|
|
210
|
+
* Page breakdown for multi-page documents.
|
|
211
|
+
* @type {Array<Page>}
|
|
212
|
+
* @memberof ElectronicDocument
|
|
213
|
+
*/
|
|
214
|
+
pages?: Array<Page>;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @export
|
|
218
|
+
*/
|
|
219
|
+
export declare const ElectronicDocumentIncomeTypeEnum: {
|
|
220
|
+
readonly _01: "01";
|
|
221
|
+
readonly _02: "02";
|
|
222
|
+
readonly _03: "03";
|
|
223
|
+
readonly _04: "04";
|
|
224
|
+
readonly _05: "05";
|
|
225
|
+
readonly _06: "06";
|
|
226
|
+
};
|
|
227
|
+
export type ElectronicDocumentIncomeTypeEnum = typeof ElectronicDocumentIncomeTypeEnum[keyof typeof ElectronicDocumentIncomeTypeEnum];
|
|
228
|
+
/**
|
|
229
|
+
* @export
|
|
230
|
+
*/
|
|
231
|
+
export declare const ElectronicDocumentPaymentTypeEnum: {
|
|
232
|
+
readonly _1: "1";
|
|
233
|
+
readonly _2: "2";
|
|
234
|
+
readonly _3: "3";
|
|
235
|
+
};
|
|
236
|
+
export type ElectronicDocumentPaymentTypeEnum = typeof ElectronicDocumentPaymentTypeEnum[keyof typeof ElectronicDocumentPaymentTypeEnum];
|
|
237
|
+
/**
|
|
238
|
+
* @export
|
|
239
|
+
*/
|
|
240
|
+
export declare const ElectronicDocumentCreditNoteIndicatorEnum: {
|
|
241
|
+
readonly _0: "0";
|
|
242
|
+
readonly _1: "1";
|
|
243
|
+
};
|
|
244
|
+
export type ElectronicDocumentCreditNoteIndicatorEnum = typeof ElectronicDocumentCreditNoteIndicatorEnum[keyof typeof ElectronicDocumentCreditNoteIndicatorEnum];
|
|
245
|
+
/**
|
|
246
|
+
* Check if a given object implements the ElectronicDocument interface.
|
|
247
|
+
*/
|
|
248
|
+
export declare function instanceOfElectronicDocument(value: object): value is ElectronicDocument;
|
|
249
|
+
export declare function ElectronicDocumentFromJSON(json: any): ElectronicDocument;
|
|
250
|
+
export declare function ElectronicDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ElectronicDocument;
|
|
251
|
+
export declare function ElectronicDocumentToJSON(json: any): ElectronicDocument;
|
|
252
|
+
export declare function ElectronicDocumentToJSONTyped(value?: ElectronicDocument | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
import { AdditionalInfoFromJSON, AdditionalInfoToJSON, } from './AdditionalInfo';
|
|
15
|
+
import { ItemFromJSON, ItemToJSON, } from './Item';
|
|
16
|
+
import { TotalsFromJSON, TotalsToJSON, } from './Totals';
|
|
17
|
+
import { SubtotalFromJSON, SubtotalToJSON, } from './Subtotal';
|
|
18
|
+
import { AlternativeCurrencyFromJSON, AlternativeCurrencyToJSON, } from './AlternativeCurrency';
|
|
19
|
+
import { DiscountOrSurchargeFromJSON, DiscountOrSurchargeToJSON, } from './DiscountOrSurcharge';
|
|
20
|
+
import { BuyerFromJSON, BuyerToJSON, } from './Buyer';
|
|
21
|
+
import { PageFromJSON, PageToJSON, } from './Page';
|
|
22
|
+
import { TransportFromJSON, TransportToJSON, } from './Transport';
|
|
23
|
+
import { AccountTypeFromJSON, AccountTypeToJSON, } from './AccountType';
|
|
24
|
+
import { InvoiceTypeFromJSON, InvoiceTypeToJSON, } from './InvoiceType';
|
|
25
|
+
import { ReferenceInfoFromJSON, ReferenceInfoToJSON, } from './ReferenceInfo';
|
|
26
|
+
/**
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
export const ElectronicDocumentIncomeTypeEnum = {
|
|
30
|
+
_01: '01',
|
|
31
|
+
_02: '02',
|
|
32
|
+
_03: '03',
|
|
33
|
+
_04: '04',
|
|
34
|
+
_05: '05',
|
|
35
|
+
_06: '06'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const ElectronicDocumentPaymentTypeEnum = {
|
|
41
|
+
_1: '1',
|
|
42
|
+
_2: '2',
|
|
43
|
+
_3: '3'
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export const ElectronicDocumentCreditNoteIndicatorEnum = {
|
|
49
|
+
_0: '0',
|
|
50
|
+
_1: '1'
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the ElectronicDocument interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfElectronicDocument(value) {
|
|
56
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
57
|
+
return false;
|
|
58
|
+
if (!('invoiceType' in value) || value['invoiceType'] === undefined)
|
|
59
|
+
return false;
|
|
60
|
+
if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined)
|
|
61
|
+
return false;
|
|
62
|
+
if (!('issueDate' in value) || value['issueDate'] === undefined)
|
|
63
|
+
return false;
|
|
64
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
65
|
+
return false;
|
|
66
|
+
if (!('totals' in value) || value['totals'] === undefined)
|
|
67
|
+
return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
export function ElectronicDocumentFromJSON(json) {
|
|
71
|
+
return ElectronicDocumentFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
export function ElectronicDocumentFromJSONTyped(json, ignoreDiscriminator) {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
'version': json['version'],
|
|
79
|
+
'invoiceType': InvoiceTypeFromJSON(json['invoiceType']),
|
|
80
|
+
'invoiceNumber': json['invoiceNumber'],
|
|
81
|
+
'issueDate': (new Date(json['issueDate'])),
|
|
82
|
+
'expirationDate': json['expirationDate'] == null ? undefined : (new Date(json['expirationDate'])),
|
|
83
|
+
'incomeType': json['incomeType'] == null ? undefined : json['incomeType'],
|
|
84
|
+
'paymentType': json['paymentType'] == null ? undefined : json['paymentType'],
|
|
85
|
+
'paymentDeadline': json['paymentDeadline'] == null ? undefined : (new Date(json['paymentDeadline'])),
|
|
86
|
+
'paymentTerms': json['paymentTerms'] == null ? undefined : json['paymentTerms'],
|
|
87
|
+
'paymentAccountType': json['paymentAccountType'] == null ? undefined : AccountTypeFromJSON(json['paymentAccountType']),
|
|
88
|
+
'paymentAccountNumber': json['paymentAccountNumber'] == null ? undefined : json['paymentAccountNumber'],
|
|
89
|
+
'paymentBank': json['paymentBank'] == null ? undefined : json['paymentBank'],
|
|
90
|
+
'creditNoteIndicator': json['creditNoteIndicator'] == null ? undefined : json['creditNoteIndicator'],
|
|
91
|
+
'issuerRNC': json['issuerRNC'] == null ? undefined : json['issuerRNC'],
|
|
92
|
+
'issuerBusinessName': json['issuerBusinessName'] == null ? undefined : json['issuerBusinessName'],
|
|
93
|
+
'issuerEmail': json['issuerEmail'] == null ? undefined : json['issuerEmail'],
|
|
94
|
+
'issuerPhones': json['issuerPhones'] == null ? undefined : json['issuerPhones'],
|
|
95
|
+
'buyer': json['buyer'] == null ? undefined : BuyerFromJSON(json['buyer']),
|
|
96
|
+
'items': (json['items'].map(ItemFromJSON)),
|
|
97
|
+
'totals': TotalsFromJSON(json['totals']),
|
|
98
|
+
'transport': json['transport'] == null ? undefined : TransportFromJSON(json['transport']),
|
|
99
|
+
'additionalInfo': json['additionalInfo'] == null ? undefined : AdditionalInfoFromJSON(json['additionalInfo']),
|
|
100
|
+
'alternativeCurrency': json['alternativeCurrency'] == null ? undefined : AlternativeCurrencyFromJSON(json['alternativeCurrency']),
|
|
101
|
+
'referenceInfo': json['referenceInfo'] == null ? undefined : ReferenceInfoFromJSON(json['referenceInfo']),
|
|
102
|
+
'subtotals': json['subtotals'] == null ? undefined : (json['subtotals'].map(SubtotalFromJSON)),
|
|
103
|
+
'discountsOrSurcharges': json['discountsOrSurcharges'] == null ? undefined : (json['discountsOrSurcharges'].map(DiscountOrSurchargeFromJSON)),
|
|
104
|
+
'pages': json['pages'] == null ? undefined : (json['pages'].map(PageFromJSON)),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export function ElectronicDocumentToJSON(json) {
|
|
108
|
+
return ElectronicDocumentToJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
export function ElectronicDocumentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
'version': value['version'],
|
|
116
|
+
'invoiceType': InvoiceTypeToJSON(value['invoiceType']),
|
|
117
|
+
'invoiceNumber': value['invoiceNumber'],
|
|
118
|
+
'issueDate': value['issueDate'].toISOString(),
|
|
119
|
+
'expirationDate': value['expirationDate'] == null ? value['expirationDate'] : value['expirationDate'].toISOString(),
|
|
120
|
+
'incomeType': value['incomeType'],
|
|
121
|
+
'paymentType': value['paymentType'],
|
|
122
|
+
'paymentDeadline': value['paymentDeadline'] == null ? value['paymentDeadline'] : value['paymentDeadline'].toISOString(),
|
|
123
|
+
'paymentTerms': value['paymentTerms'],
|
|
124
|
+
'paymentAccountType': AccountTypeToJSON(value['paymentAccountType']),
|
|
125
|
+
'paymentAccountNumber': value['paymentAccountNumber'],
|
|
126
|
+
'paymentBank': value['paymentBank'],
|
|
127
|
+
'creditNoteIndicator': value['creditNoteIndicator'],
|
|
128
|
+
'issuerRNC': value['issuerRNC'],
|
|
129
|
+
'issuerBusinessName': value['issuerBusinessName'],
|
|
130
|
+
'issuerEmail': value['issuerEmail'],
|
|
131
|
+
'issuerPhones': value['issuerPhones'],
|
|
132
|
+
'buyer': BuyerToJSON(value['buyer']),
|
|
133
|
+
'items': (value['items'].map(ItemToJSON)),
|
|
134
|
+
'totals': TotalsToJSON(value['totals']),
|
|
135
|
+
'transport': TransportToJSON(value['transport']),
|
|
136
|
+
'additionalInfo': AdditionalInfoToJSON(value['additionalInfo']),
|
|
137
|
+
'alternativeCurrency': AlternativeCurrencyToJSON(value['alternativeCurrency']),
|
|
138
|
+
'referenceInfo': ReferenceInfoToJSON(value['referenceInfo']),
|
|
139
|
+
'subtotals': value['subtotals'] == null ? undefined : (value['subtotals'].map(SubtotalToJSON)),
|
|
140
|
+
'discountsOrSurcharges': value['discountsOrSurcharges'] == null ? undefined : (value['discountsOrSurcharges'].map(DiscountOrSurchargeToJSON)),
|
|
141
|
+
'pages': value['pages'] == null ? undefined : (value['pages'].map(PageToJSON)),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eCF-Pronesoft Integration API
|
|
3
|
+
* ## 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) |
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: contacto@pronesoft.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Target environment for e-CF submission.
|
|
14
|
+
* - `TesteCF`: Functional tests, no real DGII interaction.
|
|
15
|
+
* - `CerteCF`: DGII certification environment.
|
|
16
|
+
* - `eCF`: Production — issues real legal documents.
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const Environment: {
|
|
21
|
+
readonly TesteCf: "TesteCF";
|
|
22
|
+
readonly CerteCf: "CerteCF";
|
|
23
|
+
readonly ECf: "eCF";
|
|
24
|
+
};
|
|
25
|
+
export type Environment = typeof Environment[keyof typeof Environment];
|
|
26
|
+
export declare function instanceOfEnvironment(value: any): boolean;
|
|
27
|
+
export declare function EnvironmentFromJSON(json: any): Environment;
|
|
28
|
+
export declare function EnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Environment;
|
|
29
|
+
export declare function EnvironmentToJSON(value?: Environment | null): any;
|
|
30
|
+
export declare function EnvironmentToJSONTyped(value: any, ignoreDiscriminator: boolean): Environment;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
* Target environment for e-CF submission.
|
|
16
|
+
* - `TesteCF`: Functional tests, no real DGII interaction.
|
|
17
|
+
* - `CerteCF`: DGII certification environment.
|
|
18
|
+
* - `eCF`: Production — issues real legal documents.
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export const Environment = {
|
|
23
|
+
TesteCf: 'TesteCF',
|
|
24
|
+
CerteCf: 'CerteCF',
|
|
25
|
+
ECf: 'eCF'
|
|
26
|
+
};
|
|
27
|
+
export function instanceOfEnvironment(value) {
|
|
28
|
+
for (const key in Environment) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(Environment, key)) {
|
|
30
|
+
if (Environment[key] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
export function EnvironmentFromJSON(json) {
|
|
38
|
+
return EnvironmentFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function EnvironmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
export function EnvironmentToJSON(value) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
export function EnvironmentToJSONTyped(value, ignoreDiscriminator) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eCF-Pronesoft Integration API
|
|
3
|
+
* ## 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) |
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: contacto@pronesoft.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Standard error response returned by all endpoints on failure.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ErrorResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface ErrorResponse {
|
|
18
|
+
/**
|
|
19
|
+
* HTTP status code.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ErrorResponse
|
|
22
|
+
*/
|
|
23
|
+
statusCode?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Human-readable error description.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ErrorResponse
|
|
28
|
+
*/
|
|
29
|
+
message?: string;
|
|
30
|
+
/**
|
|
31
|
+
* When the error occurred.
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof ErrorResponse
|
|
34
|
+
*/
|
|
35
|
+
timestamp?: Date;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfErrorResponse(value: object): value is ErrorResponse;
|
|
41
|
+
export declare function ErrorResponseFromJSON(json: any): ErrorResponse;
|
|
42
|
+
export declare function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse;
|
|
43
|
+
export declare function ErrorResponseToJSON(json: any): ErrorResponse;
|
|
44
|
+
export declare function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* Check if a given object implements the ErrorResponse interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfErrorResponse(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function ErrorResponseFromJSON(json) {
|
|
21
|
+
return ErrorResponseFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'statusCode': json['statusCode'] == null ? undefined : json['statusCode'],
|
|
29
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
30
|
+
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function ErrorResponseToJSON(json) {
|
|
34
|
+
return ErrorResponseToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function ErrorResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'statusCode': value['statusCode'],
|
|
42
|
+
'message': value['message'],
|
|
43
|
+
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
|
|
44
|
+
};
|
|
45
|
+
}
|