vpndetection 5.13.0 → 5.13.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 CHANGED
@@ -17,7 +17,7 @@ Requires Node.js 22 or newer. TypeScript types are included.
17
17
 
18
18
  ## Usage
19
19
 
20
- **No API key needed to start.** The Unlimited tier answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, with no daily or monthly cap, with a key or without one.
20
+ **No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, with no daily or monthly cap, with a key or without one.
21
21
 
22
22
  ```js
23
23
  import { VPNDetection } from 'vpndetection';
@@ -32,7 +32,7 @@ console.log(result.asn?.name); // who runs the announcing network
32
32
 
33
33
  ### With an API key
34
34
 
35
- Every paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, and the provider, confidence and last-seen detail behind each flag. The plans differ only in how many lookups they include, and a new account can try every field, 100 lookups a day. Create a key in the [console](https://app.vpndetection.io), then pass it in:
35
+ Every paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, and the provider, confidence and last-seen detail behind each flag. The plans differ only in how many lookups they include, and a free account tries every field, 100 lookups a day. Create a key in the [console](https://app.vpndetection.io), then pass it in:
36
36
 
37
37
  ```js
38
38
  const client = new VPNDetection({ apiKey: process.env.VPNDETECTION_API_KEY });
@@ -59,7 +59,7 @@ console.log(ent.usage.requests); // 580
59
59
  console.log(ent.usage.window_end); // when the allowance resets
60
60
  ```
61
61
 
62
- Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period, and against the UTC day on a trial key; it is the same number a lookup is gated on. `hard_limit` is null on an uncapped plan, which is not the same as zero.
62
+ Usage counts against the anniversary of your subscription on a paid plan, not the calendar month and not the billing period, and against the UTC day on the free plan; it is the same number a lookup is gated on. `hard_limit` is null on an uncapped plan, which is not the same as zero.
63
63
 
64
64
  ### Batch lookup
65
65
 
@@ -254,12 +254,12 @@ Each redirect URI must be https on a public host name, or http on a loopback add
254
254
 
255
255
  ### Absent is not false
256
256
 
257
- The Unlimited tier leaves out `isHosting`, `isCdn` and the four proxy flags, and of the detail behind each flag it answers only Tor's and relay's; a trial key's answer carries `trialExpired`, true once its day of full answers is spent. A field your key does not include is `undefined`, which means "not in your plan" rather than "checked, and no".
257
+ The Unlimited tier leaves out `isHosting`, `isCdn` and the four proxy flags, and of the detail behind each flag it answers only Tor's and relay's; a free-plan key's answer carries `trialExpired`, true once its daily trial is spent. A field your key does not include is `undefined`, which means "not in your plan" rather than "checked, and no".
258
258
 
259
259
  ```js
260
260
  result.isHosting ?? false // when you only want the flag
261
261
  result.isHosting === undefined // on the Unlimited tier: not in your plan
