@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,374 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
CreateTaxSequenceRequest,
|
|
19
|
+
Environment,
|
|
20
|
+
ErrorResponse,
|
|
21
|
+
GetNextNumber200Response,
|
|
22
|
+
InvoiceType,
|
|
23
|
+
ListTaxSequences200Response,
|
|
24
|
+
} from '../models/index';
|
|
25
|
+
import {
|
|
26
|
+
CreateTaxSequenceRequestFromJSON,
|
|
27
|
+
CreateTaxSequenceRequestToJSON,
|
|
28
|
+
EnvironmentFromJSON,
|
|
29
|
+
EnvironmentToJSON,
|
|
30
|
+
ErrorResponseFromJSON,
|
|
31
|
+
ErrorResponseToJSON,
|
|
32
|
+
GetNextNumber200ResponseFromJSON,
|
|
33
|
+
GetNextNumber200ResponseToJSON,
|
|
34
|
+
InvoiceTypeFromJSON,
|
|
35
|
+
InvoiceTypeToJSON,
|
|
36
|
+
ListTaxSequences200ResponseFromJSON,
|
|
37
|
+
ListTaxSequences200ResponseToJSON,
|
|
38
|
+
} from '../models/index';
|
|
39
|
+
|
|
40
|
+
export interface CreateTaxSequenceOperationRequest {
|
|
41
|
+
xTenantId: string;
|
|
42
|
+
createTaxSequenceRequest: CreateTaxSequenceRequest;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface GetNextNumberRequest {
|
|
46
|
+
xTenantId: string;
|
|
47
|
+
type: InvoiceType;
|
|
48
|
+
environment: Environment;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ListTaxSequencesRequest {
|
|
52
|
+
xTenantId: string;
|
|
53
|
+
type?: InvoiceType;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* TaxSequencesApi - interface
|
|
58
|
+
*
|
|
59
|
+
* @export
|
|
60
|
+
* @interface TaxSequencesApiInterface
|
|
61
|
+
*/
|
|
62
|
+
export interface TaxSequencesApiInterface {
|
|
63
|
+
/**
|
|
64
|
+
* Creates request options for createTaxSequence without sending the request
|
|
65
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
66
|
+
* @param {CreateTaxSequenceRequest} createTaxSequenceRequest
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @memberof TaxSequencesApiInterface
|
|
69
|
+
*/
|
|
70
|
+
createTaxSequenceRequestOpts(requestParameters: CreateTaxSequenceOperationRequest): Promise<runtime.RequestOpts>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Registers a new block of fiscal numbers for a given invoice type. The `from` and `to` values define the numeric range of the sequence.
|
|
74
|
+
* @summary Create new tax sequence
|
|
75
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
76
|
+
* @param {CreateTaxSequenceRequest} createTaxSequenceRequest
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
* @memberof TaxSequencesApiInterface
|
|
80
|
+
*/
|
|
81
|
+
createTaxSequenceRaw(requestParameters: CreateTaxSequenceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Registers a new block of fiscal numbers for a given invoice type. The `from` and `to` values define the numeric range of the sequence.
|
|
85
|
+
* Create new tax sequence
|
|
86
|
+
*/
|
|
87
|
+
createTaxSequence(requestParameters: CreateTaxSequenceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Creates request options for getNextNumber without sending the request
|
|
91
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
92
|
+
* @param {InvoiceType} type Invoice type code (e.g. \"31\" for Tax Credit Invoice).
|
|
93
|
+
* @param {Environment} environment Target environment for the sequence.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof TaxSequencesApiInterface
|
|
96
|
+
*/
|
|
97
|
+
getNextNumberRequestOpts(requestParameters: GetNextNumberRequest): Promise<runtime.RequestOpts>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Returns the next available e-NCF number for a given invoice type and environment. Use this number as the `invoiceNumber` when submitting a document.
|
|
101
|
+
* @summary Get next available fiscal number
|
|
102
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
103
|
+
* @param {InvoiceType} type Invoice type code (e.g. \"31\" for Tax Credit Invoice).
|
|
104
|
+
* @param {Environment} environment Target environment for the sequence.
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
* @memberof TaxSequencesApiInterface
|
|
108
|
+
*/
|
|
109
|
+
getNextNumberRaw(requestParameters: GetNextNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetNextNumber200Response>>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Returns the next available e-NCF number for a given invoice type and environment. Use this number as the `invoiceNumber` when submitting a document.
|
|
113
|
+
* Get next available fiscal number
|
|
114
|
+
*/
|
|
115
|
+
getNextNumber(requestParameters: GetNextNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetNextNumber200Response>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for listTaxSequences without sending the request
|
|
119
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
120
|
+
* @param {InvoiceType} [type] Filter by invoice type (e.g. \"31\" for Tax Credit).
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
* @memberof TaxSequencesApiInterface
|
|
123
|
+
*/
|
|
124
|
+
listTaxSequencesRequestOpts(requestParameters: ListTaxSequencesRequest): Promise<runtime.RequestOpts>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Returns all fiscal number sequences registered for the tenant.
|
|
128
|
+
* @summary List tax sequences
|
|
129
|
+
* @param {string} xTenantId UUID of the company or branch (tenant) making the request. Obtained from the Pronesoft portal after account setup.
|
|
130
|
+
* @param {InvoiceType} [type] Filter by invoice type (e.g. \"31\" for Tax Credit).
|
|
131
|
+
* @param {*} [options] Override http request option.
|
|
132
|
+
* @throws {RequiredError}
|
|
133
|
+
* @memberof TaxSequencesApiInterface
|
|
134
|
+
*/
|
|
135
|
+
listTaxSequencesRaw(requestParameters: ListTaxSequencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTaxSequences200Response>>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns all fiscal number sequences registered for the tenant.
|
|
139
|
+
* List tax sequences
|
|
140
|
+
*/
|
|
141
|
+
listTaxSequences(requestParameters: ListTaxSequencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListTaxSequences200Response>;
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
export class TaxSequencesApi extends runtime.BaseAPI implements TaxSequencesApiInterface {
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Creates request options for createTaxSequence without sending the request
|
|
152
|
+
*/
|
|
153
|
+
async createTaxSequenceRequestOpts(requestParameters: CreateTaxSequenceOperationRequest): Promise<runtime.RequestOpts> {
|
|
154
|
+
if (requestParameters['xTenantId'] == null) {
|
|
155
|
+
throw new runtime.RequiredError(
|
|
156
|
+
'xTenantId',
|
|
157
|
+
'Required parameter "xTenantId" was null or undefined when calling createTaxSequence().'
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (requestParameters['createTaxSequenceRequest'] == null) {
|
|
162
|
+
throw new runtime.RequiredError(
|
|
163
|
+
'createTaxSequenceRequest',
|
|
164
|
+
'Required parameter "createTaxSequenceRequest" was null or undefined when calling createTaxSequence().'
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const queryParameters: any = {};
|
|
169
|
+
|
|
170
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
171
|
+
|
|
172
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
173
|
+
|
|
174
|
+
if (requestParameters['xTenantId'] != null) {
|
|
175
|
+
headerParameters['x-tenant-id'] = String(requestParameters['xTenantId']);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
179
|
+
// oauth required
|
|
180
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["sequences:create"]);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
184
|
+
const token = this.configuration.accessToken;
|
|
185
|
+
const tokenString = await token("bearerAuth", []);
|
|
186
|
+
|
|
187
|
+
if (tokenString) {
|
|
188
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
let urlPath = `/tax-sequences`;
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
path: urlPath,
|
|
196
|
+
method: 'POST',
|
|
197
|
+
headers: headerParameters,
|
|
198
|
+
query: queryParameters,
|
|
199
|
+
body: CreateTaxSequenceRequestToJSON(requestParameters['createTaxSequenceRequest']),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Registers a new block of fiscal numbers for a given invoice type. The `from` and `to` values define the numeric range of the sequence.
|
|
205
|
+
* Create new tax sequence
|
|
206
|
+
*/
|
|
207
|
+
async createTaxSequenceRaw(requestParameters: CreateTaxSequenceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
208
|
+
const requestOptions = await this.createTaxSequenceRequestOpts(requestParameters);
|
|
209
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
210
|
+
|
|
211
|
+
return new runtime.VoidApiResponse(response);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Registers a new block of fiscal numbers for a given invoice type. The `from` and `to` values define the numeric range of the sequence.
|
|
216
|
+
* Create new tax sequence
|
|
217
|
+
*/
|
|
218
|
+
async createTaxSequence(requestParameters: CreateTaxSequenceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
219
|
+
await this.createTaxSequenceRaw(requestParameters, initOverrides);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Creates request options for getNextNumber without sending the request
|
|
224
|
+
*/
|
|
225
|
+
async getNextNumberRequestOpts(requestParameters: GetNextNumberRequest): Promise<runtime.RequestOpts> {
|
|
226
|
+
if (requestParameters['xTenantId'] == null) {
|
|
227
|
+
throw new runtime.RequiredError(
|
|
228
|
+
'xTenantId',
|
|
229
|
+
'Required parameter "xTenantId" was null or undefined when calling getNextNumber().'
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (requestParameters['type'] == null) {
|
|
234
|
+
throw new runtime.RequiredError(
|
|
235
|
+
'type',
|
|
236
|
+
'Required parameter "type" was null or undefined when calling getNextNumber().'
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (requestParameters['environment'] == null) {
|
|
241
|
+
throw new runtime.RequiredError(
|
|
242
|
+
'environment',
|
|
243
|
+
'Required parameter "environment" was null or undefined when calling getNextNumber().'
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const queryParameters: any = {};
|
|
248
|
+
|
|
249
|
+
if (requestParameters['type'] != null) {
|
|
250
|
+
queryParameters['type'] = requestParameters['type'];
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if (requestParameters['environment'] != null) {
|
|
254
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
258
|
+
|
|
259
|
+
if (requestParameters['xTenantId'] != null) {
|
|
260
|
+
headerParameters['x-tenant-id'] = String(requestParameters['xTenantId']);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
264
|
+
// oauth required
|
|
265
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["sequences:read"]);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
269
|
+
const token = this.configuration.accessToken;
|
|
270
|
+
const tokenString = await token("bearerAuth", []);
|
|
271
|
+
|
|
272
|
+
if (tokenString) {
|
|
273
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
let urlPath = `/tax-sequences/next`;
|
|
278
|
+
|
|
279
|
+
return {
|
|
280
|
+
path: urlPath,
|
|
281
|
+
method: 'GET',
|
|
282
|
+
headers: headerParameters,
|
|
283
|
+
query: queryParameters,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Returns the next available e-NCF number for a given invoice type and environment. Use this number as the `invoiceNumber` when submitting a document.
|
|
289
|
+
* Get next available fiscal number
|
|
290
|
+
*/
|
|
291
|
+
async getNextNumberRaw(requestParameters: GetNextNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetNextNumber200Response>> {
|
|
292
|
+
const requestOptions = await this.getNextNumberRequestOpts(requestParameters);
|
|
293
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
294
|
+
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetNextNumber200ResponseFromJSON(jsonValue));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Returns the next available e-NCF number for a given invoice type and environment. Use this number as the `invoiceNumber` when submitting a document.
|
|
300
|
+
* Get next available fiscal number
|
|
301
|
+
*/
|
|
302
|
+
async getNextNumber(requestParameters: GetNextNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetNextNumber200Response> {
|
|
303
|
+
const response = await this.getNextNumberRaw(requestParameters, initOverrides);
|
|
304
|
+
return await response.value();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Creates request options for listTaxSequences without sending the request
|
|
309
|
+
*/
|
|
310
|
+
async listTaxSequencesRequestOpts(requestParameters: ListTaxSequencesRequest): Promise<runtime.RequestOpts> {
|
|
311
|
+
if (requestParameters['xTenantId'] == null) {
|
|
312
|
+
throw new runtime.RequiredError(
|
|
313
|
+
'xTenantId',
|
|
314
|
+
'Required parameter "xTenantId" was null or undefined when calling listTaxSequences().'
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const queryParameters: any = {};
|
|
319
|
+
|
|
320
|
+
if (requestParameters['type'] != null) {
|
|
321
|
+
queryParameters['type'] = requestParameters['type'];
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
325
|
+
|
|
326
|
+
if (requestParameters['xTenantId'] != null) {
|
|
327
|
+
headerParameters['x-tenant-id'] = String(requestParameters['xTenantId']);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
331
|
+
// oauth required
|
|
332
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["sequences:read"]);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
336
|
+
const token = this.configuration.accessToken;
|
|
337
|
+
const tokenString = await token("bearerAuth", []);
|
|
338
|
+
|
|
339
|
+
if (tokenString) {
|
|
340
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
let urlPath = `/tax-sequences`;
|
|
345
|
+
|
|
346
|
+
return {
|
|
347
|
+
path: urlPath,
|
|
348
|
+
method: 'GET',
|
|
349
|
+
headers: headerParameters,
|
|
350
|
+
query: queryParameters,
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Returns all fiscal number sequences registered for the tenant.
|
|
356
|
+
* List tax sequences
|
|
357
|
+
*/
|
|
358
|
+
async listTaxSequencesRaw(requestParameters: ListTaxSequencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTaxSequences200Response>> {
|
|
359
|
+
const requestOptions = await this.listTaxSequencesRequestOpts(requestParameters);
|
|
360
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
361
|
+
|
|
362
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListTaxSequences200ResponseFromJSON(jsonValue));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Returns all fiscal number sequences registered for the tenant.
|
|
367
|
+
* List tax sequences
|
|
368
|
+
*/
|
|
369
|
+
async listTaxSequences(requestParameters: ListTaxSequencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListTaxSequences200Response> {
|
|
370
|
+
const response = await this.listTaxSequencesRaw(requestParameters, initOverrides);
|
|
371
|
+
return await response.value();
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
}
|