authhero 5.16.0 → 5.17.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 (39) hide show
  1. package/dist/authhero.cjs +70 -70
  2. package/dist/authhero.d.ts +185 -135
  3. package/dist/authhero.mjs +4273 -4234
  4. package/dist/stats.html +1 -1
  5. package/dist/tsconfig.types.tsbuildinfo +1 -1
  6. package/dist/types/authentication-flows/passwordless.d.ts +3 -3
  7. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  8. package/dist/types/index.d.ts +110 -109
  9. package/dist/types/middlewares/authentication.d.ts +17 -0
  10. package/dist/types/routes/auth-api/authorize.d.ts +12 -12
  11. package/dist/types/routes/auth-api/index.d.ts +58 -58
  12. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  13. package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
  14. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  15. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  16. package/dist/types/routes/auth-api/token.d.ts +21 -21
  17. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  18. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  19. package/dist/types/routes/management-api/branding.d.ts +8 -8
  20. package/dist/types/routes/management-api/clients.d.ts +7 -7
  21. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  22. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  23. package/dist/types/routes/management-api/index.d.ts +33 -33
  24. package/dist/types/routes/management-api/logs.d.ts +3 -3
  25. package/dist/types/routes/management-api/organizations.d.ts +1 -1
  26. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  27. package/dist/types/routes/management-api/themes.d.ts +3 -3
  28. package/dist/types/routes/management-api/users.d.ts +2 -2
  29. package/dist/types/routes/universal-login/common.d.ts +6 -6
  30. package/dist/types/routes/universal-login/continue.d.ts +2 -2
  31. package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
  32. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  33. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  34. package/dist/types/routes/universal-login/index.d.ts +8 -8
  35. package/dist/types/routes/universal-login/u2-index.d.ts +10 -10
  36. package/dist/types/routes/universal-login/u2-routes.d.ts +10 -10
  37. package/dist/types/types/AuthHeroConfig.d.ts +33 -0
  38. package/dist/types/types/Variables.d.ts +1 -0
  39. package/package.json +3 -3
@@ -13,9 +13,26 @@ export declare const MANAGEMENT_API_AUDIENCE = "urn:authhero:management";
13
13
  * token's `aud` includes the management API audience. It must be enabled
14
14
  * for the management API and left off for everything else (the `/userinfo`
15
15
  * endpoint, for example, takes any access token issued by this tenant).
16
+ *
17
+ * `relaxManagementAudience` downgrades that audience check from a hard
18
+ * rejection to a `console.warn`, letting tokens issued for other audiences
19
+ * still pass. TRANSITIONAL: use only while migrating clients to request
20
+ * the management audience; flip back off once warnings stop appearing.
21
+ *
22
+ * `additionalManagementAudiences` extends the set of accepted audiences
23
+ * beyond the built-in `urn:authhero:management`. The resolver receives the
24
+ * token's `tenant_id` and returns the list of audiences accepted for that
25
+ * token, so a per-tenant identifier (e.g.
26
+ * `https://${tenant_id}.token.example.com/v2/api/`) can be constructed at
27
+ * request time alongside any global legacy identifiers.
16
28
  */
29
+ export type ManagementAudienceResolver = (params: {
30
+ tenant_id?: string;
31
+ }) => string[] | Promise<string[]>;
17
32
  export interface AuthMiddlewareOptions {
18
33
  requireManagementAudience?: boolean;
34
+ relaxManagementAudience?: boolean;
35
+ additionalManagementAudiences?: ManagementAudienceResolver;
19
36
  }
