authhero 5.9.0 → 5.10.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/dist/authhero.cjs +135 -135
- package/dist/authhero.d.ts +335 -104
- package/dist/authhero.mjs +16339 -16678
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +335 -104
- package/dist/types/routes/auth-api/authorize.d.ts +14 -14
- package/dist/types/routes/auth-api/index.d.ts +52 -52
- package/dist/types/routes/auth-api/passwordless.d.ts +2 -2
- package/dist/types/routes/management-api/index.d.ts +73 -6
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/users-by-email.d.ts +69 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +168 -4
- package/dist/types/routes/universal-login/u2-routes.d.ts +168 -4
- package/dist/types/utils/define-route.d.ts +20 -0
- package/package.json +6 -6
|
@@ -21,11 +21,35 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
21
21
|
Bindings: Bindings;
|
|
22
22
|
Variables: Variables;
|
|
23
23
|
}, import("hono/types").MergeSchemaPath<{
|
|
24
|
-
|
|
24
|
+
"/guardian/enroll": {
|
|
25
25
|
$get: {
|
|
26
26
|
input: {
|
|
27
27
|
query: {
|
|
28
|
-
|
|
28
|
+
ticket: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
output: Response;
|
|
32
|
+
outputFormat: "json";
|
|
33
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
34
|
+
} | {
|
|
35
|
+
input: {
|
|
36
|
+
query: {
|
|
37
|
+
ticket: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
output: {};
|
|
41
|
+
outputFormat: string;
|
|
42
|
+
status: 302;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} & {
|
|
46
|
+
"/accept-invitation": {
|
|
47
|
+
$get: {
|
|
48
|
+
input: {
|
|
49
|
+
query: {
|
|
50
|
+
invitation?: string | undefined;
|
|
51
|
+
organization?: string | undefined;
|
|
52
|
+
state?: string | undefined;
|
|
29
53
|
error?: string | undefined;
|
|
30
54
|
error_description?: string | undefined;
|
|
31
55
|
ui_locales?: string | undefined;
|
|
@@ -34,10 +58,24 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
34
58
|
output: Response;
|
|
35
59
|
outputFormat: "json";
|
|
36
60
|
status: import("hono/utils/http-status").StatusCode;
|
|
61
|
+
} | {
|
|
62
|
+
input: {
|
|
63
|
+
query: {
|
|
64
|
+
invitation?: string | undefined;
|
|
65
|
+
organization?: string | undefined;
|
|
66
|
+
state?: string | undefined;
|
|
67
|
+
error?: string | undefined;
|
|
68
|
+
error_description?: string | undefined;
|
|
69
|
+
ui_locales?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
output: {};
|
|
73
|
+
outputFormat: string;
|
|
74
|
+
status: 302;
|
|
37
75
|
};
|
|
38
76
|
};
|
|
39
77
|
} & {
|
|
40
|
-
|
|
78
|
+
"/accept-invitation": {
|
|
41
79
|
$post: {
|
|
42
80
|
input: {
|
|
43
81
|
query: {
|
|
@@ -69,11 +107,12 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
69
107
|
};
|
|
70
108
|
};
|
|
71
109
|
} & {
|
|
72
|
-
"/
|
|
110
|
+
"/tickets/email-verification": {
|
|
73
111
|
$get: {
|
|
74
112
|
input: {
|
|
75
113
|
query: {
|
|
76
114
|
ticket: string;
|
|
115
|
+
tenant_id?: string | undefined;
|
|
77
116
|
};
|
|
78
117
|
};
|
|
79
118
|
output: Response;
|
|
@@ -83,6 +122,21 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
83
122
|
input: {
|
|
84
123
|
query: {
|
|
85
124
|
ticket: string;
|
|
125
|
+
tenant_id?: string | undefined;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
output: {};
|
|
129
|
+
outputFormat: string;
|
|
130
|
+
status: 302;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
} & {
|
|
134
|
+
"/tickets/password-change": {
|
|
135
|
+
$get: {
|
|
136
|
+
input: {
|
|
137
|
+
query: {
|
|
138
|
+
ticket: string;
|
|
139
|
+
tenant_id?: string | undefined;
|
|
86
140
|
};
|
|
87
141
|
};
|
|
88
142
|
output: {};
|
|
@@ -90,6 +144,116 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
90
144
|
status: 302;
|
|
91
145
|
};
|
|
92
146
|
};
|
|
147
|
+
} & {
|
|
148
|
+
"/:screen{.+}": {
|
|
149
|
+
$get: {
|
|
150
|
+
input: {
|
|
151
|
+
param: {
|
|
152
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
153
|
+
};
|
|
154
|
+
} & {
|
|
155
|
+
query: {
|
|
156
|
+
state: string;
|
|
157
|
+
error?: string | undefined;
|
|
158
|
+
error_description?: string | undefined;
|
|
159
|
+
ui_locales?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
output: Response;
|
|
163
|
+
outputFormat: "json";
|
|
164
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
165
|
+
} | {
|
|
166
|
+
input: {
|
|
167
|
+
param: {
|
|
168
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
169
|
+
};
|
|
170
|
+
} & {
|
|
171
|
+
query: {
|
|
172
|
+
state: string;
|
|
173
|
+
error?: string | undefined;
|
|
174
|
+
error_description?: string | undefined;
|
|
175
|
+
ui_locales?: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
output: {};
|
|
179
|
+
outputFormat: string;
|
|
180
|
+
status: 302;
|
|
181
|
+
} | {
|
|
182
|
+
input: {
|
|
183
|
+
param: {
|
|
184
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
185
|
+
};
|
|
186
|
+
} & {
|
|
187
|
+
query: {
|
|
188
|
+
state: string;
|
|
189
|
+
error?: string | undefined;
|
|
190
|
+
error_description?: string | undefined;
|
|
191
|
+
ui_locales?: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
output: {};
|
|
195
|
+
outputFormat: string;
|
|
196
|
+
status: 400;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
} & {
|
|
200
|
+
"/:screen{.+}": {
|
|
201
|
+
$post: {
|
|
202
|
+
input: {
|
|
203
|
+
param: {
|
|
204
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
205
|
+
};
|
|
206
|
+
} & {
|
|
207
|
+
query: {
|
|
208
|
+
state: string;
|
|
209
|
+
error?: string | undefined;
|
|
210
|
+
error_description?: string | undefined;
|
|
211
|
+
ui_locales?: string | undefined;
|
|
212
|
+
};
|
|
213
|
+
} & {
|
|
214
|
+
form: Record<string, string>;
|
|
215
|
+
};
|
|
216
|
+
output: Response;
|
|
217
|
+
outputFormat: "json";
|
|
218
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
219
|
+
} | {
|
|
220
|
+
input: {
|
|
221
|
+
param: {
|
|
222
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
223
|
+
};
|
|
224
|
+
} & {
|
|
225
|
+
query: {
|
|
226
|
+
state: string;
|
|
227
|
+
error?: string | undefined;
|
|
228
|
+
error_description?: string | undefined;
|
|
229
|
+
ui_locales?: string | undefined;
|
|
230
|
+
};
|
|
231
|
+
} & {
|
|
232
|
+
form: Record<string, string>;
|
|
233
|
+
};
|
|
234
|
+
output: {};
|
|
235
|
+
outputFormat: string;
|
|
236
|
+
status: 302;
|
|
237
|
+
} | {
|
|
238
|
+
input: {
|
|
239
|
+
param: {
|
|
240
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
241
|
+
};
|
|
242
|
+
} & {
|
|
243
|
+
query: {
|
|
244
|
+
state: string;
|
|
245
|
+
error?: string | undefined;
|
|
246
|
+
error_description?: string | undefined;
|
|
247
|
+
ui_locales?: string | undefined;
|
|
248
|
+
};
|
|
249
|
+
} & {
|
|
250
|
+
form: Record<string, string>;
|
|
251
|
+
};
|
|
252
|
+
output: {};
|
|
253
|
+
outputFormat: string;
|
|
254
|
+
status: 400;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
93
257
|
}, "/"> & import("hono/types").MergeSchemaPath<{
|
|
94
258
|
"/:formId/nodes/:nodeId": {
|
|
95
259
|
$get: {
|
|
@@ -26,11 +26,35 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
26
26
|
Bindings: Bindings;
|
|
27
27
|
Variables: Variables;
|
|
28
28
|
}, {
|
|
29
|
-
|
|
29
|
+
"/guardian/enroll": {
|
|
30
30
|
$get: {
|
|
31
31
|
input: {
|
|
32
32
|
query: {
|
|
33
|
-
|
|
33
|
+
ticket: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
output: Response;
|
|
37
|
+
outputFormat: "json";
|
|
38
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
39
|
+
} | {
|
|
40
|
+
input: {
|
|
41
|
+
query: {
|
|
42
|
+
ticket: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
output: {};
|
|
46
|
+
outputFormat: string;
|
|
47
|
+
status: 302;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
} & {
|
|
51
|
+
"/accept-invitation": {
|
|
52
|
+
$get: {
|
|
53
|
+
input: {
|
|
54
|
+
query: {
|
|
55
|
+
invitation?: string | undefined;
|
|
56
|
+
organization?: string | undefined;
|
|
57
|
+
state?: string | undefined;
|
|
34
58
|
error?: string | undefined;
|
|
35
59
|
error_description?: string | undefined;
|
|
36
60
|
ui_locales?: string | undefined;
|
|
@@ -39,10 +63,24 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
39
63
|
output: Response;
|
|
40
64
|
outputFormat: "json";
|
|
41
65
|
status: import("hono/utils/http-status").StatusCode;
|
|
66
|
+
} | {
|
|
67
|
+
input: {
|
|
68
|
+
query: {
|
|
69
|
+
invitation?: string | undefined;
|
|
70
|
+
organization?: string | undefined;
|
|
71
|
+
state?: string | undefined;
|
|
72
|
+
error?: string | undefined;
|
|
73
|
+
error_description?: string | undefined;
|
|
74
|
+
ui_locales?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
output: {};
|
|
78
|
+
outputFormat: string;
|
|
79
|
+
status: 302;
|
|
42
80
|
};
|
|
43
81
|
};
|
|
44
82
|
} & {
|
|
45
|
-
|
|
83
|
+
"/accept-invitation": {
|
|
46
84
|
$post: {
|
|
47
85
|
input: {
|
|
48
86
|
query: {
|
|
@@ -74,11 +112,12 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
74
112
|
};
|
|
75
113
|
};
|
|
76
114
|
} & {
|
|
77
|
-
"/
|
|
115
|
+
"/tickets/email-verification": {
|
|
78
116
|
$get: {
|
|
79
117
|
input: {
|
|
80
118
|
query: {
|
|
81
119
|
ticket: string;
|
|
120
|
+
tenant_id?: string | undefined;
|
|
82
121
|
};
|
|
83
122
|
};
|
|
84
123
|
output: Response;
|
|
@@ -88,6 +127,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
88
127
|
input: {
|
|
89
128
|
query: {
|
|
90
129
|
ticket: string;
|
|
130
|
+
tenant_id?: string | undefined;
|
|
91
131
|
};
|
|
92
132
|
};
|
|
93
133
|
output: {};
|
|
@@ -95,4 +135,128 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
95
135
|
status: 302;
|
|
96
136
|
};
|
|
97
137
|
};
|
|
138
|
+
} & {
|
|
139
|
+
"/tickets/password-change": {
|
|
140
|
+
$get: {
|
|
141
|
+
input: {
|
|
142
|
+
query: {
|
|
143
|
+
ticket: string;
|
|
144
|
+
tenant_id?: string | undefined;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
output: {};
|
|
148
|
+
outputFormat: string;
|
|
149
|
+
status: 302;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
} & {
|
|
153
|
+
"/:screen{.+}": {
|
|
154
|
+
$get: {
|
|
155
|
+
input: {
|
|
156
|
+
param: {
|
|
157
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
158
|
+
};
|
|
159
|
+
} & {
|
|
160
|
+
query: {
|
|
161
|
+
state: string;
|
|
162
|
+
error?: string | undefined;
|
|
163
|
+
error_description?: string | undefined;
|
|
164
|
+
ui_locales?: string | undefined;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
output: Response;
|
|
168
|
+
outputFormat: "json";
|
|
169
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
170
|
+
} | {
|
|
171
|
+
input: {
|
|
172
|
+
param: {
|
|
173
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
174
|
+
};
|
|
175
|
+
} & {
|
|
176
|
+
query: {
|
|
177
|
+
state: string;
|
|
178
|
+
error?: string | undefined;
|
|
179
|
+
error_description?: string | undefined;
|
|
180
|
+
ui_locales?: string | undefined;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
output: {};
|
|
184
|
+
outputFormat: string;
|
|
185
|
+
status: 302;
|
|
186
|
+
} | {
|
|
187
|
+
input: {
|
|
188
|
+
param: {
|
|
189
|
+
screen: "signup" | "login" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
190
|
+
};
|
|
191
|
+
} & {
|
|
192
|
+
query: {
|
|
193
|
+
state: string;
|
|
194
|
+
error?: string | undefined;
|
|
195
|
+
error_description?: string | undefined;
|
|
196
|
+
ui_locales?: string | undefined;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
output: {};
|
|
200
|
+
outputFormat: string;
|
|
201
|
+
status: 400;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
} & {
|
|
205
|
+
"/:screen{.+}": {
|
|
206
|
+
$post: {
|
|
207
|
+
input: {
|
|
208
|
+
param: {
|
|
209
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
210
|
+
};
|
|
211
|
+
} & {
|
|
212
|
+
query: {
|
|
213
|
+
state: string;
|
|
214
|
+
error?: string | undefined;
|
|
215
|
+
error_description?: string | undefined;
|
|
216
|
+
ui_locales?: string | undefined;
|
|
217
|
+
};
|
|
218
|
+
} & {
|
|
219
|
+
form: Record<string, string>;
|
|
220
|
+
};
|
|
221
|
+
output: Response;
|
|
222
|
+
outputFormat: "json";
|
|
223
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
224
|
+
} | {
|
|
225
|
+
input: {
|
|
226
|
+
param: {
|
|
227
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
228
|
+
};
|
|
229
|
+
} & {
|
|
230
|
+
query: {
|
|
231
|
+
state: string;
|
|
232
|
+
error?: string | undefined;
|
|
233
|
+
error_description?: string | undefined;
|
|
234
|
+
ui_locales?: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
} & {
|
|
237
|
+
form: Record<string, string>;
|
|
238
|
+
};
|
|
239
|
+
output: {};
|
|
240
|
+
outputFormat: string;
|
|
241
|
+
status: 302;
|
|
242
|
+
} | {
|
|
243
|
+
input: {
|
|
244
|
+
param: {
|
|
245
|
+
screen: "signup" | "login" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
246
|
+
};
|
|
247
|
+
} & {
|
|
248
|
+
query: {
|
|
249
|
+
state: string;
|
|
250
|
+
error?: string | undefined;
|
|
251
|
+
error_description?: string | undefined;
|
|
252
|
+
ui_locales?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
} & {
|
|
255
|
+
form: Record<string, string>;
|
|
256
|
+
};
|
|
257
|
+
output: {};
|
|
258
|
+
outputFormat: string;
|
|
259
|
+
status: 400;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
98
262
|
}, "/">;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OpenAPIRoute, RouteConfig } from "@hono/zod-openapi";
|
|
2
|
+
import { Bindings, Variables } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Pin the handler context to the authhero app's `Bindings`/`Variables` so
|
|
5
|
+
* `ctx.var.tenant_id`, `ctx.env.data`, etc. are typed at the call site.
|
|
6
|
+
*
|
|
7
|
+
* Without this wrapper, `defineOpenAPIRoute`'s `E` generic defaults to the
|
|
8
|
+
* base `Env`, and every handler ends up with `ctx.var: object` and
|
|
9
|
+
* `ctx.env: object | undefined`.
|
|
10
|
+
*
|
|
11
|
+
* Each route file imports `defineRoute` and registers its routes via
|
|
12
|
+
* `new OpenAPIHono<{ Bindings; Variables }>().openapiRoutes([...] as const)`
|
|
13
|
+
* — replacing the pre-1.x chained `.openapi(...)` style.
|
|
14
|
+
*/
|
|
15
|
+
type AuthHeroEnv = {
|
|
16
|
+
Bindings: Bindings;
|
|
17
|
+
Variables: Variables;
|
|
18
|
+
};
|
|
19
|
+
export declare const defineRoute: <R extends RouteConfig, const AddRoute extends boolean | undefined = undefined>(def: OpenAPIRoute<R, AuthHeroEnv, AddRoute>) => OpenAPIRoute<R, AuthHeroEnv, AddRoute>;
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "5.
|
|
14
|
+
"version": "5.10.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"vite": "^7.2.0",
|
|
63
63
|
"vite-plugin-dts": "^4.5.4",
|
|
64
64
|
"vitest": "^4.0.7",
|
|
65
|
-
"@authhero/kysely-adapter": "11.
|
|
66
|
-
"@authhero/widget": "0.32.
|
|
65
|
+
"@authhero/kysely-adapter": "11.4.0",
|
|
66
|
+
"@authhero/widget": "0.32.28"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@peculiar/x509": "^1.14.0",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"qrcode": "^1.5.4",
|
|
82
82
|
"sanitize-html": "^2.17.0",
|
|
83
83
|
"xstate": "^5.25.0",
|
|
84
|
-
"@authhero/adapter-interfaces": "2.6.
|
|
85
|
-
"@authhero/saml": "0.4.
|
|
84
|
+
"@authhero/adapter-interfaces": "2.6.1",
|
|
85
|
+
"@authhero/saml": "0.4.1"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@authhero/widget": "^0.1.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"dev": "bun --watch src/bun.ts",
|
|
106
|
-
"build": "
|
|
106
|
+
"build": "pnpm build:i18n && pnpm build:emails && pnpm build:tailwind && pnpm build:client && tsc -p tsconfig.types.json && vite build && rollup -c rollup.dts.config.mjs && pnpm build:assets",
|
|
107
107
|
"build:i18n": "node scripts/generate-locale-types.js",
|
|
108
108
|
"build:emails": "tsx scripts/build-emails.tsx",
|
|
109
109
|
"build:tailwind": "node build-tailwind.js",
|