@apiverve/vatrates 1.1.14 → 1.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +18 -6
  3. package/package.json +6 -7
package/README.md CHANGED
@@ -7,7 +7,7 @@ VAT Rates provides current and historical Value Added Tax rates for EU and non-E
7
7
  ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
8
8
  [![npm version](https://img.shields.io/npm/v/@apiverve/vatrates.svg)](https://www.npmjs.com/package/@apiverve/vatrates)
9
9
 
10
- This is a Javascript Wrapper for the [VAT Rates API](https://apiverve.com/marketplace/vatrates?utm_source=npm&utm_medium=readme)
10
+ This is a Javascript Wrapper for the [VAT Rates API](https://vatrates.apiverve.com?utm_source=npm&utm_medium=readme)
11
11
 
12
12
  ---
13
13
 
package/index.d.ts CHANGED
@@ -4,26 +4,38 @@ declare module '@apiverve/vatrates' {
4
4
  secure?: boolean;
5
5
  }
6
6
 
7
+ /**
8
+ * Describes fields the current plan does not unlock. Locked fields arrive as null
9
+ * in `data`; `locked_fields` names them, using dot paths for nested fields.
10
+ * Absent when the plan unlocks everything.
11
+ */
12
+ export interface PremiumInfo {
13
+ message: string;
14
+ upgrade_url: string;
15
+ locked_fields: string[];
16
+ }
17
+
7
18
  export interface vatratesResponse {
8
19
  status: string;
9
20
  error: string | null;
10
21
  data: VATRatesData;
11
22
  code?: number;
23
+ premium?: PremiumInfo;
12
24
  }
13
25
 
14
26
 
15
27
  interface VATRatesData {
16
- country: string;
17
- countryName: string;
18
- currency: string;
19
- effectiveFrom: Date;
28
+ country: null | string;
29
+ countryName: null | string;
30
+ currency: null | string;
31
+ effectiveFrom: Date | null;
20
32
  rates: Rates;
21
33
  exception: null;
22
34
  }
23
35
 
24
36
  interface Rates {
25
- standard: number;
26
- reduced: number;
37
+ standard: number | null;
38
+ reduced: number | null;
27
39
  reduced2: null;
28
40
  superReduced: null;
29
41
  parking: null;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@apiverve/vatrates",
3
- "version": "1.1.14",
3
+ "version": "1.2.0",
4
4
  "description": "VAT Rates provides current and historical Value Added Tax rates for EU and non-EU countries. Includes standard, reduced, and special rates with support for regional exceptions.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "sideEffects": false,
8
8
  "engines": {
9
- "node": ">=14.0.0"
9
+ "node": ">=18.0.0"
10
10
  },
11
11
  "files": [
12
12
  "index.js",
@@ -23,7 +23,7 @@
23
23
  "directory": "npm"
24
24
  },
25
25
  "keywords": [
26
- ""
26
+ "vat rates", "vat api", "value added tax", "eu vat", "tax rates"
27
27
  ],
28
28
  "author": {
29
29
  "name": "APIVerve",
@@ -34,15 +34,14 @@
34
34
  "bugs": {
35
35
  "url": "https://github.com/apiverve/vatrates-api/issues"
36
36
  },
37
- "homepage": "https://apiverve.com/marketplace/vatrates?utm_source=npm&utm_medium=homepage",
37
+ "homepage": "https://vatrates.apiverve.com?utm_source=npm&utm_medium=homepage",
38
38
  "devDependencies": {
39
39
  "mocha": "^11.0.1",
40
40
  "chai": "^5.1.2",
41
41
  "dotenv": "^16.4.7"
42
42
  },
43
43
  "dependencies": {
44
- "node-fetch": "^3.3.2",
45
- "promise": "^8.3.0",
46
- "axios": "1.13.2"
44
+ "axios": "1.13.2",
45
+ "form-data": "^4.0.1"
47
46
  }
48
47
  }