@veroao/react 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.
package/README.md CHANGED
@@ -122,3 +122,9 @@ export async function POST(req: Request) {
122
122
  O backend não precisa de ser Node - é só o exemplo mais directo. Se for PHP, Python, Ruby, etc.,
123
123
  chama a API REST directamente com o cliente HTTP dessa linguagem; tens as mesmas operações
124
124
  disponíveis. Exemplos em cURL, Python e PHP em [vero.ao/docs](https://vero.ao/docs).
125
+
126
+ ## A implementar com Claude Code ou outro agente de IA?
127
+
128
+ Aponta o teu assistente para [vero.ao/vero-skill.md](https://vero.ao/vero-skill.md) - um skill
129
+ com o essencial da API da Vero (autenticação, endpoints, formatos e erros comuns) pronto a
130
+ carregar, sem teres de colar documentação à mão.
package/dist/types.d.ts CHANGED
@@ -23,6 +23,15 @@ export interface InvoiceItem {
23
23
  unitPrice: number;
24
24
  taxRate?: number;
25
25
  }
26
+ export interface WithholdingTax {
27
+ /** 'II' = Imposto Industrial, 'IRT' = pessoa singular/ENI */
28
+ type: "II" | "IRT";
29
+ /** Percentagem × 100 - ex: 650 = 6,50% */
30
+ rate: number;
31
+ /** Valor retido, em kwanzas × 100 */
32
+ amount: number;
33
+ description: string;
34
+ }
26
35
  export interface Invoice {
27
36
  id: string;
28
37
  orgId: string;
@@ -38,6 +47,8 @@ export interface Invoice {
38
47
  atcud?: string | null;
39
48
  issuedAt?: string | null;
40
49
  createdAt: string;
50
+ /** Presente só quando a organização tem retenção na fonte activada e pedida nesta factura */
51
+ withholdingTax?: WithholdingTax | null;
41
52
  }
42
53
  export interface CreateInvoiceInput {
43
54
  customerId: string;
@@ -45,6 +56,12 @@ export interface CreateInvoiceInput {
45
56
  notes?: string;
46
57
  idempotencyKey?: string;
47
58
  documentType?: "FT" | "FR";
59
+ /**
60
+ * Pede para aplicar a retenção na fonte configurada na organização
61
+ * (Definições → Retenção na fonte). Sem efeito se a organização não a
62
+ * tiver activada, ou se o valor não ultrapassar o limiar mínimo.
63
+ */
64
+ applyWithholdingTax?: boolean;
48
65
  }
49
66
  export interface SearchCustomersParams {
50
67
  search?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veroao/react",
3
- "version": "1.0.0",
4
- "description": "Vero-AO SDK for React faturação certificada AGT em aplicações React",
3
+ "version": "1.1.0",
4
+ "description": "Vero-AO SDK for React \u2014 fatura\u00e7\u00e3o certificada AGT em aplica\u00e7\u00f5es React",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -12,8 +12,15 @@
12
12
  "build": "tsc",
13
13
  "prepublishOnly": "npm run build"
14
14
  },
15
- "keywords": ["vero-ao", "faturacao", "agt", "angola", "invoicing", "react"],
16
- "author": "Eterim Prestação de Serviços",
15
+ "keywords": [
16
+ "vero-ao",
17
+ "faturacao",
18
+ "agt",
19
+ "angola",
20
+ "invoicing",
21
+ "react"
22
+ ],
23
+ "author": "Eterim Presta\u00e7\u00e3o de Servi\u00e7os",
17
24
  "license": "ISC",
18
25
  "repository": {
19
26
  "type": "git",