brisa-sdk 0.0.0-stage → 0.2.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/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +90 -2
- package/dist/index.cjs +621 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +928 -0
- package/dist/index.d.ts +928 -0
- package/dist/index.js +590 -0
- package/dist/index.js.map +1 -0
- package/docs/01-primeiros-passos.md +106 -0
- package/docs/02-autenticacao.md +55 -0
- package/docs/03-documentos.md +80 -0
- package/docs/04-pagamentos.md +69 -0
- package/docs/05-impressao.md +44 -0
- package/docs/06-dados-bancarios.md +42 -0
- package/docs/07-clientes-e-extrato.md +61 -0
- package/docs/08-artigos-e-stock.md +38 -0
- package/docs/09-saft.md +23 -0
- package/docs/10-webhooks.md +42 -0
- package/docs/11-erros.md +52 -0
- package/docs/12-idempotencia-e-limites.md +29 -0
- package/docs/13-sandbox-e-producao.md +25 -0
- package/docs/README.md +35 -0
- package/docs/openapi.json +16772 -0
- package/docs/upgrade.md +23 -0
- package/package.json +67 -4
package/docs/upgrade.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Guia de atualização
|
|
2
|
+
|
|
3
|
+
Cada secção diz o que mudou, o **impacto** (alto, médio ou baixo) e o que fazer. Os SDKs seguem [versionamento semântico](https://semver.org/lang/pt-BR/): antes da 1.0, uma versão menor pode trazer mudanças.
|
|
4
|
+
|
|
5
|
+
## De 0.1 para 0.2
|
|
6
|
+
|
|
7
|
+
Requer a API de 15 de novembro de 2026 ou posterior. Contra uma API anterior, os pedidos antigos continuam a funcionar.
|
|
8
|
+
|
|
9
|
+
### Impacto baixo: novos papéis de impressão
|
|
10
|
+
|
|
11
|
+
`pdf({ format })` aceita agora `a5`, `thermal80` (igual a `thermal`) e `thermal58`. Nada a fazer.
|
|
12
|
+
|
|
13
|
+
### Impacto baixo: pagamento com vários meios
|
|
14
|
+
|
|
15
|
+
`payment.payments` (até 6 meios) em `FR` e `TV`. O detalhe do documento traz `paymentMethod: "mixed"`, `payments` e `amountReceived`. Se mostra o meio de pagamento num ecrã seu, trate o valor `mixed`.
|
|
16
|
+
|
|
17
|
+
### Impacto baixo: dados bancários
|
|
18
|
+
|
|
19
|
+
`bank()`, `setBank()`, `bankDetails` e `printBankDetails` ao emitir. O IBAN guarda-se como foi escrito, sem verificação.
|
|
20
|
+
|
|
21
|
+
### Impacto baixo: clientes
|
|
22
|
+
|
|
23
|
+
`clients.list` aceita `sort`, `desc` e `totals`; novos `statement`, `statementPdf` e `statementCsv`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brisa-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "SDK oficial da API Brisa (faturação certificada AGT, Angola) para Node.js e TypeScript.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Codespace <geral@codespace.ao>",
|
|
7
|
+
"homepage": "https://github.com/codespace-ao/brisa-sdk-js#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/codespace-ao/brisa-sdk-js.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": "https://github.com/codespace-ao/brisa-sdk-js/issues",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"brisa",
|
|
15
|
+
"faturacao",
|
|
16
|
+
"agt",
|
|
17
|
+
"angola",
|
|
18
|
+
"saft",
|
|
19
|
+
"invoicing",
|
|
20
|
+
"sdk"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.cjs",
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/index.d.cts",
|
|
34
|
+
"default": "./dist/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"docs",
|
|
42
|
+
"README.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"sideEffects": false,
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"lint": "biome check src test",
|
|
53
|
+
"format": "biome check --write src test examples",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"test:integration": "vitest run test/integration.test.ts",
|
|
57
|
+
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@biomejs/biome": "2.6.7",
|
|
64
|
+
"@types/node": "^20.17.0",
|
|
65
|
+
"tsup": "^8.3.0",
|
|
66
|
+
"typescript": "^5.6.0",
|
|
67
|
+
"vitest": "^2.1.0"
|
|
68
|
+
}
|
|
69
|
+
}
|