@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,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Master Integration API
|
|
5
|
+
* **Highly detailed** production-grade API specification for eCF-Pronesoft. **Optimized for high-fidelity SDK generation.** This specification is the result of an exhaustive audit of the source code (NestJS), covering 100% of the DTOs, regex validations, Webhook schemas, and OAuth 2.0 security flows.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UploadCertificate201Response
|
|
20
|
+
*/
|
|
21
|
+
export interface UploadCertificate201Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UploadCertificate201Response
|
|
26
|
+
*/
|
|
27
|
+
message?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UploadCertificate201Response
|
|
32
|
+
*/
|
|
33
|
+
representative?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof UploadCertificate201Response
|
|
38
|
+
*/
|
|
39
|
+
expirationDate?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the UploadCertificate201Response interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUploadCertificate201Response(value: object): value is UploadCertificate201Response {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function UploadCertificate201ResponseFromJSON(json: any): UploadCertificate201Response {
|
|
50
|
+
return UploadCertificate201ResponseFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UploadCertificate201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadCertificate201Response {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
60
|
+
'representative': json['representative'] == null ? undefined : json['representative'],
|
|
61
|
+
'expirationDate': json['expirationDate'] == null ? undefined : (new Date(json['expirationDate'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function UploadCertificate201ResponseToJSON(json: any): UploadCertificate201Response {
|
|
66
|
+
return UploadCertificate201ResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function UploadCertificate201ResponseToJSONTyped(value?: UploadCertificate201Response | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'message': value['message'],
|
|
77
|
+
'representative': value['representative'],
|
|
78
|
+
'expirationDate': value['expirationDate'] == null ? value['expirationDate'] : value['expirationDate'].toISOString(),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Response after successfully uploading a digital certificate.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UploadCertificateResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface UploadCertificateResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Confirmation message.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UploadCertificateResponse
|
|
26
|
+
*/
|
|
27
|
+
message?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Name of the certificate holder as registered with the DGII.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UploadCertificateResponse
|
|
32
|
+
*/
|
|
33
|
+
representative?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Certificate expiration date. Monitor this to avoid disruptions.
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof UploadCertificateResponse
|
|
38
|
+
*/
|
|
39
|
+
expirationDate?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the UploadCertificateResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUploadCertificateResponse(value: object): value is UploadCertificateResponse {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function UploadCertificateResponseFromJSON(json: any): UploadCertificateResponse {
|
|
50
|
+
return UploadCertificateResponseFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UploadCertificateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadCertificateResponse {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
60
|
+
'representative': json['representative'] == null ? undefined : json['representative'],
|
|
61
|
+
'expirationDate': json['expirationDate'] == null ? undefined : (new Date(json['expirationDate'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function UploadCertificateResponseToJSON(json: any): UploadCertificateResponse {
|
|
66
|
+
return UploadCertificateResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function UploadCertificateResponseToJSONTyped(value?: UploadCertificateResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'message': value['message'],
|
|
77
|
+
'representative': value['representative'],
|
|
78
|
+
'expirationDate': value['expirationDate'] == null ? value['expirationDate'] : value['expirationDate'].toISOString(),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { WebhookEventType } from './WebhookEventType';
|
|
17
|
+
import {
|
|
18
|
+
WebhookEventTypeFromJSON,
|
|
19
|
+
WebhookEventTypeFromJSONTyped,
|
|
20
|
+
WebhookEventTypeToJSON,
|
|
21
|
+
WebhookEventTypeToJSONTyped,
|
|
22
|
+
} from './WebhookEventType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A registered webhook configuration.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface WebhookConfigResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface WebhookConfigResponse {
|
|
30
|
+
/**
|
|
31
|
+
* Unique webhook identifier.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof WebhookConfigResponse
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The URL that receives webhook notifications.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof WebhookConfigResponse
|
|
40
|
+
*/
|
|
41
|
+
url?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Events this webhook is subscribed to.
|
|
44
|
+
* @type {Array<WebhookEventType>}
|
|
45
|
+
* @memberof WebhookConfigResponse
|
|
46
|
+
*/
|
|
47
|
+
eventTypes?: Array<WebhookEventType>;
|
|
48
|
+
/**
|
|
49
|
+
* Whether this webhook is currently active.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof WebhookConfigResponse
|
|
52
|
+
*/
|
|
53
|
+
isActive?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof WebhookConfigResponse
|
|
58
|
+
*/
|
|
59
|
+
createdAt?: Date;
|
|
60
|
+
/**
|
|
61
|
+
* When this webhook was last triggered. Null if never triggered.
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof WebhookConfigResponse
|
|
64
|
+
*/
|
|
65
|
+
lastTriggeredAt?: Date | null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the WebhookConfigResponse interface.
|
|
70
|
+
*/
|
|
71
|
+
export function instanceOfWebhookConfigResponse(value: object): value is WebhookConfigResponse {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function WebhookConfigResponseFromJSON(json: any): WebhookConfigResponse {
|
|
76
|
+
return WebhookConfigResponseFromJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function WebhookConfigResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookConfigResponse {
|
|
80
|
+
if (json == null) {
|
|
81
|
+
return json;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
86
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
87
|
+
'eventTypes': json['eventTypes'] == null ? undefined : ((json['eventTypes'] as Array<any>).map(WebhookEventTypeFromJSON)),
|
|
88
|
+
'isActive': json['isActive'] == null ? undefined : json['isActive'],
|
|
89
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
90
|
+
'lastTriggeredAt': json['lastTriggeredAt'] == null ? undefined : (new Date(json['lastTriggeredAt'])),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function WebhookConfigResponseToJSON(json: any): WebhookConfigResponse {
|
|
95
|
+
return WebhookConfigResponseToJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function WebhookConfigResponseToJSONTyped(value?: WebhookConfigResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
99
|
+
if (value == null) {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'id': value['id'],
|
|
106
|
+
'url': value['url'],
|
|
107
|
+
'eventTypes': value['eventTypes'] == null ? undefined : ((value['eventTypes'] as Array<any>).map(WebhookEventTypeToJSON)),
|
|
108
|
+
'isActive': value['isActive'],
|
|
109
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
110
|
+
'lastTriggeredAt': value['lastTriggeredAt'] == null ? value['lastTriggeredAt'] : value['lastTriggeredAt'].toISOString(),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Type of event that triggers a webhook notification.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const WebhookEventType = {
|
|
21
|
+
DocumentReceived: 'document.received',
|
|
22
|
+
DocumentStatusChanged: 'document.status_changed',
|
|
23
|
+
DocumentValidationError: 'document.validation_error',
|
|
24
|
+
DocumentContingencyActivated: 'document.contingency_activated',
|
|
25
|
+
CommercialApproval: 'commercial.approval',
|
|
26
|
+
CertificateExpiring: 'certificate.expiring',
|
|
27
|
+
PlanUsageAlert: 'plan.usage_alert',
|
|
28
|
+
PlanPaymentFailed: 'plan.payment_failed',
|
|
29
|
+
BillingInvoiceReady: 'billing.invoice_ready',
|
|
30
|
+
SequenceDepleted: 'sequence.depleted',
|
|
31
|
+
SequenceVoided: 'sequence.voided',
|
|
32
|
+
BranchCreated: 'branch.created',
|
|
33
|
+
BranchStatusChanged: 'branch.status_changed',
|
|
34
|
+
MemberInvited: 'member.invited',
|
|
35
|
+
MemberJoined: 'member.joined',
|
|
36
|
+
MemberRemoved: 'member.removed',
|
|
37
|
+
CertificationCompleted: 'certification.completed'
|
|
38
|
+
} as const;
|
|
39
|
+
export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export function instanceOfWebhookEventType(value: any): boolean {
|
|
43
|
+
for (const key in WebhookEventType) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(WebhookEventType, key)) {
|
|
45
|
+
if (WebhookEventType[key as keyof typeof WebhookEventType] === value) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function WebhookEventTypeFromJSON(json: any): WebhookEventType {
|
|
54
|
+
return WebhookEventTypeFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function WebhookEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEventType {
|
|
58
|
+
return json as WebhookEventType;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function WebhookEventTypeToJSON(value?: WebhookEventType | null): any {
|
|
62
|
+
return value as any;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function WebhookEventTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebhookEventType {
|
|
66
|
+
return value as WebhookEventType;
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* eCF-Pronesoft Integration API
|
|
5
|
+
* ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: contacto@pronesoft.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { WebhookEventType } from './WebhookEventType';
|
|
17
|
+
import {
|
|
18
|
+
WebhookEventTypeFromJSON,
|
|
19
|
+
WebhookEventTypeFromJSONTyped,
|
|
20
|
+
WebhookEventTypeToJSON,
|
|
21
|
+
WebhookEventTypeToJSONTyped,
|
|
22
|
+
} from './WebhookEventType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Payload sent to your registered webhook URL when an event occurs.
|
|
26
|
+
* Verify authenticity using HMAC-SHA256 with your webhook `secret`.
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @interface WebhookNotificationPayload
|
|
30
|
+
*/
|
|
31
|
+
export interface WebhookNotificationPayload {
|
|
32
|
+
/**
|
|
33
|
+
* Unique notification identifier (use for deduplication).
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof WebhookNotificationPayload
|
|
36
|
+
*/
|
|
37
|
+
id: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {WebhookEventType}
|
|
41
|
+
* @memberof WebhookNotificationPayload
|
|
42
|
+
*/
|
|
43
|
+
event: WebhookEventType;
|
|
44
|
+
/**
|
|
45
|
+
* When the event occurred (ISO 8601).
|
|
46
|
+
* @type {Date}
|
|
47
|
+
* @memberof WebhookNotificationPayload
|
|
48
|
+
*/
|
|
49
|
+
timestamp: Date;
|
|
50
|
+
/**
|
|
51
|
+
* RNC of the company that triggered the event.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof WebhookNotificationPayload
|
|
54
|
+
*/
|
|
55
|
+
businessRnc: string;
|
|
56
|
+
/**
|
|
57
|
+
* Event-specific data payload.
|
|
58
|
+
* @type {object}
|
|
59
|
+
* @memberof WebhookNotificationPayload
|
|
60
|
+
*/
|
|
61
|
+
data: object;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the WebhookNotificationPayload interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfWebhookNotificationPayload(value: object): value is WebhookNotificationPayload {
|
|
70
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
71
|
+
if (!('event' in value) || value['event'] === undefined) return false;
|
|
72
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
73
|
+
if (!('businessRnc' in value) || value['businessRnc'] === undefined) return false;
|
|
74
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function WebhookNotificationPayloadFromJSON(json: any): WebhookNotificationPayload {
|
|
79
|
+
return WebhookNotificationPayloadFromJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function WebhookNotificationPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookNotificationPayload {
|
|
83
|
+
if (json == null) {
|
|
84
|
+
return json;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'id': json['id'],
|
|
89
|
+
'event': WebhookEventTypeFromJSON(json['event']),
|
|
90
|
+
'timestamp': (new Date(json['timestamp'])),
|
|
91
|
+
'businessRnc': json['businessRnc'],
|
|
92
|
+
'data': json['data'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function WebhookNotificationPayloadToJSON(json: any): WebhookNotificationPayload {
|
|
97
|
+
return WebhookNotificationPayloadToJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function WebhookNotificationPayloadToJSONTyped(value?: WebhookNotificationPayload | null, ignoreDiscriminator: boolean = false): any {
|
|
101
|
+
if (value == null) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'id': value['id'],
|
|
108
|
+
'event': WebhookEventTypeToJSON(value['event']),
|
|
109
|
+
'timestamp': value['timestamp'].toISOString(),
|
|
110
|
+
'businessRnc': value['businessRnc'],
|
|
111
|
+
'data': value['data'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './AccountType';
|
|
4
|
+
export * from './AdditionalInfo';
|
|
5
|
+
export * from './AlternativeCurrency';
|
|
6
|
+
export * from './AssociatedCompany';
|
|
7
|
+
export * from './AssociatedCompanySubscription';
|
|
8
|
+
export * from './AssociatedCompanySubscriptionPlan';
|
|
9
|
+
export * from './BillingIndicator';
|
|
10
|
+
export * from './Buyer';
|
|
11
|
+
export * from './CreateAssociatedCompany201Response';
|
|
12
|
+
export * from './CreateTaxSequenceRequest';
|
|
13
|
+
export * from './CreateWebhookConfig';
|
|
14
|
+
export * from './DiscountOrSurcharge';
|
|
15
|
+
export * from './EcfSubmissionResponse';
|
|
16
|
+
export * from './ElectronicDocument';
|
|
17
|
+
export * from './Environment';
|
|
18
|
+
export * from './ErrorResponse';
|
|
19
|
+
export * from './GetNextNumber200Response';
|
|
20
|
+
export * from './GetNextNumber200ResponseData';
|
|
21
|
+
export * from './InvoiceType';
|
|
22
|
+
export * from './Item';
|
|
23
|
+
export * from './ItemAdditionalTax';
|
|
24
|
+
export * from './ListTaxSequences200Response';
|
|
25
|
+
export * from './OAuthTokenRequest';
|
|
26
|
+
export * from './OAuthTokenResponse';
|
|
27
|
+
export * from './Page';
|
|
28
|
+
export * from './PaymentMethod';
|
|
29
|
+
export * from './PrintFormat';
|
|
30
|
+
export * from './ReferenceInfo';
|
|
31
|
+
export * from './Subquantity';
|
|
32
|
+
export * from './Subtotal';
|
|
33
|
+
export * from './TaxSequence';
|
|
34
|
+
export * from './Totals';
|
|
35
|
+
export * from './Transport';
|
|
36
|
+
export * from './UploadCertificateResponse';
|
|
37
|
+
export * from './WebhookConfigResponse';
|
|
38
|
+
export * from './WebhookEventType';
|
|
39
|
+
export * from './WebhookNotificationPayload';
|