@veroao/core 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 +6 -0
- package/dist/types.d.ts +17 -0
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -83,3 +83,9 @@ directamente com o Vero para essas operações.
|
|
|
83
83
|
Esse backend não precisa de ser Node - é só a opção mais directa. Qualquer linguagem (PHP,
|
|
84
84
|
Python, Ruby, etc.) consegue chamar a API REST directamente com o seu próprio cliente HTTP, com
|
|
85
85
|
as mesmas operações disponíveis. Exemplos em cURL, Python e PHP em [vero.ao/docs](https://vero.ao/docs).
|
|
86
|
+
|
|
87
|
+
## A implementar com Claude Code ou outro agente de IA?
|
|
88
|
+
|
|
89
|
+
Aponta o teu assistente para [vero.ao/vero-skill.md](https://vero.ao/vero-skill.md) - um skill
|
|
90
|
+
com o essencial da API da Vero (autenticação, endpoints, formatos e erros comuns) pronto a
|
|
91
|
+
carregar, sem teres de colar documentação à mão.
|
package/dist/types.d.ts
CHANGED
|
@@ -47,6 +47,15 @@ export interface InvoiceItem {
|
|
|
47
47
|
unitPrice: number;
|
|
48
48
|
taxRate?: number;
|
|
49
49
|
}
|
|
50
|
+
export interface WithholdingTax {
|
|
51
|
+
/** 'II' = Imposto Industrial, 'IRT' = pessoa singular/ENI */
|
|
52
|
+
type: "II" | "IRT";
|
|
53
|
+
/** Percentagem × 100 - ex: 650 = 6,50% */
|
|
54
|
+
rate: number;
|
|
55
|
+
/** Valor retido, em kwanzas × 100 */
|
|
56
|
+
amount: number;
|
|
57
|
+
description: string;
|
|
58
|
+
}
|
|
50
59
|
export interface Invoice {
|
|
51
60
|
id: string;
|
|
52
61
|
orgId: string;
|
|
@@ -66,6 +75,8 @@ export interface Invoice {
|
|
|
66
75
|
createdAt: string;
|
|
67
76
|
customerSnapshot?: Record<string, unknown>;
|
|
68
77
|
orgSnapshot?: Record<string, unknown>;
|
|
78
|
+
/** Presente só quando a organização tem retenção na fonte activada e pedida nesta factura */
|
|
79
|
+
withholdingTax?: WithholdingTax | null;
|
|
69
80
|
}
|
|
70
81
|
export interface CreateInvoiceInput {
|
|
71
82
|
customerId: string;
|
|
@@ -73,6 +84,12 @@ export interface CreateInvoiceInput {
|
|
|
73
84
|
notes?: string;
|
|
74
85
|
idempotencyKey?: string;
|
|
75
86
|
documentType?: "FT" | "FR";
|
|
87
|
+
/**
|
|
88
|
+
* Pede para aplicar a retenção na fonte configurada na organização
|
|
89
|
+
* (Definições → Retenção na fonte). Sem efeito se a organização não a
|
|
90
|
+
* tiver activada, ou se o valor não ultrapassar o limiar mínimo.
|
|
91
|
+
*/
|
|
92
|
+
applyWithholdingTax?: boolean;
|
|
76
93
|
}
|
|
77
94
|
export interface CreateCustomerDTO {
|
|
78
95
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veroao/core",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Cliente partilhado e
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Cliente partilhado e m\u00ednimo para os endpoints de widget do Vero \u2014 base do @veroao/react e @veroao/widget",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
9
11
|
"scripts": {
|
|
10
12
|
"build": "tsc",
|
|
11
13
|
"dev": "tsc --watch",
|
|
12
14
|
"prepublishOnly": "npm run build"
|
|
13
15
|
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
|
|
16
|
+
"keywords": [
|
|
17
|
+
"vero-ao",
|
|
18
|
+
"faturacao",
|
|
19
|
+
"agt",
|
|
20
|
+
"angola",
|
|
21
|
+
"invoicing"
|
|
22
|
+
],
|
|
23
|
+
"author": "Eterim Presta\u00e7\u00e3o de Servi\u00e7os",
|
|
16
24
|
"license": "ISC",
|
|
17
25
|
"repository": {
|
|
18
26
|
"type": "git",
|