@effect-auth/core 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (149) hide show
  1. package/README.md +148 -13
  2. package/dist/ApiKey.d.ts +207 -0
  3. package/dist/ApiKey.d.ts.map +1 -0
  4. package/dist/ApiKey.js +275 -0
  5. package/dist/ApiKey.js.map +1 -0
  6. package/dist/AuditLog.d.ts +204 -1
  7. package/dist/AuditLog.d.ts.map +1 -1
  8. package/dist/AuditLog.js +170 -0
  9. package/dist/AuditLog.js.map +1 -1
  10. package/dist/AuthConfig.d.ts +0 -9
  11. package/dist/AuthConfig.d.ts.map +1 -1
  12. package/dist/AuthConfig.js +1 -14
  13. package/dist/AuthConfig.js.map +1 -1
  14. package/dist/AuthFlow.d.ts +220 -51
  15. package/dist/AuthFlow.d.ts.map +1 -1
  16. package/dist/AuthFlow.js +550 -22
  17. package/dist/AuthFlow.js.map +1 -1
  18. package/dist/AuthKernel.d.ts +1 -1
  19. package/dist/Challenge.d.ts +5 -1
  20. package/dist/Challenge.d.ts.map +1 -1
  21. package/dist/Challenge.js +58 -48
  22. package/dist/Challenge.js.map +1 -1
  23. package/dist/Client.d.ts +242 -1
  24. package/dist/Client.d.ts.map +1 -1
  25. package/dist/Client.js +489 -1
  26. package/dist/Client.js.map +1 -1
  27. package/dist/D1Kysely.d.ts +1 -1
  28. package/dist/D1Kysely.d.ts.map +1 -1
  29. package/dist/EffectQbSqliteStorage.d.ts +156 -41
  30. package/dist/EffectQbSqliteStorage.d.ts.map +1 -1
  31. package/dist/EffectQbSqliteStorage.js +336 -33
  32. package/dist/EffectQbSqliteStorage.js.map +1 -1
  33. package/dist/EmailOtp.d.ts +5 -2
  34. package/dist/EmailOtp.d.ts.map +1 -1
  35. package/dist/EmailOtp.js +11 -4
  36. package/dist/EmailOtp.js.map +1 -1
  37. package/dist/EmailVerification.d.ts +2 -2
  38. package/dist/EmailVerification.d.ts.map +1 -1
  39. package/dist/EmailVerification.js +2 -3
  40. package/dist/EmailVerification.js.map +1 -1
  41. package/dist/HttpApi/Api.d.ts +1161 -19
  42. package/dist/HttpApi/Api.d.ts.map +1 -1
  43. package/dist/HttpApi/Api.js +1433 -20
  44. package/dist/HttpApi/Api.js.map +1 -1
  45. package/dist/HttpApi/Endpoints.d.ts +611 -0
  46. package/dist/HttpApi/Endpoints.d.ts.map +1 -1
  47. package/dist/HttpApi/Endpoints.js +242 -1
  48. package/dist/HttpApi/Endpoints.js.map +1 -1
  49. package/dist/HttpApi/Schemas.d.ts +704 -0
  50. package/dist/HttpApi/Schemas.d.ts.map +1 -1
  51. package/dist/HttpApi/Schemas.js +435 -1
  52. package/dist/HttpApi/Schemas.js.map +1 -1
  53. package/dist/HttpApi/Security.d.ts +13 -1
  54. package/dist/HttpApi/Security.d.ts.map +1 -1
  55. package/dist/HttpApi/Security.js +107 -16
  56. package/dist/HttpApi/Security.js.map +1 -1
  57. package/dist/HttpApi/Transport.d.ts +36 -2
  58. package/dist/HttpApi/Transport.d.ts.map +1 -1
  59. package/dist/HttpApi/Transport.js +151 -9
  60. package/dist/HttpApi/Transport.js.map +1 -1
  61. package/dist/Jwt.d.ts +271 -0
  62. package/dist/Jwt.d.ts.map +1 -0
  63. package/dist/Jwt.js +512 -0
  64. package/dist/Jwt.js.map +1 -0
  65. package/dist/KyselyStorage.d.ts +134 -1
  66. package/dist/KyselyStorage.d.ts.map +1 -1
  67. package/dist/KyselyStorage.js +918 -4
  68. package/dist/KyselyStorage.js.map +1 -1
  69. package/dist/LoginApproval.d.ts +314 -0
  70. package/dist/LoginApproval.d.ts.map +1 -0
  71. package/dist/LoginApproval.js +551 -0
  72. package/dist/LoginApproval.js.map +1 -0
  73. package/dist/LoginNotification.d.ts +183 -0
  74. package/dist/LoginNotification.d.ts.map +1 -0
  75. package/dist/LoginNotification.js +329 -0
  76. package/dist/LoginNotification.js.map +1 -0
  77. package/dist/LoginRisk.d.ts +73 -0
  78. package/dist/LoginRisk.d.ts.map +1 -0
  79. package/dist/LoginRisk.js +57 -0
  80. package/dist/LoginRisk.js.map +1 -0
  81. package/dist/MagicLink.d.ts +85 -0
  82. package/dist/MagicLink.d.ts.map +1 -0
  83. package/dist/MagicLink.js +206 -0
  84. package/dist/MagicLink.js.map +1 -0
  85. package/dist/Mailer.d.ts +33 -2
  86. package/dist/Mailer.d.ts.map +1 -1
  87. package/dist/Mailer.js +107 -0
  88. package/dist/Mailer.js.map +1 -1
  89. package/dist/Passkey.d.ts +334 -0
  90. package/dist/Passkey.d.ts.map +1 -0
  91. package/dist/Passkey.js +422 -0
  92. package/dist/Passkey.js.map +1 -0
  93. package/dist/Password.d.ts +138 -8
  94. package/dist/Password.d.ts.map +1 -1
  95. package/dist/Password.js +397 -8
  96. package/dist/Password.js.map +1 -1
  97. package/dist/RecoveryCode.d.ts +169 -0
  98. package/dist/RecoveryCode.d.ts.map +1 -0
  99. package/dist/RecoveryCode.js +299 -0
  100. package/dist/RecoveryCode.js.map +1 -0
  101. package/dist/RefreshToken.d.ts +222 -0
  102. package/dist/RefreshToken.d.ts.map +1 -0
  103. package/dist/RefreshToken.js +342 -0
  104. package/dist/RefreshToken.js.map +1 -0
  105. package/dist/Sessions.d.ts +52 -2
  106. package/dist/Sessions.d.ts.map +1 -1
  107. package/dist/Sessions.js +123 -1
  108. package/dist/Sessions.js.map +1 -1
  109. package/dist/StepUp.d.ts +44 -0
  110. package/dist/StepUp.d.ts.map +1 -0
  111. package/dist/StepUp.js +82 -0
  112. package/dist/StepUp.js.map +1 -0
  113. package/dist/Storage.d.ts +14 -1
  114. package/dist/Storage.d.ts.map +1 -1
  115. package/dist/Storage.js.map +1 -1
  116. package/dist/StorageMigrations.d.ts +9 -1
  117. package/dist/StorageMigrations.d.ts.map +1 -1
  118. package/dist/StorageMigrations.js +159 -0
  119. package/dist/StorageMigrations.js.map +1 -1
  120. package/dist/Testing.d.ts +1 -1
  121. package/dist/Totp.d.ts +220 -0
  122. package/dist/Totp.d.ts.map +1 -0
  123. package/dist/Totp.js +477 -0
  124. package/dist/Totp.js.map +1 -0
  125. package/dist/TrustedDevice.d.ts +115 -0
  126. package/dist/TrustedDevice.d.ts.map +1 -0
  127. package/dist/TrustedDevice.js +222 -0
  128. package/dist/TrustedDevice.js.map +1 -0
  129. package/dist/alchemy/cloudflare/Email.d.ts +25 -0
  130. package/dist/alchemy/cloudflare/Email.d.ts.map +1 -0
  131. package/dist/alchemy/cloudflare/Email.js +117 -0
  132. package/dist/alchemy/cloudflare/Email.js.map +1 -0
  133. package/dist/cloudflare/Email.d.ts +25 -0
  134. package/dist/cloudflare/Email.d.ts.map +1 -0
  135. package/dist/cloudflare/Email.js +153 -0
  136. package/dist/cloudflare/Email.js.map +1 -0
  137. package/dist/index.d.ts +12 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +12 -0
  140. package/dist/index.js.map +1 -1
  141. package/migrations/0003_auth_login_approval_review.sql +22 -0
  142. package/migrations/0004_auth_trusted_device.sql +12 -0
  143. package/migrations/0005_auth_passkey.sql +17 -0
  144. package/migrations/0006_auth_totp_factor.sql +17 -0
  145. package/migrations/0007_auth_recovery_code.sql +13 -0
  146. package/migrations/0008_auth_api_key.sql +17 -0
  147. package/migrations/0009_auth_refresh_token.sql +21 -0
  148. package/migrations/0010_auth_jwt_revocation.sql +8 -0
  149. package/package.json +57 -1
@@ -1,34 +1,262 @@
1
- import { Effect, Layer } from "effect";
2
- import type { Schema } from "effect";
1
+ import { Effect, Layer, Redacted } from "effect";
2
+ import type { Duration, Schema } from "effect";
3
3
  import type { HttpServerRequest } from "effect/unstable/http";
4
4
  import { HttpServerResponse } from "effect/unstable/http";
5
5
  import { HttpApi, HttpApiGroup } from "effect/unstable/httpapi";
6
- import { AuthResult } from "../AuthFlow.js";
6
+ import { ApiKeyId } from "../ApiKey.js";
7
+ import type { ApiKeyCreateForUserInput, ApiKeyManagementRevokeInput, ApiKeyManagementService } from "../ApiKey.js";
8
+ import type { JwtAudience, JwtIssueInput, JwtIssuerService, JwtRevokeJwtIdInput, JwtRevocationService, JwtVerifyInput } from "../Jwt.js";
9
+ import { AuthFlow, AuthFlowState, AuthResult } from "../AuthFlow.js";
10
+ import type { AuthFlowService, AuthFlowStateService, LoginApprovalFinalizeService } from "../AuthFlow.js";
11
+ import { EmailOtpLogin } from "../EmailOtp.js";
12
+ import type { EmailOtpLoginService, EmailOtpStartInput, EmailOtpVerifyInput } from "../EmailOtp.js";
7
13
  import { EmailVerification, EmailVerificationFlow } from "../EmailVerification.js";
8
14
  import type { EmailVerificationFlowService, EmailVerificationService, EmailVerificationIssueInput, EmailVerificationVerifyInput } from "../EmailVerification.js";
