vpndetection 4.2.0 → 5.0.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 +4 -4
- package/dist/client.d.ts +3 -10
- package/dist/client.js +4 -13
- package/dist/client.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 +167 -5
- package/dist/generated/sdk.gen.js +227 -4
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +534 -19
- package/dist/index.d.ts +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -52,10 +52,10 @@ 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.
|
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
|
/**
|
|
@@ -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,14 +117,7 @@ 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
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The former name of `myAccount`.
|
|
123
|
-
*
|
|
124
|
-
* @deprecated Use `myAccount`. Kept because it shipped in 3.1.0 and 4.0.0;
|
|
125
|
-
* it goes at the next major.
|
|
126
|
-
*/
|
|
127
|
-
me(options?: LookupOptions): Promise<AccountMe>;
|
|
120
|
+
myEntitlement(options?: LookupOptions): Promise<Entitlement>;
|
|
128
121
|
/**
|
|
129
122
|
* Classify many addresses concurrently.
|
|
130
123
|
*
|
package/dist/client.js
CHANGED
|
@@ -2,7 +2,7 @@ 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, lookupIp, lookupMyIp, } from './generated/sdk.gen.js';
|
|
6
6
|
import { bogonResult, isBogon } from './bogon.js';
|
|
7
7
|
import { errorFromResponse, VPNDetectionError } from './errors.js';
|
|
8
8
|
import { DATABASE_FORMATS, toResult } from './types.js';
|
|
@@ -107,7 +107,7 @@ export class VPNDetection {
|
|
|
107
107
|
*
|
|
108
108
|
* Named for what it answers rather than `me`, which sits one letter from
|
|
109
109
|
* `myIp` and means something quite different: one is which address you are
|
|
110
|
-
* calling FROM, the other is
|
|
110
|
+
* calling FROM, the other is what the key you are calling WITH may spend.
|
|
111
111
|
*
|
|
112
112
|
* Unlike a lookup there is no useful unauthenticated answer, so a client
|
|
113
113
|
* built without a key gets an unauthorized error rather than a partial one.
|
|
@@ -120,24 +120,15 @@ export class VPNDetection {
|
|
|
120
120
|
* Deliberately NOT cached: the whole point is what has been spent, and a
|
|
121
121
|
* cached answer is a wrong one within seconds of the next request.
|
|
122
122
|
*/
|
|
123
|
-
async
|
|
123
|
+
async myEntitlement(options = {}) {
|
|
124
124
|
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
125
125
|
return withRetry(options.retries ?? this.retries, async () => {
|
|
126
|
-
const res = await deadline(timeoutMs, (signal) =>
|
|
126
|
+
const res = await deadline(timeoutMs, (signal) => myEntitlement({
|
|
127
127
|
client: this.client, signal: signal,
|
|
128
128
|
}));
|
|
129
129
|
return unwrap(res);
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
/**
|
|
133
|
-
* The former name of `myAccount`.
|
|
134
|
-
*
|
|
135
|
-
* @deprecated Use `myAccount`. Kept because it shipped in 3.1.0 and 4.0.0;
|
|
136
|
-
* it goes at the next major.
|
|
137
|
-
*/
|
|
138
|
-
async me(options = {}) {
|
|
139
|
-
return this.myAccount(options);
|
|
140
|
-
}
|
|
141
132
|
/**
|
|
142
133
|
* Classify many addresses concurrently.
|
|
143
134
|
*
|
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,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,EACH,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,IAAI,gBAAg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, accountIdentity, accountListApikeys, accountOrg, accountOrgMembers, accountRevealApikey, accountRevokeApikey, accountRotateApikey, databaseChecksum, databaseMetadata, downloadDatabase, listDatabases, listDownloads, 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, 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, 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, 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,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, 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
|
|
@@ -80,10 +80,172 @@ export declare const databaseChecksum: <ThrowOnError extends boolean = false>(op
|
|
|
80
80
|
*/
|
|
81
81
|
export declare const listDownloads: <ThrowOnError extends boolean = false>(options?: Options<ListDownloadsData, ThrowOnError>) => RequestResult<ListDownloadsResponses, ListDownloadsErrors, ThrowOnError>;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Plan and usage
|
|
84
84
|
*
|
|
85
85
|
* Answers what the presented key is, what plan is behind it, and what has
|
|
86
86
|
* been spent against that plan's allowance in the current window.
|
|
87
87
|
*
|
|
88
88
|
*/
|
|
89
|
-
export declare const
|
|
89
|
+
export declare const myEntitlement: <ThrowOnError extends boolean = false>(options?: Options<MyEntitlementData, ThrowOnError>) => RequestResult<MyEntitlementResponses, MyEntitlementErrors, ThrowOnError>;
|
|
90
|
+
/**
|
|
91
|
+
* Identity
|
|
92
|
+
*
|
|
93
|
+
* The identity behind this credential: what it is, the organization it is
|
|
94
|
+
* scoped to, and the scopes it currently holds.
|
|
95
|
+
*
|
|
96
|
+
* `user` is present for an OAuth token and ABSENT for an API key, which
|
|
97
|
+
* has an organization but no person behind it. `credential.kind` says
|
|
98
|
+
* which you are holding, so a client can branch without guessing from a
|
|
99
|
+
* missing field.
|
|
100
|
+
*
|
|
101
|
+
* Narrower than what the console shows its own user on purpose: an
|
|
102
|
+
* integration needs a name to display and an organization to address, not
|
|
103
|
+
* a profile. The `scopes` array is what the credential may do RIGHT NOW,
|
|
104
|
+
* so a client can render its own capabilities rather than discovering
|
|
105
|
+
* them from a 403.
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
export declare const accountIdentity: <ThrowOnError extends boolean = false>(options?: Options<AccountIdentityData, ThrowOnError>) => RequestResult<AccountIdentityResponses, AccountIdentityErrors, ThrowOnError>;
|
|
109
|
+
/**
|
|
110
|
+
* Organization
|
|
111
|
+
*
|
|
112
|
+
* The organization this credential is scoped to.
|
|
113
|
+
*
|
|
114
|
+
* There is no way to name a different one. A credential describes exactly
|
|
115
|
+
* one organization, so an identifier in the path could only ever be your
|
|
116
|
+
* own or a refusal.
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export declare const accountOrg: <ThrowOnError extends boolean = false>(options?: Options<AccountOrgData, ThrowOnError>) => RequestResult<AccountOrgResponses, AccountOrgErrors, ThrowOnError>;
|
|
120
|
+
/**
|
|
121
|
+
* Members
|
|
122
|
+
*
|
|
123
|
+
* Read-only. Adding or removing a member is an invitation flow with email
|
|
124
|
+
* in the middle rather than a POST, and modelling it as one here would
|
|
125
|
+
* promise something this API does not do.
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
export declare const accountOrgMembers: <ThrowOnError extends boolean = false>(options?: Options<AccountOrgMembersData, ThrowOnError>) => RequestResult<AccountOrgMembersResponses, AccountOrgMembersErrors, ThrowOnError>;
|
|
129
|
+
/**
|
|
130
|
+
* List
|
|
131
|
+
*
|
|
132
|
+
* Metadata only. A key's secret is never in a list - not here and not in
|
|
133
|
+
* the console - because a list is the response that ends up in logs,
|
|
134
|
+
* caches and support tickets.
|
|
135
|
+
*
|
|
136
|
+
* `retrievable` says whether the secret could still be read back at all.
|
|
137
|
+
* A key issued before this product stored secrets recoverably was never
|
|
138
|
+
* kept, so `reveal` will refuse it permanently; rotating produces one
|
|
139
|
+
* that can be read.
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
export declare const accountListApikeys: <ThrowOnError extends boolean = false>(options?: Options<AccountListApikeysData, ThrowOnError>) => RequestResult<AccountListApikeysResponses, AccountListApikeysErrors, ThrowOnError>;
|
|
143
|
+
/**
|
|
144
|
+
* Create
|
|
145
|
+
*
|
|
146
|
+
* Creates a key and returns its secret.
|
|
147
|
+
*
|
|
148
|
+
* This is the ONLY response that ever carries the secret, and only
|
|
149
|
+
* because this is the moment it comes into existence. Store it now.
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
export declare const accountCreateApikey: <ThrowOnError extends boolean = false>(options: Options<AccountCreateApikeyData, ThrowOnError>) => RequestResult<AccountCreateApikeyResponses, AccountCreateApikeyErrors, ThrowOnError>;
|
|
153
|
+
/**
|
|
154
|
+
* Rotate
|
|
155
|
+
*
|
|
156
|
+
* Replaces the secret behind a key, keeping its id, name and settings.
|
|
157
|
+
* The previous secret stops working immediately.
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
export declare const accountRotateApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRotateApikeyData, ThrowOnError>) => RequestResult<AccountRotateApikeyResponses, AccountRotateApikeyErrors, ThrowOnError>;
|
|
161
|
+
/**
|
|
162
|
+
* Revoke
|
|
163
|
+
*
|
|
164
|
+
* Stops the key working. Revocation is soft: the key stays listed with a
|
|
165
|
+
* `revoked_at`, because the organization still owns whatever it did while
|
|
166
|
+
* it was alive.
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
export declare const accountRevokeApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRevokeApikeyData, ThrowOnError>) => RequestResult<AccountRevokeApikeyResponses, AccountRevokeApikeyErrors, ThrowOnError>;
|
|
170
|
+
/**
|
|
171
|
+
* Reveal
|
|
172
|
+
*
|
|
173
|
+
* Returns an existing key's secret.
|
|
174
|
+
*
|
|
175
|
+
* Its own scope rather than part of `apikeys.manage`, because the two are
|
|
176
|
+
* different acts: rotating replaces a secret you never see, while this
|
|
177
|
+
* hands one over.
|
|
178
|
+
*
|
|
179
|
+
* Refused with `NOT_RETRIEVABLE` for a key issued before this product
|
|
180
|
+
* stored secrets recoverably - that secret was never kept, so no retry
|
|
181
|
+
* will ever produce it. Rotate the key instead.
|
|
182
|
+
*
|
|
183
|
+
*/
|
|
184
|
+
export declare const accountRevealApikey: <ThrowOnError extends boolean = false>(options: Options<AccountRevealApikeyData, ThrowOnError>) => RequestResult<AccountRevealApikeyResponses, AccountRevealApikeyErrors, ThrowOnError>;
|
|
185
|
+
/**
|
|
186
|
+
* Discovery
|
|
187
|
+
*
|
|
188
|
+
* RFC 8414 authorization server metadata: the endpoints, the grant types
|
|
189
|
+
* and the scopes this server supports.
|
|
190
|
+
*
|
|
191
|
+
* Read this rather than hardcoding endpoints. It is also served at
|
|
192
|
+
* `/.well-known/openid-configuration`, identically, because several
|
|
193
|
+
* clients probe that path first.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
export declare const oauthMetadata: <ThrowOnError extends boolean = false>(options?: Options<OauthMetadataData, ThrowOnError>) => RequestResult<OauthMetadataResponses, unknown, ThrowOnError>;
|
|
197
|
+
/**
|
|
198
|
+
* Device authorization
|
|
199
|
+
*
|
|
200
|
+
* Starts the device flow. Show the `user_code` to the person and send them
|
|
201
|
+
* to `verification_uri`; `verification_uri_complete` has the code already
|
|
202
|
+
* embedded, which is what to open if you can open a browser at all.
|
|
203
|
+
*
|
|
204
|
+
* Then poll `/oauth/token`, no faster than `interval` seconds.
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
export declare const oauthDeviceAuthorization: <ThrowOnError extends boolean = false>(options: Options<OauthDeviceAuthorizationData, ThrowOnError>) => RequestResult<OauthDeviceAuthorizationResponses, OauthDeviceAuthorizationErrors, ThrowOnError>;
|
|
208
|
+
/**
|
|
209
|
+
* Authorize
|
|
210
|
+
*
|
|
211
|
+
* The browser entry point for the authorization-code flow. This is a
|
|
212
|
+
* redirect target, not something to call from code.
|
|
213
|
+
*
|
|
214
|
+
* An unknown `client_id` or an unregistered `redirect_uri` is shown to the
|
|
215
|
+
* USER and never redirected, because sending an error to an address we
|
|
216
|
+
* have not verified belongs to you is how an open redirector works.
|
|
217
|
+
* Everything else comes back to your `redirect_uri` with `error`, your
|
|
218
|
+
* `state`, and `iss`.
|
|
219
|
+
*
|
|
220
|
+
*/
|
|
221
|
+
export declare const oauthAuthorize: <ThrowOnError extends boolean = false>(options: Options<OauthAuthorizeData, ThrowOnError>) => RequestResult<unknown, OauthAuthorizeErrors, ThrowOnError>;
|
|
222
|
+
/**
|
|
223
|
+
* Token
|
|
224
|
+
*
|
|
225
|
+
* Three grant types.
|
|
226
|
+
*
|
|
227
|
+
* `urn:ietf:params:oauth:grant-type:device_code` polls a device
|
|
228
|
+
* authorization. Until the person approves it answers
|
|
229
|
+
* `authorization_pending`; poll faster than `interval` and it answers
|
|
230
|
+
* `slow_down`, which means widen your interval and keep it widened.
|
|
231
|
+
*
|
|
232
|
+
* `authorization_code` exchanges a code from `/oauth/authorize`, with the
|
|
233
|
+
* `code_verifier` matching the challenge you sent.
|
|
234
|
+
*
|
|
235
|
+
* `refresh_token` exchanges a refresh token. The presented token is
|
|
236
|
+
* consumed whatever happens next, so store the new one before using it.
|
|
237
|
+
*
|
|
238
|
+
*/
|
|
239
|
+
export declare const oauthToken: <ThrowOnError extends boolean = false>(options: Options<OauthTokenData, ThrowOnError>) => RequestResult<OauthTokenResponses, OauthTokenErrors, ThrowOnError>;
|
|
240
|
+
/**
|
|
241
|
+
* Revoke
|
|
242
|
+
*
|
|
243
|
+
* RFC 7009. Always answers 200, including for a token that was never
|
|
244
|
+
* valid - an endpoint that distinguished the two would be a way to test
|
|
245
|
+
* whether a stolen string is a live credential.
|
|
246
|
+
*
|
|
247
|
+
* Revoking a REFRESH token ends the whole authorization and takes its
|
|
248
|
+
* access tokens with it. Revoking an access token affects only that token.
|
|
249
|
+
*
|
|
250
|
+
*/
|
|
251
|
+
export declare const oauthRevoke: <ThrowOnError extends boolean = false>(options: Options<OauthRevokeData, ThrowOnError>) => RequestResult<OauthRevokeResponses, unknown, ThrowOnError>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { client } from './client.gen.js';
|
|
3
|
+
import { urlSearchParamsBodySerializer } from './client/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* Lookup
|
|
5
6
|
*
|
|
@@ -22,7 +23,7 @@ export const lookupIp = (options) => (options.client ?? client).get({
|
|
|
22
23
|
...options
|
|
23
24
|
});
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* My IP
|
|
26
27
|
*
|
|
27
28
|
* Answers what is known about the address this request came from, which is
|
|
28
29
|
* the same answer `GET /{ip}` gives for that address: the plan behind the
|
|
@@ -151,13 +152,13 @@ export const listDownloads = (options) => (options?.client ?? client).get({
|
|
|
151
152
|
...options
|
|
152
153
|
});
|
|
153
154
|
/**
|
|
154
|
-
*
|
|
155
|
+
* Plan and usage
|
|
155
156
|
*
|
|
156
157
|
* Answers what the presented key is, what plan is behind it, and what has
|
|
157
158
|
* been spent against that plan's allowance in the current window.
|
|
158
159
|
*
|
|
159
160
|
*/
|
|
160
|
-
export const
|
|
161
|
+
export const myEntitlement = (options) => (options?.client ?? client).get({
|
|
161
162
|
security: [
|
|
162
163
|
{
|
|
163
164
|
in: 'query',
|
|
@@ -167,7 +168,229 @@ export const accountMe = (options) => (options?.client ?? client).get({
|
|
|
167
168
|
{ name: 'X-Api-Key', type: 'apiKey' },
|
|
168
169
|
{ scheme: 'bearer', type: 'http' }
|
|
169
170
|
],
|
|
170
|
-
url: '/api/v1/
|
|
171
|
+
url: '/api/v1/entitlement',
|
|
171
172
|
...options
|
|
172
173
|
});
|
|
174
|
+
/**
|
|
175
|
+
* Identity
|
|
176
|
+
*
|
|
177
|
+
* The identity behind this credential: what it is, the organization it is
|
|
178
|
+
* scoped to, and the scopes it currently holds.
|
|
179
|
+
*
|
|
180
|
+
* `user` is present for an OAuth token and ABSENT for an API key, which
|
|
181
|
+
* has an organization but no person behind it. `credential.kind` says
|
|
182
|
+
* which you are holding, so a client can branch without guessing from a
|
|
183
|
+
* missing field.
|
|
184
|
+
*
|
|
185
|
+
* Narrower than what the console shows its own user on purpose: an
|
|
186
|
+
* integration needs a name to display and an organization to address, not
|
|
187
|
+
* a profile. The `scopes` array is what the credential may do RIGHT NOW,
|
|
188
|
+
* so a client can render its own capabilities rather than discovering
|
|
189
|
+
* them from a 403.
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
export const accountIdentity = (options) => (options?.client ?? client).get({
|
|
193
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
194
|
+
url: '/api/v1/iam/identity',
|
|
195
|
+
...options
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Organization
|
|
199
|
+
*
|
|
200
|
+
* The organization this credential is scoped to.
|
|
201
|
+
*
|
|
202
|
+
* There is no way to name a different one. A credential describes exactly
|
|
203
|
+
* one organization, so an identifier in the path could only ever be your
|
|
204
|
+
* own or a refusal.
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
export const accountOrg = (options) => (options?.client ?? client).get({
|
|
208
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
209
|
+
url: '/api/v1/iam/org',
|
|
210
|
+
...options
|
|
211
|
+
});
|
|
212
|
+
/**
|
|
213
|
+
* Members
|
|
214
|
+
*
|
|
215
|
+
* Read-only. Adding or removing a member is an invitation flow with email
|
|
216
|
+
* in the middle rather than a POST, and modelling it as one here would
|
|
217
|
+
* promise something this API does not do.
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
export const accountOrgMembers = (options) => (options?.client ?? client).get({
|
|
221
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
222
|
+
url: '/api/v1/iam/org/members',
|
|
223
|
+
...options
|
|
224
|
+
});
|
|
225
|
+
/**
|
|
226
|
+
* List
|
|
227
|
+
*
|
|
228
|
+
* Metadata only. A key's secret is never in a list - not here and not in
|
|
229
|
+
* the console - because a list is the response that ends up in logs,
|
|
230
|
+
* caches and support tickets.
|
|
231
|
+
*
|
|
232
|
+
* `retrievable` says whether the secret could still be read back at all.
|
|
233
|
+
* A key issued before this product stored secrets recoverably was never
|
|
234
|
+
* kept, so `reveal` will refuse it permanently; rotating produces one
|
|
235
|
+
* that can be read.
|
|
236
|
+
*
|
|
237
|
+
*/
|
|
238
|
+
export const accountListApikeys = (options) => (options?.client ?? client).get({
|
|
239
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
240
|
+
url: '/api/v1/iam/apikeys',
|
|
241
|
+
...options
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* Create
|
|
245
|
+
*
|
|
246
|
+
* Creates a key and returns its secret.
|
|
247
|
+
*
|
|
248
|
+
* This is the ONLY response that ever carries the secret, and only
|
|
249
|
+
* because this is the moment it comes into existence. Store it now.
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
252
|
+
export const accountCreateApikey = (options) => (options.client ?? client).post({
|
|
253
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
254
|
+
url: '/api/v1/iam/apikeys',
|
|
255
|
+
...options,
|
|
256
|
+
headers: {
|
|
257
|
+
'Content-Type': 'application/json',
|
|
258
|
+
...options.headers
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
/**
|
|
262
|
+
* Rotate
|
|
263
|
+
*
|
|
264
|
+
* Replaces the secret behind a key, keeping its id, name and settings.
|
|
265
|
+
* The previous secret stops working immediately.
|
|
266
|
+
*
|
|
267
|
+
*/
|
|
268
|
+
export const accountRotateApikey = (options) => (options.client ?? client).post({
|
|
269
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
270
|
+
url: '/api/v1/iam/apikeys/{id}/rotate',
|
|
271
|
+
...options
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Revoke
|
|
275
|
+
*
|
|
276
|
+
* Stops the key working. Revocation is soft: the key stays listed with a
|
|
277
|
+
* `revoked_at`, because the organization still owns whatever it did while
|
|
278
|
+
* it was alive.
|
|
279
|
+
*
|
|
280
|
+
*/
|
|
281
|
+
export const accountRevokeApikey = (options) => (options.client ?? client).post({
|
|
282
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
283
|
+
url: '/api/v1/iam/apikeys/{id}/revoke',
|
|
284
|
+
...options
|
|
285
|
+
});
|
|
286
|
+
/**
|
|
287
|
+
* Reveal
|
|
288
|
+
*
|
|
289
|
+
* Returns an existing key's secret.
|
|
290
|
+
*
|
|
291
|
+
* Its own scope rather than part of `apikeys.manage`, because the two are
|
|
292
|
+
* different acts: rotating replaces a secret you never see, while this
|
|
293
|
+
* hands one over.
|
|
294
|
+
*
|
|
295
|
+
* Refused with `NOT_RETRIEVABLE` for a key issued before this product
|
|
296
|
+
* stored secrets recoverably - that secret was never kept, so no retry
|
|
297
|
+
* will ever produce it. Rotate the key instead.
|
|
298
|
+
*
|
|
299
|
+
*/
|
|
300
|
+
export const accountRevealApikey = (options) => (options.client ?? client).post({
|
|
301
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
302
|
+
url: '/api/v1/iam/apikeys/{id}/reveal',
|
|
303
|
+
...options
|
|
304
|
+
});
|
|
305
|
+
/**
|
|
306
|
+
* Discovery
|
|
307
|
+
*
|
|
308
|
+
* RFC 8414 authorization server metadata: the endpoints, the grant types
|
|
309
|
+
* and the scopes this server supports.
|
|
310
|
+
*
|
|
311
|
+
* Read this rather than hardcoding endpoints. It is also served at
|
|
312
|
+
* `/.well-known/openid-configuration`, identically, because several
|
|
313
|
+
* clients probe that path first.
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
316
|
+
export const oauthMetadata = (options) => (options?.client ?? client).get({ url: '/.well-known/oauth-authorization-server', ...options });
|
|
317
|
+
/**
|
|
318
|
+
* Device authorization
|
|
319
|
+
*
|
|
320
|
+
* Starts the device flow. Show the `user_code` to the person and send them
|
|
321
|
+
* to `verification_uri`; `verification_uri_complete` has the code already
|
|
322
|
+
* embedded, which is what to open if you can open a browser at all.
|
|
323
|
+
*
|
|
324
|
+
* Then poll `/oauth/token`, no faster than `interval` seconds.
|
|
325
|
+
*
|
|
326
|
+
*/
|
|
327
|
+
export const oauthDeviceAuthorization = (options) => (options.client ?? client).post({
|
|
328
|
+
...urlSearchParamsBodySerializer,
|
|
329
|
+
url: '/oauth/device_authorization',
|
|
330
|
+
...options,
|
|
331
|
+
headers: {
|
|
332
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
333
|
+
...options.headers
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
/**
|
|
337
|
+
* Authorize
|
|
338
|
+
*
|
|
339
|
+
* The browser entry point for the authorization-code flow. This is a
|
|
340
|
+
* redirect target, not something to call from code.
|
|
341
|
+
*
|
|
342
|
+
* An unknown `client_id` or an unregistered `redirect_uri` is shown to the
|
|
343
|
+
* USER and never redirected, because sending an error to an address we
|
|
344
|
+
* have not verified belongs to you is how an open redirector works.
|
|
345
|
+
* Everything else comes back to your `redirect_uri` with `error`, your
|
|
346
|
+
* `state`, and `iss`.
|
|
347
|
+
*
|
|
348
|
+
*/
|
|
349
|
+
export const oauthAuthorize = (options) => (options.client ?? client).get({ url: '/oauth/authorize', ...options });
|
|
350
|
+
/**
|
|
351
|
+
* Token
|
|
352
|
+
*
|
|
353
|
+
* Three grant types.
|
|
354
|
+
*
|
|
355
|
+
* `urn:ietf:params:oauth:grant-type:device_code` polls a device
|
|
356
|
+
* authorization. Until the person approves it answers
|
|
357
|
+
* `authorization_pending`; poll faster than `interval` and it answers
|
|
358
|
+
* `slow_down`, which means widen your interval and keep it widened.
|
|
359
|
+
*
|
|
360
|
+
* `authorization_code` exchanges a code from `/oauth/authorize`, with the
|
|
361
|
+
* `code_verifier` matching the challenge you sent.
|
|
362
|
+
*
|
|
363
|
+
* `refresh_token` exchanges a refresh token. The presented token is
|
|
364
|
+
* consumed whatever happens next, so store the new one before using it.
|
|
365
|
+
*
|
|
366
|
+
*/
|
|
367
|
+
export const oauthToken = (options) => (options.client ?? client).post({
|
|
368
|
+
...urlSearchParamsBodySerializer,
|
|
369
|
+
url: '/oauth/token',
|
|
370
|
+
...options,
|
|
371
|
+
headers: {
|
|
372
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
373
|
+
...options.headers
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
/**
|
|
377
|
+
* Revoke
|
|
378
|
+
*
|
|
379
|
+
* RFC 7009. Always answers 200, including for a token that was never
|
|
380
|
+
* valid - an endpoint that distinguished the two would be a way to test
|
|
381
|
+
* whether a stolen string is a live credential.
|
|
382
|
+
*
|
|
383
|
+
* Revoking a REFRESH token ends the whole authorization and takes its
|
|
384
|
+
* access tokens with it. Revoking an access token affects only that token.
|
|
385
|
+
*
|
|
386
|
+
*/
|
|
387
|
+
export const oauthRevoke = (options) => (options.client ?? client).post({
|
|
388
|
+
...urlSearchParamsBodySerializer,
|
|
389
|
+
url: '/oauth/revoke',
|
|
390
|
+
...options,
|
|
391
|
+
headers: {
|
|
392
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
393
|
+
...options.headers
|
|
394
|
+
}
|
|
395
|
+
});
|
|
173
396
|
//# sourceMappingURL=sdk.gen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.gen.js","sourceRoot":"","sources":["../../src/generated/sdk.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3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,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,IAAI,CAA8C;IAC3P,GAAG,6BAA6B;IAChC,GAAG,EAAE,eAAe;IACpB,GAAG,OAAO;IACV,OAAO,EAAE;QACL,cAAc,EAAE,mCAAmC;QACnD,GAAG,OAAO,CAAC,OAAO;KACrB;CACJ,CAAC,CAAC"}
|
|
@@ -199,7 +199,11 @@ export type DatabaseFormat = 'csvgz' | 'mmdb';
|
|
|
199
199
|
export type DatabaseFormatSize = {
|
|
200
200
|
format: DatabaseFormat;
|
|
201
201
|
/**
|
|
202
|
-
* Size of the published file, or null when it has not been published
|
|
202
|
+
* Size of the published file, or null when it has not been published
|
|
203
|
+
* yet. int64 because it is not hypothetical: resproxy_ip_14d's MMDB is
|
|
204
|
+
* 4.58 GB, so a 32-bit field cannot carry the catalogue and `list`
|
|
205
|
+
* throws for every caller rather than for that one entry.
|
|
206
|
+
*
|
|
203
207
|
*/
|
|
204
208
|
bytes: number | null;
|
|
205
209
|
};
|
|
@@ -277,6 +281,8 @@ export type Download = {
|
|
|
277
281
|
/**
|
|
278
282
|
* Object size at redirect time, NOT bytes delivered: the transfer is a
|
|
279
283
|
* presigned redirect straight to object storage, so we never observe it.
|
|
284
|
+
* int64 for the same reason as DatabaseFormatSize.bytes - it is the
|
|
285
|
+
* size of the same object.
|
|
280
286
|
*
|
|
281
287
|
*/
|
|
282
288
|
bytes: number | null;
|
|
@@ -347,21 +353,21 @@ export type DatabaseMetadata = {
|
|
|
347
353
|
*/
|
|
348
354
|
sample_entries?: number;
|
|
349
355
|
};
|
|
350
|
-
export type
|
|
356
|
+
export type Entitlement = {
|
|
351
357
|
/**
|
|
352
358
|
* The organization the key belongs to.
|
|
353
359
|
*/
|
|
354
360
|
org_id: string;
|
|
355
|
-
apikey:
|
|
356
|
-
plan:
|
|
357
|
-
usage:
|
|
361
|
+
apikey: EntitlementApikey;
|
|
362
|
+
plan: EntitlementPlan;
|
|
363
|
+
usage: EntitlementUsage;
|
|
358
364
|
};
|
|
359
365
|
/**
|
|
360
366
|
* The credential itself. The key is never echoed - only its id, which is
|
|
361
367
|
* what the console shows and what you can act on.
|
|
362
368
|
*
|
|
363
369
|
*/
|
|
364
|
-
export type
|
|
370
|
+
export type EntitlementApikey = {
|
|
365
371
|
id: string;
|
|
366
372
|
/**
|
|
367
373
|
* Null for a key with no end date, which is the normal case.
|
|
@@ -374,7 +380,7 @@ export type AccountApikey = {
|
|
|
374
380
|
*/
|
|
375
381
|
allowed_cidrs: Array<string>;
|
|
376
382
|
};
|
|
377
|
-
export type
|
|
383
|
+
export type EntitlementPlan = {
|
|
378
384
|
/**
|
|
379
385
|
* The plan the organization is on.
|
|
380
386
|
*/
|
|
@@ -387,7 +393,7 @@ export type AccountPlan = {
|
|
|
387
393
|
*/
|
|
388
394
|
tier: 'free' | 'starter' | 'scale' | 'max';
|
|
389
395
|
};
|
|
390
|
-
export type
|
|
396
|
+
export type EntitlementUsage = {
|
|
391
397
|
/**
|
|
392
398
|
* Requests counted in the current window. The same number the lookup
|
|
393
399
|
* API gates on, and it can lag by a few seconds.
|
|
@@ -414,9 +420,175 @@ export type AccountUsage = {
|
|
|
414
420
|
*/
|
|
415
421
|
window_end: string;
|
|
416
422
|
};
|
|
417
|
-
export type
|
|
423
|
+
export type EntitlementError = {
|
|
418
424
|
error: string;
|
|
419
425
|
};
|
|
426
|
+
export type AccountRc = {
|
|
427
|
+
/**
|
|
428
|
+
* The outcome. `SUCCESS` on success; otherwise the reason.
|
|
429
|
+
*/
|
|
430
|
+
rc: string;
|
|
431
|
+
};
|
|
432
|
+
export type Identity = {
|
|
433
|
+
rc: string;
|
|
434
|
+
user: AccountUser;
|
|
435
|
+
org: AccountOrgRef;
|
|
436
|
+
/**
|
|
437
|
+
* What this credential may do right now.
|
|
438
|
+
*/
|
|
439
|
+
scopes: Array<string>;
|
|
440
|
+
};
|
|
441
|
+
export type AccountUser = {
|
|
442
|
+
id: string;
|
|
443
|
+
fullname?: string;
|
|
444
|
+
email?: string;
|
|
445
|
+
};
|
|
446
|
+
export type AccountOrgRef = {
|
|
447
|
+
id: string;
|
|
448
|
+
};
|
|
449
|
+
export type AccountOrgWrap = {
|
|
450
|
+
rc: string;
|
|
451
|
+
org: AccountOrg;
|
|
452
|
+
};
|
|
453
|
+
export type AccountOrg = {
|
|
454
|
+
id: string;
|
|
455
|
+
name?: string;
|
|
456
|
+
created?: string | null;
|
|
457
|
+
};
|
|
458
|
+
export type ApikeyList = {
|
|
459
|
+
rc: string;
|
|
460
|
+
keys: Array<ApikeyDetail>;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Key METADATA. Never the key itself.
|
|
464
|
+
*/
|
|
465
|
+
export type ApikeyDetail = {
|
|
466
|
+
id: string;
|
|
467
|
+
name: string;
|
|
468
|
+
/**
|
|
469
|
+
* The leading, non-secret part, so a key is recognisable without storing it.
|
|
470
|
+
*/
|
|
471
|
+
key_prefix: string;
|
|
472
|
+
created: string;
|
|
473
|
+
expires?: string | null;
|
|
474
|
+
last_used_at?: string | null;
|
|
475
|
+
revoked_at?: string | null;
|
|
476
|
+
/**
|
|
477
|
+
* Source-IP allowlist. EMPTY MEANS UNRESTRICTED, not deny-all.
|
|
478
|
+
*/
|
|
479
|
+
allowed_cidrs?: Array<string>;
|
|
480
|
+
allowed_scopes?: Array<string>;
|
|
481
|
+
/**
|
|
482
|
+
* Whether this key's secret can still be read back. False permanently for a key issued before secrets were stored recoverably.
|
|
483
|
+
*/
|
|
484
|
+
retrievable?: boolean;
|
|
485
|
+
};
|
|
486
|
+
export type AccountCreateApikeyRequest = {
|
|
487
|
+
/**
|
|
488
|
+
* A label you will recognise later. Shown wherever the key is listed.
|
|
489
|
+
*/
|
|
490
|
+
name: string;
|
|
491
|
+
/**
|
|
492
|
+
* What the new key may do. Omit for a key that carries no named scope, which is the safe default.
|
|
493
|
+
*/
|
|
494
|
+
allowed_scopes?: Array<string>;
|
|
495
|
+
};
|
|
496
|
+
export type AccountCreatedApikey = {
|
|
497
|
+
rc: string;
|
|
498
|
+
id: string;
|
|
499
|
+
name?: string;
|
|
500
|
+
/**
|
|
501
|
+
* The secret. Returned once, here, and never again.
|
|
502
|
+
*/
|
|
503
|
+
key: string;
|
|
504
|
+
key_prefix?: string;
|
|
505
|
+
allowed_cidrs?: Array<string>;
|
|
506
|
+
allowed_scopes?: Array<string>;
|
|
507
|
+
};
|
|
508
|
+
export type AccountRevealedApikey = {
|
|
509
|
+
rc: string;
|
|
510
|
+
/**
|
|
511
|
+
* The secret.
|
|
512
|
+
*/
|
|
513
|
+
key: string;
|
|
514
|
+
};
|
|
515
|
+
export type OauthMetadata = {
|
|
516
|
+
issuer: string;
|
|
517
|
+
authorization_endpoint: string;
|
|
518
|
+
token_endpoint: string;
|
|
519
|
+
device_authorization_endpoint?: string;
|
|
520
|
+
revocation_endpoint?: string;
|
|
521
|
+
scopes_supported?: Array<string>;
|
|
522
|
+
response_types_supported?: Array<string>;
|
|
523
|
+
grant_types_supported?: Array<string>;
|
|
524
|
+
code_challenge_methods_supported?: Array<string>;
|
|
525
|
+
/**
|
|
526
|
+
* A client_id may be an https URL serving your client metadata.
|
|
527
|
+
*/
|
|
528
|
+
client_id_metadata_document_supported?: boolean;
|
|
529
|
+
};
|
|
530
|
+
export type DeviceAuthorizationRequest = {
|
|
531
|
+
client_id: string;
|
|
532
|
+
/**
|
|
533
|
+
* Space-delimited. Anything your client is not registered for is dropped rather than refused.
|
|
534
|
+
*/
|
|
535
|
+
scope?: string;
|
|
536
|
+
/**
|
|
537
|
+
* RFC 8707: what the token is for.
|
|
538
|
+
*/
|
|
539
|
+
resource?: string;
|
|
540
|
+
};
|
|
541
|
+
export type DeviceAuthorization = {
|
|
542
|
+
/**
|
|
543
|
+
* Yours. Poll with it; never show it to anyone.
|
|
544
|
+
*/
|
|
545
|
+
device_code: string;
|
|
546
|
+
/**
|
|
547
|
+
* Short and typable. This is what the person confirms.
|
|
548
|
+
*/
|
|
549
|
+
user_code: string;
|
|
550
|
+
verification_uri: string;
|
|
551
|
+
/**
|
|
552
|
+
* The same page with the code already filled in.
|
|
553
|
+
*/
|
|
554
|
+
verification_uri_complete?: string;
|
|
555
|
+
expires_in: number;
|
|
556
|
+
/**
|
|
557
|
+
* Seconds between polls.
|
|
558
|
+
*/
|
|
559
|
+
interval: number;
|
|
560
|
+
};
|
|
561
|
+
export type TokenRequest = {
|
|
562
|
+
grant_type: string;
|
|
563
|
+
client_id: string;
|
|
564
|
+
device_code?: string;
|
|
565
|
+
code?: string;
|
|
566
|
+
code_verifier?: string;
|
|
567
|
+
redirect_uri?: string;
|
|
568
|
+
refresh_token?: string;
|
|
569
|
+
};
|
|
570
|
+
export type TokenResponse = {
|
|
571
|
+
access_token: string;
|
|
572
|
+
token_type: string;
|
|
573
|
+
expires_in: number;
|
|
574
|
+
refresh_token?: string;
|
|
575
|
+
/**
|
|
576
|
+
* What was actually granted, which may be narrower than what was asked for.
|
|
577
|
+
*/
|
|
578
|
+
scope?: string;
|
|
579
|
+
};
|
|
580
|
+
export type RevokeRequest = {
|
|
581
|
+
token: string;
|
|
582
|
+
client_id?: string;
|
|
583
|
+
};
|
|
584
|
+
export type OauthError = {
|
|
585
|
+
error: string;
|
|
586
|
+
error_description?: string;
|
|
587
|
+
};
|
|
588
|
+
/**
|
|
589
|
+
* The key's id, as returned by the list endpoint. Never the key itself.
|
|
590
|
+
*/
|
|
591
|
+
export type ApikeyIdParam = string;
|
|
420
592
|
export type LookupIpData = {
|
|
421
593
|
body?: never;
|
|
422
594
|
path: {
|
|
@@ -667,36 +839,379 @@ export type ListDownloadsResponses = {
|
|
|
667
839
|
};
|
|
668
840
|
};
|
|
669
841
|
export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
|
|
670
|
-
export type
|
|
842
|
+
export type MyEntitlementData = {
|
|
671
843
|
body?: never;
|
|
672
844
|
path?: never;
|
|
673
845
|
query?: never;
|
|
674
|
-
url: '/api/v1/
|
|
846
|
+
url: '/api/v1/entitlement';
|
|
675
847
|
};
|
|
676
|
-
export type
|
|
848
|
+
export type MyEntitlementErrors = {
|
|
677
849
|
/**
|
|
678
850
|
* No key was presented, or it is unknown, revoked or expired.
|
|
679
851
|
*/
|
|
680
|
-
401:
|
|
852
|
+
401: EntitlementError;
|
|
681
853
|
/**
|
|
682
854
|
* The key restricts which source addresses may use it, and this
|
|
683
855
|
* request did not come from one of them.
|
|
684
856
|
*
|
|
685
857
|
*/
|
|
686
|
-
403:
|
|
858
|
+
403: EntitlementError;
|
|
687
859
|
/**
|
|
688
860
|
* The usage counters could not be read. Reported rather than guessed
|
|
689
861
|
* at: the whole answer is the number, and a confident zero would read
|
|
690
862
|
* as "you have used nothing".
|
|
691
863
|
*
|
|
692
864
|
*/
|
|
693
|
-
503:
|
|
865
|
+
503: EntitlementError;
|
|
694
866
|
};
|
|
695
|
-
export type
|
|
696
|
-
export type
|
|
867
|
+
export type MyEntitlementError = MyEntitlementErrors[keyof MyEntitlementErrors];
|
|
868
|
+
export type MyEntitlementResponses = {
|
|
697
869
|
/**
|
|
698
870
|
* The key's entitlements and consumption.
|
|
699
871
|
*/
|
|
700
|
-
200:
|
|
872
|
+
200: Entitlement;
|
|
873
|
+
};
|
|
874
|
+
export type MyEntitlementResponse = MyEntitlementResponses[keyof MyEntitlementResponses];
|
|
875
|
+
export type AccountIdentityData = {
|
|
876
|
+
body?: never;
|
|
877
|
+
path?: never;
|
|
878
|
+
query?: never;
|
|
879
|
+
url: '/api/v1/iam/identity';
|
|
880
|
+
};
|
|
881
|
+
export type AccountIdentityErrors = {
|
|
882
|
+
/**
|
|
883
|
+
* No credential was presented, or it is not valid.
|
|
884
|
+
*/
|
|
885
|
+
401: AccountRc;
|
|
886
|
+
/**
|
|
887
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
888
|
+
* missing scope is deliberately not named.
|
|
889
|
+
*
|
|
890
|
+
*/
|
|
891
|
+
403: AccountRc;
|
|
892
|
+
};
|
|
893
|
+
export type AccountIdentityError = AccountIdentityErrors[keyof AccountIdentityErrors];
|
|
894
|
+
export type AccountIdentityResponses = {
|
|
895
|
+
/**
|
|
896
|
+
* The caller.
|
|
897
|
+
*/
|
|
898
|
+
200: Identity;
|
|
899
|
+
};
|
|
900
|
+
export type AccountIdentityResponse = AccountIdentityResponses[keyof AccountIdentityResponses];
|
|
901
|
+
export type AccountOrgData = {
|
|
902
|
+
body?: never;
|
|
903
|
+
path?: never;
|
|
904
|
+
query?: never;
|
|
905
|
+
url: '/api/v1/iam/org';
|
|
906
|
+
};
|
|
907
|
+
export type AccountOrgErrors = {
|
|
908
|
+
/**
|
|
909
|
+
* No credential was presented, or it is not valid.
|
|
910
|
+
*/
|
|
911
|
+
401: AccountRc;
|
|
912
|
+
/**
|
|
913
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
914
|
+
* missing scope is deliberately not named.
|
|
915
|
+
*
|
|
916
|
+
*/
|
|
917
|
+
403: AccountRc;
|
|
918
|
+
};
|
|
919
|
+
export type AccountOrgError = AccountOrgErrors[keyof AccountOrgErrors];
|
|
920
|
+
export type AccountOrgResponses = {
|
|
921
|
+
/**
|
|
922
|
+
* The organization.
|
|
923
|
+
*/
|
|
924
|
+
200: AccountOrgWrap;
|
|
925
|
+
};
|
|
926
|
+
export type AccountOrgResponse = AccountOrgResponses[keyof AccountOrgResponses];
|
|
927
|
+
export type AccountOrgMembersData = {
|
|
928
|
+
body?: never;
|
|
929
|
+
path?: never;
|
|
930
|
+
query?: never;
|
|
931
|
+
url: '/api/v1/iam/org/members';
|
|
932
|
+
};
|
|
933
|
+
export type AccountOrgMembersErrors = {
|
|
934
|
+
/**
|
|
935
|
+
* No credential was presented, or it is not valid.
|
|
936
|
+
*/
|
|
937
|
+
401: AccountRc;
|
|
938
|
+
/**
|
|
939
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
940
|
+
* missing scope is deliberately not named.
|
|
941
|
+
*
|
|
942
|
+
*/
|
|
943
|
+
403: AccountRc;
|
|
944
|
+
};
|
|
945
|
+
export type AccountOrgMembersError = AccountOrgMembersErrors[keyof AccountOrgMembersErrors];
|
|
946
|
+
export type AccountOrgMembersResponses = {
|
|
947
|
+
/**
|
|
948
|
+
* The members.
|
|
949
|
+
*/
|
|
950
|
+
200: AccountRc;
|
|
951
|
+
};
|
|
952
|
+
export type AccountOrgMembersResponse = AccountOrgMembersResponses[keyof AccountOrgMembersResponses];
|
|
953
|
+
export type AccountListApikeysData = {
|
|
954
|
+
body?: never;
|
|
955
|
+
path?: never;
|
|
956
|
+
query?: never;
|
|
957
|
+
url: '/api/v1/iam/apikeys';
|
|
958
|
+
};
|
|
959
|
+
export type AccountListApikeysErrors = {
|
|
960
|
+
/**
|
|
961
|
+
* No credential was presented, or it is not valid.
|
|
962
|
+
*/
|
|
963
|
+
401: AccountRc;
|
|
964
|
+
/**
|
|
965
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
966
|
+
* missing scope is deliberately not named.
|
|
967
|
+
*
|
|
968
|
+
*/
|
|
969
|
+
403: AccountRc;
|
|
970
|
+
};
|
|
971
|
+
export type AccountListApikeysError = AccountListApikeysErrors[keyof AccountListApikeysErrors];
|
|
972
|
+
export type AccountListApikeysResponses = {
|
|
973
|
+
/**
|
|
974
|
+
* The organization's keys, newest first.
|
|
975
|
+
*/
|
|
976
|
+
200: ApikeyList;
|
|
977
|
+
};
|
|
978
|
+
export type AccountListApikeysResponse = AccountListApikeysResponses[keyof AccountListApikeysResponses];
|
|
979
|
+
export type AccountCreateApikeyData = {
|
|
980
|
+
body: AccountCreateApikeyRequest;
|
|
981
|
+
path?: never;
|
|
982
|
+
query?: never;
|
|
983
|
+
url: '/api/v1/iam/apikeys';
|
|
984
|
+
};
|
|
985
|
+
export type AccountCreateApikeyErrors = {
|
|
986
|
+
/**
|
|
987
|
+
* The request body is missing a required field.
|
|
988
|
+
*/
|
|
989
|
+
400: AccountRc;
|
|
990
|
+
/**
|
|
991
|
+
* No credential was presented, or it is not valid.
|
|
992
|
+
*/
|
|
993
|
+
401: AccountRc;
|
|
994
|
+
/**
|
|
995
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
996
|
+
* missing scope is deliberately not named.
|
|
997
|
+
*
|
|
998
|
+
*/
|
|
999
|
+
403: AccountRc;
|
|
1000
|
+
};
|
|
1001
|
+
export type AccountCreateApikeyError = AccountCreateApikeyErrors[keyof AccountCreateApikeyErrors];
|
|
1002
|
+
export type AccountCreateApikeyResponses = {
|
|
1003
|
+
/**
|
|
1004
|
+
* The new key, including its secret.
|
|
1005
|
+
*/
|
|
1006
|
+
200: AccountCreatedApikey;
|
|
1007
|
+
};
|
|
1008
|
+
export type AccountCreateApikeyResponse = AccountCreateApikeyResponses[keyof AccountCreateApikeyResponses];
|
|
1009
|
+
export type AccountRotateApikeyData = {
|
|
1010
|
+
body?: never;
|
|
1011
|
+
path: {
|
|
1012
|
+
/**
|
|
1013
|
+
* The key's id, as returned by the list endpoint. Never the key itself.
|
|
1014
|
+
*/
|
|
1015
|
+
id: string;
|
|
1016
|
+
};
|
|
1017
|
+
query?: never;
|
|
1018
|
+
url: '/api/v1/iam/apikeys/{id}/rotate';
|
|
1019
|
+
};
|
|
1020
|
+
export type AccountRotateApikeyErrors = {
|
|
1021
|
+
/**
|
|
1022
|
+
* No credential was presented, or it is not valid.
|
|
1023
|
+
*/
|
|
1024
|
+
401: AccountRc;
|
|
1025
|
+
/**
|
|
1026
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
1027
|
+
* missing scope is deliberately not named.
|
|
1028
|
+
*
|
|
1029
|
+
*/
|
|
1030
|
+
403: AccountRc;
|
|
1031
|
+
/**
|
|
1032
|
+
* No such key in this organization.
|
|
1033
|
+
*/
|
|
1034
|
+
404: AccountRc;
|
|
1035
|
+
};
|
|
1036
|
+
export type AccountRotateApikeyError = AccountRotateApikeyErrors[keyof AccountRotateApikeyErrors];
|
|
1037
|
+
export type AccountRotateApikeyResponses = {
|
|
1038
|
+
/**
|
|
1039
|
+
* The key, with its new secret.
|
|
1040
|
+
*/
|
|
1041
|
+
200: AccountCreatedApikey;
|
|
1042
|
+
};
|
|
1043
|
+
export type AccountRotateApikeyResponse = AccountRotateApikeyResponses[keyof AccountRotateApikeyResponses];
|
|
1044
|
+
export type AccountRevokeApikeyData = {
|
|
1045
|
+
body?: never;
|
|
1046
|
+
path: {
|
|
1047
|
+
/**
|
|
1048
|
+
* The key's id, as returned by the list endpoint. Never the key itself.
|
|
1049
|
+
*/
|
|
1050
|
+
id: string;
|
|
1051
|
+
};
|
|
1052
|
+
query?: never;
|
|
1053
|
+
url: '/api/v1/iam/apikeys/{id}/revoke';
|
|
1054
|
+
};
|
|
1055
|
+
export type AccountRevokeApikeyErrors = {
|
|
1056
|
+
/**
|
|
1057
|
+
* No credential was presented, or it is not valid.
|
|
1058
|
+
*/
|
|
1059
|
+
401: AccountRc;
|
|
1060
|
+
/**
|
|
1061
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
1062
|
+
* missing scope is deliberately not named.
|
|
1063
|
+
*
|
|
1064
|
+
*/
|
|
1065
|
+
403: AccountRc;
|
|
1066
|
+
/**
|
|
1067
|
+
* No such key in this organization.
|
|
1068
|
+
*/
|
|
1069
|
+
404: AccountRc;
|
|
1070
|
+
};
|
|
1071
|
+
export type AccountRevokeApikeyError = AccountRevokeApikeyErrors[keyof AccountRevokeApikeyErrors];
|
|
1072
|
+
export type AccountRevokeApikeyResponses = {
|
|
1073
|
+
/**
|
|
1074
|
+
* Revoked.
|
|
1075
|
+
*/
|
|
1076
|
+
200: AccountRc;
|
|
1077
|
+
};
|
|
1078
|
+
export type AccountRevokeApikeyResponse = AccountRevokeApikeyResponses[keyof AccountRevokeApikeyResponses];
|
|
1079
|
+
export type AccountRevealApikeyData = {
|
|
1080
|
+
body?: never;
|
|
1081
|
+
path: {
|
|
1082
|
+
/**
|
|
1083
|
+
* The key's id, as returned by the list endpoint. Never the key itself.
|
|
1084
|
+
*/
|
|
1085
|
+
id: string;
|
|
1086
|
+
};
|
|
1087
|
+
query?: never;
|
|
1088
|
+
url: '/api/v1/iam/apikeys/{id}/reveal';
|
|
1089
|
+
};
|
|
1090
|
+
export type AccountRevealApikeyErrors = {
|
|
1091
|
+
/**
|
|
1092
|
+
* No credential was presented, or it is not valid.
|
|
1093
|
+
*/
|
|
1094
|
+
401: AccountRc;
|
|
1095
|
+
/**
|
|
1096
|
+
* The credential does not hold the scope this endpoint requires. The
|
|
1097
|
+
* missing scope is deliberately not named.
|
|
1098
|
+
*
|
|
1099
|
+
*/
|
|
1100
|
+
403: AccountRc;
|
|
1101
|
+
/**
|
|
1102
|
+
* No such key in this organization, or its secret was never stored
|
|
1103
|
+
* recoverably (`NOT_RETRIEVABLE`).
|
|
1104
|
+
*
|
|
1105
|
+
*/
|
|
1106
|
+
404: AccountRc;
|
|
1107
|
+
};
|
|
1108
|
+
export type AccountRevealApikeyError = AccountRevealApikeyErrors[keyof AccountRevealApikeyErrors];
|
|
1109
|
+
export type AccountRevealApikeyResponses = {
|
|
1110
|
+
/**
|
|
1111
|
+
* The key's secret.
|
|
1112
|
+
*/
|
|
1113
|
+
200: AccountRevealedApikey;
|
|
1114
|
+
};
|
|
1115
|
+
export type AccountRevealApikeyResponse = AccountRevealApikeyResponses[keyof AccountRevealApikeyResponses];
|
|
1116
|
+
export type OauthMetadataData = {
|
|
1117
|
+
body?: never;
|
|
1118
|
+
path?: never;
|
|
1119
|
+
query?: never;
|
|
1120
|
+
url: '/.well-known/oauth-authorization-server';
|
|
1121
|
+
};
|
|
1122
|
+
export type OauthMetadataResponses = {
|
|
1123
|
+
/**
|
|
1124
|
+
* The server's metadata.
|
|
1125
|
+
*/
|
|
1126
|
+
200: OauthMetadata;
|
|
1127
|
+
};
|
|
1128
|
+
export type OauthMetadataResponse = OauthMetadataResponses[keyof OauthMetadataResponses];
|
|
1129
|
+
export type OauthDeviceAuthorizationData = {
|
|
1130
|
+
body: DeviceAuthorizationRequest;
|
|
1131
|
+
path?: never;
|
|
1132
|
+
query?: never;
|
|
1133
|
+
url: '/oauth/device_authorization';
|
|
1134
|
+
};
|
|
1135
|
+
export type OauthDeviceAuthorizationErrors = {
|
|
1136
|
+
/**
|
|
1137
|
+
* `invalid_request`, `invalid_client`, `unauthorized_client`, or
|
|
1138
|
+
* `slow_down` when this address has started too many authorizations.
|
|
1139
|
+
*
|
|
1140
|
+
*/
|
|
1141
|
+
400: OauthError;
|
|
1142
|
+
};
|
|
1143
|
+
export type OauthDeviceAuthorizationError = OauthDeviceAuthorizationErrors[keyof OauthDeviceAuthorizationErrors];
|
|
1144
|
+
export type OauthDeviceAuthorizationResponses = {
|
|
1145
|
+
/**
|
|
1146
|
+
* A pending device authorization.
|
|
1147
|
+
*/
|
|
1148
|
+
200: DeviceAuthorization;
|
|
1149
|
+
};
|
|
1150
|
+
export type OauthDeviceAuthorizationResponse = OauthDeviceAuthorizationResponses[keyof OauthDeviceAuthorizationResponses];
|
|
1151
|
+
export type OauthAuthorizeData = {
|
|
1152
|
+
body?: never;
|
|
1153
|
+
path?: never;
|
|
1154
|
+
query: {
|
|
1155
|
+
client_id: string;
|
|
1156
|
+
redirect_uri: string;
|
|
1157
|
+
response_type: 'code';
|
|
1158
|
+
code_challenge: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* S256 only. `plain` is refused rather than downgraded.
|
|
1161
|
+
*/
|
|
1162
|
+
code_challenge_method?: 'S256';
|
|
1163
|
+
scope?: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* Returned unchanged. Use it to bind the response to your request.
|
|
1166
|
+
*/
|
|
1167
|
+
state?: string;
|
|
1168
|
+
/**
|
|
1169
|
+
* RFC 8707. What the token is FOR, so it cannot be replayed elsewhere.
|
|
1170
|
+
*/
|
|
1171
|
+
resource?: string;
|
|
1172
|
+
};
|
|
1173
|
+
url: '/oauth/authorize';
|
|
1174
|
+
};
|
|
1175
|
+
export type OauthAuthorizeErrors = {
|
|
1176
|
+
/**
|
|
1177
|
+
* Shown to the user. An unverified redirect target is never sent an error.
|
|
1178
|
+
*/
|
|
1179
|
+
400: unknown;
|
|
1180
|
+
};
|
|
1181
|
+
export type OauthTokenData = {
|
|
1182
|
+
body: TokenRequest;
|
|
1183
|
+
path?: never;
|
|
1184
|
+
query?: never;
|
|
1185
|
+
url: '/oauth/token';
|
|
1186
|
+
};
|
|
1187
|
+
export type OauthTokenErrors = {
|
|
1188
|
+
/**
|
|
1189
|
+
* An RFC 6749 error. `authorization_pending` and `slow_down` are
|
|
1190
|
+
* normal answers while polling a device authorization, not failures.
|
|
1191
|
+
*
|
|
1192
|
+
*/
|
|
1193
|
+
400: OauthError;
|
|
1194
|
+
};
|
|
1195
|
+
export type OauthTokenError = OauthTokenErrors[keyof OauthTokenErrors];
|
|
1196
|
+
export type OauthTokenResponses = {
|
|
1197
|
+
/**
|
|
1198
|
+
* Tokens.
|
|
1199
|
+
*/
|
|
1200
|
+
200: TokenResponse;
|
|
1201
|
+
};
|
|
1202
|
+
export type OauthTokenResponse = OauthTokenResponses[keyof OauthTokenResponses];
|
|
1203
|
+
export type OauthRevokeData = {
|
|
1204
|
+
body: RevokeRequest;
|
|
1205
|
+
path?: never;
|
|
1206
|
+
query?: never;
|
|
1207
|
+
url: '/oauth/revoke';
|
|
1208
|
+
};
|
|
1209
|
+
export type OauthRevokeResponses = {
|
|
1210
|
+
/**
|
|
1211
|
+
* Always, whatever was presented.
|
|
1212
|
+
*/
|
|
1213
|
+
200: {
|
|
1214
|
+
[key: string]: unknown;
|
|
1215
|
+
};
|
|
701
1216
|
};
|
|
702
|
-
export type
|
|
1217
|
+
export type OauthRevokeResponse = OauthRevokeResponses[keyof OauthRevokeResponses];
|
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export type { Result, VpnDetail, ClassDetail, ProxyDetail, LookupResponse, } fro
|
|
|
7
7
|
export { DATABASE_FORMATS, STANDINGS, LICENSE_TYPES } from './types.js';
|
|
8
8
|
export type { Database, DatabaseFormat, DatabaseFormatSize, DatabaseMetadata, DatabaseMetadataColumn, DatabaseVersion, DbChecksums, Download, Standing, } from './generated/types.gen.js';
|
|
9
9
|
export type LicenseType = NonNullable<import('./generated/types.gen.js').Database['license_type']>;
|
|
10
|
-
export type {
|
|
10
|
+
export type { Entitlement, EntitlementApikey, EntitlementPlan, EntitlementUsage, } from './generated/types.gen.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpndetection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
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",
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
58
|
+
"@mslmio/eslint-config": "^1.0.0",
|
|
58
59
|
"@types/node": "^26.2.0",
|
|
60
|
+
"eslint": "^9.39.0",
|
|
59
61
|
"typescript": "^5.9.3"
|
|
60
62
|
},
|
|
61
63
|
"scripts": {
|