@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.
Files changed (291) hide show
  1. package/.openapi-generator/FILES +96 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +234 -0
  5. package/dist/apis/AssociatedCompaniesApi.d.ts +150 -0
  6. package/dist/apis/AssociatedCompaniesApi.js +229 -0
  7. package/dist/apis/AuthenticationApi.d.ts +64 -0
  8. package/dist/apis/AuthenticationApi.js +75 -0
  9. package/dist/apis/DigitalCertificatesApi.d.ts +70 -0
  10. package/dist/apis/DigitalCertificatesApi.js +113 -0
  11. package/dist/apis/ECFSubmissionApi.d.ts +70 -0
  12. package/dist/apis/ECFSubmissionApi.js +96 -0
  13. package/dist/apis/TaxSequencesApi.d.ts +152 -0
  14. package/dist/apis/TaxSequencesApi.js +214 -0
  15. package/dist/apis/WebhookConfigurationApi.d.ts +146 -0
  16. package/dist/apis/WebhookConfigurationApi.js +197 -0
  17. package/dist/apis/index.d.ts +6 -0
  18. package/dist/apis/index.js +24 -0
  19. package/dist/esm/apis/AssociatedCompaniesApi.d.ts +150 -0
  20. package/dist/esm/apis/AssociatedCompaniesApi.js +225 -0
  21. package/dist/esm/apis/AuthenticationApi.d.ts +64 -0
  22. package/dist/esm/apis/AuthenticationApi.js +71 -0
  23. package/dist/esm/apis/DigitalCertificatesApi.d.ts +70 -0
  24. package/dist/esm/apis/DigitalCertificatesApi.js +109 -0
  25. package/dist/esm/apis/ECFSubmissionApi.d.ts +70 -0
  26. package/dist/esm/apis/ECFSubmissionApi.js +92 -0
  27. package/dist/esm/apis/TaxSequencesApi.d.ts +152 -0
  28. package/dist/esm/apis/TaxSequencesApi.js +210 -0
  29. package/dist/esm/apis/WebhookConfigurationApi.d.ts +146 -0
  30. package/dist/esm/apis/WebhookConfigurationApi.js +193 -0
  31. package/dist/esm/apis/index.d.ts +6 -0
  32. package/dist/esm/apis/index.js +8 -0
  33. package/dist/esm/index.d.ts +3 -0
  34. package/dist/esm/index.js +5 -0
  35. package/dist/esm/models/AccountType.d.ts +30 -0
  36. package/dist/esm/models/AccountType.js +48 -0
  37. package/dist/esm/models/AdditionalInfo.d.ts +50 -0
  38. package/dist/esm/models/AdditionalInfo.js +47 -0
  39. package/dist/esm/models/AlternativeCurrency.d.ts +46 -0
  40. package/dist/esm/models/AlternativeCurrency.js +49 -0
  41. package/dist/esm/models/AssociatedCompany.d.ts +125 -0
  42. package/dist/esm/models/AssociatedCompany.js +77 -0
  43. package/dist/esm/models/AssociatedCompanySubscription.d.ts +45 -0
  44. package/dist/esm/models/AssociatedCompanySubscription.js +46 -0
  45. package/dist/esm/models/AssociatedCompanySubscriptionPlan.d.ts +38 -0
  46. package/dist/esm/models/AssociatedCompanySubscriptionPlan.js +43 -0
  47. package/dist/esm/models/BillingIndicator.d.ts +34 -0
  48. package/dist/esm/models/BillingIndicator.js +52 -0
  49. package/dist/esm/models/Buyer.d.ts +68 -0
  50. package/dist/esm/models/Buyer.js +55 -0
  51. package/dist/esm/models/CreateAssociatedCompany201Response.d.ts +39 -0
  52. package/dist/esm/models/CreateAssociatedCompany201Response.js +44 -0
  53. package/dist/esm/models/CreateTaxSequenceRequest.d.ts +47 -0
  54. package/dist/esm/models/CreateTaxSequenceRequest.js +52 -0
  55. package/dist/esm/models/CreateWebhookConfig.d.ts +53 -0
  56. package/dist/esm/models/CreateWebhookConfig.js +52 -0
  57. package/dist/esm/models/DiscountOrSurcharge.d.ts +93 -0
  58. package/dist/esm/models/DiscountOrSurcharge.js +78 -0
  59. package/dist/esm/models/EcfSubmissionResponse.d.ts +56 -0
  60. package/dist/esm/models/EcfSubmissionResponse.js +53 -0
  61. package/dist/esm/models/ElectronicDocument.d.ts +252 -0
  62. package/dist/esm/models/ElectronicDocument.js +143 -0
  63. package/dist/esm/models/Environment.d.ts +30 -0
  64. package/dist/esm/models/Environment.js +48 -0
  65. package/dist/esm/models/ErrorResponse.d.ts +44 -0
  66. package/dist/esm/models/ErrorResponse.js +45 -0
  67. package/dist/esm/models/GetNextNumber200Response.d.ts +39 -0
  68. package/dist/esm/models/GetNextNumber200Response.js +44 -0
  69. package/dist/esm/models/GetNextNumber200ResponseData.d.ts +38 -0
  70. package/dist/esm/models/GetNextNumber200ResponseData.js +43 -0
  71. package/dist/esm/models/InvoiceType.d.ts +44 -0
  72. package/dist/esm/models/InvoiceType.js +62 -0
  73. package/dist/esm/models/Item.d.ts +106 -0
  74. package/dist/esm/models/Item.js +83 -0
  75. package/dist/esm/models/ItemAdditionalTax.d.ts +38 -0
  76. package/dist/esm/models/ItemAdditionalTax.js +47 -0
  77. package/dist/esm/models/ListTaxSequences200Response.d.ts +39 -0
  78. package/dist/esm/models/ListTaxSequences200Response.js +44 -0
  79. package/dist/esm/models/OAuthTokenRequest.d.ts +43 -0
  80. package/dist/esm/models/OAuthTokenRequest.js +47 -0
  81. package/dist/esm/models/OAuthTokenResponse.d.ts +46 -0
  82. package/dist/esm/models/OAuthTokenResponse.js +45 -0
  83. package/dist/esm/models/Page.d.ts +116 -0
  84. package/dist/esm/models/Page.js +75 -0
  85. package/dist/esm/models/PaymentMethod.d.ts +40 -0
  86. package/dist/esm/models/PaymentMethod.js +58 -0
  87. package/dist/esm/models/PrintFormat.d.ts +30 -0
  88. package/dist/esm/models/PrintFormat.js +48 -0
  89. package/dist/esm/models/ReferenceInfo.d.ts +76 -0
  90. package/dist/esm/models/ReferenceInfo.js +63 -0
  91. package/dist/esm/models/Subquantity.d.ts +38 -0
  92. package/dist/esm/models/Subquantity.js +47 -0
  93. package/dist/esm/models/Subtotal.d.ts +110 -0
  94. package/dist/esm/models/Subtotal.js +71 -0
  95. package/dist/esm/models/TaxSequence.d.ts +45 -0
  96. package/dist/esm/models/TaxSequence.js +46 -0
  97. package/dist/esm/models/Totals.d.ts +173 -0
  98. package/dist/esm/models/Totals.js +90 -0
  99. package/dist/esm/models/Transport.d.ts +62 -0
  100. package/dist/esm/models/Transport.js +51 -0
  101. package/dist/esm/models/UploadCertificate201Response.d.ts +44 -0
  102. package/dist/esm/models/UploadCertificate201Response.js +45 -0
  103. package/dist/esm/models/UploadCertificateResponse.d.ts +44 -0
  104. package/dist/esm/models/UploadCertificateResponse.js +45 -0
  105. package/dist/esm/models/WebhookConfigResponse.d.ts +63 -0
  106. package/dist/esm/models/WebhookConfigResponse.js +52 -0
  107. package/dist/esm/models/WebhookEventType.d.ts +40 -0
  108. package/dist/esm/models/WebhookEventType.js +58 -0
  109. package/dist/esm/models/WebhookNotificationPayload.d.ts +59 -0
  110. package/dist/esm/models/WebhookNotificationPayload.js +60 -0
  111. package/dist/esm/models/index.d.ts +37 -0
  112. package/dist/esm/models/index.js +39 -0
  113. package/dist/esm/runtime.d.ts +184 -0
  114. package/dist/esm/runtime.js +349 -0
  115. package/dist/index.d.ts +3 -0
  116. package/dist/index.js +21 -0
  117. package/dist/models/AccountType.d.ts +30 -0
  118. package/dist/models/AccountType.js +56 -0
  119. package/dist/models/AdditionalInfo.d.ts +50 -0
  120. package/dist/models/AdditionalInfo.js +54 -0
  121. package/dist/models/AlternativeCurrency.d.ts +46 -0
  122. package/dist/models/AlternativeCurrency.js +56 -0
  123. package/dist/models/AssociatedCompany.d.ts +125 -0
  124. package/dist/models/AssociatedCompany.js +85 -0
  125. package/dist/models/AssociatedCompanySubscription.d.ts +45 -0
  126. package/dist/models/AssociatedCompanySubscription.js +53 -0
  127. package/dist/models/AssociatedCompanySubscriptionPlan.d.ts +38 -0
  128. package/dist/models/AssociatedCompanySubscriptionPlan.js +50 -0
  129. package/dist/models/BillingIndicator.d.ts +34 -0
  130. package/dist/models/BillingIndicator.js +60 -0
  131. package/dist/models/Buyer.d.ts +68 -0
  132. package/dist/models/Buyer.js +62 -0
  133. package/dist/models/CreateAssociatedCompany201Response.d.ts +39 -0
  134. package/dist/models/CreateAssociatedCompany201Response.js +51 -0
  135. package/dist/models/CreateTaxSequenceRequest.d.ts +47 -0
  136. package/dist/models/CreateTaxSequenceRequest.js +59 -0
  137. package/dist/models/CreateWebhookConfig.d.ts +53 -0
  138. package/dist/models/CreateWebhookConfig.js +59 -0
  139. package/dist/models/DiscountOrSurcharge.d.ts +93 -0
  140. package/dist/models/DiscountOrSurcharge.js +86 -0
  141. package/dist/models/EcfSubmissionResponse.d.ts +56 -0
  142. package/dist/models/EcfSubmissionResponse.js +60 -0
  143. package/dist/models/ElectronicDocument.d.ts +252 -0
  144. package/dist/models/ElectronicDocument.js +151 -0
  145. package/dist/models/Environment.d.ts +30 -0
  146. package/dist/models/Environment.js +56 -0
  147. package/dist/models/ErrorResponse.d.ts +44 -0
  148. package/dist/models/ErrorResponse.js +52 -0
  149. package/dist/models/GetNextNumber200Response.d.ts +39 -0
  150. package/dist/models/GetNextNumber200Response.js +51 -0
  151. package/dist/models/GetNextNumber200ResponseData.d.ts +38 -0
  152. package/dist/models/GetNextNumber200ResponseData.js +50 -0
  153. package/dist/models/InvoiceType.d.ts +44 -0
  154. package/dist/models/InvoiceType.js +70 -0
  155. package/dist/models/Item.d.ts +106 -0
  156. package/dist/models/Item.js +91 -0
  157. package/dist/models/ItemAdditionalTax.d.ts +38 -0
  158. package/dist/models/ItemAdditionalTax.js +54 -0
  159. package/dist/models/ListTaxSequences200Response.d.ts +39 -0
  160. package/dist/models/ListTaxSequences200Response.js +51 -0
  161. package/dist/models/OAuthTokenRequest.d.ts +43 -0
  162. package/dist/models/OAuthTokenRequest.js +54 -0
  163. package/dist/models/OAuthTokenResponse.d.ts +46 -0
  164. package/dist/models/OAuthTokenResponse.js +52 -0
  165. package/dist/models/Page.d.ts +116 -0
  166. package/dist/models/Page.js +82 -0
  167. package/dist/models/PaymentMethod.d.ts +40 -0
  168. package/dist/models/PaymentMethod.js +66 -0
  169. package/dist/models/PrintFormat.d.ts +30 -0
  170. package/dist/models/PrintFormat.js +56 -0
  171. package/dist/models/ReferenceInfo.d.ts +76 -0
  172. package/dist/models/ReferenceInfo.js +71 -0
  173. package/dist/models/Subquantity.d.ts +38 -0
  174. package/dist/models/Subquantity.js +54 -0
  175. package/dist/models/Subtotal.d.ts +110 -0
  176. package/dist/models/Subtotal.js +78 -0
  177. package/dist/models/TaxSequence.d.ts +45 -0
  178. package/dist/models/TaxSequence.js +53 -0
  179. package/dist/models/Totals.d.ts +173 -0
  180. package/dist/models/Totals.js +97 -0
  181. package/dist/models/Transport.d.ts +62 -0
  182. package/dist/models/Transport.js +58 -0
  183. package/dist/models/UploadCertificate201Response.d.ts +44 -0
  184. package/dist/models/UploadCertificate201Response.js +52 -0
  185. package/dist/models/UploadCertificateResponse.d.ts +44 -0
  186. package/dist/models/UploadCertificateResponse.js +52 -0
  187. package/dist/models/WebhookConfigResponse.d.ts +63 -0
  188. package/dist/models/WebhookConfigResponse.js +59 -0
  189. package/dist/models/WebhookEventType.d.ts +40 -0
  190. package/dist/models/WebhookEventType.js +66 -0
  191. package/dist/models/WebhookNotificationPayload.d.ts +59 -0
  192. package/dist/models/WebhookNotificationPayload.js +67 -0
  193. package/dist/models/index.d.ts +37 -0
  194. package/dist/models/index.js +55 -0
  195. package/dist/runtime.d.ts +184 -0
  196. package/dist/runtime.js +365 -0
  197. package/docs/AccountType.md +33 -0
  198. package/docs/AdditionalInfo.md +41 -0
  199. package/docs/AlternativeCurrency.md +39 -0
  200. package/docs/AssociatedCompaniesApi.md +207 -0
  201. package/docs/AssociatedCompany.md +63 -0
  202. package/docs/AssociatedCompanySubscription.md +38 -0
  203. package/docs/AssociatedCompanySubscriptionPlan.md +36 -0
  204. package/docs/AuthenticationApi.md +77 -0
  205. package/docs/BillingIndicator.md +33 -0
  206. package/docs/Buyer.md +47 -0
  207. package/docs/CreateAssociatedCompany201Response.md +36 -0
  208. package/docs/CreateTaxSequenceRequest.md +39 -0
  209. package/docs/CreateWebhookConfig.md +41 -0
  210. package/docs/DigitalCertificatesApi.md +90 -0
  211. package/docs/DiscountOrSurcharge.md +49 -0
  212. package/docs/ECFSubmissionApi.md +90 -0
  213. package/docs/EcfSubmissionResponse.md +43 -0
  214. package/docs/ElectronicDocument.md +87 -0
  215. package/docs/Environment.md +33 -0
  216. package/docs/ErrorResponse.md +39 -0
  217. package/docs/GetNextNumber200Response.md +36 -0
  218. package/docs/GetNextNumber200ResponseData.md +36 -0
  219. package/docs/InvoiceType.md +33 -0
  220. package/docs/Item.md +55 -0
  221. package/docs/ItemAdditionalTax.md +37 -0
  222. package/docs/ListTaxSequences200Response.md +36 -0
  223. package/docs/OAuthTokenRequest.md +37 -0
  224. package/docs/OAuthTokenResponse.md +39 -0
  225. package/docs/Page.md +63 -0
  226. package/docs/PaymentMethod.md +33 -0
  227. package/docs/PrintFormat.md +33 -0
  228. package/docs/ReferenceInfo.md +43 -0
  229. package/docs/Subquantity.md +37 -0
  230. package/docs/Subtotal.md +61 -0
  231. package/docs/TaxSequence.md +39 -0
  232. package/docs/TaxSequencesApi.md +246 -0
  233. package/docs/Totals.md +81 -0
  234. package/docs/Transport.md +45 -0
  235. package/docs/UploadCertificate201Response.md +38 -0
  236. package/docs/UploadCertificateResponse.md +39 -0
  237. package/docs/WebhookConfigResponse.md +45 -0
  238. package/docs/WebhookConfigurationApi.md +241 -0
  239. package/docs/WebhookEventType.md +33 -0
  240. package/docs/WebhookNotificationPayload.md +43 -0
  241. package/package.json +21 -0
  242. package/src/apis/AssociatedCompaniesApi.ts +415 -0
  243. package/src/apis/AuthenticationApi.ts +122 -0
  244. package/src/apis/DigitalCertificatesApi.ts +175 -0
  245. package/src/apis/ECFSubmissionApi.ts +163 -0
  246. package/src/apis/TaxSequencesApi.ts +374 -0
  247. package/src/apis/WebhookConfigurationApi.ts +332 -0
  248. package/src/apis/index.ts +8 -0
  249. package/src/index.ts +5 -0
  250. package/src/models/AccountType.ts +58 -0
  251. package/src/models/AdditionalInfo.ts +89 -0
  252. package/src/models/AlternativeCurrency.ts +85 -0
  253. package/src/models/AssociatedCompany.ts +196 -0
  254. package/src/models/AssociatedCompanySubscription.ts +89 -0
  255. package/src/models/AssociatedCompanySubscriptionPlan.ts +73 -0
  256. package/src/models/BillingIndicator.ts +62 -0
  257. package/src/models/Buyer.ts +114 -0
  258. package/src/models/CreateAssociatedCompany201Response.ts +81 -0
  259. package/src/models/CreateTaxSequenceRequest.ts +96 -0
  260. package/src/models/CreateWebhookConfig.ts +101 -0
  261. package/src/models/DiscountOrSurcharge.ts +155 -0
  262. package/src/models/EcfSubmissionResponse.ts +99 -0
  263. package/src/models/ElectronicDocument.ts +421 -0
  264. package/src/models/Environment.ts +58 -0
  265. package/src/models/ErrorResponse.ts +81 -0
  266. package/src/models/GetNextNumber200Response.ts +81 -0
  267. package/src/models/GetNextNumber200ResponseData.ts +73 -0
  268. package/src/models/InvoiceType.ts +72 -0
  269. package/src/models/Item.ts +187 -0
  270. package/src/models/ItemAdditionalTax.ts +75 -0
  271. package/src/models/ListTaxSequences200Response.ts +81 -0
  272. package/src/models/OAuthTokenRequest.ts +80 -0
  273. package/src/models/OAuthTokenResponse.ts +83 -0
  274. package/src/models/Page.ts +180 -0
  275. package/src/models/PaymentMethod.ts +68 -0
  276. package/src/models/PrintFormat.ts +58 -0
  277. package/src/models/ReferenceInfo.ts +122 -0
  278. package/src/models/Subquantity.ts +75 -0
  279. package/src/models/Subtotal.ts +171 -0
  280. package/src/models/TaxSequence.ts +91 -0
  281. package/src/models/Totals.ts +260 -0
  282. package/src/models/Transport.ts +105 -0
  283. package/src/models/UploadCertificate201Response.ts +81 -0
  284. package/src/models/UploadCertificateResponse.ts +81 -0
  285. package/src/models/WebhookConfigResponse.ts +113 -0
  286. package/src/models/WebhookEventType.ts +68 -0
  287. package/src/models/WebhookNotificationPayload.ts +114 -0
  288. package/src/models/index.ts +39 -0
  289. package/src/runtime.ts +450 -0
  290. package/tsconfig.esm.json +7 -0
  291. package/tsconfig.json +16 -0