9
- import { PasswordLogin, PasswordRegistration } from "../Password.js";
10
- import type { PasswordLoginService, PasswordRegistrationService, PasswordSignInInput, PasswordSignUpInput } from "../Password.js";
15
+ import type { Email, UnixMillis, UserId } from "../Identifiers.js";
16
+ import { LoginApproval } from "../LoginApproval.js";
17
+ import type { LoginApprovalReviewService, LoginApprovalService, LoginApprovalVerifyInput } from "../LoginApproval.js";
18
+ import type { LoginRequestContext } from "../LoginRisk.js";
19
+ import type { LoginNotificationReportInput, LoginNotificationService } from "../LoginNotification.js";
20
+ import { MagicLinkLogin } from "../MagicLink.js";
21
+ import type { MagicLinkLoginService, MagicLinkStartInput, MagicLinkVerifyInput } from "../MagicLink.js";
22
+ import { PasswordLogin, PasswordManagement, PasswordRegistration, PasswordReset } from "../Password.js";
23
+ import { PasskeyCredentialId } from "../Passkey.js";
24
+ import type { FinishedPasskeyAuthentication, PasskeyAttestation, PasskeyAuthenticationStartInput, PasskeyAuthenticatorSelection, PasskeyCredentialManagementService, PasskeyOptionsService, PasskeyPublicKeyCredentialParameters, PasskeyRelyingParty, PasskeyUserVerification, PasskeyVerificationService } from "../Passkey.js";
25
+ import type { PasswordChangeInput, PasswordManagementService, PasswordLoginService, PasswordRegistrationService, PasswordResetService, PasswordResetStartInput, PasswordResetVerifyInput, PasswordSetInput, PasswordSignInInput, PasswordSignUpInput } from "../Password.js";
26
+ import type { RecoveryCodeGenerateForUserInput, RecoveryCodeManagementRevokeInput, RecoveryCodeManagementService, RecoveryCodeVerifyForUserInput } from "../RecoveryCode.js";
27
+ import type { RefreshTokenInfo, RefreshTokenManagementService, RefreshTokenRotateInput } from "../RefreshToken.js";
11
28
  import { SessionCookie, Sessions } from "../Sessions.js";
12
- import type { SessionCookieService, SessionsService } from "../Sessions.js";
13
- import { AuthBadRequestError, AuthEmailAlreadyRegisteredError, AuthInternalError, AuthRateLimitedError, AuthSchemaErrorMiddleware, AuthUnauthenticatedError } from "./Errors.js";
14
- import type { EmailVerificationStartBody, EmailVerificationVerifyBody, PasswordSignInBody, PasswordSignUpBody } from "./Schemas.js";
29
+ import type { SessionClaims, SessionCookieService, SessionCreateInput, SessionsService } from "../Sessions.js";
30
+ import { UserStore } from "../Storage.js";
31
+ import type { UserStoreService } from "../Storage.js";
32
+ import type { TotpAlgorithm, TotpEnrollmentConfirmInput, TotpEnrollmentStartInput, TotpFactorManagementService, TotpFactorManagementRevokeInput, TotpVerifyForUserInput } from "../Totp.js";
33
+ import type { TrustedDeviceCookieService, TrustedDeviceService } from "../TrustedDevice.js";
34
+ import { AuthBadRequestError, AuthEmailAlreadyRegisteredError, AuthInternalError, AuthInvalidCredentialsError, AuthPolicyDeniedError, AuthRateLimitedError, AuthSchemaErrorMiddleware, AuthUnauthenticatedError } from "./Errors.js";
35
+ import type { ApiKeyCreateBody, ApiKeyRevokeBody, EmailOtpStartBody, EmailOtpVerifyBody, EmailVerificationStartBody, EmailVerificationVerifyBody, LoginApprovalApproveBody, LoginApprovalFinalizeBody, LoginNotificationReportBody, LoginApprovalReviewStatusBody, JwtIntrospectBody, JwtRevokeBody, MagicLinkStartBody, MagicLinkVerifyBody, MfaOptionsBody, PasskeyAuthenticationFinishBody, PasskeyAuthenticationStartBody, PasskeyCredentialRevokeBody, PasskeyMfaStartBody, PasskeyMfaVerifyBody, PasskeyRegistrationFinishBody, PasskeyRegistrationStartBody, PasswordChangeBody, PasswordResetStartBody, PasswordResetVerifyBody, PasswordSetBody, SessionRevokeBody, PasswordSignInBody, PasswordSignUpBody, RecoveryCodeGenerateBody, RecoveryCodeMfaVerifyBody, RecoveryCodeMfaVerifyForFlowBody, RefreshTokenRefreshBody, RecoveryCodeRevokeBody, RecoveryCodeVerifyBody, TotpEnrollmentConfirmBody, TotpEnrollmentStartBody, TotpFactorRevokeBody, TotpMfaVerifyBody, TotpMfaVerifyForFlowBody, TotpVerifyBody } from "./Schemas.js";
15
36
  import { AuthApiRateLimit, AuthOriginCheckMiddleware, AuthRateLimitMiddleware } from "./Security.js";
16
37
  import type { AuthApiRateLimitService } from "./Security.js";
17
38
  import { AuthHttp } from "./Transport.js";
18
- import type { AuthHttpService } from "./Transport.js";
19
- export declare const passwordSignInInput: (payload: Schema.Schema.Type<typeof PasswordSignInBody>) => PasswordSignInInput;
20
- export declare const passwordSignUpInput: (payload: Schema.Schema.Type<typeof PasswordSignUpBody>) => PasswordSignUpInput;
39
+ import type { AuthHttpService, LoginApprovalPendingCookieService } from "./Transport.js";
40
+ export declare const passwordSignInInput: (payload: Schema.Schema.Type<typeof PasswordSignInBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => PasswordSignInInput;
41
+ export declare const passwordSignUpInput: (payload: Schema.Schema.Type<typeof PasswordSignUpBody>, request?: LoginRequestContext) => PasswordSignUpInput;
42
+ export declare const passwordResetStartInput: (payload: Schema.Schema.Type<typeof PasswordResetStartBody>) => PasswordResetStartInput;
43
+ export declare const passwordResetVerifyInput: (payload: Schema.Schema.Type<typeof PasswordResetVerifyBody>) => PasswordResetVerifyInput;
44
+ export declare const passwordSetInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasswordSetBody>) => PasswordSetInput;
45
+ export declare const passwordChangeInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasswordChangeBody>) => PasswordChangeInput;
21
46
  export declare const emailVerificationStartInput: (payload: Schema.Schema.Type<typeof EmailVerificationStartBody>) => EmailVerificationIssueInput;
22
47
  export declare const emailVerificationVerifyInput: (payload: Schema.Schema.Type<typeof EmailVerificationVerifyBody>) => EmailVerificationVerifyInput;