262
- result.trialExpired === true // a trial key's day of full answers is spent
262
+ result.trialExpired === true // a free-plan key's daily trial is spent
263
263
  ```
264
264
 
265
265
  ## Other Libraries
package/dist/client.d.ts CHANGED
@@ -141,7 +141,7 @@ export declare class VPNDetection {
141
141
  *
142
142
  * Usage counts against the ALLOWANCE WINDOW - on a paid plan the
143
143
  * anniversary of the subscription, not the calendar month and not the
144
- * billing period, and on a trial key the UTC day - and it is the same
144
+ * billing period, and on the free plan the UTC day - and it is the same
145
145
  * number a lookup is gated on. It can lag by a few seconds, because
146
146
  * requests are counted in memory and flushed in aggregate.
147
147
  *
@@ -166,7 +166,7 @@ export declare class VPNDetection {
166
166
  * is refused as `bad_request` before anything is sent. An IPv4-mapped address is looked
167
167
  * up as the IPv4 address it carries, and its answer keyed as you passed it.
168
168
  * The batch endpoint needs a paid plan: without a key every address sent to
169
- * it carries an `unauthorized` error, and a trial key's batch of two or more
169
+ * it carries an `unauthorized` error, and a free-plan key's batch of two or more
170
170
  * a `bad_request` (HTTP 402).
171
171
  */
172
172
  lookupBatch(ips: Iterable<string>, options?: BatchOptions): Promise<Map<string, Result | VPNDetectionError>>;
package/dist/client.js CHANGED
@@ -146,7 +146,7 @@ export class VPNDetection {
146
146
  *
147
147
  * Usage counts against the ALLOWANCE WINDOW - on a paid plan the
148
148
  * anniversary of the subscription, not the calendar month and not the
149
- * billing period, and on a trial key the UTC day - and it is the same
149
+ * billing period, and on the free plan the UTC day - and it is the same
150
150
  * number a lookup is gated on. It can lag by a few seconds, because
151
151
  * requests are counted in memory and flushed in aggregate.
152
152
  *
@@ -179,7 +179,7 @@ export class VPNDetection {
179
179
  * is refused as `bad_request` before anything is sent. An IPv4-mapped address is looked
180
180
  * up as the IPv4 address it carries, and its answer keyed as you passed it.
181
181
  * The batch endpoint needs a paid plan: without a key every address sent to
182
- * it carries an `unauthorized` error, and a trial key's batch of two or more
182
+ * it carries an `unauthorized` error, and a free-plan key's batch of two or more
183
183
  * a `bad_request` (HTTP 402).
184
184
  */
185
185
  async lookupBatch(ips, options = {}) {
@@ -59,9 +59,9 @@ export declare const lookupMyIp: <ThrowOnError extends boolean = false>(options?
59
59
  * and never a throttle.
60
60
  *
61
61
  * A batch needs a paid plan: without a key the call is refused with `401`,
62
- * and with a trial key with `402`, unless it names one address, which is
63
- * answered as `GET /{ip}` would answer it. Unlimited and a trial look up
64
- * one address at a time.
62
+ * and with a key on the free plan with `402`, unless it names one address,
63
+ * which is answered as `GET /{ip}` would answer it. Unlimited looks up one
64
+ * address at a time.
65
65
  *
66
66
  */
67
67
  export declare const lookupBatch: <ThrowOnError extends boolean = false>(options: Options<LookupBatchData, ThrowOnError>) => RequestResult<LookupBatchResponses, LookupBatchErrors, ThrowOnError>;
@@ -71,9 +71,9 @@ export const lookupMyIp = (options) => (options?.client ?? client).get({
71
71
  * and never a throttle.
72
72
  *
73
73
  * A batch needs a paid plan: without a key the call is refused with `401`,
74
- * and with a trial key with `402`, unless it names one address, which is
75
- * answered as `GET /{ip}` would answer it. Unlimited and a trial look up
76
- * one address at a time.
74
+ * and with a key on the free plan with `402`, unless it names one address,
75
+ * which is answered as `GET /{ip}` would answer it. Unlimited looks up one
76
+ * address at a time.
77
77
  *
78
78
  */
79
79
  export const lookupBatch = (options) => (options.client ?? client).post({
@@ -96,9 +96,9 @@ export type LookupResponse = {
96
96
  location?: Location;
97
97
  asn?: Asn;
98
98
  /**
99
- * On every answer to a trial key, an organization on no paid plan, and
100
- * on no other: `false` while the organization's 100 full answers for
101
- * the UTC day last, `true` once the answer is Unlimited's.
99
+ * On every answer to a key on the free plan, and on no other: `false`
100
+ * while its organization's daily trial lasts (every field for the first
101
+ * 100 lookups each UTC day), `true` once the answer has Unlimited's.
102
102
  *
103
103
  */
104
104
  trial_expired?: boolean;
@@ -593,15 +593,15 @@ export type EntitlementApikey = {
593
593
  };
594
594
  export type EntitlementPlan = {
595
595
  /**
596
- * The plan the organization is on, or `trial` on none: a trial
597
- * answers every field for the organization's first 100 lookups each
598
- * UTC day, and Unlimited's answer after them.
596
+ * The plan the organization is on: `free` for the free plan,
597
+ * Unlimited, or a paid plan's key. On `free`, usage counts the
598
+ * day's lookups answered with every field, its daily trial.
599
599
  *
600
600
  */
601
601
  key: string;
602
602
  /**
603
603
  * The field tier, which decides how much of a lookup answer comes
604
- * back; `free` is a trial's. What each tier includes is documented
604
+ * back; `free` is the free plan's. What each tier includes is documented
605
605
  * on the lookup endpoint rather than repeated here, so there is one
606
606
  * place it can be wrong.
607
607
  *
@@ -1033,8 +1033,8 @@ export type LookupBatchErrors = {
1033
1033
  */
1034
1034
  401: LookupError;
1035
1035
  /**
1036
- * The key is a trial's, an organization on no paid plan, and the batch
1037
- * names more than one address: a batch needs a paid plan.
1036
+ * The key is on the free plan and the batch names more than one
1037
+ * address: a batch needs a paid plan.
1038
1038
  *
1039
1039
  */
1040
1040
  402: LookupError;
package/dist/types.d.ts CHANGED
@@ -30,8 +30,9 @@ export interface Result {
30
30
  isMobproxy?: boolean;
31
31
  isPubproxy?: boolean;
32
32
  /**
33
- * On a Trial key's answers only: `false` while the organization's 100 full answers for the
34
- * UTC day last, `true` once the answer is Unlimited's.
33
+ * On answers to a key on the free plan only: `false` while its organization's daily trial
34
+ * lasts (every field for the first 100 lookups each UTC day), `true` once the answer has
35
+ * Unlimited's.
35
36
  */
36
37
  trialExpired?: boolean;
37
38
  vpn?: VpnDetail;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,8BAA8B;AAC9B,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,SAAS,GAAwB,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AAEpF,MAAM,CAAC,MAAM,aAAa,GAAqD;IAC3E,YAAY,EAAE,UAAU,EAAE,cAAc;CAC3C,CAAC;AAyDF,yEAAyE;AACzE,8EAA8E;AAC9E,gFAAgF;AAChF,kCAAkC;AAClC,MAAM,UAAU,QAAQ,CAAC,IAAoB;IACzC,MAAM,CAAC,GAAW;QACd,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,OAAO,EAAE,KAAK;QACd,GAAG,EAAE,IAAI;KACZ,CAAC;IACF,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,WAAW,CAAC,CA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E,KAAK,CAAC,CAAC;IAClC,OAAO,CAAC,CAAC;AACb,CAAC;AAED,SAAS,QAAQ,CACb,IAAoB,EAAE,GAAW,EACjC,IAA0B,EAAE,EACmD;IAE/E,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC3C,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAY,CAAC;IACpC,CAAC;AACL,CAAC;AAED,SAAS,UAAU,CACf,IAAoB,EAAE,GAAW,EACjC,IAA0B,EAC1B,EACqC;IAErC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC3C,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAU,CAAC;IAClC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpndetection",
3
- "version": "5.13.0",
3
+ "version": "5.13.1",
4
4
  "description": "Official Node.js client library for the VPNDetection API. Detect VPNs, proxies, Tor, hosting and CDN IPs.",
5
5
  "type": "module",
6
6
  "license": "MIT",