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.
@@ -84,6 +84,50 @@ export type LookupResponse = {
84
84
  */
85
85
  mobproxy?: ProxyDetail;
86
86
  };
87
+ export type BatchLookupRequest = {
88
+ /**
89
+ * The addresses to classify, 1 to 1000 per call, counted before
90
+ * duplicates collapse. Each distinct string is one lookup.
91
+ *
92
+ */
93
+ ips: Array<string>;
94
+ };
95
+ export type BatchLookupResponse = {
96
+ /**
97
+ * One answer per input string that was classified, keyed by the string
98
+ * as you sent it; the `ip` inside is the normalized form. Each value is
99
+ * exactly what `GET /{ip}` answers for your plan.
100
+ *
101
+ */
102
+ results: {
103
+ [key: string]: LookupResponse;
104
+ };
105
+ /**
106
+ * One entry per input string that could not be classified, keyed the
107
+ * same way. Empty when every entry was answered.
108
+ *
109
+ */
110
+ errors: {
111
+ [key: string]: BatchLookupError;
112
+ };
113
+ };
114
+ /**
115
+ * Why one entry of a batch was not answered, as the single lookup would have reported it.
116
+ */
117
+ export type BatchLookupError = {
118
+ /**
119
+ * The HTTP status `GET /{ip}` would have answered for this entry: `400`
120
+ * for a string that is not an address, `429` for a spent allowance,
121
+ * `500` when the VPN dataset could not be consulted. A `429` here is
122
+ * never a throttle; the whole call is refused instead.
123
+ *
124
+ */
125
+ status: number;
126
+ /**
127
+ * The same message the single lookup carries for that status.
128
+ */
129
+ error: string;
130
+ };
87
131
  /**
88
132
  * What is known about the VPN attribution. Every key is present when the
89
133
  * object is populated, empty values included; the object is `{}` when
@@ -199,7 +243,11 @@ export type DatabaseFormat = 'csvgz' | 'mmdb';
199
243
  export type DatabaseFormatSize = {
200
244
  format: DatabaseFormat;
201
245
  /**
202
- * Size of the published file, or null when it has not been published yet
246
+ * Size of the published file, or null when it has not been published
247
+ * yet. int64 because it is not hypothetical: resproxy_ip_14d's MMDB is
248
+ * 4.58 GB, so a 32-bit field cannot carry the catalogue and `list`
249
+ * throws for every caller rather than for that one entry.
250
+ *
203
251
  */
204
252
  bytes: number | null;
205
253
  };