20
37
  export declare function createAuthMiddleware(app: OpenAPIHono<{
21
38
  Bindings: Bindings;
@@ -105,11 +105,17 @@ export declare const authorizeRoutes: OpenAPIHono<{
105
105
  request_uri?: string | undefined;
106
106
  };
107
107
  };
108
- output: {
109
- message: string;
108
+ output: string | {
109
+ access_token: string;
110
+ token_type: string;
111
+ expires_in: number;
112
+ id_token?: string | undefined;
113
+ scope?: string | undefined;
114
+ state?: string | undefined;
115
+ refresh_token?: string | undefined;
110
116
  };
111
117
  outputFormat: "json";
112
- status: 400;
118
+ status: 200;
113
119
  } | {
114
120
  input: {
115
121
  query: {
@@ -141,17 +147,11 @@ export declare const authorizeRoutes: OpenAPIHono<{
141
147
  request_uri?: string | undefined;
142
148
  };
143
149
  };
144
- output: string | {
145
- access_token: string;
146
- token_type: string;
147
- expires_in: number;
148
- id_token?: string | undefined;
149
- scope?: string | undefined;
150
- state?: string | undefined;
151
- refresh_token?: string | undefined;
150
+ output: {
151
+ message: string;
152
152
  };
153
153
  outputFormat: "json";
154
- status: 200;
154
+ status: 400;
155
155
  } | {
156
156
  input: {
157
157
  query: {
@@ -288,7 +288,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
288
288
  scope?: string | undefined;
289
289
  grant_types?: string[] | undefined;
290
290
  response_types?: string[] | undefined;
291
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
291
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
292
292
  jwks_uri?: string | undefined;
293
293
  jwks?: Record<string, unknown> | undefined;
294
294
  software_id?: string | undefined;
@@ -377,7 +377,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
377
377
  scope?: string | undefined;
378
378
  grant_types?: string[] | undefined;
379
379
  response_types?: string[] | undefined;
380
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
380
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
381
381
  jwks_uri?: string | undefined;
382
382
  jwks?: Record<string, unknown> | undefined;
383
383
  software_id?: string | undefined;
@@ -557,11 +557,17 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
557
557
  request_uri?: string | undefined;
558
558
  };
559
559
  };
560
- output: {
561
- message: string;
560
+ output: string | {
561
+ access_token: string;
562
+ token_type: string;
563
+ expires_in: number;
564
+ id_token?: string | undefined;
565
+ scope?: string | undefined;
566
+ state?: string | undefined;
567
+ refresh_token?: string | undefined;
562
568
  };
563
569
  outputFormat: "json";
564
- status: 400;
570
+ status: 200;
565
571
  } | {
566
572
  input: {
567
573
  query: {
@@ -593,17 +599,11 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
593
599
  request_uri?: string | undefined;
594
600
  };
595
601
  };
596
- output: string | {
597
- access_token: string;
598
- token_type: string;
599
- expires_in: number;
600
- id_token?: string | undefined;
601
- scope?: string | undefined;
602
- state?: string | undefined;
603
- refresh_token?: string | undefined;
602
+ output: {
603
+ message: string;
604
604
  };
605
605
  outputFormat: "json";
606
- status: 200;
606
+ status: 400;
607
607
  } | {
608
608
  input: {
609
609
  query: {
@@ -723,19 +723,19 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
723
723
  email: string;
724
724
  send: "code" | "link";
725
725
  authParams: {
726
- audience?: string | undefined;
726
+ state?: string | undefined;
727
727
  response_type?: import("@authhero/adapter-interfaces").AuthorizationResponseType | undefined;
728
728
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
729
729
  scope?: string | undefined;
730
730
  username?: string | undefined;
731
- state?: string | undefined;
732
- act_as?: string | undefined;
733
- redirect_uri?: string | undefined;
734
- organization?: string | undefined;
735
- nonce?: string | undefined;
731
+ audience?: string | undefined;
736
732
  prompt?: string | undefined;
737
- code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
738
733
  code_challenge?: string | undefined;
734
+ code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
735
+ redirect_uri?: string | undefined;
736
+ nonce?: string | undefined;
737
+ act_as?: string | undefined;
738
+ organization?: string | undefined;
739
739
  ui_locales?: string | undefined;
740
740
  max_age?: number | undefined;
741
741
  acr_values?: string | undefined;
@@ -759,19 +759,19 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
759
759
  phone_number: string;
760
760
  send: "code" | "link";
761
761
  authParams: {
762
- audience?: string | undefined;
762
+ state?: string | undefined;
763
763
  response_type?: import("@authhero/adapter-interfaces").AuthorizationResponseType | undefined;
764
764
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
765
765
  scope?: string | undefined;
766
766
  username?: string | undefined;
767
- state?: string | undefined;
768
- act_as?: string | undefined;
769
- redirect_uri?: string | undefined;
770
- organization?: string | undefined;
771
- nonce?: string | undefined;
767
+ audience?: string | undefined;
772
768
  prompt?: string | undefined;
773
- code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
774
769
  code_challenge?: string | undefined;
770
+ code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
771
+ redirect_uri?: string | undefined;
772
+ nonce?: string | undefined;
773
+ act_as?: string | undefined;
774
+ organization?: string | undefined;
775
775
  ui_locales?: string | undefined;
776
776
  max_age?: number | undefined;
777
777
  acr_values?: string | undefined;
@@ -903,14 +903,14 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
903
903
  input: {
904
904
  form: {
905
905
  token: string;
906
- token_type_hint?: "refresh_token" | "access_token" | undefined;
906
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
907
907
  client_id?: string | undefined;
908
908
  client_secret?: string | undefined;
909
909
  };
910
910
  } & {
911
911
  json: {
912
912
  token: string;
913
- token_type_hint?: "refresh_token" | "access_token" | undefined;
913
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
914
914
  client_id?: string | undefined;
915
915
  client_secret?: string | undefined;
916
916
  };
@@ -922,14 +922,14 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
922
922
  input: {
923
923
  form: {
924
924
  token: string;
925
- token_type_hint?: "refresh_token" | "access_token" | undefined;
925
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
926
926
  client_id?: string | undefined;
927
927
  client_secret?: string | undefined;
928
928
  };
929
929
  } & {
930
930
  json: {
931
931
  token: string;
932
- token_type_hint?: "refresh_token" | "access_token" | undefined;
932
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
933
933
  client_id?: string | undefined;
934
934
  client_secret?: string | undefined;
935
935
  };
@@ -944,14 +944,14 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
944
944
  input: {
945
945
  form: {
946
946
  token: string;
947
- token_type_hint?: "refresh_token" | "access_token" | undefined;
947
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
948
948
  client_id?: string | undefined;
949
949
  client_secret?: string | undefined;
950
950
  };
951
951
  } & {
952
952
  json: {
953
953
  token: string;
954
- token_type_hint?: "refresh_token" | "access_token" | undefined;
954
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
955
955
  client_id?: string | undefined;
956
956
  client_secret?: string | undefined;
957
957
  };
@@ -1001,7 +1001,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1001
1001
  client_id: string;
1002
1002
  username: string;
1003
1003
  otp: string;
1004
- realm: "sms" | "email";
1004
+ realm: "email" | "sms";
1005
1005
  };
1006
1006
  } & {
1007
1007
  json: {
@@ -1037,7 +1037,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1037
1037
  client_id: string;
1038
1038
  username: string;
1039
1039
  otp: string;
1040
- realm: "sms" | "email";
1040
+ realm: "email" | "sms";
1041
1041
  };
1042
1042
  };
1043
1043
  output: {};
@@ -1078,7 +1078,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1078
1078
  client_id: string;
1079
1079
  username: string;
1080
1080
  otp: string;
1081
- realm: "sms" | "email";
1081
+ realm: "email" | "sms";
1082
1082
  };
1083
1083
  } & {
1084
1084
  json: {
@@ -1114,15 +1114,20 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1114
1114
  client_id: string;
1115
1115
  username: string;
1116
1116
  otp: string;
1117
- realm: "sms" | "email";
1117
+ realm: "email" | "sms";
1118
1118
  };
1119
1119
  };
1120
1120
  output: {
1121
- error: string;
1122
- error_description?: string | undefined;
1121
+ access_token: string;
1122
+ token_type: string;
1123
+ expires_in: number;
1124
+ id_token?: string | undefined;
1125
+ scope?: string | undefined;
1126
+ state?: string | undefined;
1127
+ refresh_token?: string | undefined;
1123
1128
  };
1124
1129
  outputFormat: "json";
1125
- status: 400;
1130
+ status: 200;
1126
1131
  } | {
1127
1132
  input: {
1128
1133
  form: {
@@ -1158,7 +1163,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1158
1163
  client_id: string;
1159
1164
  username: string;
1160
1165
  otp: string;
1161
- realm: "sms" | "email";
1166
+ realm: "email" | "sms";
1162
1167
  };
1163
1168
  } & {
1164
1169
  json: {
@@ -1194,20 +1199,15 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1194
1199
  client_id: string;
1195
1200
  username: string;
1196
1201
  otp: string;
1197
- realm: "sms" | "email";
1202
+ realm: "email" | "sms";
1198
1203
  };
1199
1204
  };
1200
1205
  output: {
1201
- access_token: string;
1202
- token_type: string;
1203
- expires_in: number;
1204
- id_token?: string | undefined;
1205
- scope?: string | undefined;
1206
- state?: string | undefined;
1207
- refresh_token?: string | undefined;
1206
+ error: string;
1207
+ error_description?: string | undefined;
1208
1208
  };
1209
1209
  outputFormat: "json";
1210
- status: 200;
1210
+ status: 400;
1211
1211
  } | {
1212
1212
  input: {
1213
1213
  form: {
@@ -1243,7 +1243,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1243
1243
  client_id: string;
1244
1244
  username: string;
1245
1245
  otp: string;
1246
- realm: "sms" | "email";
1246
+ realm: "email" | "sms";
1247
1247
  };
1248
1248
  } & {
1249
1249
  json: {
@@ -1279,7 +1279,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1279
1279
  client_id: string;
1280
1280
  username: string;
1281
1281
  otp: string;
1282
- realm: "sms" | "email";
1282
+ realm: "email" | "sms";
1283
1283
  };
1284
1284
  };
1285
1285
  output: {
@@ -1323,7 +1323,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1323
1323
  client_id: string;
1324
1324
  username: string;
1325
1325
  otp: string;
1326
- realm: "sms" | "email";
1326
+ realm: "email" | "sms";
1327
1327
  };
1328
1328
  } & {
1329
1329
  json: {
@@ -1359,7 +1359,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1359
1359
  client_id: string;
1360
1360
  username: string;
1361
1361
  otp: string;
1362
- realm: "sms" | "email";
1362
+ realm: "email" | "sms";
1363
1363
  };
1364
1364
  };
1365
1365
  output: {
@@ -1566,7 +1566,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1566
1566
  };
1567
1567
  output: {};
1568
1568
  outputFormat: string;
1569
- status: 400;
1569
+ status: 200;
1570
1570
  } | {
1571
1571
  input: {
1572
1572
  query: {
@@ -1580,7 +1580,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1580
1580
  };
1581
1581
  output: {};
1582
1582
  outputFormat: string;
1583
- status: 200;
1583
+ status: 302;
1584
1584
  } | {
1585
1585
  input: {
1586
1586
  query: {
@@ -1594,7 +1594,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
1594
1594
  };
1595
1595
  output: {};
1596
1596
  outputFormat: string;
1597
- status: 302;
1597
+ status: 400;
1598
1598
  };
1599
1599
  };
1600
1600
  }, "/oidc/logout"> & import("hono/types").MergeSchemaPath<{
@@ -18,7 +18,7 @@ export declare const oidcLogoutRoutes: OpenAPIHono<{
18
18
  };
19
19
  output: {};
20
20
  outputFormat: string;
21
- status: 400;
21
+ status: 200;
22
22
  } | {
23
23
  input: {
24
24
  query: {
@@ -32,7 +32,7 @@ export declare const oidcLogoutRoutes: OpenAPIHono<{
32
32
  };
33
33
  output: {};
34
34
  outputFormat: string;
35
- status: 200;
35
+ status: 302;
36
36
  } | {
37
37
  input: {
38
38
  query: {
@@ -46,7 +46,7 @@ export declare const oidcLogoutRoutes: OpenAPIHono<{
46
46
  };
47
47
  output: {};
48
48
  outputFormat: string;
49
- status: 302;
49
+ status: 400;
50
50
  };
51
51
  };
52
52
  }, "/">;
@@ -14,19 +14,19 @@ export declare const passwordlessRoutes: OpenAPIHono<{
14
14
  email: string;
15
15
  send: "code" | "link";
16
16
  authParams: {
17
- audience?: string | undefined;
17
+ state?: string | undefined;
18
18
  response_type?: AuthorizationResponseType | undefined;
19
19
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
20
20
  scope?: string | undefined;
21
21
  username?: string | undefined;
22
- state?: string | undefined;
23
- act_as?: string | undefined;
24
- redirect_uri?: string | undefined;
25
- organization?: string | undefined;
26
- nonce?: string | undefined;
22
+ audience?: string | undefined;
27
23
  prompt?: string | undefined;
28
- code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
29
24
  code_challenge?: string | undefined;
25
+ code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
26
+ redirect_uri?: string | undefined;
27
+ nonce?: string | undefined;
28
+ act_as?: string | undefined;
29
+ organization?: string | undefined;
30
30
  ui_locales?: string | undefined;
31
31
  max_age?: number | undefined;
32
32
  acr_values?: string | undefined;
@@ -50,19 +50,19 @@ export declare const passwordlessRoutes: OpenAPIHono<{
50
50
  phone_number: string;
51
51
  send: "code" | "link";
52
52
  authParams: {
53
- audience?: string | undefined;
53
+ state?: string | undefined;
54
54
  response_type?: AuthorizationResponseType | undefined;
55
55
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
56
56
  scope?: string | undefined;
57
57
  username?: string | undefined;
58
- state?: string | undefined;
59
- act_as?: string | undefined;
60
- redirect_uri?: string | undefined;
61
- organization?: string | undefined;
62
- nonce?: string | undefined;
58
+ audience?: string | undefined;
63
59
  prompt?: string | undefined;
64
- code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
65
60
  code_challenge?: string | undefined;
61
+ code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
62
+ redirect_uri?: string | undefined;
63
+ nonce?: string | undefined;
64
+ act_as?: string | undefined;
65
+ organization?: string | undefined;
66
66
  ui_locales?: string | undefined;
67
67
  max_age?: number | undefined;
68
68
  acr_values?: string | undefined;
@@ -18,7 +18,7 @@ export declare const registerRoutes: OpenAPIHono<{
18
18
  scope?: string | undefined;
19
19
  grant_types?: string[] | undefined;
20
20
  response_types?: string[] | undefined;
21
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
21
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
22
22
  jwks_uri?: string | undefined;
23
23
  jwks?: Record<string, unknown> | undefined;
24
24
  software_id?: string | undefined;
@@ -107,7 +107,7 @@ export declare const registerRoutes: OpenAPIHono<{
107
107
  scope?: string | undefined;
108
108
  grant_types?: string[] | undefined;
109
109
  response_types?: string[] | undefined;
110
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
110
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
111
111
  jwks_uri?: string | undefined;
112
112
  jwks?: Record<string, unknown> | undefined;
113
113
  software_id?: string | undefined;
@@ -9,14 +9,14 @@ export declare const revokeRoutes: OpenAPIHono<{
9
9
  input: {
10
10
  form: {
11
11
  token: string;
12
- token_type_hint?: "refresh_token" | "access_token" | undefined;
12
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
13
13
  client_id?: string | undefined;
14
14
  client_secret?: string | undefined;
15
15
  };
16
16
  } & {
17
17
  json: {
18
18
  token: string;
19
- token_type_hint?: "refresh_token" | "access_token" | undefined;
19
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
20
20
  client_id?: string | undefined;
21
21
  client_secret?: string | undefined;
22
22
  };
@@ -28,14 +28,14 @@ export declare const revokeRoutes: OpenAPIHono<{
28
28
  input: {
29
29
  form: {
30
30
  token: string;
31
- token_type_hint?: "refresh_token" | "access_token" | undefined;
31
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
32
32
  client_id?: string | undefined;
33
33
  client_secret?: string | undefined;
34
34
  };
35
35
  } & {
36
36
  json: {
37
37
  token: string;
38
- token_type_hint?: "refresh_token" | "access_token" | undefined;
38
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
39
39
  client_id?: string | undefined;
40
40
  client_secret?: string | undefined;
41
41
  };
@@ -50,14 +50,14 @@ export declare const revokeRoutes: OpenAPIHono<{
50
50
  input: {
51
51
  form: {
52
52
  token: string;
53
- token_type_hint?: "refresh_token" | "access_token" | undefined;
53
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
54
54
  client_id?: string | undefined;
55
55
  client_secret?: string | undefined;
56
56
  };
57
57
  } & {
58
58
  json: {
59
59
  token: string;
60
- token_type_hint?: "refresh_token" | "access_token" | undefined;
60
+ token_type_hint?: "access_token" | "refresh_token" | undefined;
61
61
  client_id?: string | undefined;
62
62
  client_secret?: string | undefined;
63
63
  };
@@ -40,7 +40,7 @@ export declare const tokenRoutes: OpenAPIHono<{
40
40
  client_id: string;
41
41
  username: string;
42
42
  otp: string;
43
- realm: "sms" | "email";
43
+ realm: "email" | "sms";
44
44
  };
45
45
  } & {
46
46
  json: {
@@ -76,7 +76,7 @@ export declare const tokenRoutes: OpenAPIHono<{
76
76
  client_id: string;
77
77
  username: string;
78
78
  otp: string;
79
- realm: "sms" | "email";
79
+ realm: "email" | "sms";
80
80
  };
81
81
  };
82
82
  output: {};
@@ -117,7 +117,7 @@ export declare const tokenRoutes: OpenAPIHono<{
117
117
  client_id: string;
118
118
  username: string;
119
119
  otp: string;
120
- realm: "sms" | "email";
120
+ realm: "email" | "sms";
121
121
  };
122
122
  } & {
123
123
  json: {
@@ -153,15 +153,20 @@ export declare const tokenRoutes: OpenAPIHono<{
153
153
  client_id: string;
154
154
  username: string;
155
155
  otp: string;
156
- realm: "sms" | "email";
156
+ realm: "email" | "sms";
157
157
  };
158
158
  };
159
159
  output: {
160
- error: string;
161
- error_description?: string | undefined;
160
+ access_token: string;
161
+ token_type: string;
162
+ expires_in: number;
163
+ id_token?: string | undefined;
164
+ scope?: string | undefined;
165
+ state?: string | undefined;
166
+ refresh_token?: string | undefined;
162
167
  };
163
168
  outputFormat: "json";
164
- status: 400;
169
+ status: 200;
165
170
  } | {
166
171
  input: {
167
172
  form: {
@@ -197,7 +202,7 @@ export declare const tokenRoutes: OpenAPIHono<{
197
202
  client_id: string;
198
203
  username: string;
199
204
  otp: string;
200
- realm: "sms" | "email";
205
+ realm: "email" | "sms";
201
206
  };
202
207
  } & {
203
208
  json: {
@@ -233,20 +238,15 @@ export declare const tokenRoutes: OpenAPIHono<{
233
238
  client_id: string;
234
239
  username: string;
235
240
  otp: string;
236
- realm: "sms" | "email";
241
+ realm: "email" | "sms";
237
242
  };
238
243
  };
239
244
  output: {
240
- access_token: string;
241
- token_type: string;
242
- expires_in: number;
243
- id_token?: string | undefined;
244
- scope?: string | undefined;
245
- state?: string | undefined;
246
- refresh_token?: string | undefined;
245
+ error: string;
246
+ error_description?: string | undefined;
247
247
  };
248
248
  outputFormat: "json";
249
- status: 200;
249
+ status: 400;
250
250
  } | {
251
251
  input: {
252
252
  form: {
@@ -282,7 +282,7 @@ export declare const tokenRoutes: OpenAPIHono<{
282
282
  client_id: string;
283
283
  username: string;
284
284
  otp: string;
285
- realm: "sms" | "email";
285
+ realm: "email" | "sms";
286
286
  };
287
287
  } & {
288
288
  json: {
@@ -318,7 +318,7 @@ export declare const tokenRoutes: OpenAPIHono<{
318
318
  client_id: string;
319
319
  username: string;
320
320
  otp: string;
321
- realm: "sms" | "email";
321
+ realm: "email" | "sms";
322
322
  };
323
323
  };
324
324
  output: {
@@ -362,7 +362,7 @@ export declare const tokenRoutes: OpenAPIHono<{
362
362
  client_id: string;
363
363
  username: string;
364
364
  otp: string;
365
- realm: "sms" | "email";
365
+ realm: "email" | "sms";
366
366
  };
367
367
  } & {
368
368
  json: {
@@ -398,7 +398,7 @@ export declare const tokenRoutes: OpenAPIHono<{
398
398
  client_id: string;
399
399
  username: string;
400
400
  otp: string;
401
- realm: "sms" | "email";
401
+ realm: "email" | "sms";
402
402
  };
403
403
  };
404
404
  output: {
@@ -31,7 +31,7 @@ export declare const actionExecutionsRoutes: OpenAPIHono<{
31
31
  output: {
32
32
  id: string;
33
33
  trigger_id: string;
34
- status: "pending" | "unspecified" | "final" | "partial" | "canceled" | "suspended";
34
+ status: "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended";
35
35
  results: {
36
36
  action_name: string;
37
37
  error: {