@12-apps/fiscal 1.0.0 → 1.1.0

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 (140) hide show
  1. package/README.md +152 -7
  2. package/dist/chunk-27B4HNO6.js +574 -0
  3. package/dist/chunk-27B4HNO6.js.map +1 -0
  4. package/dist/chunk-3SDXLSG4.js +24 -0
  5. package/dist/chunk-3SDXLSG4.js.map +1 -0
  6. package/dist/chunk-ALABGVPO.js +247 -0
  7. package/dist/chunk-ALABGVPO.js.map +1 -0
  8. package/dist/chunk-FOFIN5M7.js +14 -0
  9. package/dist/chunk-FOFIN5M7.js.map +1 -0
  10. package/dist/chunk-HQ2NXSTX.js +85 -0
  11. package/dist/chunk-HQ2NXSTX.js.map +1 -0
  12. package/dist/chunk-PNTKG3DZ.js +47 -0
  13. package/dist/chunk-PNTKG3DZ.js.map +1 -0
  14. package/dist/chunk-RRFKYVLZ.js +192 -0
  15. package/dist/chunk-RRFKYVLZ.js.map +1 -0
  16. package/dist/chunk-V5ZQAAJT.js +210 -0
  17. package/dist/chunk-V5ZQAAJT.js.map +1 -0
  18. package/dist/chunk-X6MRDUYH.js +21 -0
  19. package/dist/chunk-X6MRDUYH.js.map +1 -0
  20. package/dist/chunk-XQGW5HUG.js +30 -0
  21. package/dist/chunk-XQGW5HUG.js.map +1 -0
  22. package/dist/context-ChnWR4Kb.d.ts +455 -0
  23. package/dist/danfe/en-US.d.ts +12 -0
  24. package/dist/danfe/en-US.js +51 -0
  25. package/dist/danfe/en-US.js.map +1 -0
  26. package/dist/danfe/index.d.ts +50 -0
  27. package/dist/danfe/index.js +18 -0
  28. package/dist/danfe/index.js.map +1 -0
  29. package/dist/danfe/pt-BR.d.ts +11 -0
  30. package/dist/danfe/pt-BR.js +51 -0
  31. package/dist/danfe/pt-BR.js.map +1 -0
  32. package/dist/documents/index.d.ts +169 -0
  33. package/dist/documents/index.js +1228 -0
  34. package/dist/documents/index.js.map +1 -0
  35. package/dist/engine/index.d.ts +3 -246
  36. package/dist/http.d.ts +73 -0
  37. package/dist/http.js +16 -0
  38. package/dist/http.js.map +1 -0
  39. package/dist/issuer/index.d.ts +43 -0
  40. package/dist/issuer/index.js +131 -0
  41. package/dist/issuer/index.js.map +1 -0
  42. package/dist/jobs.d.ts +74 -0
  43. package/dist/jobs.js +22 -0
  44. package/dist/jobs.js.map +1 -0
  45. package/dist/labels-BNvflT0h.d.ts +44 -0
  46. package/dist/manifest/index.d.ts +30 -16
  47. package/dist/manifest/index.js +11 -17
  48. package/dist/manifest/index.js.map +1 -1
  49. package/dist/manifest/server.d.ts +57 -0
  50. package/dist/manifest/server.js +25 -0
  51. package/dist/manifest/server.js.map +1 -0
  52. package/dist/notifications.d.ts +93 -0
  53. package/dist/notifications.js +41 -0
  54. package/dist/notifications.js.map +1 -0
  55. package/dist/port-DpRFK56U.d.ts +238 -0
  56. package/dist/sale/index.d.ts +243 -0
  57. package/dist/sale/index.js +1 -0
  58. package/dist/sale/index.js.map +1 -0
  59. package/dist/service-KTjH7AxW.d.ts +139 -0
  60. package/dist/sidecar/index.d.ts +216 -0
  61. package/dist/sidecar/index.js +8 -0
  62. package/dist/sidecar/index.js.map +1 -0
  63. package/dist/types-B1b8LIWX.d.ts +247 -0
  64. package/package.json +63 -5
  65. package/prisma/fiscal.prisma +158 -0
  66. package/prisma/migrations/20261113220000_fiscal_documents/migration.sql +201 -0
  67. package/sidecar/.dockerignore +5 -0
  68. package/sidecar/Dockerfile +68 -0
  69. package/sidecar/README.md +149 -0
  70. package/sidecar/composer.json +30 -0
  71. package/sidecar/composer.lock +2224 -0
  72. package/sidecar/docker/apache.conf +14 -0
  73. package/sidecar/docker/icp-brasil.pem +8031 -0
  74. package/sidecar/docker/mpm.conf +17 -0
  75. package/sidecar/docker/openssl.cnf +16 -0
  76. package/sidecar/docker/php.ini +19 -0
  77. package/sidecar/public/index.php +15 -0
  78. package/sidecar/schema/sale-for-document.schema.json +401 -0
  79. package/sidecar/src/ErrorClass.php +31 -0
  80. package/sidecar/src/Http/Request.php +48 -0
  81. package/sidecar/src/Http/Response.php +32 -0
  82. package/sidecar/src/Http/Router.php +59 -0
  83. package/sidecar/src/Kernel.php +99 -0
  84. package/sidecar/src/Module.php +31 -0
  85. package/sidecar/src/Nfe/Classifier.php +89 -0
  86. package/sidecar/src/Nfe/Credentials.php +52 -0
  87. package/sidecar/src/Nfe/DocumentMapper.php +383 -0
  88. package/sidecar/src/Nfe/DocumentSchema.php +39 -0
  89. package/sidecar/src/Nfe/Input.php +125 -0
  90. package/sidecar/src/Nfe/Model.php +17 -0
  91. package/sidecar/src/Nfe/NfeModule.php +62 -0
  92. package/sidecar/src/Nfe/NfeService.php +504 -0
  93. package/sidecar/src/Nfe/Sefaz.php +49 -0
  94. package/sidecar/src/Nfe/SefazReply.php +81 -0
  95. package/sidecar/src/Nfe/Transport/CurlTransport.php +198 -0
  96. package/sidecar/src/Nfe/Transport/SoapAdapter.php +57 -0
  97. package/sidecar/src/Nfe/Transport/Transport.php +20 -0
  98. package/sidecar/src/Nfe/Transport/TransportFailure.php +42 -0
  99. package/sidecar/src/RequestLog.php +54 -0
  100. package/sidecar/src/ServiceError.php +69 -0
  101. package/src/danfe/en-US.ts +53 -0
  102. package/src/danfe/index.ts +11 -0
  103. package/src/danfe/labels.ts +49 -0
  104. package/src/danfe/pt-BR.ts +52 -0
  105. package/src/danfe/render.ts +265 -0
  106. package/src/danfe/xml.ts +45 -0
  107. package/src/documents/context.ts +260 -0
  108. package/src/documents/errors.ts +41 -0
  109. package/src/documents/helpers.ts +128 -0
  110. package/src/documents/index.ts +39 -0
  111. package/src/documents/lines.ts +63 -0
  112. package/src/documents/machine-steps.ts +260 -0
  113. package/src/documents/machine.ts +128 -0
  114. package/src/documents/memory.ts +138 -0
  115. package/src/documents/nfe-proc.ts +51 -0
  116. package/src/documents/ports.ts +130 -0
  117. package/src/documents/profile-input.ts +168 -0
  118. package/src/documents/profile.ts +98 -0
  119. package/src/documents/service-profile.ts +104 -0
  120. package/src/documents/service.ts +296 -0
  121. package/src/documents/settle.ts +121 -0
  122. package/src/documents/signing.ts +61 -0
  123. package/src/documents/sql-rows.ts +180 -0
  124. package/src/documents/sql-store.ts +242 -0
  125. package/src/documents/sql.ts +18 -0
  126. package/src/documents/steps.ts +173 -0
  127. package/src/documents/tests/integration/pglite.ts +73 -0
  128. package/src/documents/types.ts +193 -0
  129. package/src/http.ts +264 -0
  130. package/src/issuer/index.ts +9 -0
  131. package/src/issuer/port.ts +109 -0
  132. package/src/issuer/sidecar.ts +171 -0
  133. package/src/jobs.ts +115 -0
  134. package/src/manifest/index.ts +25 -16
  135. package/src/manifest/server.ts +20 -0
  136. package/src/notifications.ts +120 -0
  137. package/src/sale/index.ts +8 -0
  138. package/src/sale/types.ts +292 -0
  139. package/src/sidecar/index.ts +9 -0
  140. package/src/sidecar/types.ts +243 -0