48
+ export declare const emailOtpStartInput: (payload: Schema.Schema.Type<typeof EmailOtpStartBody>) => EmailOtpStartInput;
49
+ export declare const emailOtpVerifyInput: (payload: Schema.Schema.Type<typeof EmailOtpVerifyBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => EmailOtpVerifyInput;
50
+ export declare const magicLinkStartInput: (payload: Schema.Schema.Type<typeof MagicLinkStartBody>) => MagicLinkStartInput;
51
+ export declare const magicLinkVerifyInput: (payload: Schema.Schema.Type<typeof MagicLinkVerifyBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => MagicLinkVerifyInput;
52
+ export interface PasskeyRegistrationStartHttpOptions {
53
+ readonly relyingParty: PasskeyRelyingParty;
54
+ readonly timeout?: number;
55
+ readonly pubKeyCredParams?: readonly PasskeyPublicKeyCredentialParameters[];
56
+ readonly authenticatorSelection?: PasskeyAuthenticatorSelection;
57
+ readonly attestation?: PasskeyAttestation;
58
+ }
59
+ export interface PasskeyAuthenticationStartHttpOptions {
60
+ readonly relyingPartyId: string;
61
+ readonly timeout?: number;
62
+ readonly userVerification?: PasskeyUserVerification;
63
+ }
64
+ export interface PasskeyFinishHttpOptions {
65
+ readonly relyingPartyId: string;
66
+ readonly expectedOrigin: string | readonly string[];
67
+ readonly requireUserVerification?: boolean;
68
+ }
69
+ export interface TotpEnrollmentStartHttpOptions {
70
+ readonly issuer: string;
71
+ readonly secretBytes?: number;
72
+ readonly algorithm?: TotpAlgorithm;
73
+ readonly digits?: number;
74
+ readonly period?: number;
75
+ }
76
+ export interface TotpCodeHttpOptions {
77
+ readonly window?: number;
78
+ }
79
+ export interface RecoveryCodeGenerateHttpOptions {
80
+ readonly count?: number;
81
+ readonly length?: number;
82
+ readonly groupSize?: number;
83
+ }
84
+ export declare const passkeyRegistrationStartInput: (payload: Schema.Schema.Type<typeof PasskeyRegistrationStartBody>, options: PasskeyRegistrationStartHttpOptions) => {
85
+ metadata?: {
86
+ readonly [x: string]: unknown;
87
+ } | undefined;
88
+ attestation?: PasskeyAttestation | undefined;
89
+ authenticatorSelection?: PasskeyAuthenticatorSelection | undefined;
90
+ pubKeyCredParams?: readonly PasskeyPublicKeyCredentialParameters[] | undefined;
91
+ timeout?: number | undefined;
92
+ relyingParty: PasskeyRelyingParty;
93
+ userId: string & import("effect/Brand").Brand<"auth/UserId">;
94
+ userName: string;
95
+ userDisplayName: string;
96
+ };
97
+ export declare const passkeyAuthenticationStartInput: (payload: Schema.Schema.Type<typeof PasskeyAuthenticationStartBody>, options: PasskeyAuthenticationStartHttpOptions) => {
98
+ metadata?: {
99
+ readonly [x: string]: unknown;
100
+ } | undefined;
101
+ userVerification?: PasskeyUserVerification | undefined;
102
+ timeout?: number | undefined;
103
+ userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
104
+ relyingPartyId: string;
105
+ };
106
+ export declare const passkeyMfaStartInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasskeyMfaStartBody>, options: PasskeyAuthenticationStartHttpOptions) => PasskeyAuthenticationStartInput;
107
+ export declare const passkeyRegistrationFinishInput: (payload: Schema.Schema.Type<typeof PasskeyRegistrationFinishBody>, options: PasskeyFinishHttpOptions) => {
108
+ metadata?: {
109
+ readonly [x: string]: unknown;
110
+ } | undefined;
111
+ requireUserVerification?: boolean | undefined;
112
+ challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
113
+ userId: string & import("effect/Brand").Brand<"auth/UserId">;
114
+ response: {
115
+ readonly id: string;
116
+ readonly type: "public-key";
117
+ readonly response: {
118
+ readonly [x: string]: unknown;
119
+ };
120
+ readonly rawId?: string | undefined;
121
+ readonly authenticatorAttachment?: string | undefined;
122
+ readonly clientExtensionResults?: {
123
+ readonly [x: string]: unknown;
124
+ } | undefined;
125
+ };
126
+ relyingPartyId: string;
127
+ expectedOrigin: string | readonly string[];
128
+ };
129
+ export declare const passkeyAuthenticationFinishInput: (payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>, options: PasskeyFinishHttpOptions) => {
130
+ metadata?: {
131
+ readonly [x: string]: unknown;
132
+ } | undefined;
133
+ requireUserVerification?: boolean | undefined;
134
+ relyingPartyId: string;
135
+ expectedOrigin: string | readonly string[];
136
+ userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
137
+ challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
138
+ response: {
139
+ readonly id: string;
140
+ readonly type: "public-key";
141
+ readonly response: {
142
+ readonly [x: string]: unknown;
143
+ };
144
+ readonly rawId?: string | undefined;
145
+ readonly authenticatorAttachment?: string | undefined;
146
+ readonly clientExtensionResults?: {
147
+ readonly [x: string]: unknown;
148
+ } | undefined;
149
+ };
150
+ };
151
+ export declare const passkeyMfaVerifyInput: (payload: Schema.Schema.Type<typeof PasskeyMfaVerifyBody>, options: PasskeyFinishHttpOptions) => {
152
+ metadata?: {
153
+ readonly [x: string]: unknown;
154
+ } | undefined;
155
+ requireUserVerification?: boolean | undefined;
156
+ relyingPartyId: string;
157
+ expectedOrigin: string | readonly string[];
158
+ userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
159
+ challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
160
+ response: {
161
+ readonly id: string;
162
+ readonly type: "public-key";
163
+ readonly response: {
164
+ readonly [x: string]: unknown;
165
+ };
166
+ readonly rawId?: string | undefined;
167
+ readonly authenticatorAttachment?: string | undefined;
168
+ readonly clientExtensionResults?: {
169
+ readonly [x: string]: unknown;
170
+ } | undefined;
171
+ };
172
+ };
173
+ export declare const passkeyCredentialRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasskeyCredentialRevokeBody>) => {
174
+ reason?: string | undefined;
175
+ userId: UserId;
176
+ credentialId: PasskeyCredentialId;
177
+ };
178
+ export declare const totpEnrollmentStartInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpEnrollmentStartBody>, options: TotpEnrollmentStartHttpOptions) => TotpEnrollmentStartInput;
179
+ export declare const totpEnrollmentConfirmInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpEnrollmentConfirmBody>, options?: TotpCodeHttpOptions) => TotpEnrollmentConfirmInput;
180
+ export declare const totpVerifyInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpVerifyBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
181
+ export declare const totpFactorRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpFactorRevokeBody>) => TotpFactorManagementRevokeInput;
182
+ export declare const recoveryCodeGenerateInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeGenerateBody>, options?: RecoveryCodeGenerateHttpOptions) => RecoveryCodeGenerateForUserInput;
183
+ export declare const recoveryCodeVerifyInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeVerifyBody>) => RecoveryCodeVerifyForUserInput;
184
+ export declare const recoveryCodeRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeRevokeBody>) => RecoveryCodeManagementRevokeInput;
185
+ export declare const apiKeyCreateInput: (userId: UserId, payload: Schema.Schema.Type<typeof ApiKeyCreateBody>) => ApiKeyCreateForUserInput;
186
+ export declare const apiKeyRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof ApiKeyRevokeBody>) => ApiKeyManagementRevokeInput;
187
+ export interface RefreshTokenRefreshHttpPolicyInput {
188
+ readonly now: UnixMillis;
189
+ }
190
+ export interface RefreshTokenAccessTokenHttpInput extends RefreshTokenRefreshHttpPolicyInput {
191
+ readonly refreshToken: RefreshTokenInfo;
192
+ readonly previousToken: RefreshTokenInfo;
193
+ }
194
+ export interface RefreshTokenRefreshHttpOptions {
195
+ readonly refreshTokenExpiresAt: (input: RefreshTokenRefreshHttpPolicyInput) => UnixMillis;
196
+ readonly accessToken: (input: RefreshTokenAccessTokenHttpInput) => JwtIssueInput;
197
+ }
198
+ export declare const refreshTokenRefreshInput: (payload: Schema.Schema.Type<typeof RefreshTokenRefreshBody>, now: UnixMillis, expiresAt: UnixMillis) => RefreshTokenRotateInput;
199
+ export interface JwtIntrospectionHttpOptions {
200
+ readonly issuer?: string;
201
+ readonly audience?: JwtAudience;
202
+ readonly clockTolerance?: Duration.Duration;
203
+ }
204
+ export declare const jwtIntrospectInput: (payload: Schema.Schema.Type<typeof JwtIntrospectBody>, options?: JwtIntrospectionHttpOptions) => JwtVerifyInput;
205
+ export declare const jwtRevokeInput: (payload: Schema.Schema.Type<typeof JwtRevokeBody>) => JwtRevokeJwtIdInput;
206
+ export declare const totpMfaVerifyInput: (payload: Schema.Schema.Type<typeof TotpMfaVerifyBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
207
+ export declare const totpMfaVerifyForFlowInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpMfaVerifyForFlowBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
208
+ export declare const recoveryCodeMfaVerifyInput: (payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyBody>) => RecoveryCodeVerifyForUserInput;
209
+ export declare const recoveryCodeMfaVerifyForFlowInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyForFlowBody>) => RecoveryCodeVerifyForUserInput;
210
+ export interface LoginApprovalApproveInput {
211
+ readonly flowId: Schema.Schema.Type<typeof LoginApprovalApproveBody>["flowId"];
212
+ readonly approval: LoginApprovalVerifyInput;
213
+ readonly rememberDevice: boolean;
214
+ }
215
+ export declare const loginApprovalApproveInput: (payload: Schema.Schema.Type<typeof LoginApprovalApproveBody>) => LoginApprovalApproveInput;
216
+ export interface LoginApprovalStatusInput {
217
+ readonly flowId: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>["flowId"];
218
+ readonly approvalChallengeId: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>["approvalChallengeId"];
219
+ }
220
+ export declare const loginApprovalStatusInput: (payload: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>) => LoginApprovalStatusInput;
221
+ export interface LoginApprovalFinalizeHttpInput {
222
+ readonly flowId: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>["flowId"];
223
+ readonly approvalChallengeId: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>["approvalChallengeId"];
224
+ readonly rememberDevice: boolean;
225
+ }
226
+ export declare const loginApprovalFinalizeInput: (payload: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>) => LoginApprovalFinalizeHttpInput;
227
+ export declare const loginNotificationReportInput: (payload: Schema.Schema.Type<typeof LoginNotificationReportBody>) => LoginNotificationReportInput;
23
228
  export type PasswordSignInHandlerRequest = {
24
229
  readonly payload: Schema.Schema.Type<typeof PasswordSignInBody>;
230
+ readonly request?: HttpServerRequest.HttpServerRequest;
25
231
  };
26
232
  export type PasswordSignUpHandlerRequest = {
27
233
  readonly payload: Schema.Schema.Type<typeof PasswordSignUpBody>;
234
+ readonly request?: HttpServerRequest.HttpServerRequest;
235
+ };
236
+ export type PasswordResetStartHandlerRequest = {
237
+ readonly payload: Schema.Schema.Type<typeof PasswordResetStartBody>;
238
+ };
239
+ export type PasswordResetVerifyHandlerRequest = {
240
+ readonly payload: Schema.Schema.Type<typeof PasswordResetVerifyBody>;
241
+ };
242
+ export type PasswordSetHandlerRequest = {
243
+ readonly payload: Schema.Schema.Type<typeof PasswordSetBody>;
244
+ readonly request: HttpServerRequest.HttpServerRequest;
245
+ };
246
+ export type PasswordChangeHandlerRequest = {
247
+ readonly payload: Schema.Schema.Type<typeof PasswordChangeBody>;
248
+ readonly request: HttpServerRequest.HttpServerRequest;
28
249
  };
29
250
  export type SessionHandlerRequest = {
30
251
  readonly request: HttpServerRequest.HttpServerRequest;
31
252
  };
253
+ export type SessionRevokeHandlerRequest = {
254
+ readonly payload: Schema.Schema.Type<typeof SessionRevokeBody>;
255
+ readonly request: HttpServerRequest.HttpServerRequest;
256
+ };
257
+ export type LoginNotificationReportHandlerRequest = {
258
+ readonly payload: Schema.Schema.Type<typeof LoginNotificationReportBody>;
259
+ };
32
260
  export type EmailVerificationStartHandlerRequest = {
33
261
  readonly payload: Schema.Schema.Type<typeof EmailVerificationStartBody>;
34
262
  };
@@ -36,11 +264,137 @@ export type EmailVerificationVerifyHandlerRequest = {
36
264
  readonly payload: Schema.Schema.Type<typeof EmailVerificationVerifyBody>;
37
265
  readonly request: HttpServerRequest.HttpServerRequest;
38
266
  };