@@ -0,0 +1,83 @@
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
+ * Successful token response. Use `accessToken` as a Bearer token
18
+ * in the `Authorization` header of all subsequent requests.
19
+ *
20
+ * @export
21
+ * @interface OAuthTokenResponse
22
+ */
23
+ export interface OAuthTokenResponse {
24
+ /**
25
+ * JWT Bearer token. Pass as Authorization: Bearer <accessToken>.
26
+ * @type {string}
27
+ * @memberof OAuthTokenResponse
28
+ */
29
+ accessToken?: string;
30
+ /**
31
+ * Always "Bearer".
32
+ * @type {string}
33
+ * @memberof OAuthTokenResponse
34
+ */
35
+ tokenType?: string;
36
+ /**
37
+ * Token lifetime in seconds. Request a new token when it expires.
38
+ * @type {number}
39
+ * @memberof OAuthTokenResponse
40
+ */
41
+ expiresIn?: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the OAuthTokenResponse interface.
46
+ */
47
+ export function instanceOfOAuthTokenResponse(value: object): value is OAuthTokenResponse {
48
+ return true;
49
+ }
50
+
51
+ export function OAuthTokenResponseFromJSON(json: any): OAuthTokenResponse {
52
+ return OAuthTokenResponseFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function OAuthTokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthTokenResponse {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'accessToken': json['accessToken'] == null ? undefined : json['accessToken'],
62
+ 'tokenType': json['tokenType'] == null ? undefined : json['tokenType'],
63
+ 'expiresIn': json['expiresIn'] == null ? undefined : json['expiresIn'],
64
+ };
65
+ }
66
+
67
+ export function OAuthTokenResponseToJSON(json: any): OAuthTokenResponse {
68
+ return OAuthTokenResponseToJSONTyped(json, false);
69
+ }
70
+
71
+ export function OAuthTokenResponseToJSONTyped(value?: OAuthTokenResponse | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'accessToken': value['accessToken'],
79
+ 'tokenType': value['tokenType'],
80
+ 'expiresIn': value['expiresIn'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,180 @@
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
+ * Page-level breakdown for multi-page documents.
18
+ * @export
19
+ * @interface Page
20
+ */
21
+ export interface Page {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof Page
26
+ */
27
+ pageNumber: number;
28
+ /**
29
+ * First line item number on this page.
30
+ * @type {number}
31
+ * @memberof Page
32
+ */
33
+ lineFrom: number;
34
+ /**
35
+ * Last line item number on this page.
36
+ * @type {number}
37
+ * @memberof Page
38
+ */
39
+ lineTo: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof Page
44
+ */
45
+ subtotal?: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof Page
50
+ */
51
+ taxableAmount?: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof Page
56
+ */
57
+ taxableAmount1?: number;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof Page
62
+ */
63
+ taxableAmount2?: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof Page
68
+ */
69
+ taxableAmount3?: number;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof Page
74
+ */
75
+ totalITBIS?: number;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof Page
80
+ */
81
+ itbis1?: number;
82
+ /**
83
+ *
84
+ * @type {number}
85
+ * @memberof Page
86
+ */
87
+ itbis2?: number;
88
+ /**
89
+ *
90
+ * @type {number}
91
+ * @memberof Page
92
+ */
93
+ itbis3?: number;
94
+ /**
95
+ *
96
+ * @type {number}
97
+ * @memberof Page
98
+ */
99
+ additionalTaxes?: number;
100
+ /**
101
+ *
102
+ * @type {number}
103
+ * @memberof Page
104
+ */
105
+ exemptAmount?: number;
106
+ /**
107
+ *
108
+ * @type {number}
109
+ * @memberof Page
110
+ */
111
+ nonBillableAmount?: number;
112
+ }
113
+
114
+ /**
115
+ * Check if a given object implements the Page interface.
116
+ */
117
+ export function instanceOfPage(value: object): value is Page {
118
+ if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false;
119
+ if (!('lineFrom' in value) || value['lineFrom'] === undefined) return false;
120
+ if (!('lineTo' in value) || value['lineTo'] === undefined) return false;
121
+ return true;
122
+ }
123
+
124
+ export function PageFromJSON(json: any): Page {
125
+ return PageFromJSONTyped(json, false);
126
+ }
127
+
128
+ export function PageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Page {
129
+ if (json == null) {
130
+ return json;
131
+ }
132
+ return {
133
+
134
+ 'pageNumber': json['pageNumber'],
135
+ 'lineFrom': json['lineFrom'],
136
+ 'lineTo': json['lineTo'],
137
+ 'subtotal': json['subtotal'] == null ? undefined : json['subtotal'],
138
+ 'taxableAmount': json['taxableAmount'] == null ? undefined : json['taxableAmount'],
139
+ 'taxableAmount1': json['taxableAmount1'] == null ? undefined : json['taxableAmount1'],
140
+ 'taxableAmount2': json['taxableAmount2'] == null ? undefined : json['taxableAmount2'],
141
+ 'taxableAmount3': json['taxableAmount3'] == null ? undefined : json['taxableAmount3'],
142
+ 'totalITBIS': json['totalITBIS'] == null ? undefined : json['totalITBIS'],
143
+ 'itbis1': json['itbis1'] == null ? undefined : json['itbis1'],
144
+ 'itbis2': json['itbis2'] == null ? undefined : json['itbis2'],
145
+ 'itbis3': json['itbis3'] == null ? undefined : json['itbis3'],
146
+ 'additionalTaxes': json['additionalTaxes'] == null ? undefined : json['additionalTaxes'],
147
+ 'exemptAmount': json['exemptAmount'] == null ? undefined : json['exemptAmount'],
148
+ 'nonBillableAmount': json['nonBillableAmount'] == null ? undefined : json['nonBillableAmount'],
149
+ };
150
+ }
151
+
152
+ export function PageToJSON(json: any): Page {
153
+ return PageToJSONTyped(json, false);
154
+ }
155
+
156
+ export function PageToJSONTyped(value?: Page | null, ignoreDiscriminator: boolean = false): any {
157
+ if (value == null) {
158
+ return value;
159
+ }
160
+
161
+ return {
162
+
163
+ 'pageNumber': value['pageNumber'],
164
+ 'lineFrom': value['lineFrom'],
165
+ 'lineTo': value['lineTo'],
166
+ 'subtotal': value['subtotal'],
167
+ 'taxableAmount': value['taxableAmount'],
168
+ 'taxableAmount1': value['taxableAmount1'],
169
+ 'taxableAmount2': value['taxableAmount2'],
170
+ 'taxableAmount3': value['taxableAmount3'],
171
+ 'totalITBIS': value['totalITBIS'],
172
+ 'itbis1': value['itbis1'],
173
+ 'itbis2': value['itbis2'],
174
+ 'itbis3': value['itbis3'],
175
+ 'additionalTaxes': value['additionalTaxes'],
176
+ 'exemptAmount': value['exemptAmount'],
177
+ 'nonBillableAmount': value['nonBillableAmount'],
178
+ };
179
+ }
180
+
@@ -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
+ * Payment method code:
18
+ * - `1`: Cash (Efectivo)
19
+ * - `2`: Check (Cheque)
20
+ * - `3`: Debit/Credit Card (Tarjeta de Débito/Crédito)
21
+ * - `4`: Credit (Crédito)
22
+ * - `5`: Bank Transfer (Transferencia Bancaria)
23
+ * - `6`: Electronic Money (Dinero Electrónico)
24
+ * - `7`: Bond/Gift Card (Bono/Gift Card)
25
+ * - `8`: Other (Otro)
26
+ *
27
+ * @export
28
+ */
29
+ export const PaymentMethod = {
30
+ _1: '1',
31
+ _2: '2',
32
+ _3: '3',
33
+ _4: '4',
34
+ _5: '5',
35
+ _6: '6',
36
+ _7: '7',
37
+ _8: '8'
38
+ } as const;
39
+ export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];
40
+
41
+
42
+ export function instanceOfPaymentMethod(value: any): boolean {
43
+ for (const key in PaymentMethod) {
44
+ if (Object.prototype.hasOwnProperty.call(PaymentMethod, key)) {
45
+ if (PaymentMethod[key as keyof typeof PaymentMethod] === value) {
46
+ return true;
47
+ }
48
+ }
49
+ }
50
+ return false;
51
+ }
52
+
53
+ export function PaymentMethodFromJSON(json: any): PaymentMethod {
54
+ return PaymentMethodFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function PaymentMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethod {
58
+ return json as PaymentMethod;
59
+ }
60
+
61
+ export function PaymentMethodToJSON(value?: PaymentMethod | null): any {
62
+ return value as any;
63
+ }
64
+
65
+ export function PaymentMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentMethod {
66
+ return value as PaymentMethod;
67
+ }
68
+
@@ -0,0 +1,58 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * eCF-Pronesoft Integration API
5
+ * ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: contacto@pronesoft.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Printer/receipt format:
18
+ * - `A4`: Standard A4 paper
19
+ * - `thermal_80`: 80mm thermal printer
20
+ * - `thermal_58`: 58mm thermal printer
21
+ *
22
+ * @export
23
+ */
24
+ export const PrintFormat = {
25
+ A4: 'A4',
26
+ Thermal80: 'thermal_80',
27
+ Thermal58: 'thermal_58'
28
+ } as const;
29
+ export type PrintFormat = typeof PrintFormat[keyof typeof PrintFormat];
30
+
31
+
32
+ export function instanceOfPrintFormat(value: any): boolean {
33
+ for (const key in PrintFormat) {
34
+ if (Object.prototype.hasOwnProperty.call(PrintFormat, key)) {
35
+ if (PrintFormat[key as keyof typeof PrintFormat] === value) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ export function PrintFormatFromJSON(json: any): PrintFormat {
44
+ return PrintFormatFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function PrintFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): PrintFormat {
48
+ return json as PrintFormat;
49
+ }
50
+
51
+ export function PrintFormatToJSON(value?: PrintFormat | null): any {
52
+ return value as any;
53
+ }
54
+
55
+ export function PrintFormatToJSONTyped(value: any, ignoreDiscriminator: boolean): PrintFormat {
56
+ return value as PrintFormat;
57
+ }
58
+
@@ -0,0 +1,122 @@
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
+ * Reference to a previously issued document. Required for:
18
+ * - Credit Notes (type 34) — references the original invoice
19
+ * - Debit Notes (type 33) — references the original invoice
20
+ *
21
+ * @export
22
+ * @interface ReferenceInfo
23
+ */
24
+ export interface ReferenceInfo {
25
+ /**
26
+ * e-NCF number of the original document being referenced.
27
+ * @type {string}
28
+ * @memberof ReferenceInfo
29
+ */
30
+ modifiedInvoiceNumber: string;
31
+ /**
32
+ * RNC of the other contributor (if different from issuer).
33
+ * @type {string}
34
+ * @memberof ReferenceInfo
35
+ */
36
+ otherContributorRNC?: string;
37
+ /**
38
+ * Issue date of the original document.
39
+ * @type {Date}
40
+ * @memberof ReferenceInfo
41
+ */
42
+ modifiedInvoiceDate?: Date;
43
+ /**
44
+ * Reason for the modification:
45
+ * - `1`: Price correction
46
+ * - `2`: Quantity correction
47
+ * - `3`: Return of goods
48
+ * - `4`: Tax correction
49
+ * - `5`: Other
50
+ *
51
+ * @type {ReferenceInfoModificationCodeEnum}
52
+ * @memberof ReferenceInfo
53
+ */
54
+ modificationCode: ReferenceInfoModificationCodeEnum;
55
+ /**
56
+ * Free-text description of the modification reason.
57
+ * @type {string}
58
+ * @memberof ReferenceInfo
59
+ */
60
+ modificationReason?: string;
61
+ }
62
+
63
+
64
+ /**
65
+ * @export
66
+ */
67
+ export const ReferenceInfoModificationCodeEnum = {
68
+ _1: '1',
69
+ _2: '2',
70
+ _3: '3',
71
+ _4: '4',
72
+ _5: '5'
73
+ } as const;
74
+ export type ReferenceInfoModificationCodeEnum = typeof ReferenceInfoModificationCodeEnum[keyof typeof ReferenceInfoModificationCodeEnum];
75
+
76
+
77
+ /**
78
+ * Check if a given object implements the ReferenceInfo interface.
79
+ */
80
+ export function instanceOfReferenceInfo(value: object): value is ReferenceInfo {
81
+ if (!('modifiedInvoiceNumber' in value) || value['modifiedInvoiceNumber'] === undefined) return false;
82
+ if (!('modificationCode' in value) || value['modificationCode'] === undefined) return false;
83
+ return true;
84
+ }
85
+
86
+ export function ReferenceInfoFromJSON(json: any): ReferenceInfo {
87
+ return ReferenceInfoFromJSONTyped(json, false);
88
+ }
89
+
90
+ export function ReferenceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReferenceInfo {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+
96
+ 'modifiedInvoiceNumber': json['modifiedInvoiceNumber'],
97
+ 'otherContributorRNC': json['otherContributorRNC'] == null ? undefined : json['otherContributorRNC'],
98
+ 'modifiedInvoiceDate': json['modifiedInvoiceDate'] == null ? undefined : (new Date(json['modifiedInvoiceDate'])),
99
+ 'modificationCode': json['modificationCode'],
100
+ 'modificationReason': json['modificationReason'] == null ? undefined : json['modificationReason'],
101
+ };
102
+ }
103
+
104
+ export function ReferenceInfoToJSON(json: any): ReferenceInfo {
105
+ return ReferenceInfoToJSONTyped(json, false);
106
+ }
107
+
108
+ export function ReferenceInfoToJSONTyped(value?: ReferenceInfo | null, ignoreDiscriminator: boolean = false): any {
109
+ if (value == null) {
110
+ return value;
111
+ }
112
+
113
+ return {
114
+
115
+ 'modifiedInvoiceNumber': value['modifiedInvoiceNumber'],
116
+ 'otherContributorRNC': value['otherContributorRNC'],
117
+ 'modifiedInvoiceDate': value['modifiedInvoiceDate'] == null ? value['modifiedInvoiceDate'] : value['modifiedInvoiceDate'].toISOString().substring(0,10),
118
+ 'modificationCode': value['modificationCode'],
119
+ 'modificationReason': value['modificationReason'],
120
+ };
121
+ }
122
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * eCF-Pronesoft Integration API
5
+ * ## Overview Production-grade API for issuing Electronic Tax Receipts (e-CF) in the Dominican Republic through the Pronesoft platform, which handles all communication with the DGII on your behalf. ## Authentication — OAuth 2.0 Client Credentials This API uses the **OAuth 2.0 Client Credentials** flow. There is no user login — authentication is machine-to-machine using a `clientId` and `clientSecret` issued by the Pronesoft portal. ### Step-by-step 1. **Get credentials**: - Sandbox: https://ecf.sandbox.pronesoft.com - Production: https://ecf.pronesoft.com 2. **Request a token** — call `POST /oauth/token` with your credentials. The server returns an `accessToken` valid for `expiresIn` seconds. 3. **Authorize requests** — include the token in every subsequent request: ``` Authorization: Bearer <accessToken> ``` 4. **Identify your tenant** — include your company/branch UUID in every protected request: ``` x-tenant-id: <your-tenant-uuid> ``` 5. **Refresh** — when the token expires, simply call `POST /oauth/token` again. ### Scopes | Category | Scope | Description | |---|---|---| | **Business** | `business:read` | Read company data | | | `business:create` | Create a new company | | | `business:update` | Update company data | | **Members** | `members:read` | View team members | | | `members:invite` | Invite new members | | | `members:revoke` | Revoke member access | | **Certificates** | `certificates:read` | View digital certificates | | | `certificates:upload` | Upload new certificates | | | `certificates:update` | Update existing certificates | | **Documents** | `documents:read` | List and view documents | | | `documents:create` | Create drafts or internal documents | | | `documents:send` | Submit e-CF to DGII | | | `documents:receive` | Receive e-CF from third parties | | | `documents:update` | Modify document metadata | | **Approvals** | `approvals:read` | View approval statuses | | | `approvals:commercial` | Perform commercial approvals/rejections | | **Sequences** | `sequences:read` | View NCF/e-NCF ranges | | | `sequences:create` | Request new sequences | | | `sequences:update` | Modify sequence configurations | | | `sequences:cancel` | Cancel unused sequences | | **Dashboard** | `business_info:read` | Access dashboard stats and metrics | | **Certification** | `certification:read` | View certification progress | | | `certification:write` | Run automated DGII certification tests | | **Reports** | `reports:read` | Generate and export reports (e.g. 606) | ## Environments | Environment | Portal | API Host | Purpose | |---|---|---|---| | Sandbox | https://ecf.sandbox.pronesoft.com | `api.ecf.sandbox.pronesoft.com` | Development & testing | | Production | https://ecf.pronesoft.com | `api.ecf.pronesoft.com` | Live e-CF issuance | ## Invoice Types (e-NCF) | Code | Name | |---|---| | `31` | Tax Credit Invoice (Factura de Crédito Fiscal) | | `32` | Consumer Invoice (Factura de Consumo) | | `33` | Debit Note (Nota de Débito) | | `34` | Credit Note (Nota de Crédito) | | `41` | Purchases (Compras) | | `43` | Minor Expenses (Gastos Menores) | | `44` | Special Regimes (Regímenes Especiales) | | `45` | Governmental (Gubernamentales) | | `46` | Exports (Exportaciones) | | `47` | Overseas Payments (Pagos al Exterior) |
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: contacto@pronesoft.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Sub-quantity for items measured in multiple units.
18
+ * @export
19
+ * @interface Subquantity
20
+ */
21
+ export interface Subquantity {
22
+ /**
23
+ * Quantity in this unit of measure.
24
+ * @type {number}
25
+ * @memberof Subquantity
26
+ */
27
+ quantity: number;
28
+ /**
29
+ * DGII unit of measure code.
30
+ * @type {number}
31
+ * @memberof Subquantity
32
+ */
33
+ unitCode: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the Subquantity interface.
38
+ */
39
+ export function instanceOfSubquantity(value: object): value is Subquantity {
40
+ if (!('quantity' in value) || value['quantity'] === undefined) return false;
41
+ if (!('unitCode' in value) || value['unitCode'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function SubquantityFromJSON(json: any): Subquantity {
46
+ return SubquantityFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function SubquantityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Subquantity {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'quantity': json['quantity'],
56
+ 'unitCode': json['unitCode'],
57
+ };
58
+ }
59
+
60
+ export function SubquantityToJSON(json: any): Subquantity {
61
+ return SubquantityToJSONTyped(json, false);
62
+ }
63
+
64
+ export function SubquantityToJSONTyped(value?: Subquantity | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'quantity': value['quantity'],
72
+ 'unitCode': value['unitCode'],
73
+ };
74
+ }
75
+