zata-vsdc-sdk 1.0.1
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 +26 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Usage (TypeScript)
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import ZataClient from 'zata-sdk';
|
|
5
|
+
|
|
6
|
+
const client = new ZataClient({
|
|
7
|
+
apiKey: 'your-api-key-here',
|
|
8
|
+
baseUrl: 'https://ebm.zata.rw/v1' // if sandbox exists
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
try {
|
|
13
|
+
const companies = await client.getCompanies();
|
|
14
|
+
console.log('Companies:', companies);
|
|
15
|
+
|
|
16
|
+
const newCompany = await client.createCompany({
|
|
17
|
+
name: 'Example Ltd',
|
|
18
|
+
tin: '102345678'
|
|
19
|
+
});
|
|
20
|
+
console.log('Created:', newCompany);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
console.error('Error:', (err as Error).message);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zata-vsdc-sdk",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "TypeScript SDK for Zata API – E-Invoicing & Tax Compliance (Rwanda)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"zata",
|
|
13
|
+
"e-invoicing",
|
|
14
|
+
"rra",
|
|
15
|
+
"rwanda",
|
|
16
|
+
"typescript",
|
|
17
|
+
"api-sdk",
|
|
18
|
+
"ebm",
|
|
19
|
+
"vsdc"
|
|
20
|
+
],
|
|
21
|
+
"author": "Joshua",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"axios": "^1.7.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"typescript": "^5.5.4"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/HiQ-Africa/zata-npm.git"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
}
|
|
39
|
+
}
|