267
+ export type EmailOtpStartHandlerRequest = {
268
+ readonly payload: Schema.Schema.Type<typeof EmailOtpStartBody>;
269
+ };
270
+ export type EmailOtpVerifyHandlerRequest = {
271
+ readonly payload: Schema.Schema.Type<typeof EmailOtpVerifyBody>;
272
+ readonly request?: HttpServerRequest.HttpServerRequest;
273
+ };
274
+ export type MagicLinkStartHandlerRequest = {
275
+ readonly payload: Schema.Schema.Type<typeof MagicLinkStartBody>;
276
+ };
277
+ export type MagicLinkVerifyHandlerRequest = {
278
+ readonly payload: Schema.Schema.Type<typeof MagicLinkVerifyBody>;
279
+ readonly request?: HttpServerRequest.HttpServerRequest;
280
+ };
281
+ export type PasskeyRegistrationStartHandlerRequest = {
282
+ readonly payload: Schema.Schema.Type<typeof PasskeyRegistrationStartBody>;
283
+ };
284
+ export type PasskeyRegistrationFinishHandlerRequest = {
285
+ readonly payload: Schema.Schema.Type<typeof PasskeyRegistrationFinishBody>;
286
+ };
287
+ export type PasskeyAuthenticationStartHandlerRequest = {
288
+ readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationStartBody>;
289
+ };
290
+ export type PasskeyAuthenticationFinishHandlerRequest = {
291
+ readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>;
292
+ readonly request?: HttpServerRequest.HttpServerRequest;
293
+ };
294
+ export type PasskeyCredentialListHandlerRequest = {
295
+ readonly request: HttpServerRequest.HttpServerRequest;
296
+ };
297
+ export type PasskeyCredentialRevokeHandlerRequest = {
298
+ readonly payload: Schema.Schema.Type<typeof PasskeyCredentialRevokeBody>;
299
+ readonly request: HttpServerRequest.HttpServerRequest;
300
+ };
301
+ export type TotpEnrollmentStartHandlerRequest = {
302
+ readonly payload: Schema.Schema.Type<typeof TotpEnrollmentStartBody>;
303
+ readonly request: HttpServerRequest.HttpServerRequest;
304
+ };
305
+ export type TotpEnrollmentConfirmHandlerRequest = {
306
+ readonly payload: Schema.Schema.Type<typeof TotpEnrollmentConfirmBody>;
307
+ readonly request: HttpServerRequest.HttpServerRequest;
308
+ };
309
+ export type TotpVerifyHandlerRequest = {
310
+ readonly payload: Schema.Schema.Type<typeof TotpVerifyBody>;
311
+ readonly request: HttpServerRequest.HttpServerRequest;
312
+ };
313
+ export type TotpFactorListHandlerRequest = {
314
+ readonly request: HttpServerRequest.HttpServerRequest;
315
+ };
316
+ export type TotpFactorRevokeHandlerRequest = {
317
+ readonly payload: Schema.Schema.Type<typeof TotpFactorRevokeBody>;
318
+ readonly request: HttpServerRequest.HttpServerRequest;
319
+ };
320
+ export type RecoveryCodeGenerateHandlerRequest = {
321
+ readonly payload: Schema.Schema.Type<typeof RecoveryCodeGenerateBody>;
322
+ readonly request: HttpServerRequest.HttpServerRequest;
323
+ };
324
+ export type RecoveryCodeVerifyHandlerRequest = {
325
+ readonly payload: Schema.Schema.Type<typeof RecoveryCodeVerifyBody>;
326
+ readonly request: HttpServerRequest.HttpServerRequest;
327
+ };
328
+ export type RecoveryCodeListHandlerRequest = {
329
+ readonly request: HttpServerRequest.HttpServerRequest;
330
+ };
331
+ export type RecoveryCodeRevokeHandlerRequest = {
332
+ readonly payload: Schema.Schema.Type<typeof RecoveryCodeRevokeBody>;
333
+ readonly request: HttpServerRequest.HttpServerRequest;
334
+ };
335
+ export type ApiKeyCreateHandlerRequest = {
336
+ readonly payload: Schema.Schema.Type<typeof ApiKeyCreateBody>;
337
+ readonly request: HttpServerRequest.HttpServerRequest;
338
+ };
339
+ export type ApiKeyListHandlerRequest = {
340
+ readonly request: HttpServerRequest.HttpServerRequest;
341
+ };
342
+ export type ApiKeyRevokeHandlerRequest = {
343
+ readonly payload: Schema.Schema.Type<typeof ApiKeyRevokeBody>;
344
+ readonly request: HttpServerRequest.HttpServerRequest;
345
+ };
346
+ export type RefreshTokenRefreshHandlerRequest = {
347
+ readonly payload: Schema.Schema.Type<typeof RefreshTokenRefreshBody>;
348
+ };
349
+ export type JwtIntrospectHandlerRequest = {
350
+ readonly payload: Schema.Schema.Type<typeof JwtIntrospectBody>;
351
+ };
352
+ export type JwtRevokeHandlerRequest = {
353
+ readonly payload: Schema.Schema.Type<typeof JwtRevokeBody>;
354
+ };
355
+ export type TotpMfaVerifyHandlerRequest = {
356
+ readonly payload: Schema.Schema.Type<typeof TotpMfaVerifyBody>;
357
+ };
358
+ export type TotpMfaVerifyForFlowHandlerRequest = {
359
+ readonly payload: Schema.Schema.Type<typeof TotpMfaVerifyForFlowBody>;
360
+ };
361
+ export type MfaOptionsHandlerRequest = {
362
+ readonly payload: Schema.Schema.Type<typeof MfaOptionsBody>;
363
+ };
364
+ export type RecoveryCodeMfaVerifyHandlerRequest = {
365
+ readonly payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyBody>;
366
+ };
367
+ export type RecoveryCodeMfaVerifyForFlowHandlerRequest = {
368
+ readonly payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyForFlowBody>;
369
+ };
370
+ export type PasskeyMfaStartHandlerRequest = {
371
+ readonly payload: Schema.Schema.Type<typeof PasskeyMfaStartBody>;
372
+ };
373
+ export type PasskeyMfaVerifyHandlerRequest = {
374
+ readonly payload: Schema.Schema.Type<typeof PasskeyMfaVerifyBody>;
375
+ };
376
+ export interface PasskeyAuthenticationSessionContext {
377
+ readonly finished: FinishedPasskeyAuthentication;
378
+ readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>;
379
+ readonly request?: HttpServerRequest.HttpServerRequest;
380
+ }
381
+ export type LoginApprovalApproveHandlerRequest = {
382
+ readonly payload: Schema.Schema.Type<typeof LoginApprovalApproveBody>;
383
+ readonly request: HttpServerRequest.HttpServerRequest;
384
+ };
385
+ export type LoginApprovalStatusHandlerRequest = {
386
+ readonly payload: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>;
387
+ };
388
+ export type LoginApprovalFinalizeHandlerRequest = {
389
+ readonly payload: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>;
390
+ readonly request: HttpServerRequest.HttpServerRequest;
391
+ };
39
392
  export declare const makePasswordSignInHandler: (dependencies: {
40
393
  readonly password: PasswordLoginService;
41
394
  readonly authHttp: AuthHttpService;
42
395
  readonly emailVerificationFlow?: EmailVerificationFlowService;
43
396
  readonly authApiRateLimit?: AuthApiRateLimitService;
397
+ readonly trustedDeviceCookie?: TrustedDeviceCookieService;
44
398
  }) => (args_0: PasswordSignInHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | import("./Transport.js").PasswordSignInHttpError, never>;
45
399
  export declare const makePasswordSignUpHandler: (dependencies: {
46
400
  readonly registration: PasswordRegistrationService;
@@ -48,6 +402,23 @@ export declare const makePasswordSignUpHandler: (dependencies: {
48
402
  readonly emailVerificationFlow?: EmailVerificationFlowService;
49
403
  readonly authApiRateLimit?: AuthApiRateLimitService;
50
404
  }) => (args_0: PasswordSignUpHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | AuthEmailAlreadyRegisteredError | import("./Transport.js").PasswordSignUpHttpError, never>;
405
+ export declare const makePasswordResetStartHandler: (dependencies: {
406
+ readonly passwordReset: PasswordResetService;
407
+ readonly authApiRateLimit?: AuthApiRateLimitService;
408
+ }) => (args_0: PasswordResetStartHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | AuthInternalError, never>;
409
+ export declare const makePasswordResetVerifyHandler: (dependencies: {
410
+ readonly passwordReset: PasswordResetService;
411
+ }) => (args_0: PasswordResetVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError, never>;
412
+ export declare const makePasswordSetHandler: (dependencies: {
413
+ readonly passwordManagement: PasswordManagementService;
414
+ readonly sessions: SessionsService;
415
+ readonly sessionCookie: SessionCookieService;
416
+ }) => (args_0: PasswordSetHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
417
+ export declare const makePasswordChangeHandler: (dependencies: {
418
+ readonly passwordManagement: PasswordManagementService;
419
+ readonly sessions: SessionsService;
420
+ readonly sessionCookie: SessionCookieService;
421
+ }) => (args_0: PasswordChangeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
51
422
  export declare const makeCurrentSessionHandler: (dependencies: {
52
423
  readonly sessions: SessionsService;
53
424
  readonly sessionCookie: SessionCookieService;
@@ -63,6 +434,44 @@ export declare const makeLogoutHandler: (dependencies: {
63
434
  readonly sessionCookie: SessionCookieService;
64
435
  readonly authHttp: AuthHttpService;
65
436
  }) => (args_0: SessionHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthInternalError, never>;
437
+ export declare const makeListSessionsHandler: (dependencies: {
438
+ readonly sessions: SessionsService;
439
+ readonly sessionCookie: SessionCookieService;
440
+ }) => (args_0: SessionHandlerRequest) => Effect.Effect<{
441
+ sessions: {
442
+ metadata?: Readonly<Record<string, unknown>> | undefined;
443
+ longitude?: number | undefined;
444
+ latitude?: number | undefined;
445
+ city?: string | undefined;
446
+ region?: string | undefined;
447
+ country?: string | undefined;
448
+ userAgent?: string | undefined;
449
+ ip?: string | undefined;
450
+ claims?: SessionClaims | undefined;
451
+ current: boolean;
452
+ mfaVerifiedAt?: UnixMillis | undefined;
453
+ expiresAt: UnixMillis;
454
+ aal: import("../Sessions.js").AuthAssuranceLevel;
455
+ amr: readonly import("../Sessions.js").AuthMethodReference[];
456
+ lastSeenAt?: UnixMillis | undefined;
457
+ sessionId: import("../Identifiers.js").SessionId;
458
+ userId: UserId;
459
+ createdAt: UnixMillis;
460
+ authTime: UnixMillis;
461
+ }[];
462
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
463
+ export declare const makeRevokeSessionHandler: (dependencies: {
464
+ readonly sessions: SessionsService;
465
+ readonly sessionCookie: SessionCookieService;
466
+ readonly authHttp: AuthHttpService;
467
+ }) => (args_0: SessionRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthUnauthenticatedError | AuthInternalError, never>;
468
+ export declare const makeRevokeOtherSessionsHandler: (dependencies: {
469
+ readonly sessions: SessionsService;
470
+ readonly sessionCookie: SessionCookieService;
471
+ }) => (args_0: SessionHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthUnauthenticatedError | AuthInternalError, never>;
472
+ export declare const makeLoginNotificationReportHandler: (dependencies: {
473
+ readonly loginNotification?: LoginNotificationService;
474
+ }) => (args_0: LoginNotificationReportHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
66
475
  export declare const makeEmailVerificationStartHandler: (dependencies: {
67
476
  readonly emailVerificationFlow: EmailVerificationFlowService;
68
477
  readonly authApiRateLimit?: AuthApiRateLimitService;
@@ -72,6 +481,343 @@ export declare const makeEmailVerificationVerifyHandler: (dependencies: {
72
481
  readonly sessions: SessionsService;
73
482
  readonly sessionCookie: SessionCookieService;
74
483
  }) => (args_0: EmailVerificationVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
484
+ export declare const makeEmailOtpStartHandler: (dependencies: {
485
+ readonly emailOtp: EmailOtpLoginService;
486
+ readonly authApiRateLimit?: AuthApiRateLimitService;
487
+ }) => (args_0: EmailOtpStartHandlerRequest) => Effect.Effect<import("../EmailOtp.js").EmailOtpStarted, AuthRateLimitedError | AuthInternalError, never>;
488
+ export declare const makeEmailOtpVerifyHandler: (dependencies: {
489
+ readonly emailOtp: EmailOtpLoginService;
490
+ readonly authHttp: AuthHttpService;
491
+ readonly trustedDeviceCookie?: TrustedDeviceCookieService;
492
+ }) => (args_0: EmailOtpVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("./Transport.js").PasswordSignInHttpError, never>;
493
+ export declare const makeMagicLinkStartHandler: (dependencies: {
494
+ readonly magicLink: MagicLinkLoginService;
495
+ readonly authApiRateLimit?: AuthApiRateLimitService;
496
+ }) => (args_0: MagicLinkStartHandlerRequest) => Effect.Effect<{
497
+ email: Email;
498
+ expiresAt: UnixMillis;
499
+ }, AuthRateLimitedError | AuthInternalError, never>;
500
+ export declare const makeMagicLinkVerifyHandler: (dependencies: {
501
+ readonly magicLink: MagicLinkLoginService;
502
+ readonly authHttp: AuthHttpService;
503
+ readonly trustedDeviceCookie?: TrustedDeviceCookieService;
504
+ }) => (args_0: MagicLinkVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("./Transport.js").PasswordSignInHttpError, never>;
505
+ export declare const makePasskeyRegistrationStartHandler: (dependencies: {
506
+ readonly passkeyOptions: PasskeyOptionsService;
507
+ } & PasskeyRegistrationStartHttpOptions) => (args_0: PasskeyRegistrationStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyRegistration, AuthInternalError, never>;
508
+ export declare const makePasskeyRegistrationFinishHandler: (dependencies: {
509
+ readonly passkeyVerification: PasskeyVerificationService;
510
+ } & PasskeyFinishHttpOptions) => (args_0: PasskeyRegistrationFinishHandlerRequest) => Effect.Effect<{
511
+ credentialId: PasskeyCredentialId;
512
+ }, AuthBadRequestError | AuthInternalError, never>;
513
+ export declare const makePasskeyAuthenticationStartHandler: (dependencies: {
514
+ readonly passkeyOptions: PasskeyOptionsService;
515
+ } & PasskeyAuthenticationStartHttpOptions) => (args_0: PasskeyAuthenticationStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyAuthentication, AuthInternalError, never>;
516
+ export declare const makePasskeyAuthenticationFinishHandler: (dependencies: {
517
+ readonly passkeyVerification: PasskeyVerificationService;
518
+ readonly sessions: SessionsService;
519
+ readonly authHttp: AuthHttpService;
520
+ readonly makeSessionInput: (context: PasskeyAuthenticationSessionContext) => SessionCreateInput;
521
+ } & PasskeyFinishHttpOptions) => (args_0: PasskeyAuthenticationFinishHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
522
+ export declare const makePasskeyCredentialListHandler: (dependencies: {
523
+ readonly passkeyCredentialManagement: PasskeyCredentialManagementService;
524
+ readonly sessions: SessionsService;
525
+ readonly sessionCookie: SessionCookieService;
526
+ }) => (args_0: PasskeyCredentialListHandlerRequest) => Effect.Effect<{
527
+ credentials: {
528
+ metadata?: Readonly<Record<string, unknown>> | undefined;
529
+ revokedAt?: UnixMillis | undefined;
530
+ lastUsedAt?: UnixMillis | undefined;
531
+ createdAt: UnixMillis;
532
+ backedUp?: boolean | undefined;
533
+ transports?: readonly import("../Passkey.js").PasskeyTransport[] | undefined;
534
+ credentialId: PasskeyCredentialId;
535
+ }[];
536
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
537
+ export declare const makePasskeyCredentialRevokeHandler: (dependencies: {
538
+ readonly passkeyCredentialManagement: PasskeyCredentialManagementService;
539
+ readonly sessions: SessionsService;
540
+ readonly sessionCookie: SessionCookieService;
541
+ }) => (args_0: PasskeyCredentialRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
542
+ export declare const makeTotpEnrollmentStartHandler: (dependencies: {
543
+ readonly totpFactorManagement: TotpFactorManagementService;
544
+ readonly sessions: SessionsService;
545
+ readonly sessionCookie: SessionCookieService;
546
+ } & TotpEnrollmentStartHttpOptions) => (args_0: TotpEnrollmentStartHandlerRequest) => Effect.Effect<{
547
+ factor: {
548
+ metadata?: Readonly<Record<string, unknown>> | undefined;
549
+ revokedAt?: UnixMillis | undefined;
550
+ lastUsedAt?: UnixMillis | undefined;
551
+ confirmedAt?: UnixMillis | undefined;
552
+ factorId: import("../Identifiers.js").CredentialId;
553
+ algorithm: TotpAlgorithm;
554
+ digits: number;
555
+ period: number;
556
+ createdAt: UnixMillis;
557
+ };
558
+ secret: import("../Totp.js").TotpSecret;
559
+ uri: string;
560
+ }, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
561
+ export declare const makeTotpEnrollmentConfirmHandler: (dependencies: {
562
+ readonly totpFactorManagement: TotpFactorManagementService;
563
+ readonly sessions: SessionsService;
564
+ readonly sessionCookie: SessionCookieService;
565
+ } & TotpCodeHttpOptions) => (args_0: TotpEnrollmentConfirmHandlerRequest) => Effect.Effect<{
566
+ metadata?: Readonly<Record<string, unknown>> | undefined;
567
+ revokedAt?: UnixMillis | undefined;
568
+ lastUsedAt?: UnixMillis | undefined;
569
+ confirmedAt?: UnixMillis | undefined;
570
+ factorId: import("../Identifiers.js").CredentialId;
571
+ algorithm: TotpAlgorithm;
572
+ digits: number;
573
+ period: number;
574
+ createdAt: UnixMillis;
575
+ }, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
576
+ export declare const makeTotpVerifyHandler: (dependencies: {
577
+ readonly totpFactorManagement: TotpFactorManagementService;
578
+ readonly sessions: SessionsService;
579
+ readonly sessionCookie: SessionCookieService;
580
+ } & TotpCodeHttpOptions) => (args_0: TotpVerifyHandlerRequest) => Effect.Effect<{
581
+ delta?: number | undefined;
582
+ factor?: {
583
+ metadata?: Readonly<Record<string, unknown>> | undefined;
584
+ revokedAt?: UnixMillis | undefined;
585
+ lastUsedAt?: UnixMillis | undefined;
586
+ confirmedAt?: UnixMillis | undefined;
587
+ factorId: import("../Identifiers.js").CredentialId;
588
+ algorithm: TotpAlgorithm;
589
+ digits: number;
590
+ period: number;
591
+ createdAt: UnixMillis;
592
+ } | undefined;
593
+ valid: boolean;
594
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
595
+ export declare const makeTotpFactorListHandler: (dependencies: {
596
+ readonly totpFactorManagement: TotpFactorManagementService;
597
+ readonly sessions: SessionsService;
598
+ readonly sessionCookie: SessionCookieService;
599
+ }) => (args_0: TotpFactorListHandlerRequest) => Effect.Effect<{
600
+ factors: {
601
+ metadata?: Readonly<Record<string, unknown>> | undefined;
602
+ revokedAt?: UnixMillis | undefined;
603
+ lastUsedAt?: UnixMillis | undefined;
604
+ confirmedAt?: UnixMillis | undefined;
605
+ factorId: import("../Identifiers.js").CredentialId;
606
+ algorithm: TotpAlgorithm;
607
+ digits: number;
608
+ period: number;
609
+ createdAt: UnixMillis;
610
+ }[];
611
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
612
+ export declare const makeTotpFactorRevokeHandler: (dependencies: {
613
+ readonly totpFactorManagement: TotpFactorManagementService;
614
+ readonly sessions: SessionsService;
615
+ readonly sessionCookie: SessionCookieService;
616
+ }) => (args_0: TotpFactorRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
617
+ export declare const makeRecoveryCodeGenerateHandler: (dependencies: {
618
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
619
+ readonly sessions: SessionsService;
620
+ readonly sessionCookie: SessionCookieService;
621
+ } & RecoveryCodeGenerateHttpOptions) => (args_0: RecoveryCodeGenerateHandlerRequest) => Effect.Effect<{
622
+ codes: import("../RecoveryCode.js").RecoveryCode[];
623
+ records: {
624
+ metadata?: Readonly<Record<string, unknown>> | undefined;
625
+ revokedAt?: UnixMillis | undefined;
626
+ usedAt?: UnixMillis | undefined;
627
+ codeId: import("../Identifiers.js").CredentialId;
628
+ createdAt: UnixMillis;
629
+ }[];
630
+ }, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
631
+ export declare const makeRecoveryCodeVerifyHandler: (dependencies: {
632
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
633
+ readonly sessions: SessionsService;
634
+ readonly sessionCookie: SessionCookieService;
635
+ }) => (args_0: RecoveryCodeVerifyHandlerRequest) => Effect.Effect<{
636
+ code?: {
637
+ metadata?: Readonly<Record<string, unknown>> | undefined;
638
+ revokedAt?: UnixMillis | undefined;
639
+ usedAt?: UnixMillis | undefined;
640
+ codeId: import("../Identifiers.js").CredentialId;
641
+ createdAt: UnixMillis;
642
+ } | undefined;
643
+ valid: boolean;
644
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
645
+ export declare const makeRecoveryCodeListHandler: (dependencies: {
646
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
647
+ readonly sessions: SessionsService;
648
+ readonly sessionCookie: SessionCookieService;
649
+ }) => (args_0: RecoveryCodeListHandlerRequest) => Effect.Effect<{
650
+ codes: {
651
+ metadata?: Readonly<Record<string, unknown>> | undefined;
652
+ revokedAt?: UnixMillis | undefined;
653
+ usedAt?: UnixMillis | undefined;
654
+ codeId: import("../Identifiers.js").CredentialId;
655
+ createdAt: UnixMillis;
656
+ }[];
657
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
658
+ export declare const makeRecoveryCodeRevokeHandler: (dependencies: {
659
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
660
+ readonly sessions: SessionsService;
661
+ readonly sessionCookie: SessionCookieService;
662
+ }) => (args_0: RecoveryCodeRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
663
+ export declare const makeApiKeyCreateHandler: (dependencies: {
664
+ readonly apiKeyManagement: ApiKeyManagementService;
665
+ readonly sessions: SessionsService;
666
+ readonly sessionCookie: SessionCookieService;
667
+ }) => (args_0: ApiKeyCreateHandlerRequest) => Effect.Effect<{
668
+ secret: import("../ApiKey.js").ApiKeySecret;
669
+ key: {
670
+ metadata?: Readonly<Record<string, unknown>> | undefined;
671
+ revokedAt?: UnixMillis | undefined;
672
+ lastUsedAt?: UnixMillis | undefined;
673
+ expiresAt?: UnixMillis | undefined;
674
+ keyId: ApiKeyId;
675
+ prefix: import("../ApiKey.js").ApiKeyPrefix;
676
+ scopes: readonly string[];
677
+ createdAt: UnixMillis;
678
+ };
679
+ }, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
680
+ export declare const makeApiKeyListHandler: (dependencies: {
681
+ readonly apiKeyManagement: ApiKeyManagementService;
682
+ readonly sessions: SessionsService;
683
+ readonly sessionCookie: SessionCookieService;
684
+ }) => (args_0: ApiKeyListHandlerRequest) => Effect.Effect<{
685
+ keys: {
686
+ metadata?: Readonly<Record<string, unknown>> | undefined;
687
+ revokedAt?: UnixMillis | undefined;
688
+ lastUsedAt?: UnixMillis | undefined;
689
+ expiresAt?: UnixMillis | undefined;
690
+ keyId: ApiKeyId;
691
+ prefix: import("../ApiKey.js").ApiKeyPrefix;
692
+ scopes: readonly string[];
693
+ createdAt: UnixMillis;
694
+ }[];
695
+ }, AuthUnauthenticatedError | AuthInternalError, never>;
696
+ export declare const makeApiKeyRevokeHandler: (dependencies: {
697
+ readonly apiKeyManagement: ApiKeyManagementService;
698
+ readonly sessions: SessionsService;
699
+ readonly sessionCookie: SessionCookieService;
700
+ }) => (args_0: ApiKeyRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
701
+ export declare const makeRefreshTokenRefreshHandler: (dependencies: {
702
+ readonly refreshTokenManagement: RefreshTokenManagementService;
703
+ readonly jwtIssuer: JwtIssuerService;
704
+ } & RefreshTokenRefreshHttpOptions) => (args_0: RefreshTokenRefreshHandlerRequest) => Effect.Effect<{
705
+ refreshToken: string;
706
+ refreshTokenRecord: {
707
+ metadata?: Readonly<Record<string, unknown>> | undefined;
708
+ reuseDetectedAt?: UnixMillis | undefined;
709
+ revokedAt?: UnixMillis | undefined;
710
+ replacedById?: import("../RefreshToken.js").RefreshTokenId | undefined;
711
+ rotatedAt?: UnixMillis | undefined;
712
+ lastUsedAt?: UnixMillis | undefined;
713
+ tokenId: import("../RefreshToken.js").RefreshTokenId;
714
+ familyId: import("../RefreshToken.js").RefreshTokenFamilyId;
715
+ createdAt: UnixMillis;
716
+ expiresAt: UnixMillis;
717
+ };
718
+ accessTokenExpiresAt?: UnixMillis | undefined;
719
+ accessToken: import("../Jwt.js").JwtToken;
720
+ }, AuthInvalidCredentialsError | AuthInternalError, never>;
721
+ export declare const makeJwtIntrospectHandler: (dependencies: {
722
+ readonly jwtRevocation: JwtRevocationService;
723
+ } & JwtIntrospectionHttpOptions) => (args_0: JwtIntrospectHandlerRequest) => Effect.Effect<{
724
+ readonly active: true;
725
+ readonly header: {
726
+ readonly typ: "JWT";
727
+ readonly alg: "HS256" | "RS256" | "ES256" | "EdDSA";
728
+ readonly kid: string;
729
+ };
730
+ readonly claims: {
731
+ readonly [x: string]: unknown;
732
+ };
733
+ readonly key: {
734
+ readonly keyId: string;
735
+ readonly alg: "HS256" | "RS256" | "ES256" | "EdDSA";
736
+ readonly status: "active" | "retired" | "disabled";
737
+ readonly createdAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
738
+ readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
739
+ readonly metadata?: {
740
+ readonly [x: string]: unknown;
741
+ } | undefined;
742
+ };
743
+ readonly revoked: false;
744
+ readonly jwtId?: string | undefined;
745
+ readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
746
+ } | {
747
+ readonly active: false;
748
+ readonly reason: "expired" | "revoked" | "malformed" | "unsupported_alg" | "unknown_key" | "invalid_signature" | "not_yet_valid" | "issuer_mismatch" | "audience_mismatch";
749
+ readonly jwtId?: string | undefined;
750
+ readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
751
+ readonly revokedAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
752
+ readonly revokedReason?: string | undefined;
753
+ }, AuthInternalError, never>;
754
+ export declare const makeJwtRevokeHandler: (dependencies: {
755
+ readonly jwtRevocation: JwtRevocationService;
756
+ }) => (args_0: JwtRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
757
+ export declare const makeMfaOptionsHandler: (dependencies: {
758
+ readonly authFlowState: AuthFlowStateService;
759
+ readonly totpFactorManagement?: TotpFactorManagementService;
760
+ readonly recoveryCodeManagement?: RecoveryCodeManagementService;
761
+ readonly passkeyCredentialManagement?: PasskeyCredentialManagementService;
762
+ }) => (args_0: MfaOptionsHandlerRequest) => Effect.Effect<{
763
+ factors: {
764
+ readonly type: "totp" | "backup-code" | "passkey";
765
+ }[];
766
+ }, AuthBadRequestError | AuthInternalError, never>;
767
+ export declare const makeTotpMfaVerifyHandler: (dependencies: {
768
+ readonly totpFactorManagement: TotpFactorManagementService;
769
+ readonly authFlow: AuthFlowService;
770
+ readonly authHttp: AuthHttpService;
771
+ } & TotpCodeHttpOptions) => (args_0: TotpMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
772
+ export declare const makeTotpMfaVerifyForFlowHandler: (dependencies: {
773
+ readonly totpFactorManagement: TotpFactorManagementService;
774
+ readonly authFlowState: AuthFlowStateService;
775
+ readonly authFlow: AuthFlowService;
776
+ readonly authHttp: AuthHttpService;
777
+ } & TotpCodeHttpOptions) => (args_0: TotpMfaVerifyForFlowHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
778
+ export declare const makeRecoveryCodeMfaVerifyHandler: (dependencies: {
779
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
780
+ readonly authFlow: AuthFlowService;
781
+ readonly authHttp: AuthHttpService;
782
+ }) => (args_0: RecoveryCodeMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
783
+ export declare const makeRecoveryCodeMfaVerifyForFlowHandler: (dependencies: {
784
+ readonly recoveryCodeManagement: RecoveryCodeManagementService;
785
+ readonly authFlowState: AuthFlowStateService;
786
+ readonly authFlow: AuthFlowService;
787
+ readonly authHttp: AuthHttpService;
788
+ }) => (args_0: RecoveryCodeMfaVerifyForFlowHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
789
+ export declare const makePasskeyMfaStartHandler: (dependencies: {
790
+ readonly passkeyOptions: PasskeyOptionsService;
791
+ readonly authFlowState: AuthFlowStateService;
792
+ } & PasskeyAuthenticationStartHttpOptions) => (args_0: PasskeyMfaStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyAuthentication, AuthBadRequestError | AuthInternalError, never>;
793
+ export declare const makePasskeyMfaVerifyHandler: (dependencies: {
794
+ readonly passkeyVerification: PasskeyVerificationService;
795
+ readonly authFlow: AuthFlowService;
796
+ readonly authHttp: AuthHttpService;
797
+ } & PasskeyFinishHttpOptions) => (args_0: PasskeyMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
798
+ export declare const makeLoginApprovalApproveHandler: (dependencies: {
799
+ readonly loginApproval: LoginApprovalService;
800
+ readonly authFlowState: AuthFlowStateService;
801
+ readonly authFlow: AuthFlowService;
802
+ readonly users: UserStoreService;
803
+ readonly authHttp: AuthHttpService;
804
+ readonly loginApprovalPendingCookie: LoginApprovalPendingCookieService;
805
+ readonly trustedDevice?: TrustedDeviceService;
806
+ readonly trustedDeviceCookie?: TrustedDeviceCookieService;
807
+ }) => (args_0: LoginApprovalApproveHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
808
+ export declare const makeLoginApprovalStatusHandler: (dependencies: {
809
+ readonly loginApprovalReview?: LoginApprovalReviewService;
810
+ }) => (args_0: LoginApprovalStatusHandlerRequest) => Effect.Effect<{
811
+ status: import("../LoginApproval.js").LoginApprovalReviewStatus | "expired";
812
+ expiresAt: UnixMillis;
813
+ }, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
814
+ export declare const makeLoginApprovalFinalizeHandler: (dependencies: {
815
+ readonly loginApprovalFinalize?: LoginApprovalFinalizeService;
816
+ readonly authHttp: AuthHttpService;
817
+ readonly loginApprovalPendingCookie: LoginApprovalPendingCookieService;
818
+ readonly trustedDevice?: TrustedDeviceService;
819
+ readonly trustedDeviceCookie?: TrustedDeviceCookieService;
820
+ }) => (args_0: LoginApprovalFinalizeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthPolicyDeniedError | AuthInternalError, never>;
75
821
  declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"signIn", "POST", "/auth/password/sign-in", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
76
822
  readonly email: Schema.brand<Schema.String, "auth/Email">;
77
823
  readonly password: Schema.String;
@@ -80,6 +826,7 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
80
826
  readonly expiresAt: Schema.Number;
81
827
  readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
82
828
  readonly amr: Schema.$Array<Schema.String>;
829
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
83
830
  readonly claims: Schema.optional<Schema.Struct<{
84
831
  readonly emailVerified: Schema.optional<Schema.Boolean>;
85
832
  readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
@@ -93,10 +840,18 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
93
840
  }>, Schema.Struct<{
94
841
  readonly type: Schema.Literal<"requires_email_verification">;
95
842
  readonly flowId: Schema.String;
843
+ }>, Schema.Struct<{
844
+ readonly type: Schema.Literal<"requires_login_approval">;
845
+ readonly flowId: Schema.String;
846
+ readonly approvalChallengeId: Schema.String;
847
+ readonly channel: Schema.String;
848
+ readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
849
+ readonly sameDeviceRequired: Schema.Boolean;
850
+ readonly reason: Schema.String;
96
851
  }>, Schema.Struct<{
97
852
  readonly type: Schema.Literal<"requires_passkey_enrollment">;
98
853
  readonly flowId: Schema.String;
99
- }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof import("./Errors.js").AuthInvalidCredentialsError | typeof import("./Errors.js").AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"signUp", "POST", "/auth/password/sign-up", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
854
+ }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"signUp", "POST", "/auth/password/sign-up", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
100
855
  readonly email: Schema.brand<Schema.String, "auth/Email">;
101
856
  readonly password: Schema.String;
102
857
  readonly emailVerified: Schema.optional<Schema.Boolean>;
@@ -106,6 +861,7 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
106
861
  readonly expiresAt: Schema.Number;
107
862
  readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
108
863
  readonly amr: Schema.$Array<Schema.String>;
864
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
109
865
  readonly claims: Schema.optional<Schema.Struct<{
110
866
  readonly emailVerified: Schema.optional<Schema.Boolean>;
111
867
  readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
@@ -119,10 +875,33 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
119
875
  }>, Schema.Struct<{
120
876
  readonly type: Schema.Literal<"requires_email_verification">;
121
877
  readonly flowId: Schema.String;
878
+ }>, Schema.Struct<{
879
+ readonly type: Schema.Literal<"requires_login_approval">;
880
+ readonly flowId: Schema.String;
881
+ readonly approvalChallengeId: Schema.String;
882
+ readonly channel: Schema.String;
883
+ readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
884
+ readonly sameDeviceRequired: Schema.Boolean;
885
+ readonly reason: Schema.String;
122
886
  }>, Schema.Struct<{
123
887
  readonly type: Schema.Literal<"requires_passkey_enrollment">;
124
888
  readonly flowId: Schema.String;
125
- }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof import("./Errors.js").AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthEmailAlreadyRegisteredError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
889
+ }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthEmailAlreadyRegisteredError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"resetStart", "POST", "/auth/password/reset/start", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
890
+ readonly email: Schema.brand<Schema.String, "auth/Email">;
891
+ readonly secret: Schema.optional<Schema.String>;
892
+ readonly locale: Schema.optional<Schema.String>;
893
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
894
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"resetVerify", "POST", "/auth/password/reset/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
895
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
896
+ readonly secret: Schema.String;
897
+ readonly password: Schema.String;
898
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"set", "POST", "/auth/password/set", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
899
+ readonly password: Schema.String;
900
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
901
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"change", "POST", "/auth/password/change", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
902
+ readonly currentPassword: Schema.String;
903
+ readonly newPassword: Schema.String;
904
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
126
905
  export declare class PasswordApi extends PasswordApi_base {
127
906
  }
128
907
  declare const SessionApi_base: HttpApiGroup.HttpApiGroup<"session", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"current", "GET", "/auth/session", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
@@ -133,10 +912,36 @@ declare const SessionApi_base: HttpApiGroup.HttpApiGroup<"session", import("effe
133
912
  readonly expiresAt: Schema.Number;
134
913
  readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
135
914
  readonly amr: Schema.$Array<Schema.String>;
915
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
136
916
  readonly claims: Schema.optional<Schema.Struct<{
137
917
  readonly emailVerified: Schema.optional<Schema.Boolean>;
138
918
  readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
139
919
  }>>;
920
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"list", "GET", "/auth/sessions", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
921
+ readonly sessions: Schema.$Array<Schema.Struct<{
922
+ readonly sessionId: Schema.brand<Schema.String, "auth/SessionId">;
923
+ readonly userId: Schema.brand<Schema.String, "auth/UserId">;
924
+ readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
925
+ readonly authTime: Schema.brand<Schema.Number, "auth/UnixMillis">;
926
+ readonly lastSeenAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
927
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
928
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
929
+ readonly amr: Schema.$Array<Schema.String>;
930
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
931
+ readonly current: Schema.Boolean;
932
+ readonly claims: Schema.optional<Schema.Struct<{
933
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
934
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
935
+ }>>;
936
+ readonly ip: Schema.optional<Schema.String>;
937
+ readonly userAgent: Schema.optional<Schema.String>;
938
+ readonly country: Schema.optional<Schema.String>;
939
+ readonly region: Schema.optional<Schema.String>;
940
+ readonly city: Schema.optional<Schema.String>;
941
+ readonly latitude: Schema.optional<Schema.Number>;
942
+ readonly longitude: Schema.optional<Schema.Number>;
943
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
944
+ }>>;
140
945
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"refresh", "POST", "/auth/session/refresh", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
141
946
  readonly type: Schema.Literal<"authenticated">;
142
947
  readonly userId: Schema.String;
@@ -145,11 +950,14 @@ declare const SessionApi_base: HttpApiGroup.HttpApiGroup<"session", import("effe
145
950
  readonly expiresAt: Schema.Number;
146
951
  readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
147
952
  readonly amr: Schema.$Array<Schema.String>;
953
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
148
954
  readonly claims: Schema.optional<Schema.Struct<{
149
955
  readonly emailVerified: Schema.optional<Schema.Boolean>;
150
956
  readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
151
957
  }>>;
152
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"logout", "POST", "/auth/logout", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthInternalError>, AuthOriginCheckMiddleware, never>, false>;
958
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"logout", "POST", "/auth/logout", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthInternalError>, AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"revoke", "POST", "/auth/sessions/revoke", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
959
+ readonly sessionId: Schema.brand<Schema.String, "auth/SessionId">;
960
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"revokeOthers", "POST", "/auth/sessions/revoke-others", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthOriginCheckMiddleware, never>, false>;
153
961
  export declare class SessionApi extends SessionApi_base {
154
962
  }
155
963
  declare const EmailVerificationApi_base: HttpApiGroup.HttpApiGroup<"emailVerification", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verify", "POST", "/auth/email-verification/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
@@ -163,13 +971,347 @@ declare const EmailVerificationApi_base: HttpApiGroup.HttpApiGroup<"emailVerific
163
971
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
164
972
  export declare class EmailVerificationApi extends EmailVerificationApi_base {
165
973
  }
166
- declare const AuthApi_base: HttpApi.HttpApi<"AuthApi", typeof PasswordApi | typeof SessionApi | typeof EmailVerificationApi>;
974
+ declare const EmailOtpApi_base: HttpApiGroup.HttpApiGroup<"emailOtp", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"start", "POST", "/auth/email-otp/start", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
975
+ readonly email: Schema.brand<Schema.String, "auth/Email">;
976
+ readonly secret: Schema.optional<Schema.String>;
977
+ readonly locale: Schema.optional<Schema.String>;
978
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
979
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
980
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
981
+ readonly email: Schema.brand<Schema.String, "auth/Email">;
982
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
983
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verify", "POST", "/auth/email-otp/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
984
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
985
+ readonly secret: Schema.String;
986
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
987
+ readonly type: Schema.Literal<"authenticated">;
988
+ readonly expiresAt: Schema.Number;
989
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
990
+ readonly amr: Schema.$Array<Schema.String>;
991
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
992
+ readonly claims: Schema.optional<Schema.Struct<{
993
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
994
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
995
+ }>>;
996
+ }>, Schema.Struct<{
997
+ readonly type: Schema.Literal<"requires_mfa">;
998
+ readonly flowId: Schema.String;
999
+ readonly factors: Schema.$Array<Schema.Struct<{
1000
+ readonly type: Schema.String;
1001
+ }>>;
1002
+ }>, Schema.Struct<{
1003
+ readonly type: Schema.Literal<"requires_email_verification">;
1004
+ readonly flowId: Schema.String;
1005
+ }>, Schema.Struct<{
1006
+ readonly type: Schema.Literal<"requires_login_approval">;
1007
+ readonly flowId: Schema.String;
1008
+ readonly approvalChallengeId: Schema.String;
1009
+ readonly channel: Schema.String;
1010
+ readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
1011
+ readonly sameDeviceRequired: Schema.Boolean;
1012
+ readonly reason: Schema.String;
1013
+ }>, Schema.Struct<{
1014
+ readonly type: Schema.Literal<"requires_passkey_enrollment">;
1015
+ readonly flowId: Schema.String;
1016
+ }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
1017
+ export declare class EmailOtpApi extends EmailOtpApi_base {
1018
+ }
1019
+ declare const MagicLinkApi_base: HttpApiGroup.HttpApiGroup<"magicLink", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"start", "POST", "/auth/magic-link/start", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1020
+ readonly email: Schema.brand<Schema.String, "auth/Email">;
1021
+ readonly secret: Schema.optional<Schema.String>;
1022
+ readonly locale: Schema.optional<Schema.String>;
1023
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1024
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1025
+ readonly email: Schema.brand<Schema.String, "auth/Email">;
1026
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1027
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verify", "POST", "/auth/magic-link/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1028
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1029
+ readonly secret: Schema.String;
1030
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
1031
+ readonly type: Schema.Literal<"authenticated">;
1032
+ readonly expiresAt: Schema.Number;
1033
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1034
+ readonly amr: Schema.$Array<Schema.String>;
1035
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1036
+ readonly claims: Schema.optional<Schema.Struct<{
1037
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1038
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1039
+ }>>;
1040
+ }>, Schema.Struct<{
1041
+ readonly type: Schema.Literal<"requires_mfa">;
1042
+ readonly flowId: Schema.String;
1043
+ readonly factors: Schema.$Array<Schema.Struct<{
1044
+ readonly type: Schema.String;
1045
+ }>>;
1046
+ }>, Schema.Struct<{
1047
+ readonly type: Schema.Literal<"requires_email_verification">;
1048
+ readonly flowId: Schema.String;
1049
+ }>, Schema.Struct<{
1050
+ readonly type: Schema.Literal<"requires_login_approval">;
1051
+ readonly flowId: Schema.String;
1052
+ readonly approvalChallengeId: Schema.String;
1053
+ readonly channel: Schema.String;
1054
+ readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
1055
+ readonly sameDeviceRequired: Schema.Boolean;
1056
+ readonly reason: Schema.String;
1057
+ }>, Schema.Struct<{
1058
+ readonly type: Schema.Literal<"requires_passkey_enrollment">;
1059
+ readonly flowId: Schema.String;
1060
+ }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
1061
+ export declare class MagicLinkApi extends MagicLinkApi_base {
1062
+ }
1063
+ declare const LoginApprovalApi_base: HttpApiGroup.HttpApiGroup<"loginApproval", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"approve", "POST", "/auth/login-approval/approve", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1064
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1065
+ readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1066
+ readonly secret: Schema.optional<Schema.String>;
1067
+ readonly rememberDevice: Schema.optional<Schema.Boolean>;
1068
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1069
+ readonly type: Schema.Literal<"authenticated">;
1070
+ readonly expiresAt: Schema.Number;
1071
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1072
+ readonly amr: Schema.$Array<Schema.String>;
1073
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1074
+ readonly claims: Schema.optional<Schema.Struct<{
1075
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1076
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1077
+ }>>;
1078
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"status", "POST", "/auth/login-approval/status", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1079
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1080
+ readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1081
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1082
+ readonly status: Schema.Literals<readonly ["pending", "approved", "denied", "expired"]>;
1083
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1084
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"finalize", "POST", "/auth/login-approval/finalize", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1085
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1086
+ readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1087
+ readonly rememberDevice: Schema.optional<Schema.Boolean>;
1088
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1089
+ readonly type: Schema.Literal<"authenticated">;
1090
+ readonly expiresAt: Schema.Number;
1091
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1092
+ readonly amr: Schema.$Array<Schema.String>;
1093
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1094
+ readonly claims: Schema.optional<Schema.Struct<{
1095
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1096
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1097
+ }>>;
1098
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
1099
+ export declare class LoginApprovalApi extends LoginApprovalApi_base {
1100
+ }
1101
+ declare const MfaApi_base: HttpApiGroup.HttpApiGroup<"mfa", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"options", "POST", "/auth/mfa/options", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1102
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1103
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1104
+ readonly factors: Schema.$Array<Schema.Struct<{
1105
+ readonly type: Schema.Literals<readonly ["totp", "backup-code", "passkey"]>;
1106
+ }>>;
1107
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyTotp", "POST", "/auth/mfa/totp/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1108
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1109
+ readonly userId: Schema.brand<Schema.String, "auth/UserId">;
1110
+ readonly code: Schema.String;
1111
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1112
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1113
+ readonly type: Schema.Literal<"authenticated">;
1114
+ readonly expiresAt: Schema.Number;
1115
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1116
+ readonly amr: Schema.$Array<Schema.String>;
1117
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1118
+ readonly claims: Schema.optional<Schema.Struct<{
1119
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1120
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1121
+ }>>;
1122
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyTotpForFlow", "POST", "/auth/mfa/totp/verify-flow", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1123
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1124
+ readonly code: Schema.String;
1125
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1126
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1127
+ readonly type: Schema.Literal<"authenticated">;
1128
+ readonly expiresAt: Schema.Number;
1129
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1130
+ readonly amr: Schema.$Array<Schema.String>;
1131
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1132
+ readonly claims: Schema.optional<Schema.Struct<{
1133
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1134
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1135
+ }>>;
1136
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyRecoveryCode", "POST", "/auth/mfa/recovery-code/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1137
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1138
+ readonly userId: Schema.brand<Schema.String, "auth/UserId">;
1139
+ readonly code: Schema.String;
1140
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1141
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1142
+ readonly type: Schema.Literal<"authenticated">;
1143
+ readonly expiresAt: Schema.Number;
1144
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1145
+ readonly amr: Schema.$Array<Schema.String>;
1146
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1147
+ readonly claims: Schema.optional<Schema.Struct<{
1148
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1149
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1150
+ }>>;
1151
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyRecoveryCodeForFlow", "POST", "/auth/mfa/recovery-code/verify-flow", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1152
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1153
+ readonly code: Schema.String;
1154
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1155
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1156
+ readonly type: Schema.Literal<"authenticated">;
1157
+ readonly expiresAt: Schema.Number;
1158
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1159
+ readonly amr: Schema.$Array<Schema.String>;
1160
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1161
+ readonly claims: Schema.optional<Schema.Struct<{
1162
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1163
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1164
+ }>>;
1165
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"startPasskey", "POST", "/auth/mfa/passkey/start", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1166
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1167
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1168
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1169
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1170
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1171
+ readonly publicKey: Schema.Struct<{
1172
+ readonly challenge: Schema.String;
1173
+ readonly rpId: Schema.String;
1174
+ readonly timeout: Schema.optional<Schema.Number>;
1175
+ readonly allowCredentials: Schema.optional<Schema.$Array<Schema.Struct<{
1176
+ readonly type: Schema.Literal<"public-key">;
1177
+ readonly id: Schema.String;
1178
+ readonly transports: Schema.optional<Schema.$Array<Schema.String>>;
1179
+ }>>>;
1180
+ readonly userVerification: Schema.optional<Schema.Literals<readonly ["required", "preferred", "discouraged"]>>;
1181
+ }>;
1182
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPasskey", "POST", "/auth/mfa/passkey/verify", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1183
+ readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
1184
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1185
+ readonly credential: Schema.Struct<{
1186
+ readonly id: Schema.String;
1187
+ readonly rawId: Schema.optional<Schema.String>;
1188
+ readonly type: Schema.Literal<"public-key">;
1189
+ readonly response: Schema.$Record<Schema.String, Schema.Unknown>;
1190
+ readonly authenticatorAttachment: Schema.optional<Schema.String>;
1191
+ readonly clientExtensionResults: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1192
+ }>;
1193
+ readonly userId: Schema.optional<Schema.brand<Schema.String, "auth/UserId">>;
1194
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1195
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1196
+ readonly type: Schema.Literal<"authenticated">;
1197
+ readonly expiresAt: Schema.Number;
1198
+ readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
1199
+ readonly amr: Schema.$Array<Schema.String>;
1200
+ readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1201
+ readonly claims: Schema.optional<Schema.Struct<{
1202
+ readonly emailVerified: Schema.optional<Schema.Boolean>;
1203
+ readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
1204
+ }>>;
1205
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
1206
+ export declare class MfaApi extends MfaApi_base {
1207
+ }
1208
+ declare const ApiKeyApi_base: HttpApiGroup.HttpApiGroup<"apiKey", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/auth/api-keys/", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1209
+ readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
1210
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1211
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1212
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1213
+ readonly secret: Schema.String;
1214
+ readonly key: Schema.Struct<{
1215
+ readonly keyId: Schema.String;
1216
+ readonly prefix: Schema.String;
1217
+ readonly scopes: Schema.$Array<Schema.String>;
1218
+ readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1219
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1220
+ readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1221
+ readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1222
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1223
+ }>;
1224
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listApiKeys", "GET", "/auth/api-keys/", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1225
+ readonly keys: Schema.$Array<Schema.Struct<{
1226
+ readonly keyId: Schema.String;
1227
+ readonly prefix: Schema.String;
1228
+ readonly scopes: Schema.$Array<Schema.String>;
1229
+ readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1230
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1231
+ readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1232
+ readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1233
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1234
+ }>>;
1235
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"revokeApiKey", "POST", "/auth/api-keys/revoke", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1236
+ readonly keyId: Schema.String;
1237
+ readonly reason: Schema.optional<Schema.String>;
1238
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
1239
+ export declare class ApiKeyApi extends ApiKeyApi_base {
1240
+ }
1241
+ declare const RefreshTokenApi_base: HttpApiGroup.HttpApiGroup<"refreshToken", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"refresh", "POST", "/auth/token/refresh", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1242
+ readonly refreshToken: Schema.String;
1243
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1244
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1245
+ readonly accessToken: Schema.String;
1246
+ readonly accessTokenExpiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1247
+ readonly refreshToken: Schema.String;
1248
+ readonly refreshTokenRecord: Schema.Struct<{
1249
+ readonly tokenId: Schema.String;
1250
+ readonly familyId: Schema.String;
1251
+ readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1252
+ readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
1253
+ readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1254
+ readonly rotatedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1255
+ readonly replacedById: Schema.optional<Schema.String>;
1256
+ readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1257
+ readonly reuseDetectedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1258
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1259
+ }>;
1260
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthInternalError>, AuthSchemaErrorMiddleware, never>, false>;
1261
+ export declare class RefreshTokenApi extends RefreshTokenApi_base {
1262
+ }
1263
+ declare const JwtApi_base: HttpApiGroup.HttpApiGroup<"jwt", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"introspect", "POST", "/auth/jwt/introspect", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1264
+ readonly token: Schema.String;
1265
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
1266
+ readonly active: Schema.Literal<true>;
1267
+ readonly header: Schema.Struct<{
1268
+ readonly typ: Schema.Literal<"JWT">;
1269
+ readonly alg: Schema.Literals<readonly ["HS256", "RS256", "ES256", "EdDSA"]>;
1270
+ readonly kid: Schema.String;
1271
+ }>;
1272
+ readonly claims: Schema.$Record<Schema.String, Schema.Unknown>;
1273
+ readonly key: Schema.Struct<{
1274
+ readonly keyId: Schema.String;
1275
+ readonly alg: Schema.Literals<readonly ["HS256", "RS256", "ES256", "EdDSA"]>;
1276
+ readonly status: Schema.Literals<readonly ["active", "retired", "disabled"]>;
1277
+ readonly createdAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1278
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1279
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
1280
+ }>;
1281
+ readonly jwtId: Schema.optional<Schema.String>;
1282
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1283
+ readonly revoked: Schema.Literal<false>;
1284
+ }>, Schema.Struct<{
1285
+ readonly active: Schema.Literal<false>;
1286
+ readonly reason: Schema.Literals<readonly ["malformed", "unsupported_alg", "unknown_key", "invalid_signature", "expired", "not_yet_valid", "issuer_mismatch", "audience_mismatch", "revoked"]>;
1287
+ readonly jwtId: Schema.optional<Schema.String>;
1288
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1289
+ readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1290
+ readonly revokedReason: Schema.optional<Schema.String>;
1291
+ }>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInternalError>, AuthSchemaErrorMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"revoke", "POST", "/auth/jwt/revoke", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1292
+ readonly jwtId: Schema.String;
1293
+ readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
1294
+ readonly reason: Schema.optional<Schema.String>;
1295
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInternalError>, AuthSchemaErrorMiddleware, never>, false>;
1296
+ export declare class JwtApi extends JwtApi_base {
1297
+ }
1298
+ declare const SecurityApi_base: HttpApiGroup.HttpApiGroup<"security", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"reportLogin", "POST", "/auth/security/login/report", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
1299
+ readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
1300
+ readonly secret: Schema.String;
1301
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").NoContent>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
1302
+ export declare class SecurityApi extends SecurityApi_base {
1303
+ }
1304
+ declare const AuthApi_base: HttpApi.HttpApi<"AuthApi", typeof PasswordApi | typeof SessionApi | typeof EmailVerificationApi | typeof EmailOtpApi | typeof MagicLinkApi | typeof LoginApprovalApi | typeof SecurityApi>;
167
1305
  export declare class AuthApi extends AuthApi_base {
168
1306
  }
169
- export declare const PasswordApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "password">, never, EmailVerificationFlow | PasswordLogin | PasswordRegistration | AuthSchemaErrorMiddleware | AuthHttp | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
1307
+ export declare const PasswordApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "password">, never, Sessions | SessionCookie | PasswordLogin | PasswordRegistration | PasswordReset | PasswordManagement | AuthSchemaErrorMiddleware | AuthHttp | EmailVerificationFlow | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
170
1308
  export declare const SessionApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "session">, never, Sessions | SessionCookie | AuthHttp | AuthOriginCheckMiddleware>;
171
- export declare const EmailVerificationApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "emailVerification">, never, Sessions | SessionCookie | EmailVerificationFlow | EmailVerification | AuthSchemaErrorMiddleware | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
172
- export declare const AuthHttpApiBareLive: Layer.Layer<never, never, Sessions | SessionCookie | EmailVerificationFlow | EmailVerification | PasswordLogin | PasswordRegistration | AuthHttp | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpRouter").HttpRouter | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
173
- export declare const AuthHttpApiLive: Layer.Layer<never, never, Sessions | SessionCookie | EmailVerificationFlow | EmailVerification | PasswordLogin | PasswordRegistration | import("../Privacy.js").Privacy | AuthHttp | import("../RateLimiter.js").RateLimiter | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpRouter").HttpRouter | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
1309
+ export declare const EmailVerificationApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "emailVerification">, never, Sessions | SessionCookie | AuthSchemaErrorMiddleware | EmailVerificationFlow | EmailVerification | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
1310
+ export declare const EmailOtpApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "emailOtp">, never, EmailOtpLogin | AuthSchemaErrorMiddleware | AuthHttp | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
1311
+ export declare const MagicLinkApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "magicLink">, never, MagicLinkLogin | AuthSchemaErrorMiddleware | AuthHttp | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
1312
+ export declare const LoginApprovalApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "loginApproval">, never, UserStore | LoginApproval | AuthFlowState | AuthFlow | AuthSchemaErrorMiddleware | AuthHttp | AuthOriginCheckMiddleware>;
1313
+ export declare const SecurityApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "security">, never, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware>;
1314
+ export declare const AuthHttpApiBareLive: Layer.Layer<never, never, UserStore | Sessions | SessionCookie | LoginApproval | AuthFlowState | AuthFlow | EmailOtpLogin | MagicLinkLogin | PasswordLogin | PasswordRegistration | PasswordReset | PasswordManagement | AuthHttp | EmailVerificationFlow | EmailVerification | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpRouter").HttpRouter | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
1315
+ export declare const AuthHttpApiLive: Layer.Layer<never, never, UserStore | Sessions | SessionCookie | LoginApproval | AuthFlowState | AuthFlow | import("../Privacy.js").Privacy | EmailOtpLogin | MagicLinkLogin | PasswordLogin | PasswordRegistration | PasswordReset | PasswordManagement | AuthHttp | EmailVerificationFlow | EmailVerification | import("../RateLimiter.js").RateLimiter | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpRouter").HttpRouter | import("effect/unstable/http/HttpPlatform").HttpPlatform>;
174
1316
  export { AuthResult };
175
1317
  //# sourceMappingURL=Api.d.ts.map