vpndetection-web 0.0.0-stage → 1.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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +267 -2
  3. package/dist/bogon.d.ts +28 -0
  4. package/dist/bogon.js +164 -0
  5. package/dist/bogons.gen.d.ts +2 -0
  6. package/dist/bogons.gen.js +87 -0
  7. package/dist/client.d.ts +153 -0
  8. package/dist/client.js +384 -0
  9. package/dist/errors.d.ts +55 -0
  10. package/dist/errors.js +178 -0
  11. package/dist/generated/client/client.gen.d.ts +2 -0
  12. package/dist/generated/client/client.gen.js +216 -0
  13. package/dist/generated/client/index.d.ts +10 -0
  14. package/dist/generated/client/index.js +6 -0
  15. package/dist/generated/client/types.gen.d.ts +120 -0
  16. package/dist/generated/client/types.gen.js +2 -0
  17. package/dist/generated/client/utils.gen.d.ts +37 -0
  18. package/dist/generated/client/utils.gen.js +228 -0
  19. package/dist/generated/client.gen.d.ts +12 -0
  20. package/dist/generated/client.gen.js +3 -0
  21. package/dist/generated/core/auth.gen.d.ts +25 -0
  22. package/dist/generated/core/auth.gen.js +14 -0
  23. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  24. package/dist/generated/core/bodySerializer.gen.js +57 -0
  25. package/dist/generated/core/params.gen.d.ts +43 -0
  26. package/dist/generated/core/params.gen.js +109 -0
  27. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  28. package/dist/generated/core/pathSerializer.gen.js +106 -0
  29. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  30. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  31. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  32. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  33. package/dist/generated/core/types.gen.d.ts +83 -0
  34. package/dist/generated/core/types.gen.js +2 -0
  35. package/dist/generated/core/utils.gen.d.ts +19 -0
  36. package/dist/generated/core/utils.gen.js +87 -0
  37. package/dist/generated/index.d.ts +2 -0
  38. package/dist/generated/index.js +2 -0
  39. package/dist/generated/sdk.gen.d.ts +115 -0
  40. package/dist/generated/sdk.gen.js +171 -0
  41. package/dist/generated/types.gen.d.ts +787 -0
  42. package/dist/generated/types.gen.js +2 -0
  43. package/dist/index.d.ts +10 -0
  44. package/dist/index.js +4 -0
  45. package/dist/oauth.d.ts +114 -0
  46. package/dist/oauth.js +245 -0
  47. package/dist/shapes.d.ts +28 -0
  48. package/dist/shapes.js +133 -0
  49. package/dist/store.d.ts +39 -0
  50. package/dist/store.js +64 -0
  51. package/dist/transport.d.ts +47 -0
  52. package/dist/transport.js +140 -0
  53. package/dist/types.d.ts +48 -0
  54. package/dist/types.js +42 -0
  55. package/package.json +65 -3