@@ -0,0 +1,93 @@
1
+ export { b as FISCAL_CERTIFICATE_EXPIRING, c as FISCAL_CONTINGENCY_DEADLINE, d as FISCAL_DOCUMENT_NEEDS_ATTENTION, e as FISCAL_DOCUMENT_REJECTED } from './context-ChnWR4Kb.js';
2
+ import { F as FiscalDocumentModel, g as FiscalDocumentStatus, N as NumberVoid } from './port-DpRFK56U.js';
3
+ import './sale/index.js';
4
+ import './sidecar/index.js';
5
+ import './types-B1b8LIWX.js';
6
+
7
+ /**
8
+ * `@12-apps/fiscal/notifications` — what the package tells people about,
9
+ * as notification blueprints over the HOST's words (the estate's sanctioned
10
+ * shape for a package alert: a factory over copy, never pre-worded here).
11
+ *
12
+ * - `fiscal.certificate-expiring`, emitted by the `certificate-expiry` job to
13
+ * holders of `fiscal:manage`;
14
+ * - `fiscal.document-rejected`, emitted by the document service to holders of
15
+ * `fiscal:issue` when SEFAZ (or the fiscal service) refuses a document;
16
+ * - `fiscal.document-needs-attention`, to holders of `fiscal:issue` when a
17
+ * document stops being retried: a settlement SEFAZ refused (241, 256, 501, a
18
+ * certificate refused) or too many failures in a row;
19
+ * - `fiscal.contingency-deadline`, to holders of `fiscal:issue` when an NFC-e
20
+ * is still offline 20 hours after it was signed (the deadline is 24).
21
+ *
22
+ * Each blueprint is a structural twin of the wiring contract's
23
+ * `WireNotificationBlueprint`; the host feeds them to its notifications mount.
24
+ */
25
+
26
+ interface CertificateExpiringPayload {
27
+ readonly ownerId: string;
28
+ readonly expiresAt: string;
29
+ /** Whole days left; 0 is today, negative is expired. */
30
+ readonly daysLeft: number;
31
+ }
32
+ interface DocumentRejectedPayload {
33
+ readonly documentId: string;
34
+ readonly subjectId: string;
35
+ readonly model: FiscalDocumentModel;
36
+ readonly series: number;
37
+ readonly number: number;
38
+ /** SEFAZ's `cStat`, or the fiscal service's named code. */
39
+ readonly code: string | null;
40
+ /** SEFAZ's own reason, as the service read it. */
41
+ readonly reason: string;
42
+ }
43
+ interface DocumentNeedsAttentionPayload {
44
+ readonly documentId: string;
45
+ readonly subjectId: string;
46
+ readonly model: FiscalDocumentModel;
47
+ readonly status: FiscalDocumentStatus;
48
+ readonly numberVoid: NumberVoid | null;
49
+ readonly series: number;
50
+ readonly number: number;
51
+ readonly code: string | null;
52
+ readonly reason: string;
53
+ readonly failures: number;
54
+ }
55
+ interface ContingencyDeadlinePayload {
56
+ readonly documentId: string;
57
+ readonly subjectId: string;
58
+ readonly series: number;
59
+ readonly number: number;
60
+ /** When it was signed offline, local time with offset. */
61
+ readonly since: string;
62
+ }
63
+ interface FiscalNotificationContent {
64
+ title: string;
65
+ body: string;
66
+ link?: string;
67
+ data?: Readonly<Record<string, unknown>>;
68
+ }
69
+ interface FiscalNotificationContext {
70
+ readonly locale?: string | null;
71
+ }
72
+ /** The host's words for each event, per recipient. */
73
+ interface FiscalNotificationCopy {
74
+ certificateExpiring(payload: CertificateExpiringPayload, context?: FiscalNotificationContext): FiscalNotificationContent;
75
+ documentRejected(payload: DocumentRejectedPayload, context?: FiscalNotificationContext): FiscalNotificationContent;
76
+ documentNeedsAttention(payload: DocumentNeedsAttentionPayload, context?: FiscalNotificationContext): FiscalNotificationContent;
77
+ contingencyDeadline(payload: ContingencyDeadlinePayload, context?: FiscalNotificationContext): FiscalNotificationContent;
78
+ }
79
+ interface FiscalNotificationBlueprint<TPayload> {
80
+ type: string;
81
+ category: string;
82
+ generate(payload: TPayload, context?: FiscalNotificationContext): FiscalNotificationContent;
83
+ }
84
+ /** The suggested preference category; the host's taxonomy decides. */
85
+ declare const FISCAL_NOTIFICATION_CATEGORY = "fiscal";
86
+ declare function createFiscalNotificationBlueprints(copy: FiscalNotificationCopy): readonly [
87
+ FiscalNotificationBlueprint<CertificateExpiringPayload>,
88
+ FiscalNotificationBlueprint<DocumentRejectedPayload>,
89
+ FiscalNotificationBlueprint<DocumentNeedsAttentionPayload>,
90
+ FiscalNotificationBlueprint<ContingencyDeadlinePayload>
91
+ ];
92
+
93
+ export { type CertificateExpiringPayload, type ContingencyDeadlinePayload, type DocumentNeedsAttentionPayload, type DocumentRejectedPayload, FISCAL_NOTIFICATION_CATEGORY, type FiscalNotificationBlueprint, type FiscalNotificationContent, type FiscalNotificationContext, type FiscalNotificationCopy, createFiscalNotificationBlueprints };
@@ -0,0 +1,41 @@
1
+ import {
2
+ FISCAL_CERTIFICATE_EXPIRING,
3
+ FISCAL_CONTINGENCY_DEADLINE,
4
+ FISCAL_DOCUMENT_NEEDS_ATTENTION,
5
+ FISCAL_DOCUMENT_REJECTED
6
+ } from "./chunk-27B4HNO6.js";
7
+ import "./chunk-XQGW5HUG.js";
8
+ import "./chunk-3SDXLSG4.js";
9
+ import "./chunk-X6MRDUYH.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-7QVYU63E.js";
13
+
14
+ // src/notifications.ts
15
+ var FISCAL_NOTIFICATION_CATEGORY = "fiscal";
16
+ var COPY_KEYS = ["certificateExpiring", "documentRejected", "documentNeedsAttention", "contingencyDeadline"];
17
+ function createFiscalNotificationBlueprints(copy) {
18
+ const missing = COPY_KEYS.filter((key) => typeof copy?.[key] !== "function");
19
+ if (missing.length > 0) throw new TypeError(`createFiscalNotificationBlueprints needs ${missing.join(", ")}.`);
20
+ const blueprint = /* @__PURE__ */ __name((type, render) => ({
21
+ type,
22
+ category: FISCAL_NOTIFICATION_CATEGORY,
23
+ generate: /* @__PURE__ */ __name((payload, context) => render(payload, context), "generate")
24
+ }), "blueprint");
25
+ return [
26
+ blueprint(FISCAL_CERTIFICATE_EXPIRING, copy.certificateExpiring),
27
+ blueprint(FISCAL_DOCUMENT_REJECTED, copy.documentRejected),
28
+ blueprint(FISCAL_DOCUMENT_NEEDS_ATTENTION, copy.documentNeedsAttention),
29
+ blueprint(FISCAL_CONTINGENCY_DEADLINE, copy.contingencyDeadline)
30
+ ];
31
+ }
32
+ __name(createFiscalNotificationBlueprints, "createFiscalNotificationBlueprints");
33
+ export {
34
+ FISCAL_CERTIFICATE_EXPIRING,
35
+ FISCAL_CONTINGENCY_DEADLINE,
36
+ FISCAL_DOCUMENT_NEEDS_ATTENTION,
37
+ FISCAL_DOCUMENT_REJECTED,
38
+ FISCAL_NOTIFICATION_CATEGORY,
39
+ createFiscalNotificationBlueprints
40
+ };
41
+ //# sourceMappingURL=notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/notifications.ts"],"sourcesContent":["/**\n * `@12-apps/fiscal/notifications` — what the package tells people about,\n * as notification blueprints over the HOST's words (the estate's sanctioned\n * shape for a package alert: a factory over copy, never pre-worded here).\n *\n * - `fiscal.certificate-expiring`, emitted by the `certificate-expiry` job to\n * holders of `fiscal:manage`;\n * - `fiscal.document-rejected`, emitted by the document service to holders of\n * `fiscal:issue` when SEFAZ (or the fiscal service) refuses a document;\n * - `fiscal.document-needs-attention`, to holders of `fiscal:issue` when a\n * document stops being retried: a settlement SEFAZ refused (241, 256, 501, a\n * certificate refused) or too many failures in a row;\n * - `fiscal.contingency-deadline`, to holders of `fiscal:issue` when an NFC-e\n * is still offline 20 hours after it was signed (the deadline is 24).\n *\n * Each blueprint is a structural twin of the wiring contract's\n * `WireNotificationBlueprint`; the host feeds them to its notifications mount.\n */\n\nimport {\n FISCAL_CERTIFICATE_EXPIRING,\n FISCAL_CONTINGENCY_DEADLINE,\n FISCAL_DOCUMENT_NEEDS_ATTENTION,\n FISCAL_DOCUMENT_REJECTED,\n} from \"./documents/context\";\nimport type { FiscalDocumentModel, FiscalDocumentStatus, NumberVoid } from \"./documents/types\";\n\nexport { FISCAL_CERTIFICATE_EXPIRING, FISCAL_CONTINGENCY_DEADLINE, FISCAL_DOCUMENT_NEEDS_ATTENTION, FISCAL_DOCUMENT_REJECTED };\n\nexport interface CertificateExpiringPayload {\n readonly ownerId: string;\n readonly expiresAt: string;\n /** Whole days left; 0 is today, negative is expired. */\n readonly daysLeft: number;\n}\n\nexport interface DocumentRejectedPayload {\n readonly documentId: string;\n readonly subjectId: string;\n readonly model: FiscalDocumentModel;\n readonly series: number;\n readonly number: number;\n /** SEFAZ's `cStat`, or the fiscal service's named code. */\n readonly code: string | null;\n /** SEFAZ's own reason, as the service read it. */\n readonly reason: string;\n}\n\nexport interface DocumentNeedsAttentionPayload {\n readonly documentId: string;\n readonly subjectId: string;\n readonly model: FiscalDocumentModel;\n readonly status: FiscalDocumentStatus;\n readonly numberVoid: NumberVoid | null;\n readonly series: number;\n readonly number: number;\n readonly code: string | null;\n readonly reason: string;\n readonly failures: number;\n}\n\nexport interface ContingencyDeadlinePayload {\n readonly documentId: string;\n readonly subjectId: string;\n readonly series: number;\n readonly number: number;\n /** When it was signed offline, local time with offset. */\n readonly since: string;\n}\n\nexport interface FiscalNotificationContent {\n title: string;\n body: string;\n link?: string;\n data?: Readonly<Record<string, unknown>>;\n}\n\nexport interface FiscalNotificationContext {\n readonly locale?: string | null;\n}\n\n/** The host's words for each event, per recipient. */\nexport interface FiscalNotificationCopy {\n certificateExpiring(payload: CertificateExpiringPayload, context?: FiscalNotificationContext): FiscalNotificationContent;\n documentRejected(payload: DocumentRejectedPayload, context?: FiscalNotificationContext): FiscalNotificationContent;\n documentNeedsAttention(payload: DocumentNeedsAttentionPayload, context?: FiscalNotificationContext): FiscalNotificationContent;\n contingencyDeadline(payload: ContingencyDeadlinePayload, context?: FiscalNotificationContext): FiscalNotificationContent;\n}\n\nexport interface FiscalNotificationBlueprint<TPayload> {\n type: string;\n category: string;\n generate(payload: TPayload, context?: FiscalNotificationContext): FiscalNotificationContent;\n}\n\n/** The suggested preference category; the host's taxonomy decides. */\nexport const FISCAL_NOTIFICATION_CATEGORY = \"fiscal\";\n\nconst COPY_KEYS = [\"certificateExpiring\", \"documentRejected\", \"documentNeedsAttention\", \"contingencyDeadline\"] as const;\n\nexport function createFiscalNotificationBlueprints(copy: FiscalNotificationCopy): readonly [\n FiscalNotificationBlueprint<CertificateExpiringPayload>,\n FiscalNotificationBlueprint<DocumentRejectedPayload>,\n FiscalNotificationBlueprint<DocumentNeedsAttentionPayload>,\n FiscalNotificationBlueprint<ContingencyDeadlinePayload>,\n] {\n const missing = COPY_KEYS.filter((key) => typeof copy?.[key] !== \"function\");\n if (missing.length > 0) throw new TypeError(`createFiscalNotificationBlueprints needs ${missing.join(\", \")}.`);\n const blueprint = <T>(type: string, render: (payload: T, context?: FiscalNotificationContext) => FiscalNotificationContent) => ({\n type,\n category: FISCAL_NOTIFICATION_CATEGORY,\n generate: (payload: T, context?: FiscalNotificationContext) => render(payload, context),\n });\n return [\n blueprint(FISCAL_CERTIFICATE_EXPIRING, copy.certificateExpiring),\n blueprint(FISCAL_DOCUMENT_REJECTED, copy.documentRejected),\n blueprint(FISCAL_DOCUMENT_NEEDS_ATTENTION, copy.documentNeedsAttention),\n blueprint(FISCAL_CONTINGENCY_DEADLINE, copy.contingencyDeadline),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;AAgGO,IAAM,+BAA+B;AAE5C,IAAM,YAAY,CAAC,uBAAuB,oBAAoB,0BAA0B,qBAAqB;AAEtG,SAAS,mCAAmC,MAKjD;AACA,QAAM,UAAU,UAAU,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,MAAM,UAAU;AAC3E,MAAI,QAAQ,SAAS,EAAG,OAAM,IAAI,UAAU,4CAA4C,QAAQ,KAAK,IAAI,CAAC,GAAG;AAC7G,QAAM,YAAY,wBAAI,MAAc,YAA4F;AAAA,IAC9H;AAAA,IACA,UAAU;AAAA,IACV,UAAU,wBAAC,SAAY,YAAwC,OAAO,SAAS,OAAO,GAA5E;AAAA,EACZ,IAJkB;AAKlB,SAAO;AAAA,IACL,UAAU,6BAA6B,KAAK,mBAAmB;AAAA,IAC/D,UAAU,0BAA0B,KAAK,gBAAgB;AAAA,IACzD,UAAU,iCAAiC,KAAK,sBAAsB;AAAA,IACtE,UAAU,6BAA6B,KAAK,mBAAmB;AAAA,EACjE;AACF;AAnBgB;","names":[]}
@@ -0,0 +1,238 @@
1
+ import { SaleForDocument } from './sale/index.js';
2
+ import { SefazEnvironment, SidecarErrorClass, SigningCertificate, Csc, SidecarErrorBody, IssuedDocument, ContingencyEntry, ContingencySignedDocument, CancelledDocument, LookedUpDocument, InutilizedRange, SidecarHealth } from './sidecar/index.js';
3
+
4
+ /**
5
+ * The fiscal document record and its event log — the shape the package's
6
+ * Prisma partial stores (`prisma/fiscal.prisma`, `FiscalDocument` and
7
+ * `FiscalDocumentEvent`) and the state machine (`./machine`) transitions.
8
+ *
9
+ * A document is ONE number: one issuing point, one series, one `nNF`. A sale
10
+ * that goes offline is a second document on the issuing point's contingency
11
+ * series, and the first one is `REPLACED` (see `./machine`). The record is
12
+ * keyed by an opaque `subjectId`: what the subject is (an order, a payment,
13
+ * several orders) is the host's to know, never this package's.
14
+ */
15
+
16
+ /** The document model: NF-e (55) or NFC-e (65). NFS-e is not a model of this package yet (FUT-2242). */
17
+ type FiscalDocumentModel = "NFE" | "NFCE";
18
+ declare const FISCAL_DOCUMENT_MODELS: readonly FiscalDocumentModel[];
19
+ /**
20
+ * - `PENDING`: numbered and stored, not yet handed to the issuer.
21
+ * - `SUBMITTED`: handed to the issuer; no final answer yet (a retry is owed).
22
+ * - `AUTHORIZED`: SEFAZ authorised it. The only state a cancel leaves.
23
+ * - `REJECTED`: refused (SEFAZ's `cStat`, or a request the service refuses as
24
+ * malformed). Final; its number was not spent at SEFAZ and is inutilized.
25
+ * - `DENIED`: a denial of use. Final; the number IS spent.
26
+ * - `CONTINGENCY`: signed offline (`tpEmis = 9`), owed a transmission.
27
+ * - `CANCELLED`: an authorised document cancelled at SEFAZ.
28
+ * - `REPLACED`: its sale moved to another document (the contingency one);
29
+ * its number is settled apart (`numberVoid`).
30
+ */
31
+ type FiscalDocumentStatus = "PENDING" | "SUBMITTED" | "AUTHORIZED" | "REJECTED" | "DENIED" | "CONTINGENCY" | "CANCELLED" | "REPLACED";
32
+ declare const FISCAL_DOCUMENT_STATUSES: readonly FiscalDocumentStatus[];
33
+ /** Which of the issuing point's series the number came from. */
34
+ type SeriesKind = "ONLINE" | "CONTINGENCY";
35
+ /**
36
+ * What is still owed on a number SEFAZ never used, so the sequence has no
37
+ * unexplained gap:
38
+ *
39
+ * - `null`: nothing — the number is a document (authorised, denied, owed a
40
+ * transmission) or still in flight.
41
+ * - `LOOKUP_FIRST`: a request went out with no answer before the sale moved
42
+ * to contingency; look the key up before deciding.
43
+ * - `INUTILIZE`: never used at SEFAZ; inutilize it.
44
+ * - `CANCEL`: the lookup found it authorised after all; cancel it.
45
+ * - `INUTILIZED` / `CANCELLED`: settled.
46
+ * - `DENIED`: settled — the lookup found the number denied, which spends it.
47
+ */
48
+ type NumberVoid = "LOOKUP_FIRST" | "INUTILIZE" | "CANCEL" | "INUTILIZED" | "CANCELLED" | "DENIED";
49
+ /** The `numberVoid` values that still owe the sweep a call. */
50
+ declare const OWED_VOIDS: readonly NumberVoid[];
51
+ /** The order figures a document carries, in integer cents. */
52
+ interface DocumentTotals {
53
+ /** What the buyer pays: Σ line values − Σ discounts. */
54
+ readonly totalCents: number;
55
+ readonly discountCents: number;
56
+ readonly cbsCents: number;
57
+ readonly ibsUfCents: number;
58
+ readonly ibsMunCents: number;
59
+ }
60
+ /**
61
+ * Whether the document is the one its subject stands on. At most one live
62
+ * document per (owner, subject, model): a REPLACED one is not, nor an online
63
+ * one SEFAZ rejected (its number is voided and the sale is issued again) —
64
+ * unless a lookup had found it authorised (its protocol is kept). A
65
+ * REJECTED contingency NFC-e stays live: the buyer holds its DANFE, and the
66
+ * store corrects and resends it under the same number.
67
+ */
68
+ declare function isLive(document: Pick<FiscalDocument, "status" | "seriesKind" | "protocol">): boolean;
69
+ /** One fiscal document. */
70
+ interface FiscalDocument {
71
+ readonly id: string;
72
+ /** The emitter profile's owner: an opaque id the host maps (a store, a company). */
73
+ readonly ownerId: string;
74
+ /** The issuer's CNPJ: SEFAZ numbers by CNPJ, model and series, so the counters do too. */
75
+ readonly issuerCnpj: string;
76
+ /** What the document is FOR, opaque: the host links it to its orders. */
77
+ readonly subjectId: string;
78
+ readonly issuingPointId: string;
79
+ readonly model: FiscalDocumentModel;
80
+ readonly environment: SefazEnvironment;
81
+ readonly seriesKind: SeriesKind;
82
+ readonly series: number;
83
+ readonly number: number;
84
+ /** `cNF`, drawn once: a retried call yields the same key. */
85
+ readonly keyCode: string;
86
+ readonly status: FiscalDocumentStatus;
87
+ /** The sale as sent, issuer and number filled in. Never a secret. */
88
+ readonly sale: SaleForDocument;
89
+ readonly totals: DocumentTotals;
90
+ /** The buyer's CPF/CNPJ at issue time, or `null`. */
91
+ readonly buyerTaxId: string | null;
92
+ readonly accessKey: string | null;
93
+ /** The authorisation (or denial) protocol. */
94
+ readonly protocol: string | null;
95
+ /** The last SEFAZ `cStat`, or the service's named code. */
96
+ readonly statusCode: string | null;
97
+ readonly statusReason: string | null;
98
+ /** The class of the last failed call, or `null`. */
99
+ readonly lastErrorClass: SidecarErrorClass | null;
100
+ /** A request went out and neither it nor its lookup was answered. */
101
+ readonly outcomeUnknown: boolean;
102
+ /** `dhEmi`. */
103
+ readonly issuedAt: string;
104
+ readonly authorizedAt: string | null;
105
+ readonly contingency: {
106
+ readonly since: string;
107
+ readonly reason: string;
108
+ } | null;
109
+ readonly cancelledAt: string | null;
110
+ readonly cancelReason: string | null;
111
+ readonly cancelProtocol: string | null;
112
+ /** The document this one's sale moved to. */
113
+ readonly replacedById: string | null;
114
+ readonly numberVoid: NumberVoid | null;
115
+ /** Storage keys: the signed or authorised XML, and the cancel or inutilization event's XML. */
116
+ readonly xmlKey: string | null;
117
+ readonly eventXmlKey: string | null;
118
+ /** Calls made to the issuer for this document. */
119
+ readonly attempts: number;
120
+ /** Failed steps in a row (a retry, a deferred settlement); any progress resets it. */
121
+ readonly failures: number;
122
+ /** When the sweep (or the contingency transmission) may take it again; `null` when nothing is owed. */
123
+ readonly nextAttemptAt: string | null;
124
+ /**
125
+ * A person must look: a settlement SEFAZ refused, or too many failures in a
126
+ * row. The sweep leaves it alone until someone releases it.
127
+ */
128
+ readonly attention: boolean;
129
+ /** When the 24-hour contingency deadline warning went out. */
130
+ readonly deadlineWarnedAt: string | null;
131
+ readonly createdAt: string;
132
+ readonly updatedAt: string;
133
+ }
134
+ /** What the state machine was fed: the kind of the input that made the event. */
135
+ type DocumentEventKind = "SUBMIT" | "AUTHORIZE" | "DENY" | "REJECT" | "RETRY" | "SIGN_OFFLINE" | "REPLACE" | "CANCEL" | "LOOKUP" | "INUTILIZE" | "DEFER" | "RESIGN" | "RELEASE" | "WARN";
136
+ /**
137
+ * One transition, as stored. `answer` is what the fiscal service answered,
138
+ * verbatim but for any secret-named key (`scrubSecrets`), so the record is the
139
+ * evidence of what SEFAZ said, the `MarketplaceInboxEvent.payload` habit.
140
+ */
141
+ interface FiscalDocumentEvent {
142
+ readonly documentId: string;
143
+ readonly kind: DocumentEventKind;
144
+ readonly fromStatus: FiscalDocumentStatus;
145
+ readonly toStatus: FiscalDocumentStatus;
146
+ readonly at: string;
147
+ readonly errorClass: SidecarErrorClass | null;
148
+ readonly code: string | null;
149
+ readonly answer: unknown;
150
+ }
151
+
152
+ /**
153
+ * The Issuer port: what the document service asks of whoever talks to SEFAZ.
154
+ * The first (and today only) adapter is the fiscal service in this package's
155
+ * `sidecar/` folder (`./sidecar`). A call never throws for a failure the
156
+ * service classified: it answers `{ ok: false, error }` with the service's
157
+ * class (`REJECTED`, `RETRYABLE`, `CONTINGENCY`, `AUTH`, `INVALID`,
158
+ * `INTERNAL`), and the document service maps that onto the state machine.
159
+ *
160
+ * The certificate and the CSC travel with each call (the service is
161
+ * stateless) inside {@link SigningMaterial}, built by the signing identity
162
+ * for this one call and dropped with it.
163
+ */
164
+
165
+ /** What signs one call: the A1 and, for an NFC-e, the CSC. Never stored, never logged. */
166
+ interface SigningMaterial {
167
+ readonly certificate: SigningCertificate;
168
+ readonly csc: Csc | null;
169
+ }
170
+ /** A failed call, classified. The service's error body, verbatim. */
171
+ type IssuerFailure = SidecarErrorBody["error"];
172
+ type IssuerOutcome<T> = {
173
+ readonly ok: true;
174
+ readonly answer: T;
175
+ } | {
176
+ readonly ok: false;
177
+ readonly error: IssuerFailure;
178
+ };
179
+ interface Call {
180
+ readonly environment: SefazEnvironment;
181
+ readonly signing: SigningMaterial;
182
+ }
183
+ interface IssueCall extends Call {
184
+ readonly model: FiscalDocumentModel;
185
+ readonly document: SaleForDocument;
186
+ }
187
+ interface SignContingencyCall extends Call {
188
+ readonly document: SaleForDocument;
189
+ readonly contingency: ContingencyEntry;
190
+ }
191
+ interface TransmitCall extends Call {
192
+ readonly model: FiscalDocumentModel;
193
+ readonly signedXml: string;
194
+ }
195
+ interface CancelCall extends Call {
196
+ readonly model: FiscalDocumentModel;
197
+ readonly accessKey: string;
198
+ readonly protocol: string;
199
+ readonly reason: string;
200
+ }
201
+ /** NFC-e only: cancel an online document whose sale was issued again in contingency (event 110112). */
202
+ interface CancelBySubstitutionCall extends Call {
203
+ readonly accessKey: string;
204
+ readonly protocol: string;
205
+ readonly reason: string;
206
+ readonly substituteAccessKey: string;
207
+ }
208
+ interface LookupCall extends Call {
209
+ readonly model: FiscalDocumentModel;
210
+ readonly accessKey: string;
211
+ }
212
+ interface InutilizeCall extends Call {
213
+ readonly model: FiscalDocumentModel;
214
+ readonly uf: string;
215
+ readonly cnpj: string;
216
+ readonly year: number;
217
+ readonly series: number;
218
+ readonly from: number;
219
+ readonly to: number;
220
+ readonly reason: string;
221
+ }
222
+ interface Issuer {
223
+ /** Build, sign and transmit. `AUTHORIZED` or `DENIED`. */
224
+ issue(call: IssueCall): Promise<IssuerOutcome<IssuedDocument>>;
225
+ /** NFC-e only: build and sign offline (`tpEmis = 9`); nothing is sent. */
226
+ signContingency(call: SignContingencyCall): Promise<IssuerOutcome<ContingencySignedDocument>>;
227
+ /** Send an already signed XML (a contingency document). */
228
+ transmit(call: TransmitCall): Promise<IssuerOutcome<IssuedDocument>>;
229
+ cancel(call: CancelCall): Promise<IssuerOutcome<CancelledDocument>>;
230
+ cancelBySubstitution(call: CancelBySubstitutionCall): Promise<IssuerOutcome<CancelledDocument>>;
231
+ lookup(call: LookupCall): Promise<IssuerOutcome<LookedUpDocument>>;
232
+ inutilize(call: InutilizeCall): Promise<IssuerOutcome<InutilizedRange>>;
233
+ health(): Promise<SidecarHealth>;
234
+ }
235
+ /** The path segment of a model on the service's routes. */
236
+ declare function modelPath(model: FiscalDocumentModel): "nfe" | "nfce";
237
+
238
+ export { type CancelBySubstitutionCall as C, type DocumentEventKind as D, type FiscalDocumentModel as F, type Issuer as I, type LookupCall as L, type NumberVoid as N, OWED_VOIDS as O, type SignContingencyCall as S, type TransmitCall as T, type CancelCall as a, type InutilizeCall as b, type IssueCall as c, type IssuerFailure as d, type IssuerOutcome as e, type SigningMaterial as f, type FiscalDocumentStatus as g, type FiscalDocument as h, type FiscalDocumentEvent as i, type SeriesKind as j, type DocumentTotals as k, FISCAL_DOCUMENT_MODELS as l, modelPath as m, FISCAL_DOCUMENT_STATUSES as n, isLive as o };
@@ -0,0 +1,243 @@
1
+ /**
2
+ * The neutral document shape: one sale, host-agnostic, as the fiscal service
3
+ * (`sidecar/`) accepts it and as the issuer port maps a host's sale into it.
4
+ *
5
+ * Money is integer CENTS, rates integer BASIS POINTS (1 bp = 0.01%) — the
6
+ * engine's conventions (`@12-apps/fiscal/engine`) — and quantities carry at
7
+ * most four decimals. Every field is required; an absent value is `null`,
8
+ * never a missing key, so a host cannot forget one silently.
9
+ *
10
+ * The JSON schema the service validates against is
11
+ * `@12-apps/fiscal/sidecar/schema/sale-for-document.schema.json`; a test keeps
12
+ * it and these types in step. Whether the sale becomes an NF-e (model 55) or
13
+ * an NFC-e (model 65) is the request path's choice, never this document's.
14
+ */
15
+ /** The 27 federative units. */
16
+ type Uf = "AC" | "AL" | "AM" | "AP" | "BA" | "CE" | "DF" | "ES" | "GO" | "MA" | "MG" | "MS" | "MT" | "PA" | "PB" | "PE" | "PI" | "PR" | "RJ" | "RN" | "RO" | "RR" | "RS" | "SC" | "SE" | "SP" | "TO";
17
+ /** A postal address. `postalCode` is required on the issuer's. */
18
+ interface Address {
19
+ readonly street: string;
20
+ readonly number: string;
21
+ readonly complement: string | null;
22
+ readonly district: string;
23
+ /** The 7-digit IBGE municipality code. */
24
+ readonly municipalityIbge: string;
25
+ readonly municipalityName: string;
26
+ readonly uf: Uf;
27
+ /** CEP, 8 digits. */
28
+ readonly postalCode: string | null;
29
+ readonly phone: string | null;
30
+ }
31
+ /** The issuer's tax regime on the document (`CRT` 1, 2, 3, 4). */
32
+ type IssuerTaxRegime = "SIMPLES" | "SIMPLES_EXCESS" | "NORMAL" | "MEI";
33
+ interface DocumentIssuer {
34
+ /** 14 characters; the 2026 alphanumeric CNPJ is accepted. */
35
+ readonly cnpj: string;
36
+ /** IE digits, or `ISENTO`. */
37
+ readonly stateRegistration: string;
38
+ readonly legalName: string;
39
+ readonly tradeName: string | null;
40
+ readonly taxRegime: IssuerTaxRegime;
41
+ readonly address: Address & {
42
+ readonly postalCode: string;
43
+ };
44
+ }
45
+ type BuyerDocument = {
46
+ readonly kind: "CPF";
47
+ readonly number: string;
48
+ } | {
49
+ readonly kind: "CNPJ";
50
+ readonly number: string;
51
+ } | {
52
+ readonly kind: "FOREIGN";
53
+ readonly number: string;
54
+ };
55
+ /** `indIEDest` 1, 2, 9. */
56
+ type StateRegistrationStatus = "CONTRIBUTOR" | "EXEMPT" | "NON_CONTRIBUTOR";
57
+ interface DocumentBuyer {
58
+ readonly document: BuyerDocument;
59
+ readonly name: string | null;
60
+ readonly stateRegistrationStatus: StateRegistrationStatus;
61
+ readonly stateRegistration: string | null;
62
+ readonly email: string | null;
63
+ readonly address: Address | null;
64
+ }
65
+ /** The goods' origin (`orig`), 0–8. */
66
+ type GoodsOrigin = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
67
+ /** ICMS of a Simples Nacional issuer, without a credit. */
68
+ interface IcmsSimples {
69
+ readonly regime: "SIMPLES";
70
+ readonly origin: GoodsOrigin;
71
+ readonly csosn: "102" | "103" | "300" | "400" | "500";
72
+ }
73
+ /** ICMS of a Simples Nacional issuer that grants the buyer a credit (CSOSN 101). */
74
+ interface IcmsSimplesWithCredit {
75
+ readonly regime: "SIMPLES";
76
+ readonly origin: GoodsOrigin;
77
+ readonly csosn: "101";
78
+ readonly creditRateBp: number;
79
+ readonly creditCents: number;
80
+ }
81
+ /** ICMS fully taxed (CST 00). */
82
+ interface IcmsTaxed {
83
+ readonly regime: "NORMAL";
84
+ readonly origin: GoodsOrigin;
85
+ readonly cst: "00";
86
+ readonly baseCents: number;
87
+ readonly rateBp: number;
88
+ readonly amountCents: number;
89
+ }
90
+ /** ICMS exempt, not taxed, suspended (40, 41, 50) or collected before by substitution (60). */
91
+ interface IcmsUntaxed {
92
+ readonly regime: "NORMAL";
93
+ readonly origin: GoodsOrigin;
94
+ readonly cst: "40" | "41" | "50" | "60";
95
+ }
96
+ type LineIcms = IcmsSimples | IcmsSimplesWithCredit | IcmsTaxed | IcmsUntaxed;
97
+ /** The PIS and COFINS situation codes the layout accepts on an outgoing document. */
98
+ type ContributionCst = "01" | "02" | "04" | "05" | "06" | "07" | "08" | "09" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "70" | "71" | "72" | "73" | "74" | "75" | "98" | "99";
99
+ /**
100
+ * PIS or COFINS. CST 01/02 write the base, the rate and the amount; 04–09
101
+ * write none (send zeros); 49–99 write all three.
102
+ */
103
+ interface LineContribution {
104
+ readonly cst: ContributionCst;
105
+ readonly baseCents: number;
106
+ readonly rateBp: number;
107
+ readonly amountCents: number;
108
+ }
109
+ /**
110
+ * The IBS/CBS figures of one line — what the engine's `LineTax` carries:
111
+ * `vBC` and, per tax, the NOMINAL rate and the amount. `reductionBp` applies
112
+ * to all three rates (`pRedAliq`; the effective rate is written beside it).
113
+ */
114
+ interface IbsCbsFigures {
115
+ readonly baseCents: number;
116
+ readonly reductionBp: number;
117
+ readonly cbsRateBp: number;
118
+ readonly cbsCents: number;
119
+ readonly ibsUfRateBp: number;
120
+ readonly ibsUfCents: number;
121
+ readonly ibsMunRateBp: number;
122
+ readonly ibsMunCents: number;
123
+ }
124
+ /** The IBS/CBS group of a line. `figures: null` writes the CST and class only (immunity, say). */
125
+ interface LineIbsCbs {
126
+ /** `CST` of the IBS/CBS, 3 digits. */
127
+ readonly cst: string;
128
+ /** `cClassTrib`, 6 digits. */
129
+ readonly classCode: string;
130
+ readonly figures: IbsCbsFigures | null;
131
+ }
132
+ /** One item of the document. */
133
+ interface SaleLine {
134
+ /** The host's id; quoted back in a mapping error. */
135
+ readonly id: string;
136
+ /** `cProd`. */
137
+ readonly code: string;
138
+ /** GTIN/EAN, or `null` for "SEM GTIN". */
139
+ readonly gtin: string | null;
140
+ readonly description: string;
141
+ readonly ncm: string;
142
+ readonly cest: string | null;
143
+ readonly cfop: string;
144
+ /** `uCom` and `uTrib`. */
145
+ readonly unit: string;
146
+ /** `qCom` and `qTrib`: positive, at most four decimals. */
147
+ readonly quantity: number;
148
+ /** `vProd`: every unit, BEFORE the line's discount. The unit value is derived. */
149
+ readonly valueCents: number;
150
+ /** `vDesc`. */
151
+ readonly discountCents: number;
152
+ /** `vTotTrib` (the approximate tax of the transparency law), or `null`. */
153
+ readonly approximateTaxCents: number | null;
154
+ /** `infAdProd`. */
155
+ readonly additionalInfo: string | null;
156
+ readonly icms: LineIcms;
157
+ readonly pis: LineContribution;
158
+ readonly cofins: LineContribution;
159
+ /** `null` writes no IBS/CBS group — a regime the engine answered `NONE` for. */
160
+ readonly ibsCbs: LineIbsCbs | null;
161
+ }
162
+ /** `tPag`. */
163
+ type PaymentMethod = "CASH" | "CHECK" | "CREDIT_CARD" | "DEBIT_CARD" | "STORE_CREDIT" | "FOOD_VOUCHER" | "MEAL_VOUCHER" | "GIFT_VOUCHER" | "FUEL_VOUCHER" | "BANK_SLIP" | "BANK_DEPOSIT" | "PIX_DYNAMIC" | "TRANSFER" | "LOYALTY" | "PIX_STATIC" | "NO_PAYMENT" | "OTHER";
164
+ interface CardDetails {
165
+ /** `tpIntegra`: whether the payment went through an integrated terminal. */
166
+ readonly integrated: boolean;
167
+ readonly acquirerCnpj: string | null;
168
+ /** `tBand`, 2 digits. */
169
+ readonly brand: string | null;
170
+ /** `cAut`. */
171
+ readonly authorizationCode: string | null;
172
+ }
173
+ interface SalePayment {
174
+ readonly method: PaymentMethod;
175
+ readonly amountCents: number;
176
+ /** Required by the layout for a card and for a Pix; `null` otherwise. */
177
+ readonly card: CardDetails | null;
178
+ /** `xPag`: required when `method` is `OTHER`. */
179
+ readonly description: string | null;
180
+ }
181
+ /** `finNFe` 1–4. */
182
+ type DocumentPurpose = "NORMAL" | "COMPLEMENTARY" | "ADJUSTMENT" | "RETURN";
183
+ /** `idDest` 1–3. */
184
+ type OperationDestination = "INTERNAL" | "INTERSTATE" | "FOREIGN";
185
+ /** `indPres` 1, 2, 3, 4, 5, 9. */
186
+ type BuyerPresence = "IN_PERSON" | "INTERNET" | "TELEPHONE" | "HOME_DELIVERY" | "IN_PERSON_OFF_PREMISES" | "OTHER";
187
+ /** `modFrete` 0, 1, 2, 3, 4, 9. */
188
+ type FreightMode = "BY_ISSUER" | "BY_RECIPIENT" | "BY_THIRD_PARTY" | "OWN_BY_ISSUER" | "OWN_BY_RECIPIENT" | "NONE";
189
+ /** `infIntermed`: the third-party platform the sale went through. */
190
+ interface SaleIntermediary {
191
+ readonly cnpj: string;
192
+ /** `idCadIntTran`: the seller's id on that platform. */
193
+ readonly userId: string;
194
+ }
195
+ /** `infRespTec`: the software house responsible for the issuing system. */
196
+ interface TechnicalResponsible {
197
+ readonly cnpj: string;
198
+ readonly contactName: string;
199
+ readonly email: string;
200
+ readonly phone: string;
201
+ }
202
+ /** One sale, ready to become an NF-e or an NFC-e. */
203
+ interface SaleForDocument {
204
+ readonly version: 1;
205
+ /** `serie`, 0–999. */
206
+ readonly series: number;
207
+ /** `nNF`, 1–999999999. The package's counter owns it. */
208
+ readonly number: number;
209
+ /**
210
+ * `cNF`: the 8-digit code inside the access key. The caller draws it ONCE and
211
+ * keeps it with the document, so a retried call yields the same key.
212
+ */
213
+ readonly keyCode: string;
214
+ /** `dhEmi`: ISO 8601 with the UTC offset, `2026-11-20T12:30:00-03:00`. */
215
+ readonly issuedAt: string;
216
+ /** `natOp`. */
217
+ readonly operationNature: string;
218
+ readonly purpose: DocumentPurpose;
219
+ readonly destination: OperationDestination;
220
+ readonly presence: BuyerPresence;
221
+ /** `indFinal`. */
222
+ readonly finalConsumer: boolean;
223
+ readonly intermediary: SaleIntermediary | null;
224
+ readonly issuer: DocumentIssuer;
225
+ /** `null` on an NFC-e with no identified buyer. */
226
+ readonly buyer: DocumentBuyer | null;
227
+ /** 1–990 items. */
228
+ readonly lines: readonly SaleLine[];
229
+ readonly freight: FreightMode;
230
+ /** 1–100 payments. */
231
+ readonly payments: readonly SalePayment[];
232
+ /** `vTroco`. */
233
+ readonly changeCents: number;
234
+ readonly additionalInfo: {
235
+ /** `infCpl`. */
236
+ readonly forTaxpayer: string | null;
237
+ /** `infAdFisco`. */
238
+ readonly forTaxAuthority: string | null;
239
+ };
240
+ readonly technicalResponsible: TechnicalResponsible | null;
241
+ }
242
+
243
+ export type { Address, BuyerDocument, BuyerPresence, CardDetails, ContributionCst, DocumentBuyer, DocumentIssuer, DocumentPurpose, FreightMode, GoodsOrigin, IbsCbsFigures, IcmsSimples, IcmsSimplesWithCredit, IcmsTaxed, IcmsUntaxed, IssuerTaxRegime, LineContribution, LineIbsCbs, LineIcms, OperationDestination, PaymentMethod, SaleForDocument, SaleIntermediary, SaleLine, SalePayment, StateRegistrationStatus, TechnicalResponsible, Uf };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}