@stackin-io/stackin-node-sdk 0.9.0 → 0.11.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.
- package/README.md +30 -3
- package/dist/br/index.d.ts +1 -1
- package/dist/br/index.d.ts.map +1 -1
- package/dist/br/product.d.ts +14 -2
- package/dist/br/product.d.ts.map +1 -1
- package/dist/br/product.js +17 -2
- package/dist/br/product.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,33 @@ Node/TypeScript SDK for fiscal document issuance — a handful of business field
|
|
|
20
20
|
|
|
21
21
|
**One class, `Invoice`** — `issue()`/`consult()`/`cancel()`/`reissue()`/`correct()`/`invalidate()`/`pdf()`/`received()`/`manifest()`, nothing else to instantiate. Each line item is a `br.Product` — `description`/`amount` are universal, everything else (`ncm`/`cfop`/`cest`/tax groups...) is Brazil-specific and only required for NFE; NFSE ignores it.
|
|
22
22
|
|
|
23
|
+
## What a line item is worth
|
|
24
|
+
|
|
25
|
+
`unitPrice` is the price of **one unit**. `amount` is the **gross total of
|
|
26
|
+
the line's products**, before discount, freight, insurance and other
|
|
27
|
+
expenses. Send either; sending both asserts that they agree.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
// More than one unit — the note's line is 2 x 120.00 = 240.00
|
|
31
|
+
new br.Product({ description: "Teclado", quantity: 2, unitPrice: 120.0, unit: "UN" });
|
|
32
|
+
|
|
33
|
+
// Legacy: amount alone still means the line's gross total
|
|
34
|
+
new br.Product({ description: "Servico", quantity: 3, amount: 150.0 });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Amounts that do not add up are refused before the authorizer sees them,
|
|
38
|
+
with a `422` naming the line and both numbers (`ITEM_TOTAL_MISMATCH`).
|
|
39
|
+
|
|
40
|
+
### Migrating
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Before: quantity: 3, amount: 150.0
|
|
44
|
+
After: quantity: 3, unitPrice: 50.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Nothing has to migrate. `amount` keeps the meaning it always had and is
|
|
48
|
+
not deprecated in this release.
|
|
49
|
+
|
|
23
50
|
## Install
|
|
24
51
|
|
|
25
52
|
```bash
|
|
@@ -44,7 +71,7 @@ const invoice = await client.issue({
|
|
|
44
71
|
documentType: DocumentType.NFSE,
|
|
45
72
|
clientName: "John Doe",
|
|
46
73
|
taxId: "00000000000",
|
|
47
|
-
items: [new br.Product({ description: "Software development",
|
|
74
|
+
items: [new br.Product({ description: "Software development", unitPrice: 5000.0 })],
|
|
48
75
|
});
|
|
49
76
|
|
|
50
77
|
const status = await client.consult("ACCESS_KEY...", {
|
|
@@ -76,7 +103,7 @@ await client.issue({
|
|
|
76
103
|
items: [
|
|
77
104
|
new br.Product({
|
|
78
105
|
description: "Test product",
|
|
79
|
-
|
|
106
|
+
unitPrice: 100.0,
|
|
80
107
|
ncm: "84713012",
|
|
81
108
|
cfop: "5102",
|
|
82
109
|
}),
|
|
@@ -113,7 +140,7 @@ const result = await invoice.issue({
|
|
|
113
140
|
documentType: DocumentType.NFSE,
|
|
114
141
|
clientName: "Maria Silva",
|
|
115
142
|
taxId: "12345678909",
|
|
116
|
-
items: [new br.Product({ description: "Consultoria",
|
|
143
|
+
items: [new br.Product({ description: "Consultoria", unitPrice: 1500.0 })],
|
|
117
144
|
idempotencyKey: key,
|
|
118
145
|
});
|
|
119
146
|
```
|
package/dist/br/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Product } from "./product";
|
|
2
|
-
export type { ProductFields, PresumedCredit } from "./product";
|
|
2
|
+
export type { IbsCbsFields, ProductFields, PresumedCredit } from "./product";
|
|
3
3
|
export { Tax, cofinsAliq, cofinsNt, cofinsOutr, cofinsQtde, cofinsSt, icms00, icms02, icms10, icms15, icms20, icms30, icms40, icms51, icms53, icms60, icms61, icms70, icms90, icmsPart, icmsSn101, icmsSn102, icmsSn201, icmsSn202, icmsSn500, icmsSn900, icmsSt, icmsUfDest, ipi, ipiNt, ipiTrib, pisAliq, pisNt, pisOutr, pisQtde, pisSt, } from "./tax";
|
|
4
4
|
export type { CofinsAliqFields, CofinsNtFields, CofinsOutrFields, CofinsQtdeFields, CofinsStFields, Icms00Fields, Icms02Fields, Icms10Fields, Icms15Fields, Icms20Fields, Icms30Fields, Icms40Fields, Icms51Fields, Icms53Fields, Icms60Fields, Icms61Fields, Icms70Fields, Icms90Fields, IcmsPartFields, IcmsSn101Fields, IcmsSn102Fields, IcmsSn201Fields, IcmsSn202Fields, IcmsSn500Fields, IcmsSn900Fields, IcmsStFields, IcmsUfDestFields, IpiFields, IpiNtFields, IpiTribFields, PisAliqFields, PisNtFields, PisOutrFields, PisQtdeFields, PisStFields, TaxFields, TaxGroup, } from "./tax";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/br/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/br/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/br/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EACL,GAAG,EACH,UAAU,EACV,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,UAAU,EACV,GAAG,EACH,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,GACN,MAAM,OAAO,CAAC;AACf,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC"}
|
package/dist/br/product.d.ts
CHANGED
|
@@ -4,9 +4,18 @@ export interface PresumedCredit {
|
|
|
4
4
|
percentage: number;
|
|
5
5
|
amount: number;
|
|
6
6
|
}
|
|
7
|
+
export interface IbsCbsFields {
|
|
8
|
+
cst: string;
|
|
9
|
+
classification: string;
|
|
10
|
+
base?: number;
|
|
11
|
+
rate_state: number;
|
|
12
|
+
rate_city: number;
|
|
13
|
+
rate_federal: number;
|
|
14
|
+
}
|
|
7
15
|
export interface ProductFields {
|
|
8
16
|
description: string;
|
|
9
|
-
amount
|
|
17
|
+
amount?: number;
|
|
18
|
+
unitPrice?: number;
|
|
10
19
|
unit?: string;
|
|
11
20
|
quantity?: number;
|
|
12
21
|
barcode?: string;
|
|
@@ -28,6 +37,7 @@ export interface ProductFields {
|
|
|
28
37
|
exTipi?: string;
|
|
29
38
|
importContentControlNumber?: string;
|
|
30
39
|
recopiNumber?: string;
|
|
40
|
+
ibsCbs?: IbsCbsFields;
|
|
31
41
|
extraGroups?: Record<string, unknown>;
|
|
32
42
|
tax?: Record<string, unknown>;
|
|
33
43
|
serviceCode?: string;
|
|
@@ -37,7 +47,8 @@ export interface ProductFields {
|
|
|
37
47
|
}
|
|
38
48
|
export declare class Product {
|
|
39
49
|
description: string;
|
|
40
|
-
amount
|
|
50
|
+
amount?: number;
|
|
51
|
+
unitPrice?: number;
|
|
41
52
|
unit: string;
|
|
42
53
|
quantity: number;
|
|
43
54
|
barcode?: string;
|
|
@@ -59,6 +70,7 @@ export declare class Product {
|
|
|
59
70
|
exTipi?: string;
|
|
60
71
|
importContentControlNumber?: string;
|
|
61
72
|
recopiNumber?: string;
|
|
73
|
+
ibsCbs?: IbsCbsFields;
|
|
62
74
|
extraGroups?: Record<string, unknown>;
|
|
63
75
|
tax?: Record<string, unknown>;
|
|
64
76
|
serviceCode?: string;
|
package/dist/br/product.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/br/product.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/br/product.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;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,CAAC,EAAE,MAAM,CAAC;gBAEV,MAAM,EAAE,aAAa;IA6CjC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAmClC"}
|
package/dist/br/product.js
CHANGED
|
@@ -14,6 +14,7 @@ const BR_KEYS = [
|
|
|
14
14
|
"importContentControlNumber",
|
|
15
15
|
"recopiNumber",
|
|
16
16
|
"extraGroups",
|
|
17
|
+
"ibsCbs",
|
|
17
18
|
"tax",
|
|
18
19
|
];
|
|
19
20
|
const CAMEL_TO_SNAKE = {
|
|
@@ -25,6 +26,7 @@ const CAMEL_TO_SNAKE = {
|
|
|
25
26
|
exTipi: "ex_tipi",
|
|
26
27
|
importContentControlNumber: "import_content_control_number",
|
|
27
28
|
recopiNumber: "recopi_number",
|
|
29
|
+
ibsCbs: "ibs_cbs",
|
|
28
30
|
extraGroups: "extra_groups",
|
|
29
31
|
otherExpenses: "other_expenses",
|
|
30
32
|
usedMovableAsset: "used_movable_asset",
|
|
@@ -46,9 +48,15 @@ const PRODUCT_LEVEL_KEYS = [
|
|
|
46
48
|
function snake(key) {
|
|
47
49
|
return CAMEL_TO_SNAKE[key] ?? key;
|
|
48
50
|
}
|
|
51
|
+
function decimalString(value) {
|
|
52
|
+
return value === undefined
|
|
53
|
+
? undefined
|
|
54
|
+
: value.toFixed(10).replace(/\.?0+$/, "");
|
|
55
|
+
}
|
|
49
56
|
class Product {
|
|
50
57
|
description;
|
|
51
58
|
amount;
|
|
59
|
+
unitPrice;
|
|
52
60
|
unit;
|
|
53
61
|
quantity;
|
|
54
62
|
barcode;
|
|
@@ -70,6 +78,7 @@ class Product {
|
|
|
70
78
|
exTipi;
|
|
71
79
|
importContentControlNumber;
|
|
72
80
|
recopiNumber;
|
|
81
|
+
ibsCbs;
|
|
73
82
|
extraGroups;
|
|
74
83
|
tax;
|
|
75
84
|
serviceCode;
|
|
@@ -80,11 +89,15 @@ class Product {
|
|
|
80
89
|
if (!fields.description || fields.description.length === 0) {
|
|
81
90
|
throw new Error("description must be a non-empty string");
|
|
82
91
|
}
|
|
83
|
-
if (!(fields.amount > 0)) {
|
|
92
|
+
if (fields.amount !== undefined && !(fields.amount > 0)) {
|
|
84
93
|
throw new Error("amount must be greater than 0");
|
|
85
94
|
}
|
|
95
|
+
if (fields.unitPrice !== undefined && !(fields.unitPrice > 0)) {
|
|
96
|
+
throw new Error("unitPrice must be greater than 0");
|
|
97
|
+
}
|
|
86
98
|
this.description = fields.description;
|
|
87
99
|
this.amount = fields.amount;
|
|
100
|
+
this.unitPrice = fields.unitPrice;
|
|
88
101
|
this.unit = fields.unit ?? "UN";
|
|
89
102
|
this.quantity = fields.quantity ?? 1.0;
|
|
90
103
|
this.barcode = fields.barcode;
|
|
@@ -106,6 +119,7 @@ class Product {
|
|
|
106
119
|
this.exTipi = fields.exTipi;
|
|
107
120
|
this.importContentControlNumber = fields.importContentControlNumber;
|
|
108
121
|
this.recopiNumber = fields.recopiNumber;
|
|
122
|
+
this.ibsCbs = fields.ibsCbs;
|
|
109
123
|
this.extraGroups = fields.extraGroups;
|
|
110
124
|
this.tax = fields.tax;
|
|
111
125
|
this.serviceCode = fields.serviceCode;
|
|
@@ -138,7 +152,8 @@ class Product {
|
|
|
138
152
|
}
|
|
139
153
|
return {
|
|
140
154
|
description: this.description,
|
|
141
|
-
amount: this.amount,
|
|
155
|
+
amount: decimalString(this.amount),
|
|
156
|
+
unit_price: decimalString(this.unitPrice),
|
|
142
157
|
product,
|
|
143
158
|
service_code: this.serviceCode,
|
|
144
159
|
discount: this.serviceDiscount,
|
package/dist/br/product.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/br/product.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/br/product.ts"],"names":[],"mappings":";;;AAoDA,MAAM,OAAO,GAA+B;IAC1C,KAAK;IACL,MAAM;IACN,MAAM;IACN,UAAU;IACV,WA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AAC;YACzC,OAAO;YACP,YAAY,EAAE,IAAI,CAAC,WAAW;YAC9B,QAAQ,EAAE,IAAI,CAAC,eAAe;YAC9B,YAAY,EAAE,IAAI,CAAC,WAAW;YAC9B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;IACJ,CAAC;CACF;AAnHD,0BAmHC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackin-io/stackin-node-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Node/TypeScript SDK for stackin — issue, consult and cancel Brazilian fiscal documents (NF-e, NFS-e) via a single Invoice client. No certificates, XML or SOAP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stackin",
|