@@ -0,0 +1,787 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://api.vpndetection.io' | (string & {});
3
+ };
4
+ /**
5
+ * The union of every plan's answer. Only `ip` and `is_vpn` are guaranteed;
6
+ * each remaining field is present when your plan includes it, and absent
7
+ * otherwise. A client that must work across plans should treat an absent
8
+ * flag as unknown rather than as `false`.
9
+ *
10
+ */
11
+ export type LookupResponse = {
12
+ /**
13
+ * The address that was looked up, normalized.
14
+ */
15
+ ip: string;
16
+ /**
17
+ * Whether the address is VPN infrastructure. Keys off presence in the
18
+ * VPN dataset, so an unattributed range with no provider is still
19
+ * `true`.
20
+ *
21
+ */
22
+ is_vpn: boolean;
23
+ /**
24
+ * Whether the address belongs to a hosting or cloud provider. Paid plans.
25
+ */
26
+ is_hosting?: boolean;
27
+ /**
28
+ * Whether the address is privacy relay or enterprise web gateway egress, such as iCloud Private Relay or Zscaler. Free and paid plans.
29
+ */
30
+ is_relay?: boolean;
31
+ /**
32
+ * Whether the address is a Tor node. Free and paid plans.
33
+ */
34
+ is_tor?: boolean;
35
+ /**
36
+ * Whether the address belongs to a CDN. Paid plans.
37
+ */
38
+ is_cdn?: boolean;
39
+ /**
40
+ * Whether the address was seen in a residential proxy pool. Paid plans.
41
+ */
42
+ is_resproxy?: boolean;
43
+ /**
44
+ * Whether the address was seen in a datacenter proxy pool. Paid plans.
45
+ */
46
+ is_dcproxy?: boolean;
47
+ /**
48
+ * Whether the address was seen in a mobile proxy pool. Paid plans.
49
+ */
50
+ is_mobproxy?: boolean;
51
+ /**
52
+ * Whether a public proxy, one anyone can connect through, listens on the address or sends its traffic out from it. Paid plans.
53
+ */
54
+ is_pubproxy?: boolean;
55
+ /**
56
+ * Detail for `is_vpn`. Empty when `is_vpn` is false. Paid plans.
57
+ *
58
+ */
59
+ vpn?: VpnDetail;
60
+ /**
61
+ * Detail for `is_hosting`. Empty when false. Paid plans.
62
+ */
63
+ hosting?: ClassDetail;
64
+ /**
65
+ * Detail for `is_relay`. Empty when false. Free and paid plans.
66
+ */
67
+ relay?: ClassDetail;
68
+ /**
69
+ * Detail for `is_tor`. Empty when false. Free and paid plans. The tor
70
+ * dataset carries no provider, so `provider` is always an empty string.
71
+ *
72
+ */
73
+ tor?: ClassDetail;
74
+ /**
75
+ * Detail for `is_cdn`. Empty when false. Paid plans.
76
+ */
77
+ cdn?: ClassDetail;
78
+ /**
79
+ * Detail for `is_resproxy`. Empty when false. Paid plans.
80
+ */
81
+ resproxy?: ProxyDetail;
82
+ /**
83
+ * Detail for `is_dcproxy`. Empty when false. Paid plans.
84
+ */
85
+ dcproxy?: ProxyDetail;
86
+ /**
87
+ * Detail for `is_mobproxy`. Empty when false. Paid plans.
88
+ */
89
+ mobproxy?: ProxyDetail;
90
+ /**
91
+ * Detail for `is_pubproxy`. Empty when false. Paid plans.
92
+ */
93
+ pubproxy?: PubproxyDetail;
94
+ location?: Location;
95
+ asn?: Asn;
96
+ };
97
+ export type BatchLookupRequest = {
98
+ /**
99
+ * The addresses to classify, 1 to 1000 per call, counted before
100
+ * duplicates collapse. Each distinct string is one lookup.
101
+ *
102
+ */
103
+ ips: Array<string>;
104
+ };
105
+ export type BatchLookupResponse = {
106
+ /**
107
+ * One answer per input string that was classified, keyed by the string
108
+ * as you sent it; the `ip` inside is the normalized form. Each value is
109
+ * exactly what `GET /{ip}` answers for your plan.
110
+ *
111
+ */
112
+ results: {
113
+ [key: string]: LookupResponse;
114
+ };
115
+ /**
116
+ * One entry per input string that could not be classified, keyed the
117
+ * same way. Empty when every entry was answered.
118
+ *
119
+ */
120
+ errors: {
121
+ [key: string]: BatchLookupError;
122
+ };
123
+ };
124
+ /**
125
+ * Why one entry of a batch was not answered, as the single lookup would have reported it.
126
+ */
127
+ export type BatchLookupError = {
128
+ /**
129
+ * The HTTP status `GET /{ip}` would have answered for this entry: `400`
130
+ * for a string that is not an address, `429` for a spent allowance,
131
+ * `500` when the VPN dataset could not be consulted. A `429` here is
132
+ * never a throttle; the whole call is refused instead.
133
+ *
134
+ */
135
+ status: number;
136
+ /**
137
+ * The same message the single lookup carries for that status.
138
+ */
139
+ error: string;
140
+ };
141
+ /**
142
+ * What is known about the VPN attribution. Every key is present when the
143
+ * object is populated, empty values included; the object is `{}` when
144
+ * `is_vpn` is false.
145
+ *
146
+ */
147
+ export type VpnDetail = {
148
+ /**
149
+ * The VPN provider, or an empty string for an unattributed range.
150
+ */
151
+ provider?: string;
152
+ /**
153
+ * The most recent date this address was observed as VPN infrastructure.
154
+ */
155
+ last_seen?: string;
156
+ /**
157
+ * How strongly the attribution is supported.
158
+ */
159
+ confidence?: string;
160
+ /**
161
+ * Never returned since 2026-10-20: no plan is answered with the class of
162
+ * evidence an attribution rests on. Declared so that a client typed
163
+ * against it keeps compiling; read `confidence` instead.
164
+ *
165
+ *
166
+ * @deprecated
167
+ */
168
+ method?: string;
169
+ };
170
+ /**
171
+ * The shared detail shape for the hosting, relay, tor and cdn datasets.
172
+ * Every key is present when the object is populated; the object is `{}`
173
+ * when its flag is false.
174
+ *
175
+ */
176
+ export type ClassDetail = {
177
+ /**
178
+ * The provider, or an empty string where the dataset has none.
179
+ */
180
+ provider?: string;
181
+ /**
182
+ * How strongly the classification is supported.
183
+ */
184
+ confidence?: string;
185
+ /**
186
+ * The most recent date this address was observed in this dataset.
187
+ */
188
+ last_seen?: string;
189
+ };
190
+ /**
191
+ * The shared detail shape for the residential, datacenter and mobile proxy
192
+ * families, measured over a rolling 90 day window. An address that leaves
193
+ * the window keeps its flag and the values of its last day in it, so
194
+ * `last_seen` is what says how recent they are. Every key is present when
195
+ * the object is populated; the object is `{}` when its flag is false.
196
+ *
197
+ */
198
+ export type ProxyDetail = {
199
+ /**
200
+ * The proxy network, or an empty string where unattributed.
201
+ */
202
+ provider?: string;
203
+ /**
204
+ * The earliest date within the window this address was seen in the
205
+ * pool, as of its last day in the window once it has left.
206
+ *
207
+ */
208
+ first_seen?: string;
209
+ /**
210
+ * The most recent date this address was seen in the pool. An address
211
+ * that leaves the window keeps its flag, so this date is what says how
212
+ * recent the sighting is.
213
+ *
214
+ */
215
+ last_seen?: string;
216
+ /**
217
+ * How many times the address was observed in the pool during the
218
+ * window, as of its last day in it once it has left.
219
+ *
220
+ */
221
+ hits?: number;
222
+ /**
223
+ * The percentage of days in the window on which the address was seen,
224
+ * as of its last day in it once it has left. A high value means a
225
+ * stable pool member rather than a one-off sighting.
226
+ *
227
+ */
228
+ hits_days_pct?: number;
229
+ /**
230
+ * How many distinct proxy networks this address was seen in.
231
+ */
232
+ providers_num?: number;
233
+ };
234
+ /**
235
+ * The address in Public Proxy IP, open proxies anyone can connect
236
+ * through, measured over a rolling 90 day window. An address that leaves
237
+ * the window keeps its flag and the values of its last day in it, so
238
+ * `last_seen` is what says how recent they are. An address is either
239
+ * end of a proxy, or both: where it listens, and where its traffic
240
+ * leaves from. Every key is present when the object is populated; the
241
+ * object is `{}` when `is_pubproxy` is false.
242
+ *
243
+ */
244
+ export type PubproxyDetail = {
245
+ /**
246
+ * Whether a public proxy listens on this address.
247
+ */
248
+ entry?: boolean;
249
+ /**
250
+ * Whether a public proxy's traffic leaves from this address.
251
+ */
252
+ exit?: boolean;
253
+ /**
254
+ * The protocols of the proxies listening on or leaving from this
255
+ * address: `http`, `https` (an HTTP proxy that also tunnels HTTPS),
256
+ * `socks4` or `socks5`. Empty where only the address is known.
257
+ *
258
+ */
259
+ protocols?: Array<string>;
260
+ /**
261
+ * How many distinct ports a public proxy listens on at this address;
262
+ * 0 when it is only an exit, or its port is not known.
263
+ *
264
+ */
265
+ num_ports?: number;
266
+ /**
267
+ * How many distinct public proxies' traffic left from this address;
268
+ * 0 when it is only an entry.
269
+ *
270
+ */
271
+ num_proxies?: number;
272
+ /**
273
+ * The most recent date a proxy on this address was seen. An address
274
+ * that leaves the window keeps its flag, so this date is what says how
275
+ * recent the sighting is.
276
+ *
277
+ */
278
+ last_seen?: string;
279
+ /**
280
+ * The most recent date within the window a request through a proxy on
281
+ * this address was answered, as YYYY-MM-DD, or an empty string when
282
+ * none was, as of its last day in the window once it has left.
283
+ *
284
+ */
285
+ last_usable?: string;
286
+ };
287
+ /**
288
+ * Where the address is, to the country: the fields of our IP Country
289
+ * database. Free and paid plans. Each field is present whenever the
290
+ * object is, so an address in no country, or a private one, answers
291
+ * empty strings.
292
+ *
293
+ */
294
+ export type Location = {
295
+ /**
296
+ * Continent code: AF, AN (Antarctica), AS, EU, NA, OC or SA.
297
+ */
298
+ continent: string;
299
+ /**
300
+ * Continent name.
301
+ */
302
+ continent_name: string;
303
+ /**
304
+ * ISO 3166-1 alpha-2 country code.
305
+ */
306
+ country: string;
307
+ /**
308
+ * Country name.
309
+ */
310
+ country_name: string;
311
+ /**
312
+ * IANA timezone of the address.
313
+ */
314
+ timezone: string;
315
+ /**
316
+ * ISO 4217 code of the country's currency, where there is one.
317
+ */
318
+ currency_code: string;
319
+ /**
320
+ * Name of the country's currency, where there is one.
321
+ */
322
+ currency_name: string;
323
+ /**
324
+ * Symbol of the country's currency, where known.
325
+ */
326
+ currency_symbol: string;
327
+ /**
328
+ * The country's flag, as an emoji.
329
+ */
330
+ flag_emoji: string;
331
+ /**
332
+ * The Unicode code points of the flag emoji.
333
+ */
334
+ flag_unicode: string;
335
+ };
336
+ /**
337
+ * The autonomous system that announces the address. Free and paid plans.
338
+ * Each field is present whenever the object is: `asn` is 0 and the rest
339
+ * empty where no announcement covers the address.
340
+ *
341
+ */
342
+ export type Asn = {
343
+ /**
344
+ * The AS number, 0 when no announcement covers the address.
345
+ */
346
+ asn: number;
347
+ /**
348
+ * Name of the organization that operates the AS.
349
+ */
350
+ name: string;
351
+ /**
352
+ * The AS operator's own registrable domain.
353
+ */
354
+ domain: string;
355
+ /**
356
+ * The kind of network the AS runs: isp, hosting, education, government or business.
357
+ */
358
+ type: string;
359
+ /**
360
+ * The announced BGP prefix that covers the address, the most specific when several do.
361
+ */
362
+ prefix: string;
363
+ };
364
+ /**
365
+ * Every non-2xx response carries this shape.
366
+ */
367
+ export type LookupError = {
368
+ /**
369
+ * A human-readable explanation of the failure.
370
+ */
371
+ error: string;
372
+ };
373
+ export type Entitlement = {
374
+ /**
375
+ * The organization the key belongs to.
376
+ */
377
+ org_id: string;
378
+ apikey: EntitlementApikey;
379
+ plan: EntitlementPlan;
380
+ usage: EntitlementUsage;
381
+ };
382
+ /**
383
+ * The credential itself. The key is never echoed - only its ID, which is
384
+ * what the console shows and what you can act on.
385
+ *
386
+ */
387
+ export type EntitlementApikey = {
388
+ id: string;
389
+ /**
390
+ * Null for a key with no end date, which is the normal case.
391
+ */
392
+ expires: string | null;
393
+ /**
394
+ * The source addresses this key may be used from. EMPTY means
395
+ * unrestricted, never "deny all".
396
+ *
397
+ */
398
+ allowed_cidrs: Array<string>;
399
+ };
400
+ export type EntitlementPlan = {
401
+ /**
402
+ * The plan the organization is on.
403
+ */
404
+ key: string;
405
+ /**
406
+ * The field tier, which decides how much of a lookup answer comes
407
+ * back. What each tier includes is documented on the lookup endpoint
408
+ * rather than repeated here, so there is one place it can be wrong.
409
+ *
410
+ */
411
+ tier: 'free' | 'starter' | 'scale' | 'max';
412
+ };
413
+ export type EntitlementUsage = {
414
+ /**
415
+ * Requests counted in the current window. The same number the lookup
416
+ * API gates on, and it can lag by a few seconds.
417
+ *
418
+ */
419
+ requests: number;
420
+ /**
421
+ * What the plan includes. Zero on a plan that includes none.
422
+ */
423
+ quota: number;
424
+ /**
425
+ * Where we stop serving. NULL means never, which is the normal state
426
+ * of an uncapped paid plan and is not the same as zero. Above the
427
+ * quota and below this, requests are served and billed as overage.
428
+ *
429
+ */
430
+ hard_limit: number | null;
431
+ /**
432
+ * When the current allowance period began.
433
+ */
434
+ window_start: string;
435
+ /**
436
+ * When the allowance next resets.
437
+ */
438
+ window_end: string;
439
+ };
440
+ export type EntitlementError = {
441
+ error: string;
442
+ };
443
+ export type OauthMetadata = {
444
+ issuer: string;
445
+ authorization_endpoint: string;
446
+ token_endpoint: string;
447
+ device_authorization_endpoint?: string;
448
+ revocation_endpoint?: string;
449
+ scopes_supported?: Array<string>;
450
+ response_types_supported?: Array<string>;
451
+ grant_types_supported?: Array<string>;
452
+ code_challenge_methods_supported?: Array<string>;
453
+ /**
454
+ * Any client may sign in with an https `client_id` serving its own metadata.
455
+ */
456
+ client_id_metadata_document_supported?: boolean;
457
+ /**
458
+ * RFC 7591 dynamic client registration, for a client that cannot serve its own metadata.
459
+ */
460
+ registration_endpoint?: string;
461
+ /**
462
+ * Always `none`. Every client is public and has no secret.
463
+ */
464
+ token_endpoint_auth_methods_supported?: Array<string>;
465
+ /**
466
+ * RFC 9207. A redirect back from the authorization endpoint carries `iss`.
467
+ */
468
+ authorization_response_iss_parameter_supported?: boolean;
469
+ service_documentation?: string;
470
+ };
471
+ export type TokenRequest = {
472
+ /**
473
+ * `urn:ietf:params:oauth:grant-type:device_code`, `authorization_code` or `refresh_token`.
474
+ */
475
+ grant_type: string;
476
+ client_id: string;
477
+ /**
478
+ * Required by the device code grant.
479
+ */
480
+ device_code?: string;
481
+ /**
482
+ * Required by the authorization code grant.
483
+ */
484
+ code?: string;
485
+ /**
486
+ * Required by the authorization code grant.
487
+ */
488
+ code_verifier?: string;
489
+ /**
490
+ * Required by the authorization code grant: the `redirect_uri` the code was issued against, exactly.
491
+ */
492
+ redirect_uri?: string;
493
+ /**
494
+ * Authorization code grant, optional: RFC 8707, and it must name what was authorized.
495
+ */
496
+ resource?: string;
497
+ /**
498
+ * Required by the refresh token grant.
499
+ */
500
+ refresh_token?: string;
501
+ };
502
+ export type TokenResponse = {
503
+ access_token: string;
504
+ /**
505
+ * Always `Bearer`.
506
+ */
507
+ token_type: string;
508
+ /**
509
+ * Seconds until the access token expires.
510
+ */
511
+ expires_in: number;
512
+ /**
513
+ * Always returned. A refresh consumes the token it presents, so keep this one.
514
+ */
515
+ refresh_token?: string;
516
+ /**
517
+ * What was actually granted, which may be narrower than what was asked for.
518
+ */
519
+ scope?: string;
520
+ /**
521
+ * Not part of OAuth, and only for our own clients. The ID of the API
522
+ * key the person picked when they approved, returned by every grant
523
+ * while this authorization may still read that key back. Absent when
524
+ * no key was picked, or when the person's role no longer allows
525
+ * reading keys back.
526
+ *
527
+ */
528
+ 'mslm:apikey_id'?: string;
529
+ /**
530
+ * Not part of OAuth, and only for our own clients: a client that signed
531
+ * in with a Client ID Metadata Document or registered itself never
532
+ * receives a key. The API
533
+ * key itself, so a device ends up holding an ordinary key. Returned by
534
+ * the device code and authorization code grants only, never by a
535
+ * refresh, and only alongside
536
+ * `mslm:apikey_id`. Absent when that key's secret cannot be read back,
537
+ * which is the case for a key created before keys could be shown again
538
+ * in the console; a rotated key can be.
539
+ *
540
+ */
541
+ 'mslm:apikey'?: string;
542
+ };
543
+ export type RevokeRequest = {
544
+ /**
545
+ * An access token or a refresh token.
546
+ */
547
+ token: string;
548
+ /**
549
+ * Accepted and not checked.
550
+ */
551
+ client_id?: string;
552
+ };
553
+ export type OauthError = {
554
+ error: string;
555
+ error_description?: string;
556
+ };
557
+ export type LookupIpData = {
558
+ body?: never;
559
+ path: {
560
+ /**
561
+ * The IPv4 or IPv6 address to classify.
562
+ */
563
+ ip: string;
564
+ };
565
+ query?: never;
566
+ url: '/{ip}';
567
+ };
568
+ export type LookupIpErrors = {
569
+ /**
570
+ * The path segment is not a valid IP address.
571
+ */
572
+ 400: LookupError;
573
+ /**
574
+ * The presented API key is unknown, revoked, or expired.
575
+ */
576
+ 401: LookupError;
577
+ /**
578
+ * The key restricts which source addresses may use it and this
579
+ * request came from none of them, or the key was sent over plain
580
+ * HTTP, where anyone on the network path could read it. Rotate a key
581
+ * that was.
582
+ *
583
+ */
584
+ 403: LookupError;
585
+ /**
586
+ * Either a transient rate limit or a spent allowance. `Retry-After` is
587
+ * present for the former and absent for the latter, and is the only
588
+ * way to tell them apart.
589
+ *
590
+ */
591
+ 429: LookupError;
592
+ /**
593
+ * The VPN dataset could not be consulted.
594
+ */
595
+ 500: LookupError;
596
+ };
597
+ export type LookupIpError = LookupIpErrors[keyof LookupIpErrors];
598
+ export type LookupIpResponses = {
599
+ /**
600
+ * The classification. Present fields are those your plan includes; see
601
+ * the tier table in the API description.
602
+ *
603
+ */
604
+ 200: LookupResponse;
605
+ };
606
+ export type LookupIpResponse = LookupIpResponses[keyof LookupIpResponses];
607
+ export type LookupMyIpData = {
608
+ body?: never;
609
+ path?: never;
610
+ query?: never;
611
+ url: '/myip';
612
+ };
613
+ export type LookupMyIpErrors = {
614
+ /**
615
+ * The presented API key is unknown, revoked, or expired.
616
+ */
617
+ 401: LookupError;
618
+ /**
619
+ * The key restricts which source addresses may use it and this
620
+ * request came from none of them, or the key was sent over plain
621
+ * HTTP, where anyone on the network path could read it. Rotate a key
622
+ * that was.
623
+ *
624
+ */
625
+ 403: LookupError;
626
+ /**
627
+ * Either a transient rate limit or a spent allowance. `Retry-After` is
628
+ * present for the former and absent for the latter, and is the only
629
+ * way to tell them apart.
630
+ *
631
+ */
632
+ 429: LookupError;
633
+ /**
634
+ * The VPN dataset could not be consulted.
635
+ */
636
+ 500: LookupError;
637
+ };
638
+ export type LookupMyIpError = LookupMyIpErrors[keyof LookupMyIpErrors];
639
+ export type LookupMyIpResponses = {
640
+ /**
641
+ * The classification of your own address. Present fields are those
642
+ * your plan includes; see the tier table in the API description.
643
+ *
644
+ */
645
+ 200: LookupResponse;
646
+ };
647
+ export type LookupMyIpResponse = LookupMyIpResponses[keyof LookupMyIpResponses];
648
+ export type LookupBatchData = {
649
+ body: BatchLookupRequest;
650
+ path?: never;
651
+ query?: never;
652
+ url: '/batch';
653
+ };
654
+ export type LookupBatchErrors = {
655
+ /**
656
+ * The body is not a batch, or names too few or too many addresses.
657
+ */
658
+ 400: LookupError;
659
+ /**
660
+ * The presented API key is unknown, revoked, or expired.
661
+ */
662
+ 401: LookupError;
663
+ /**
664
+ * The key restricts which source addresses may use it and this
665
+ * request came from none of them, or the key was sent over plain
666
+ * HTTP, where anyone on the network path could read it. Rotate a key
667
+ * that was.
668
+ *
669
+ */
670
+ 403: LookupError;
671
+ /**
672
+ * The body is larger than any batch of 1000 addresses can be.
673
+ */
674
+ 413: LookupError;
675
+ /**
676
+ * The rate limit refused the whole call. Always transient and always
677
+ * with `Retry-After`; a spent allowance is reported per entry in a
678
+ * `200` instead.
679
+ *
680
+ */
681
+ 429: LookupError;
682
+ };
683
+ export type LookupBatchError = LookupBatchErrors[keyof LookupBatchErrors];
684
+ export type LookupBatchResponses = {
685
+ /**
686
+ * One entry per distinct input string, in `results` or in `errors`.
687
+ * Present fields within a result are those your plan includes; see the
688
+ * tier table in the API description.
689
+ *
690
+ */
691
+ 200: BatchLookupResponse;
692
+ };
693
+ export type LookupBatchResponse = LookupBatchResponses[keyof LookupBatchResponses];
694
+ export type MyEntitlementData = {
695
+ body?: never;
696
+ path?: never;
697
+ query?: never;
698
+ url: '/api/v1/entitlement';
699
+ };
700
+ export type MyEntitlementErrors = {
701
+ /**
702
+ * No key was presented, or it is unknown, revoked or expired.
703
+ */
704
+ 401: EntitlementError;
705
+ /**
706
+ * The key restricts which source addresses may use it, and this
707
+ * request did not come from one of them.
708
+ *
709
+ */
710
+ 403: EntitlementError;
711
+ /**
712
+ * The usage counters could not be read. Reported rather than guessed
713
+ * at: the whole answer is the number, and a confident zero would read
714
+ * as "you have used nothing".
715
+ *
716
+ */
717
+ 503: EntitlementError;
718
+ };
719
+ export type MyEntitlementError = MyEntitlementErrors[keyof MyEntitlementErrors];
720
+ export type MyEntitlementResponses = {
721
+ /**
722
+ * The key's entitlements and consumption.
723
+ */
724
+ 200: Entitlement;
725
+ };
726
+ export type MyEntitlementResponse = MyEntitlementResponses[keyof MyEntitlementResponses];
727
+ export type OauthMetadataData = {
728
+ body?: never;
729
+ path?: never;
730
+ query?: never;
731
+ url: '/.well-known/oauth-authorization-server';
732
+ };
733
+ export type OauthMetadataResponses = {
734
+ /**
735
+ * The server's metadata.
736
+ */
737
+ 200: OauthMetadata;
738
+ };
739
+ export type OauthMetadataResponse = OauthMetadataResponses[keyof OauthMetadataResponses];
740
+ export type OauthTokenData = {
741
+ body: TokenRequest;
742
+ path?: never;
743
+ query?: never;
744
+ url: '/oauth/token';
745
+ };
746
+ export type OauthTokenErrors = {
747
+ /**
748
+ * An RFC 6749 error. `authorization_pending` and `slow_down` are
749
+ * normal answers while polling a device authorization, not failures.
750
+ * `access_denied` means the person refused, and `expired_token` that
751
+ * the device code is no longer valid: it expired, or it was already
752
+ * exchanged or refused. `invalid_grant` means the code, device code or
753
+ * refresh token is not valid for this `client_id`. `invalid_target`
754
+ * means `resource` names something other than what was authorized.
755
+ * `slow_down` also answers any grant when this address sends too many
756
+ * requests.
757
+ *
758
+ */
759
+ 400: OauthError;
760
+ /**
761
+ * `invalid_client`: the `client_id` is not registered.
762
+ */
763
+ 401: OauthError;
764
+ };
765
+ export type OauthTokenError = OauthTokenErrors[keyof OauthTokenErrors];
766
+ export type OauthTokenResponses = {
767
+ /**
768
+ * Tokens.
769
+ */
770
+ 200: TokenResponse;
771
+ };
772
+ export type OauthTokenResponse = OauthTokenResponses[keyof OauthTokenResponses];
773
+ export type OauthRevokeData = {
774
+ body: RevokeRequest;
775
+ path?: never;
776
+ query?: never;
777
+ url: '/oauth/revoke';
778
+ };
779
+ export type OauthRevokeResponses = {
780
+ /**
781
+ * Always, whatever was presented.
782
+ */
783
+ 200: {
784
+ [key: string]: unknown;
785
+ };
786
+ };
787
+ export type OauthRevokeResponse = OauthRevokeResponses[keyof OauthRevokeResponses];