@@ -277,6 +325,8 @@ export type Download = {
277
325
  /**
278
326
  * Object size at redirect time, NOT bytes delivered: the transfer is a
279
327
  * presigned redirect straight to object storage, so we never observe it.
328
+ * int64 for the same reason as DatabaseFormatSize.bytes - it is the
329
+ * size of the same object.
280
330
  *
281
331
  */
282
332
  bytes: number | null;
@@ -347,21 +397,21 @@ export type DatabaseMetadata = {
347
397
  */
348
398
  sample_entries?: number;
349
399
  };
350
- export type AccountMe = {
400
+ export type Entitlement = {
351
401
  /**
352
402
  * The organization the key belongs to.
353
403
  */
354
404
  org_id: string;
355
- apikey: AccountApikey;
356
- plan: AccountPlan;
357
- usage: AccountUsage;
405
+ apikey: EntitlementApikey;
406
+ plan: EntitlementPlan;
407
+ usage: EntitlementUsage;
358
408
  };
359
409
  /**
360
410
  * The credential itself. The key is never echoed - only its id, which is
361
411
  * what the console shows and what you can act on.
362
412
  *
363
413
  */
364
- export type AccountApikey = {
414
+ export type EntitlementApikey = {
365
415
  id: string;
366
416
  /**
367
417
  * Null for a key with no end date, which is the normal case.
@@ -374,7 +424,7 @@ export type AccountApikey = {
374
424
  */
375
425
  allowed_cidrs: Array<string>;
376
426
  };
377
- export type AccountPlan = {
427
+ export type EntitlementPlan = {
378
428
  /**
379
429
  * The plan the organization is on.
380
430
  */
@@ -387,7 +437,7 @@ export type AccountPlan = {
387
437
  */
388
438
  tier: 'free' | 'starter' | 'scale' | 'max';
389
439
  };
390
- export type AccountUsage = {
440
+ export type EntitlementUsage = {
391
441
  /**
392
442
  * Requests counted in the current window. The same number the lookup
393
443
  * API gates on, and it can lag by a few seconds.
@@ -414,9 +464,175 @@ export type AccountUsage = {
414
464
  */
415
465
  window_end: string;
416
466
  };
417
- export type AccountError = {
467
+ export type EntitlementError = {
418
468
  error: string;
419
469
  };
470
+ export type AccountRc = {
471
+ /**
472
+ * The outcome. `SUCCESS` on success; otherwise the reason.
473
+ */
474
+ rc: string;
475
+ };
476
+ export type Identity = {
477
+ rc: string;
478
+ user: AccountUser;
479
+ org: AccountOrgRef;
480
+ /**
481
+ * What this credential may do right now.
482
+ */
483
+ scopes: Array<string>;
484
+ };
485
+ export type AccountUser = {
486
+ id: string;
487
+ fullname?: string;
488
+ email?: string;
489
+ };
490
+ export type AccountOrgRef = {
491
+ id: string;
492
+ };
493
+ export type AccountOrgWrap = {
494
+ rc: string;
495
+ org: AccountOrg;
496
+ };
497
+ export type AccountOrg = {
498
+ id: string;
499
+ name?: string;
500
+ created?: string | null;
501
+ };
502
+ export type ApikeyList = {
503
+ rc: string;
504
+ keys: Array<ApikeyDetail>;
505
+ };
506
+ /**
507
+ * Key METADATA. Never the key itself.
508
+ */
509
+ export type ApikeyDetail = {
510
+ id: string;
511
+ name: string;
512
+ /**
513
+ * The leading, non-secret part, so a key is recognisable without storing it.
514
+ */
515
+ key_prefix: string;
516
+ created: string;
517
+ expires?: string | null;
518
+ last_used_at?: string | null;
519
+ revoked_at?: string | null;
520
+ /**
521
+ * Source-IP allowlist. EMPTY MEANS UNRESTRICTED, not deny-all.
522
+ */
523
+ allowed_cidrs?: Array<string>;
524
+ allowed_scopes?: Array<string>;
525
+ /**
526
+ * Whether this key's secret can still be read back. False permanently for a key issued before secrets were stored recoverably.
527
+ */
528
+ retrievable?: boolean;
529
+ };
530
+ export type AccountCreateApikeyRequest = {
531
+ /**
532
+ * A label you will recognise later. Shown wherever the key is listed.
533
+ */
534
+ name: string;
535
+ /**
536
+ * What the new key may do. Omit for a key that carries no named scope, which is the safe default.
537
+ */
538
+ allowed_scopes?: Array<string>;
539
+ };
540
+ export type AccountCreatedApikey = {
541
+ rc: string;
542
+ id: string;
543
+ name?: string;
544
+ /**
545
+ * The secret. Returned once, here, and never again.
546
+ */
547
+ key: string;
548
+ key_prefix?: string;
549
+ allowed_cidrs?: Array<string>;
550
+ allowed_scopes?: Array<string>;
551
+ };
552
+ export type AccountRevealedApikey = {
553
+ rc: string;
554
+ /**
555
+ * The secret.
556
+ */
557
+ key: string;
558
+ };
559
+ export type OauthMetadata = {
560
+ issuer: string;
561
+ authorization_endpoint: string;
562
+ token_endpoint: string;
563
+ device_authorization_endpoint?: string;
564
+ revocation_endpoint?: string;
565
+ scopes_supported?: Array<string>;
566
+ response_types_supported?: Array<string>;
567
+ grant_types_supported?: Array<string>;
568
+ code_challenge_methods_supported?: Array<string>;
569
+ /**
570
+ * A client_id may be an https URL serving your client metadata.
571
+ */
572
+ client_id_metadata_document_supported?: boolean;
573
+ };
574
+ export type DeviceAuthorizationRequest = {
575
+ client_id: string;
576
+ /**
577
+ * Space-delimited. Anything your client is not registered for is dropped rather than refused.
578
+ */
579
+ scope?: string;
580
+ /**
581
+ * RFC 8707: what the token is for.
582
+ */
583
+ resource?: string;
584
+ };
585
+ export type DeviceAuthorization = {
586
+ /**
587
+ * Yours. Poll with it; never show it to anyone.
588
+ */
589
+ device_code: string;
590
+ /**
591
+ * Short and typable. This is what the person confirms.
592
+ */
593
+ user_code: string;
594
+ verification_uri: string;
595
+ /**
596
+ * The same page with the code already filled in.
597
+ */
598
+ verification_uri_complete?: string;
599
+ expires_in: number;
600
+ /**
601
+ * Seconds between polls.
602
+ */
603
+ interval: number;
604
+ };
605
+ export type TokenRequest = {
606
+ grant_type: string;
607
+ client_id: string;
608
+ device_code?: string;
609
+ code?: string;
610
+ code_verifier?: string;
611
+ redirect_uri?: string;
612
+ refresh_token?: string;
613
+ };
614
+ export type TokenResponse = {
615
+ access_token: string;
616
+ token_type: string;
617
+ expires_in: number;
618
+ refresh_token?: string;
619
+ /**
620
+ * What was actually granted, which may be narrower than what was asked for.
621
+ */
622
+ scope?: string;
623
+ };
624
+ export type RevokeRequest = {
625
+ token: string;
626
+ client_id?: string;
627
+ };
628
+ export type OauthError = {
629
+ error: string;
630
+ error_description?: string;
631
+ };
632
+ /**
633
+ * The key's id, as returned by the list endpoint. Never the key itself.
634
+ */
635
+ export type ApikeyIdParam = string;
420
636
  export type LookupIpData = {
421
637
  body?: never;
422
638
  path: {
@@ -503,6 +719,50 @@ export type LookupMyIpResponses = {
503
719
  200: LookupResponse;
504
720
  };
505
721
  export type LookupMyIpResponse = LookupMyIpResponses[keyof LookupMyIpResponses];
722
+ export type LookupBatchData = {
723
+ body: BatchLookupRequest;
724
+ path?: never;
725
+ query?: never;
726
+ url: '/batch';
727
+ };
728
+ export type LookupBatchErrors = {
729
+ /**
730
+ * The body is not a batch, or names too few or too many addresses.
731
+ */
732
+ 400: LookupError;
733
+ /**
734
+ * The presented API key is unknown, revoked, or expired.
735
+ */
736
+ 401: LookupError;
737
+ /**
738
+ * The key restricts which source addresses may use it, and this
739
+ * request did not come from one of them.
740
+ *
741
+ */
742
+ 403: LookupError;
743
+ /**
744
+ * The body is larger than any batch of 1000 addresses can be.
745
+ */
746
+ 413: LookupError;
747
+ /**
748
+ * The rate limit refused the whole call. Always transient and always
749
+ * with `Retry-After`; a spent allowance is reported per entry in a
750
+ * `200` instead.
751
+ *
752
+ */
753
+ 429: LookupError;
754
+ };
755
+ export type LookupBatchError = LookupBatchErrors[keyof LookupBatchErrors];
756
+ export type LookupBatchResponses = {
757
+ /**
758
+ * One entry per distinct input string, in `results` or in `errors`.
759
+ * Present fields within a result are those your plan includes; see the
760
+ * tier table in the API description.
761
+ *
762
+ */
763
+ 200: BatchLookupResponse;
764
+ };
765
+ export type LookupBatchResponse = LookupBatchResponses[keyof LookupBatchResponses];
506
766
  export type ListDatabasesData = {
507
767
  body?: never;
508
768
  path?: never;
@@ -667,36 +927,379 @@ export type ListDownloadsResponses = {
667
927
  };
668
928
  };
669
929
  export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
670
- export type AccountMeData = {
930
+ export type MyEntitlementData = {
671
931
  body?: never;
672
932
  path?: never;
673
933
  query?: never;
674
- url: '/api/v1/account/me';
934
+ url: '/api/v1/entitlement';
675
935
  };
676
- export type AccountMeErrors = {
936
+ export type MyEntitlementErrors = {
677
937
  /**
678
938
  * No key was presented, or it is unknown, revoked or expired.
679
939
  */
680
- 401: AccountError;
940
+ 401: EntitlementError;
681
941
  /**
682
942
  * The key restricts which source addresses may use it, and this
683
943
  * request did not come from one of them.
684
944
  *
685
945
  */
686
- 403: AccountError;
946
+ 403: EntitlementError;
687
947
  /**
688
948
  * The usage counters could not be read. Reported rather than guessed
689
949
  * at: the whole answer is the number, and a confident zero would read
690
950
  * as "you have used nothing".
691
951
  *
692
952
  */
693
- 503: AccountError;
953
+ 503: EntitlementError;
694
954
  };
695
- export type AccountMeError = AccountMeErrors[keyof AccountMeErrors];
696
- export type AccountMeResponses = {
955
+ export type MyEntitlementError = MyEntitlementErrors[keyof MyEntitlementErrors];
956
+ export type MyEntitlementResponses = {
697
957
  /**
698
958
  * The key's entitlements and consumption.
699
959
  */
700
- 200: AccountMe;
960
+ 200: Entitlement;
961
+ };
962
+ export type MyEntitlementResponse = MyEntitlementResponses[keyof MyEntitlementResponses];
963
+ export type AccountIdentityData = {
964
+ body?: never;
965
+ path?: never;
966
+ query?: never;
967
+ url: '/api/v1/iam/identity';
968
+ };
969
+ export type AccountIdentityErrors = {
970
+ /**
971
+ * No credential was presented, or it is not valid.
972
+ */
973
+ 401: AccountRc;
974
+ /**
975
+ * The credential does not hold the scope this endpoint requires. The
976
+ * missing scope is deliberately not named.
977
+ *
978
+ */
979
+ 403: AccountRc;
980
+ };
981
+ export type AccountIdentityError = AccountIdentityErrors[keyof AccountIdentityErrors];
982
+ export type AccountIdentityResponses = {
983
+ /**
984
+ * The caller.
985
+ */
986
+ 200: Identity;
987
+ };
988
+ export type AccountIdentityResponse = AccountIdentityResponses[keyof AccountIdentityResponses];
989
+ export type AccountOrgData = {
990
+ body?: never;
991
+ path?: never;
992
+ query?: never;
993
+ url: '/api/v1/iam/org';
994
+ };
995
+ export type AccountOrgErrors = {
996
+ /**
997
+ * No credential was presented, or it is not valid.
998
+ */
999
+ 401: AccountRc;
1000
+ /**
1001
+ * The credential does not hold the scope this endpoint requires. The
1002
+ * missing scope is deliberately not named.
1003
+ *
1004
+ */
1005
+ 403: AccountRc;
1006
+ };
1007
+ export type AccountOrgError = AccountOrgErrors[keyof AccountOrgErrors];
1008
+ export type AccountOrgResponses = {
1009
+ /**
1010
+ * The organization.
1011
+ */
1012
+ 200: AccountOrgWrap;
1013
+ };
1014
+ export type AccountOrgResponse = AccountOrgResponses[keyof AccountOrgResponses];
1015
+ export type AccountOrgMembersData = {
1016
+ body?: never;
1017
+ path?: never;
1018
+ query?: never;
1019
+ url: '/api/v1/iam/org/members';
1020
+ };
1021
+ export type AccountOrgMembersErrors = {
1022
+ /**
1023
+ * No credential was presented, or it is not valid.
1024
+ */
1025
+ 401: AccountRc;
1026
+ /**
1027
+ * The credential does not hold the scope this endpoint requires. The
1028
+ * missing scope is deliberately not named.
1029
+ *
1030
+ */
1031
+ 403: AccountRc;
1032
+ };
1033
+ export type AccountOrgMembersError = AccountOrgMembersErrors[keyof AccountOrgMembersErrors];
1034
+ export type AccountOrgMembersResponses = {
1035
+ /**
1036
+ * The members.
1037
+ */
1038
+ 200: AccountRc;
1039
+ };
1040
+ export type AccountOrgMembersResponse = AccountOrgMembersResponses[keyof AccountOrgMembersResponses];
1041
+ export type AccountListApikeysData = {
1042
+ body?: never;
1043
+ path?: never;
1044
+ query?: never;
1045
+ url: '/api/v1/iam/apikeys';
1046
+ };
1047
+ export type AccountListApikeysErrors = {
1048
+ /**
1049
+ * No credential was presented, or it is not valid.
1050
+ */
1051
+ 401: AccountRc;
1052
+ /**
1053
+ * The credential does not hold the scope this endpoint requires. The
1054
+ * missing scope is deliberately not named.
1055
+ *
1056
+ */
1057
+ 403: AccountRc;
1058
+ };
1059
+ export type AccountListApikeysError = AccountListApikeysErrors[keyof AccountListApikeysErrors];
1060
+ export type AccountListApikeysResponses = {
1061
+ /**
1062
+ * The organization's keys, newest first.
1063
+ */
1064
+ 200: ApikeyList;
1065
+ };
1066
+ export type AccountListApikeysResponse = AccountListApikeysResponses[keyof AccountListApikeysResponses];
1067
+ export type AccountCreateApikeyData = {
1068
+ body: AccountCreateApikeyRequest;
1069
+ path?: never;
1070
+ query?: never;
1071
+ url: '/api/v1/iam/apikeys';
1072
+ };
1073
+ export type AccountCreateApikeyErrors = {
1074
+ /**
1075
+ * The request body is missing a required field.
1076
+ */
1077
+ 400: AccountRc;
1078
+ /**
1079
+ * No credential was presented, or it is not valid.
1080
+ */
1081
+ 401: AccountRc;
1082
+ /**
1083
+ * The credential does not hold the scope this endpoint requires. The
1084
+ * missing scope is deliberately not named.
1085
+ *
1086
+ */
1087
+ 403: AccountRc;
1088
+ };
1089
+ export type AccountCreateApikeyError = AccountCreateApikeyErrors[keyof AccountCreateApikeyErrors];
1090
+ export type AccountCreateApikeyResponses = {
1091
+ /**
1092
+ * The new key, including its secret.
1093
+ */
1094
+ 200: AccountCreatedApikey;
1095
+ };
1096
+ export type AccountCreateApikeyResponse = AccountCreateApikeyResponses[keyof AccountCreateApikeyResponses];
1097
+ export type AccountRotateApikeyData = {
1098
+ body?: never;
1099
+ path: {
1100
+ /**
1101
+ * The key's id, as returned by the list endpoint. Never the key itself.
1102
+ */
1103
+ id: string;
1104
+ };
1105
+ query?: never;
1106
+ url: '/api/v1/iam/apikeys/{id}/rotate';
1107
+ };
1108
+ export type AccountRotateApikeyErrors = {
1109
+ /**
1110
+ * No credential was presented, or it is not valid.
1111
+ */
1112
+ 401: AccountRc;
1113
+ /**
1114
+ * The credential does not hold the scope this endpoint requires. The
1115
+ * missing scope is deliberately not named.
1116
+ *
1117
+ */
1118
+ 403: AccountRc;
1119
+ /**
1120
+ * No such key in this organization.
1121
+ */
1122
+ 404: AccountRc;
1123
+ };
1124
+ export type AccountRotateApikeyError = AccountRotateApikeyErrors[keyof AccountRotateApikeyErrors];
1125
+ export type AccountRotateApikeyResponses = {
1126
+ /**
1127
+ * The key, with its new secret.
1128
+ */
1129
+ 200: AccountCreatedApikey;
1130
+ };
1131
+ export type AccountRotateApikeyResponse = AccountRotateApikeyResponses[keyof AccountRotateApikeyResponses];
1132
+ export type AccountRevokeApikeyData = {
1133
+ body?: never;
1134
+ path: {
1135
+ /**
1136
+ * The key's id, as returned by the list endpoint. Never the key itself.
1137
+ */
1138
+ id: string;
1139
+ };
1140
+ query?: never;
1141
+ url: '/api/v1/iam/apikeys/{id}/revoke';
1142
+ };
1143
+ export type AccountRevokeApikeyErrors = {
1144
+ /**
1145
+ * No credential was presented, or it is not valid.
1146
+ */
1147
+ 401: AccountRc;
1148
+ /**
1149
+ * The credential does not hold the scope this endpoint requires. The
1150
+ * missing scope is deliberately not named.
1151
+ *
1152
+ */
1153
+ 403: AccountRc;
1154
+ /**
1155
+ * No such key in this organization.
1156
+ */
1157
+ 404: AccountRc;
1158
+ };
1159
+ export type AccountRevokeApikeyError = AccountRevokeApikeyErrors[keyof AccountRevokeApikeyErrors];
1160
+ export type AccountRevokeApikeyResponses = {
1161
+ /**
1162
+ * Revoked.
1163
+ */
1164
+ 200: AccountRc;
1165
+ };
1166
+ export type AccountRevokeApikeyResponse = AccountRevokeApikeyResponses[keyof AccountRevokeApikeyResponses];
1167
+ export type AccountRevealApikeyData = {
1168
+ body?: never;
1169
+ path: {
1170
+ /**
1171
+ * The key's id, as returned by the list endpoint. Never the key itself.
1172
+ */
1173
+ id: string;
1174
+ };
1175
+ query?: never;
1176
+ url: '/api/v1/iam/apikeys/{id}/reveal';
1177
+ };
1178
+ export type AccountRevealApikeyErrors = {
1179
+ /**
1180
+ * No credential was presented, or it is not valid.
1181
+ */
1182
+ 401: AccountRc;
1183
+ /**
1184
+ * The credential does not hold the scope this endpoint requires. The
1185
+ * missing scope is deliberately not named.
1186
+ *
1187
+ */
1188
+ 403: AccountRc;
1189
+ /**
1190
+ * No such key in this organization, or its secret was never stored
1191
+ * recoverably (`NOT_RETRIEVABLE`).
1192
+ *
1193
+ */
1194
+ 404: AccountRc;
1195
+ };
1196
+ export type AccountRevealApikeyError = AccountRevealApikeyErrors[keyof AccountRevealApikeyErrors];
1197
+ export type AccountRevealApikeyResponses = {
1198
+ /**
1199
+ * The key's secret.
1200
+ */
1201
+ 200: AccountRevealedApikey;
1202
+ };
1203
+ export type AccountRevealApikeyResponse = AccountRevealApikeyResponses[keyof AccountRevealApikeyResponses];
1204
+ export type OauthMetadataData = {
1205
+ body?: never;
1206
+ path?: never;
1207
+ query?: never;
1208
+ url: '/.well-known/oauth-authorization-server';
1209
+ };
1210
+ export type OauthMetadataResponses = {
1211
+ /**
1212
+ * The server's metadata.
1213
+ */
1214
+ 200: OauthMetadata;
1215
+ };
1216
+ export type OauthMetadataResponse = OauthMetadataResponses[keyof OauthMetadataResponses];
1217
+ export type OauthDeviceAuthorizationData = {
1218
+ body: DeviceAuthorizationRequest;
1219
+ path?: never;
1220
+ query?: never;
1221
+ url: '/oauth/device_authorization';
1222
+ };
1223
+ export type OauthDeviceAuthorizationErrors = {
1224
+ /**
1225
+ * `invalid_request`, `invalid_client`, `unauthorized_client`, or
1226
+ * `slow_down` when this address has started too many authorizations.
1227
+ *
1228
+ */
1229
+ 400: OauthError;
1230
+ };
1231
+ export type OauthDeviceAuthorizationError = OauthDeviceAuthorizationErrors[keyof OauthDeviceAuthorizationErrors];
1232
+ export type OauthDeviceAuthorizationResponses = {
1233
+ /**
1234
+ * A pending device authorization.
1235
+ */
1236
+ 200: DeviceAuthorization;
1237
+ };
1238
+ export type OauthDeviceAuthorizationResponse = OauthDeviceAuthorizationResponses[keyof OauthDeviceAuthorizationResponses];
1239
+ export type OauthAuthorizeData = {
1240
+ body?: never;
1241
+ path?: never;
1242
+ query: {
1243
+ client_id: string;
1244
+ redirect_uri: string;
1245
+ response_type: 'code';
1246
+ code_challenge: string;
1247
+ /**
1248
+ * S256 only. `plain` is refused rather than downgraded.
1249
+ */
1250
+ code_challenge_method?: 'S256';
1251
+ scope?: string;
1252
+ /**
1253
+ * Returned unchanged. Use it to bind the response to your request.
1254
+ */
1255
+ state?: string;
1256
+ /**
1257
+ * RFC 8707. What the token is FOR, so it cannot be replayed elsewhere.
1258
+ */
1259
+ resource?: string;
1260
+ };
1261
+ url: '/oauth/authorize';
1262
+ };
1263
+ export type OauthAuthorizeErrors = {
1264
+ /**
1265
+ * Shown to the user. An unverified redirect target is never sent an error.
1266
+ */
1267
+ 400: unknown;
1268
+ };
1269
+ export type OauthTokenData = {
1270
+ body: TokenRequest;
1271
+ path?: never;
1272
+ query?: never;
1273
+ url: '/oauth/token';
1274
+ };
1275
+ export type OauthTokenErrors = {
1276
+ /**
1277
+ * An RFC 6749 error. `authorization_pending` and `slow_down` are
1278
+ * normal answers while polling a device authorization, not failures.
1279
+ *
1280
+ */
1281
+ 400: OauthError;
1282
+ };
1283
+ export type OauthTokenError = OauthTokenErrors[keyof OauthTokenErrors];
1284
+ export type OauthTokenResponses = {
1285
+ /**
1286
+ * Tokens.
1287
+ */
1288
+ 200: TokenResponse;
1289
+ };
1290
+ export type OauthTokenResponse = OauthTokenResponses[keyof OauthTokenResponses];
1291
+ export type OauthRevokeData = {
1292
+ body: RevokeRequest;
1293
+ path?: never;
1294
+ query?: never;
1295
+ url: '/oauth/revoke';
1296
+ };
1297
+ export type OauthRevokeResponses = {
1298
+ /**
1299
+ * Always, whatever was presented.
1300
+ */
1301
+ 200: {
1302
+ [key: string]: unknown;
1303
+ };
701
1304
  };
702
- export type AccountMeResponse = AccountMeResponses[keyof AccountMeResponses];
1305
+ export type OauthRevokeResponse = OauthRevokeResponses[keyof OauthRevokeResponses];