vpndetection 4.2.0 → 5.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 +9 -9
- package/dist/client.d.ts +17 -18
- package/dist/client.js +81 -28
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +190 -5
- package/dist/generated/sdk.gen.js +266 -4
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +622 -19
- package/dist/index.d.ts +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -52,36 +52,36 @@ console.log(result.ip); // the address we saw this call come from
|
|
|
52
52
|
### Your plan and usage
|
|
53
53
|
|
|
54
54
|
```js
|
|
55
|
-
const
|
|
56
|
-
console.log(
|
|
57
|
-
console.log(
|
|
58
|
-
console.log(
|
|
55
|
+
const ent = await client.myEntitlement();
|
|
56
|
+
console.log(ent.plan.key); // max
|
|
57
|
+
console.log(ent.usage.requests); // 580
|
|
58
|
+
console.log(ent.usage.window_end); // when the allowance resets
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Usage counts against the anniversary of your subscription, not the calendar month and not the billing period, and 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
62
|
|
|
63
63
|
### Batch lookup
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Look up many addresses at once. Bogons and cached answers are handled locally, and everything else goes to the batch endpoint in chunks of up to 1000 addresses, in parallel:
|
|
66
66
|
|
|
67
67
|
```js
|
|
68
68
|
const results = await client.lookupBatch(['45.83.91.1', '8.8.8.8', '1.1.1.1']);
|
|
69
69
|
|
|
70
70
|
for (const [ip, result] of results) {
|
|
71
71
|
if (result instanceof Error) {
|
|
72
|
-
console.
|
|
72
|
+
console.log(`${ip}: ${result.message}`);
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
75
75
|
console.log(`${ip}: ${result.isVpn}`);
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
Results are keyed by address, so duplicates in your list collapse into a single
|
|
79
|
+
Results are keyed by address, in the order you first listed each one, so duplicates in your list collapse into a single entry and one address failing never loses the rest: it carries its error as its value, with the status the API would have given that address on its own.
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
How many chunks are in flight at once, and how many times a failed chunk is retried, are configurable per call:
|
|
82
82
|
|
|
83
83
|
```js
|
|
84
|
-
const results = await client.lookupBatch(manyIps, { concurrency:
|
|
84
|
+
const results = await client.lookupBatch(manyIps, { concurrency: 4, retries: 4 });
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### Caching
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Writable } from 'node:stream';
|
|
2
2
|
import type { Client } from './generated/client/index.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Entitlement, Database, DatabaseFormat, DatabaseMetadata, DbChecksums, Download } from './generated/types.gen.js';
|
|
4
4
|
import { VPNDetectionError } from './errors.js';
|
|
5
5
|
import { type Result } from './types.js';
|
|
6
6
|
/**
|
|
@@ -28,7 +28,7 @@ export interface Options {
|
|
|
28
28
|
baseUrl?: string;
|
|
29
29
|
/** Pass `false` to disable caching. */
|
|
30
30
|
cache?: CacheOptions | false;
|
|
31
|
-
/** Concurrent
|
|
31
|
+
/** Concurrent batch requests - chunks of up to 1000 addresses - during a batch. Default 8. */
|
|
32
32
|
concurrency?: number;
|
|
33
33
|
/** Retry attempts for a transient failure. Default 2. */
|
|
34
34
|
retries?: number;
|
|
@@ -51,7 +51,7 @@ export interface LookupOptions {
|
|
|
51
51
|
}
|
|
52
52
|
/** Per-call overrides for one batch. Anything omitted falls back to the client's setting. */
|
|
53
53
|
export interface BatchOptions extends LookupOptions {
|
|
54
|
-
/** Concurrent
|
|
54
|
+
/** Concurrent batch requests for THIS batch only. */
|
|
55
55
|
concurrency?: number;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
@@ -104,7 +104,7 @@ export declare class VPNDetection {
|
|
|
104
104
|
*
|
|
105
105
|
* Named for what it answers rather than `me`, which sits one letter from
|
|
106
106
|
* `myIp` and means something quite different: one is which address you are
|
|
107
|
-
* calling FROM, the other is
|
|
107
|
+
* calling FROM, the other is what the key you are calling WITH may spend.
|
|
108
108
|
*
|
|
109
109
|
* Unlike a lookup there is no useful unauthenticated answer, so a client
|
|
110
110
|
* built without a key gets an unauthorized error rather than a partial one.
|
|
@@ -117,23 +117,22 @@ export declare class VPNDetection {
|
|
|
117
117
|
* Deliberately NOT cached: the whole point is what has been spent, and a
|
|
118
118
|
* cached answer is a wrong one within seconds of the next request.
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
myEntitlement(options?: LookupOptions): Promise<Entitlement>;
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* up. An address that fails carries its error as its value, so one bad
|
|
134
|
-
* entry cannot lose the rest of the answers.
|
|
122
|
+
* Classify many addresses in as few requests as possible.
|
|
123
|
+
*
|
|
124
|
+
* Bogons are answered locally and cached answers are reused; everything
|
|
125
|
+
* else goes to the batch endpoint in chunks of up to 1000 addresses, with
|
|
126
|
+
* at most `concurrency` chunks in flight. Keyed by address rather than
|
|
127
|
+
* positional, so duplicates in the input collapse to a single entry and the
|
|
128
|
+
* caller never has to line two lists up. An address that fails carries its
|
|
129
|
+
* error as its value, so one bad entry cannot lose the rest of the answers:
|
|
130
|
+
* the API reports a per-entry failure with the status the single lookup
|
|
131
|
+
* would have answered, and a chunk that fails as a whole marks every
|
|
132
|
+
* address in it.
|
|
135
133
|
*/
|
|
136
134
|
lookupBatch(ips: Iterable<string>, options?: BatchOptions): Promise<Map<string, Result | VPNDetectionError>>;
|
|
135
|
+
private lookupChunk;
|
|
137
136
|
}
|
|
138
137
|
/** The licensed dataset downloads. Access is granted by contract, not self-serve. */
|
|
139
138
|
export declare class DatabaseApi {
|
package/dist/client.js
CHANGED
|
@@ -2,15 +2,18 @@ import { LRUCache } from 'lru-cache';
|
|
|
2
2
|
import pLimit from 'p-limit';
|
|
3
3
|
import pRetry from 'p-retry';
|
|
4
4
|
import { createClient, createConfig } from './generated/client/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { myEntitlement, databaseChecksum, databaseMetadata, downloadDatabase as downloadRedirect, listDatabases, listDownloads, lookupBatch, lookupIp, lookupMyIp, } from './generated/sdk.gen.js';
|
|
6
6
|
import { bogonResult, isBogon } from './bogon.js';
|
|
7
|
-
import { errorFromResponse, VPNDetectionError } from './errors.js';
|
|
7
|
+
import { errorFromEntry, errorFromResponse, VPNDetectionError } from './errors.js';
|
|
8
8
|
import { DATABASE_FORMATS, toResult } from './types.js';
|
|
9
9
|
export const DEFAULT_BASE_URL = 'https://api.vpndetection.io';
|
|
10
10
|
// Matches the other SDKs, whose HTTP clients default to 30s. Node's global
|
|
11
11
|
// fetch has no whole-request limit of its own, so without this a hung API holds
|
|
12
12
|
// a caller until undici's 300s headers timeout - which is why this exists.
|
|
13
13
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
14
|
+
// The most addresses POST /batch takes in one call; a larger batch is sent in
|
|
15
|
+
// chunks of this size.
|
|
16
|
+
const BATCH_MAX = 1000;
|
|
14
17
|
/**
|
|
15
18
|
* A client for the VPNDetection API.
|
|
16
19
|
*
|
|
@@ -107,7 +110,7 @@ export class VPNDetection {
|
|
|
107
110
|
*
|
|
108
111
|
* Named for what it answers rather than `me`, which sits one letter from
|
|
109
112
|
* `myIp` and means something quite different: one is which address you are
|
|
110
|
-
* calling FROM, the other is
|
|
113
|
+
* calling FROM, the other is what the key you are calling WITH may spend.
|
|
111
114
|
*
|
|
112
115
|
* Unlike a lookup there is no useful unauthenticated answer, so a client
|
|
113
116
|
* built without a key gets an unauthorized error rather than a partial one.
|
|
@@ -120,52 +123,102 @@ export class VPNDetection {
|
|
|
120
123
|
* Deliberately NOT cached: the whole point is what has been spent, and a
|
|
121
124
|
* cached answer is a wrong one within seconds of the next request.
|
|
122
125
|
*/
|
|
123
|
-
async
|
|
126
|
+
async myEntitlement(options = {}) {
|
|
124
127
|
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
125
128
|
return withRetry(options.retries ?? this.retries, async () => {
|
|
126
|
-
const res = await deadline(timeoutMs, (signal) =>
|
|
129
|
+
const res = await deadline(timeoutMs, (signal) => myEntitlement({
|
|
127
130
|
client: this.client, signal: signal,
|
|
128
131
|
}));
|
|
129
132
|
return unwrap(res);
|
|
130
133
|
});
|
|
131
134
|
}
|
|
132
135
|
/**
|
|
133
|
-
*
|
|
136
|
+
* Classify many addresses in as few requests as possible.
|
|
134
137
|
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* Keyed by address rather than positional, so duplicates in the input
|
|
145
|
-
* collapse to a single request and the caller never has to line two lists
|
|
146
|
-
* up. An address that fails carries its error as its value, so one bad
|
|
147
|
-
* entry cannot lose the rest of the answers.
|
|
138
|
+
* Bogons are answered locally and cached answers are reused; everything
|
|
139
|
+
* else goes to the batch endpoint in chunks of up to 1000 addresses, with
|
|
140
|
+
* at most `concurrency` chunks in flight. Keyed by address rather than
|
|
141
|
+
* positional, so duplicates in the input collapse to a single entry and the
|
|
142
|
+
* caller never has to line two lists up. An address that fails carries its
|
|
143
|
+
* error as its value, so one bad entry cannot lose the rest of the answers:
|
|
144
|
+
* the API reports a per-entry failure with the status the single lookup
|
|
145
|
+
* would have answered, and a chunk that fails as a whole marks every
|
|
146
|
+
* address in it.
|
|
148
147
|
*/
|
|
149
148
|
async lookupBatch(ips, options = {}) {
|
|
150
149
|
const unique = [...new Set(ips)];
|
|
150
|
+
const out = new Map();
|
|
151
|
+
const pending = [];
|
|
152
|
+
for (const ip of unique) {
|
|
153
|
+
if (isBogon(ip)) {
|
|
154
|
+
out.set(ip, bogonResult(ip));
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const hit = this.cache?.get(ip);
|
|
158
|
+
if (hit !== undefined) {
|
|
159
|
+
out.set(ip, hit);
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
pending.push(ip);
|
|
163
|
+
}
|
|
151
164
|
// A per-call concurrency gets its own limiter; without one the call
|
|
152
165
|
// would share the instance's budget and silently ignore the override.
|
|
153
166
|
const limit = options.concurrency === undefined
|
|
154
167
|
? this.limit
|
|
155
168
|
: pLimit(options.concurrency);
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
out.set(ip,
|
|
169
|
+
const chunks = [];
|
|
170
|
+
for (let i = 0; i < pending.length; i += BATCH_MAX) {
|
|
171
|
+
chunks.push(pending.slice(i, i + BATCH_MAX));
|
|
172
|
+
}
|
|
173
|
+
await Promise.all(chunks.map((chunk) => limit(async () => {
|
|
174
|
+
for (const [ip, answer] of await this.lookupChunk(chunk, options)) {
|
|
175
|
+
out.set(ip, answer);
|
|
163
176
|
}
|
|
164
177
|
})));
|
|
165
|
-
// Reinstated in input order:
|
|
166
|
-
//
|
|
178
|
+
// Reinstated in input order: chunks settle in completion order, and a
|
|
179
|
+
// caller iterating the map should see what they passed in.
|
|
167
180
|
return new Map(unique.map((ip) => [ip, out.get(ip)]));
|
|
168
181
|
}
|
|
182
|
+
// One POST /batch, mapped back onto the addresses it was asked about. A
|
|
183
|
+
// chunk-level failure - the call refused, the transport failing, the
|
|
184
|
+
// retries exhausted - becomes every address's error, exactly as it would
|
|
185
|
+
// have been had each been looked up alone.
|
|
186
|
+
async lookupChunk(chunk, options) {
|
|
187
|
+
const out = new Map();
|
|
188
|
+
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
189
|
+
let body;
|
|
190
|
+
try {
|
|
191
|
+
body = await withRetry(options.retries ?? this.retries, async () => {
|
|
192
|
+
const res = await deadline(timeoutMs, (signal) => lookupBatch({
|
|
193
|
+
client: this.client, body: { ips: chunk }, signal: signal,
|
|
194
|
+
}));
|
|
195
|
+
return unwrap(res);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
catch (err) {
|
|
199
|
+
const failure = asError(err);
|
|
200
|
+
for (const ip of chunk) {
|
|
201
|
+
out.set(ip, failure);
|
|
202
|
+
}
|
|
203
|
+
return out;
|
|
204
|
+
}
|
|
205
|
+
for (const ip of chunk) {
|
|
206
|
+
const served = body.results[ip];
|
|
207
|
+
if (served !== undefined) {
|
|
208
|
+
const result = toResult(served);
|
|
209
|
+
this.cache?.set(ip, result);
|
|
210
|
+
out.set(ip, result);
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
const failed = body.errors[ip];
|
|
214
|
+
if (failed !== undefined) {
|
|
215
|
+
out.set(ip, errorFromEntry(failed));
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
out.set(ip, new VPNDetectionError('server_error', `the batch answer did not include ${ip}`, 200));
|
|
219
|
+
}
|
|
220
|
+
return out;
|
|
221
|
+
}
|
|
169
222
|
}
|
|
170
223
|
/** The licensed dataset downloads. Access is granted by contract, not self-serve. */
|
|
171
224
|
export class DatabaseApi {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,MAAM,MAAM,SAAS,CAAC;AAK7B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,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9F,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -19,3 +19,12 @@ export declare class VPNDetectionError extends Error {
|
|
|
19
19
|
export declare function errorFromResponse(status: number, headers: {
|
|
20
20
|
get(name: string): string | null;
|
|
21
21
|
}, body: unknown): VPNDetectionError;
|
|
22
|
+
/**
|
|
23
|
+
* A per-entry failure inside a successful batch: the status the single lookup
|
|
24
|
+
* would have answered, and its message, with no headers at all - so a 429 here
|
|
25
|
+
* is a spent allowance, which is the only kind the API puts in an entry.
|
|
26
|
+
*/
|
|
27
|
+
export declare function errorFromEntry(entry: {
|
|
28
|
+
status: number;
|
|
29
|
+
error: string;
|
|
30
|
+
}): VPNDetectionError;
|
package/dist/errors.js
CHANGED
|
@@ -41,6 +41,14 @@ export function errorFromResponse(status, headers, body) {
|
|
|
41
41
|
}
|
|
42
42
|
return new VPNDetectionError('server_error', message, status);
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* A per-entry failure inside a successful batch: the status the single lookup
|
|
46
|
+
* would have answered, and its message, with no headers at all - so a 429 here
|
|
47
|
+
* is a spent allowance, which is the only kind the API puts in an entry.
|
|
48
|
+
*/
|
|
49
|
+
export function errorFromEntry(entry) {
|
|
50
|
+
return errorFromResponse(entry.status, { get: () => null }, { error: entry.error });
|
|
51
|
+
}
|
|
44
52
|
// The two APIs behind this host answer with different envelopes: the lookup
|
|
45
53
|
// endpoint uses `error`, the database endpoints use `rc`. Both are read here so
|
|
46
54
|
// a caller never has to know which one they hit.
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAkBA,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC/B,IAAI,CAAY;IAChB,MAAM,CAAU;IAChB,iBAAiB,CAAU;IAEpC,YAAY,IAAe,EAAE,OAAe,EAA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G,IAA+B,CAAC;IAC1C,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,CAAC,CAAC,KAAK,CAAC;IACnB,CAAC;IACD,IAAI,OAAO,CAAC,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC,EAAE,CAAC;IAChB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,SAAS,eAAe,CAAC,KAAoB;IACzC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,wCAAwC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { accountCreateApikey, accountIdentity, accountListApikeys, accountOrg, accountOrgMembers, accountRevealApikey, accountRevokeApikey, accountRotateApikey, databaseChecksum, databaseMetadata, downloadDatabase, listDatabases, listDownloads, lookupBatch, lookupIp, lookupMyIp, myEntitlement, oauthAuthorize, oauthDeviceAuthorization, oauthMetadata, oauthRevoke, oauthToken, type Options } from './sdk.gen.js';
|
|
2
|
+
export type { AccountCreateApikeyData, AccountCreateApikeyError, AccountCreateApikeyErrors, AccountCreateApikeyRequest, AccountCreateApikeyResponse, AccountCreateApikeyResponses, AccountCreatedApikey, AccountIdentityData, AccountIdentityError, AccountIdentityErrors, AccountIdentityResponse, AccountIdentityResponses, AccountListApikeysData, AccountListApikeysError, AccountListApikeysErrors, AccountListApikeysResponse, AccountListApikeysResponses, AccountOrg, AccountOrgData, AccountOrgError, AccountOrgErrors, AccountOrgMembersData, AccountOrgMembersError, AccountOrgMembersErrors, AccountOrgMembersResponse, AccountOrgMembersResponses, AccountOrgRef, AccountOrgResponse, AccountOrgResponses, AccountOrgWrap, AccountRc, AccountRevealApikeyData, AccountRevealApikeyError, AccountRevealApikeyErrors, AccountRevealApikeyResponse, AccountRevealApikeyResponses, AccountRevealedApikey, AccountRevokeApikeyData, AccountRevokeApikeyError, AccountRevokeApikeyErrors, AccountRevokeApikeyResponse, AccountRevokeApikeyResponses, AccountRotateApikeyData, AccountRotateApikeyError, AccountRotateApikeyErrors, AccountRotateApikeyResponse, AccountRotateApikeyResponses, AccountUser, ApikeyDetail, ApikeyIdParam, ApikeyList, BatchLookupError, BatchLookupRequest, BatchLookupResponse, ClassDetail, ClientOptions, Database, DatabaseChecksumData, DatabaseChecksumError, DatabaseChecksumErrors, DatabaseChecksumResponse, DatabaseChecksumResponses, DatabaseFormat, DatabaseFormatSize, DatabaseMetadata, DatabaseMetadataColumn, DatabaseMetadataData, DatabaseMetadataError, DatabaseMetadataErrors, DatabaseMetadataResponse, DatabaseMetadataResponses, DatabaseVersion, DbChecksums, DeviceAuthorization, DeviceAuthorizationRequest, Download, DownloadDatabaseData, DownloadDatabaseError, DownloadDatabaseErrors, Entitlement, EntitlementApikey, EntitlementError, EntitlementPlan, EntitlementUsage, Error, Identity, ListDatabasesData, ListDatabasesError, ListDatabasesErrors, ListDatabasesResponse, ListDatabasesResponses, ListDownloadsData, ListDownloadsError, ListDownloadsErrors, ListDownloadsResponse, ListDownloadsResponses, LookupBatchData, LookupBatchError, LookupBatchErrors, LookupBatchResponse, LookupBatchResponses, LookupError, LookupIpData, LookupIpError, LookupIpErrors, LookupIpResponse, LookupIpResponses, LookupMyIpData, LookupMyIpError, LookupMyIpErrors, LookupMyIpResponse, LookupMyIpResponses, LookupResponse, MyEntitlementData, MyEntitlementError, MyEntitlementErrors, MyEntitlementResponse, MyEntitlementResponses, OauthAuthorizeData, OauthAuthorizeErrors, OauthDeviceAuthorizationData, OauthDeviceAuthorizationError, OauthDeviceAuthorizationErrors, OauthDeviceAuthorizationResponse, OauthDeviceAuthorizationResponses, OauthError, OauthMetadata, OauthMetadataData, OauthMetadataResponse, OauthMetadataResponses, OauthRevokeData, OauthRevokeResponse, OauthRevokeResponses, OauthTokenData, OauthTokenError, OauthTokenErrors, OauthTokenResponse, OauthTokenResponses, ProxyDetail, RevokeRequest, Standing, TokenRequest, TokenResponse, VpnDetail } from './types.gen.js';
|
package/dist/generated/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export {
|
|
2
|
+
export { accountCreateApikey, accountIdentity, accountListApikeys, accountOrg, accountOrgMembers, accountRevealApikey, accountRevokeApikey, accountRotateApikey, databaseChecksum, databaseMetadata, downloadDatabase, listDatabases, listDownloads, lookupBatch, lookupIp, lookupMyIp, myEntitlement, oauthAuthorize, oauthDeviceAuthorization, oauthMetadata, oauthRevoke, oauthToken } from './sdk.gen.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,wBAAwB,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
1
|
+
import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape } from './client/index.js';
|
|
2
|
+
import type { AccountCreateApikeyData, AccountCreateApikeyErrors, AccountCreateApikeyResponses, AccountIdentityData, AccountIdentityErrors, AccountIdentityResponses, AccountListApikeysData, AccountListApikeysErrors, AccountListApikeysResponses, AccountOrgData, AccountOrgErrors, AccountOrgMembersData, AccountOrgMembersErrors, AccountOrgMembersResponses, AccountOrgResponses, AccountRevealApikeyData, AccountRevealApikeyErrors, AccountRevealApikeyResponses, AccountRevokeApikeyData, AccountRevokeApikeyErrors, AccountRevokeApikeyResponses, AccountRotateApikeyData, AccountRotateApikeyErrors, AccountRotateApikeyResponses, DatabaseChecksumData, DatabaseChecksumErrors, DatabaseChecksumResponses, DatabaseMetadataData, DatabaseMetadataErrors, DatabaseMetadataResponses, DownloadDatabaseData, DownloadDatabaseErrors, ListDatabasesData, ListDatabasesErrors, ListDatabasesResponses, ListDownloadsData, ListDownloadsErrors, ListDownloadsResponses, LookupBatchData, LookupBatchErrors, LookupBatchResponses, LookupIpData, LookupIpErrors, LookupIpResponses, LookupMyIpData, LookupMyIpErrors, LookupMyIpResponses, MyEntitlementData, MyEntitlementErrors, MyEntitlementResponses, OauthAuthorizeData, OauthAuthorizeErrors, OauthDeviceAuthorizationData, OauthDeviceAuthorizationErrors, OauthDeviceAuthorizationResponses, OauthMetadataData, OauthMetadataResponses, OauthRevokeData, OauthRevokeResponses, OauthTokenData, OauthTokenErrors, OauthTokenResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -23,7 +23,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const lookupIp: <ThrowOnError extends boolean = false>(options: Options<LookupIpData, ThrowOnError>) => RequestResult<LookupIpResponses, LookupIpErrors, ThrowOnError>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* My IP
|
|
27
27
|
*
|
|
28
28
|
* Answers what is known about the address this request came from, which is
|
|
29
29
|
* the same answer `GET /{ip}` gives for that address: the plan behind the
|
|
@@ -36,6 +36,29 @@ export declare const lookupIp: <ThrowOnError extends boolean = false>(options: O
|
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
38
38
|
export declare const lookupMyIp: <ThrowOnError extends boolean = false>(options?: Options<LookupMyIpData, ThrowOnError>) => RequestResult<LookupMyIpResponses, LookupMyIpErrors, ThrowOnError>;
|
|
39
|
+
/**
|
|
40
|
+
* Batch
|
|
41
|
+
*
|
|
42
|
+
* Answers up to 1000 addresses in one call. Each distinct string in `ips`
|
|
43
|
+
* is one lookup: it costs exactly what `GET /{ip}` costs for that address
|
|
44
|
+
* and comes back with exactly the fields that call would carry for your
|
|
45
|
+
* plan. Exact duplicates collapse to one entry and one lookup.
|
|
46
|
+
*
|
|
47
|
+
* Both maps in the answer are keyed by the string you sent, so nothing has
|
|
48
|
+
* to be lined up by position; the `ip` inside each result is the
|
|
49
|
+
* normalized form. An address that could not be answered sits in `errors`
|
|
50
|
+
* with the status and message the single lookup would have given, and
|
|
51
|
+
* never disturbs the others: a string that is not an address is a `400`
|
|
52
|
+
* there, and an allowance that runs out part way through leaves the
|
|
53
|
+
* remaining entries as `429`s.
|
|
54
|
+
*
|
|
55
|
+
* The call itself fails only for the reasons below, and a `429` on the
|
|
56
|
+
* call always carries `Retry-After`: the batch is admitted or refused
|
|
57
|
+
* whole by the rate limit, so a per-entry `429` is always a spent
|
|
58
|
+
* allowance and never a throttle.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare const lookupBatch: <ThrowOnError extends boolean = false>(options: Options<LookupBatchData, ThrowOnError>) => RequestResult<LookupBatchResponses, LookupBatchErrors, ThrowOnError>;
|
|
39
62
|
/**
|
|
40
63
|
* List
|
|
41
64
|
*
|
|
@@ -80,10 +103,172 @@ export declare const databaseChecksum: <ThrowOnError extends boolean = false>(op
|
|
|
80
103
|
*/
|
|
81
104
|
export declare const listDownloads: <ThrowOnError extends boolean = false>(options?: Options<ListDownloadsData, ThrowOnError>) => RequestResult<ListDownloadsResponses, ListDownloadsErrors, ThrowOnError>;
|
|
82
105
|
/**
|
|
83
|
-
*
|
|
106
|
+
* Plan and usage
|
|
84
107
|
*
|
|
85
108
|
* Answers what the presented key is, what plan is behind it, and what has
|
|
86
109
|
* been spent against that plan's allowance in the current window.
|
|
87
110
|
*
|
|
88
111
|
*/
|
|
89
|
-
export declare const
|
|
112
|
+
export declare const myEntitlement: <ThrowOnError extends boolean = false>(options?: Options<MyEntitlementData, ThrowOnError>) => RequestResult<MyEntitlementResponses, MyEntitlementErrors, ThrowOnError>;
|
|
113
|
+
/**
|
|
114
|
+
* Identity
|
|
115
|
+
*
|
|
116
|
+
* The identity behind this credential: what it is, the organization it is
|
|
117
|
+
* scoped to, and the scopes it currently holds.
|
|
118
|
+
*
|
|
119
|
+
* `user` is present for an OAuth token and ABSENT for an API key, which
|
|
120
|
+
* has an organization but no person behind it. `credential.kind` says
|
|
121
|
+
* which you are holding, so a client can branch without guessing from a
|
|
122
|
+
* missing field.
|
|
123
|
+
*
|
|
124
|
+
* Narrower than what the console shows its own user on purpose: an
|
|
125
|
+
* integration needs a name to display and an organization to address, not
|
|
126
|
+
* a profile. The `scopes` array is what the credential may do RIGHT NOW,
|
|
127
|
+
* so a client can render its own capabilities rather than discovering
|
|
128
|
+
* them from a 403.
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
export declare const accountIdentity: <ThrowOnError extends boolean = false>(options?: Options<AccountIdentityData, ThrowOnError>) => RequestResult<AccountIdentityResponses, AccountIdentityErrors, ThrowOnError>;
|
|
132
|
+
/**
|
|
133
|
+
* Organization
|
|
134
|
+
*
|
|
135
|
+
* The organization this credential is scoped to.
|
|
136
|
+
*
|
|
137
|
+
* There is no way to name a different one. A credential describes exactly
|
|
138
|
+
* one organization, so an identifier in the path could only ever be your
|
|
139
|
+
* own or a refusal.
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
export declare const accountOrg: <ThrowOnError extends boolean = false>(options?: Options<AccountOrgData, ThrowOnError>) => RequestResult<AccountOrgResponses, AccountOrgErrors, ThrowOnError>;
|
|
143
|
+
/**
|
|
144
|
+
* Members
|
|
145
|
+
*
|
|
146
|
+
* Read-only. Adding or removing a member is an invitation flow with email
|
|
147
|
+
* in the middle rather than a POST, and modelling it as one here would
|
|
148
|
+
* promise something this API does not do.
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
export declare const accountOrgMembers: <ThrowOnError extends boolean = false>(options?: Options<AccountOrgMembersData, ThrowOnError>) => RequestResult<AccountOrgMembersResponses, AccountOrgMembersErrors, ThrowOnError>;
|
|
152
|
+
/**
|
|
153
|
+
* List
|
|
154
|
+
*
|
|
155
|
+
* Metadata only. A key's secret is never in a list - not here and not in
|
|
156
|
+
* the console - because a list is the response that ends up in logs,
|
|
157
|
+
* caches and support tickets.
|
|
158
|
+
*
|
|
159
|
+
* `retrievable` says whether the secret could still be read back at all.
|
|
160
|
+
* A key issued before this product stored secrets recoverably was never
|
|
161
|
+
* kept, so `reveal` will refuse it permanently; rotating produces one
|
|
162
|
+
* that can be read.
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
export declare const accountListApikeys: <ThrowOnError extends boolean = false>(options?: Options<AccountListApikeysData, ThrowOnError>) => RequestResult<AccountListApikeysResponses, AccountListApikeysErrors, ThrowOnError>;
|
|
166
|
+
/**
|
|
167
|
+
* Create
|
|
168
|
+
*
|
|
169
|
+
* Creates a key and returns its secret.
|
|
170
|
+
*
|
|
171
|
+
* This is the ONLY response that ever carries the secret, and only
|
|
172
|
+
* because this is the moment it comes into existence. Store it now.
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
export declare const accountCreateApikey: <ThrowOnError extends boolean = false>(options: Options<AccountCreateApikeyData, ThrowOnError>) => RequestResult<AccountCreateApikeyResponses, AccountCreateApikeyErrors, ThrowOnError>;
|
|
176
|
+
/**
|
|
177
|
+
* Rotate
|
|
178
|
+
*
|
|
179
|
+
* Replaces the secret behind a key, keeping its id, name and settings.
|
|
180
|
+
* The previous secret stops working immediately.
|
|
181
|
+
*
|
|
182
|
+
*/
|
|
183
|
+
export declare const accountRotateApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRotateApikeyData, ThrowOnError>) => RequestResult<AccountRotateApikeyResponses, AccountRotateApikeyErrors, ThrowOnError>;
|
|
184
|
+
/**
|
|
185
|
+
* Revoke
|
|
186
|
+
*
|
|
187
|
+
* Stops the key working. Revocation is soft: the key stays listed with a
|
|
188
|
+
* `revoked_at`, because the organization still owns whatever it did while
|
|
189
|
+
* it was alive.
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
export declare const accountRevokeApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRevokeApikeyData, ThrowOnError>) => RequestResult<AccountRevokeApikeyResponses, AccountRevokeApikeyErrors, ThrowOnError>;
|
|
193
|
+
/**
|
|
194
|
+
* Reveal
|
|
195
|
+
*
|
|
196
|
+
* Returns an existing key's secret.
|
|
197
|
+
*
|
|
198
|
+
* Its own scope rather than part of `apikeys.manage`, because the two are
|
|
199
|
+
* different acts: rotating replaces a secret you never see, while this
|
|
200
|
+
* hands one over.
|
|
201
|
+
*
|
|
202
|
+
* Refused with `NOT_RETRIEVABLE` for a key issued before this product
|
|
203
|
+
* stored secrets recoverably - that secret was never kept, so no retry
|
|
204
|
+
* will ever produce it. Rotate the key instead.
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
export declare const accountRevealApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRevealApikeyData, ThrowOnError>) => RequestResult<AccountRevealApikeyResponses, AccountRevealApikeyErrors, ThrowOnError>;
|
|
208
|
+
/**
|
|
209
|
+
* Discovery
|
|
210
|
+
*
|
|
211
|
+
* RFC 8414 authorization server metadata: the endpoints, the grant types
|
|
212
|
+
* and the scopes this server supports.
|
|
213
|
+
*
|
|
214
|
+
* Read this rather than hardcoding endpoints. It is also served at
|
|
215
|
+
* `/.well-known/openid-configuration`, identically, because several
|
|
216
|
+
* clients probe that path first.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
export declare const oauthMetadata: <ThrowOnError extends boolean = false>(options?: Options<OauthMetadataData, ThrowOnError>) => RequestResult<OauthMetadataResponses, unknown, ThrowOnError>;
|
|
220
|
+
/**
|
|
221
|
+
* Device authorization
|
|
222
|
+
*
|
|
223
|
+
* Starts the device flow. Show the `user_code` to the person and send them
|
|
224
|
+
* to `verification_uri`; `verification_uri_complete` has the code already
|
|
225
|
+
* embedded, which is what to open if you can open a browser at all.
|
|
226
|
+
*
|
|
227
|
+
* Then poll `/oauth/token`, no faster than `interval` seconds.
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
export declare const oauthDeviceAuthorization: <ThrowOnError extends boolean = false>(options: Options<OauthDeviceAuthorizationData, ThrowOnError>) => RequestResult<OauthDeviceAuthorizationResponses, OauthDeviceAuthorizationErrors, ThrowOnError>;
|
|
231
|
+
/**
|
|
232
|
+
* Authorize
|
|
233
|
+
*
|
|
234
|
+
* The browser entry point for the authorization-code flow. This is a
|
|
235
|
+
* redirect target, not something to call from code.
|
|
236
|
+
*
|
|
237
|
+
* An unknown `client_id` or an unregistered `redirect_uri` is shown to the
|
|
238
|
+
* USER and never redirected, because sending an error to an address we
|
|
239
|
+
* have not verified belongs to you is how an open redirector works.
|
|
240
|
+
* Everything else comes back to your `redirect_uri` with `error`, your
|
|
241
|
+
* `state`, and `iss`.
|
|
242
|
+
*
|
|
243
|
+
*/
|
|
244
|
+
export declare const oauthAuthorize: <ThrowOnError extends boolean = false>(options: Options<OauthAuthorizeData, ThrowOnError>) => RequestResult<unknown, OauthAuthorizeErrors, ThrowOnError>;
|
|
245
|
+
/**
|
|
246
|
+
* Token
|
|
247
|
+
*
|
|
248
|
+
* Three grant types.
|
|
249
|
+
*
|
|
250
|
+
* `urn:ietf:params:oauth:grant-type:device_code` polls a device
|
|
251
|
+
* authorization. Until the person approves it answers
|
|
252
|
+
* `authorization_pending`; poll faster than `interval` and it answers
|
|
253
|
+
* `slow_down`, which means widen your interval and keep it widened.
|
|
254
|
+
*
|
|
255
|
+
* `authorization_code` exchanges a code from `/oauth/authorize`, with the
|
|
256
|
+
* `code_verifier` matching the challenge you sent.
|
|
257
|
+
*
|
|
258
|
+
* `refresh_token` exchanges a refresh token. The presented token is
|
|
259
|
+
* consumed whatever happens next, so store the new one before using it.
|
|
260
|
+
*
|
|
261
|
+
*/
|
|
262
|
+
export declare const oauthToken: <ThrowOnError extends boolean = false>(options: Options<OauthTokenData, ThrowOnError>) => RequestResult<OauthTokenResponses, OauthTokenErrors, ThrowOnError>;
|
|
263
|
+
/**
|
|
264
|
+
* Revoke
|
|
265
|
+
*
|
|
266
|
+
* RFC 7009. Always answers 200, including for a token that was never
|
|
267
|
+
* valid - an endpoint that distinguished the two would be a way to test
|
|
268
|
+
* whether a stolen string is a live credential.
|
|
269
|
+
*
|
|
270
|
+
* Revoking a REFRESH token ends the whole authorization and takes its
|
|
271
|
+
* access tokens with it. Revoking an access token affects only that token.
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
export declare const oauthRevoke: <ThrowOnError extends boolean = false>(options: Options<OauthRevokeData, ThrowOnError>) => RequestResult<OauthRevokeResponses, unknown, ThrowOnError>;
|