@effect-auth/core 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -13
- package/dist/ApiKey.d.ts +207 -0
- package/dist/ApiKey.d.ts.map +1 -0
- package/dist/ApiKey.js +275 -0
- package/dist/ApiKey.js.map +1 -0
- package/dist/AuditLog.d.ts +204 -1
- package/dist/AuditLog.d.ts.map +1 -1
- package/dist/AuditLog.js +170 -0
- package/dist/AuditLog.js.map +1 -1
- package/dist/AuthConfig.d.ts +0 -9
- package/dist/AuthConfig.d.ts.map +1 -1
- package/dist/AuthConfig.js +1 -14
- package/dist/AuthConfig.js.map +1 -1
- package/dist/AuthFlow.d.ts +220 -51
- package/dist/AuthFlow.d.ts.map +1 -1
- package/dist/AuthFlow.js +550 -22
- package/dist/AuthFlow.js.map +1 -1
- package/dist/AuthKernel.d.ts +1 -1
- package/dist/Challenge.d.ts +5 -1
- package/dist/Challenge.d.ts.map +1 -1
- package/dist/Challenge.js +58 -48
- package/dist/Challenge.js.map +1 -1
- package/dist/Client.d.ts +263 -1
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +533 -1
- package/dist/Client.js.map +1 -1
- package/dist/D1Kysely.d.ts +1 -1
- package/dist/D1Kysely.d.ts.map +1 -1
- package/dist/EffectQbSqliteStorage.d.ts +115 -3
- package/dist/EffectQbSqliteStorage.d.ts.map +1 -1
- package/dist/EffectQbSqliteStorage.js +314 -4
- package/dist/EffectQbSqliteStorage.js.map +1 -1
- package/dist/EmailOtp.d.ts +5 -2
- package/dist/EmailOtp.d.ts.map +1 -1
- package/dist/EmailOtp.js +11 -4
- package/dist/EmailOtp.js.map +1 -1
- package/dist/EmailVerification.d.ts +2 -2
- package/dist/EmailVerification.d.ts.map +1 -1
- package/dist/EmailVerification.js +2 -3
- package/dist/EmailVerification.js.map +1 -1
- package/dist/HttpApi/Api.d.ts +1363 -19
- package/dist/HttpApi/Api.d.ts.map +1 -1
- package/dist/HttpApi/Api.js +1625 -20
- package/dist/HttpApi/Api.js.map +1 -1
- package/dist/HttpApi/Endpoints.d.ts +682 -0
- package/dist/HttpApi/Endpoints.d.ts.map +1 -1
- package/dist/HttpApi/Endpoints.js +252 -1
- package/dist/HttpApi/Endpoints.js.map +1 -1
- package/dist/HttpApi/Schemas.d.ts +841 -0
- package/dist/HttpApi/Schemas.d.ts.map +1 -1
- package/dist/HttpApi/Schemas.js +513 -1
- package/dist/HttpApi/Schemas.js.map +1 -1
- package/dist/HttpApi/Security.d.ts +13 -1
- package/dist/HttpApi/Security.d.ts.map +1 -1
- package/dist/HttpApi/Security.js +107 -16
- package/dist/HttpApi/Security.js.map +1 -1
- package/dist/HttpApi/Transport.d.ts +36 -2
- package/dist/HttpApi/Transport.d.ts.map +1 -1
- package/dist/HttpApi/Transport.js +151 -9
- package/dist/HttpApi/Transport.js.map +1 -1
- package/dist/Jwt.d.ts +271 -0
- package/dist/Jwt.d.ts.map +1 -0
- package/dist/Jwt.js +512 -0
- package/dist/Jwt.js.map +1 -0
- package/dist/KyselyStorage.d.ts +151 -1
- package/dist/KyselyStorage.d.ts.map +1 -1
- package/dist/KyselyStorage.js +1021 -4
- package/dist/KyselyStorage.js.map +1 -1
- package/dist/LoginApproval.d.ts +314 -0
- package/dist/LoginApproval.d.ts.map +1 -0
- package/dist/LoginApproval.js +551 -0
- package/dist/LoginApproval.js.map +1 -0
- package/dist/LoginNotification.d.ts +183 -0
- package/dist/LoginNotification.d.ts.map +1 -0
- package/dist/LoginNotification.js +329 -0
- package/dist/LoginNotification.js.map +1 -0
- package/dist/LoginRisk.d.ts +73 -0
- package/dist/LoginRisk.d.ts.map +1 -0
- package/dist/LoginRisk.js +57 -0
- package/dist/LoginRisk.js.map +1 -0
- package/dist/MagicLink.d.ts +85 -0
- package/dist/MagicLink.d.ts.map +1 -0
- package/dist/MagicLink.js +206 -0
- package/dist/MagicLink.js.map +1 -0
- package/dist/Mailer.d.ts +33 -2
- package/dist/Mailer.d.ts.map +1 -1
- package/dist/Mailer.js +107 -0
- package/dist/Mailer.js.map +1 -1
- package/dist/OAuth.d.ts +742 -0
- package/dist/OAuth.d.ts.map +1 -0
- package/dist/OAuth.js +1387 -0
- package/dist/OAuth.js.map +1 -0
- package/dist/Passkey.d.ts +334 -0
- package/dist/Passkey.d.ts.map +1 -0
- package/dist/Passkey.js +422 -0
- package/dist/Passkey.js.map +1 -0
- package/dist/Password.d.ts +138 -8
- package/dist/Password.d.ts.map +1 -1
- package/dist/Password.js +397 -8
- package/dist/Password.js.map +1 -1
- package/dist/RecoveryCode.d.ts +169 -0
- package/dist/RecoveryCode.d.ts.map +1 -0
- package/dist/RecoveryCode.js +299 -0
- package/dist/RecoveryCode.js.map +1 -0
- package/dist/RefreshToken.d.ts +222 -0
- package/dist/RefreshToken.d.ts.map +1 -0
- package/dist/RefreshToken.js +342 -0
- package/dist/RefreshToken.js.map +1 -0
- package/dist/Sessions.d.ts +52 -2
- package/dist/Sessions.d.ts.map +1 -1
- package/dist/Sessions.js +123 -1
- package/dist/Sessions.js.map +1 -1
- package/dist/StepUp.d.ts +44 -0
- package/dist/StepUp.d.ts.map +1 -0
- package/dist/StepUp.js +82 -0
- package/dist/StepUp.js.map +1 -0
- package/dist/Storage.d.ts +14 -1
- package/dist/Storage.d.ts.map +1 -1
- package/dist/Storage.js.map +1 -1
- package/dist/StorageMigrations.d.ts +10 -1
- package/dist/StorageMigrations.d.ts.map +1 -1
- package/dist/StorageMigrations.js +179 -0
- package/dist/StorageMigrations.js.map +1 -1
- package/dist/Testing.d.ts +1 -1
- package/dist/Totp.d.ts +220 -0
- package/dist/Totp.d.ts.map +1 -0
- package/dist/Totp.js +477 -0
- package/dist/Totp.js.map +1 -0
- package/dist/TrustedDevice.d.ts +115 -0
- package/dist/TrustedDevice.d.ts.map +1 -0
- package/dist/TrustedDevice.js +222 -0
- package/dist/TrustedDevice.js.map +1 -0
- package/dist/Webhook.d.ts +72 -0
- package/dist/Webhook.d.ts.map +1 -0
- package/dist/Webhook.js +82 -0
- package/dist/Webhook.js.map +1 -0
- package/dist/alchemy/cloudflare/Email.d.ts +25 -0
- package/dist/alchemy/cloudflare/Email.d.ts.map +1 -0
- package/dist/alchemy/cloudflare/Email.js +117 -0
- package/dist/alchemy/cloudflare/Email.js.map +1 -0
- package/dist/cloudflare/Email.d.ts +25 -0
- package/dist/cloudflare/Email.d.ts.map +1 -0
- package/dist/cloudflare/Email.js +153 -0
- package/dist/cloudflare/Email.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/migrations/0003_auth_login_approval_review.sql +22 -0
- package/migrations/0004_auth_trusted_device.sql +12 -0
- package/migrations/0005_auth_passkey.sql +17 -0
- package/migrations/0006_auth_totp_factor.sql +17 -0
- package/migrations/0007_auth_recovery_code.sql +13 -0
- package/migrations/0008_auth_api_key.sql +17 -0
- package/migrations/0009_auth_refresh_token.sql +21 -0
- package/migrations/0010_auth_jwt_revocation.sql +8 -0
- package/migrations/0011_auth_oauth_account.sql +16 -0
- package/package.json +65 -1
package/dist/HttpApi/Api.d.ts
CHANGED
|
@@ -1,34 +1,320 @@
|
|
|
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 {
|
|
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 {
|
|
10
|
-
import
|
|
15
|
+
import type { Email, OAuthProviderId, 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 type { OAuthAccountUnlinkingResolution, OAuthAccountUnlinkingService, OAuthAuthorizationStartInput, OAuthCallbackInput, OAuthClientAuthentication, OAuthCodeVerifier, OAuthProviderConfig, OAuthProvidersService, OAuthStateService, StartedOAuthAuthorization } from "../OAuth.js";
|
|
23
|
+
import { PasswordLogin, PasswordManagement, PasswordRegistration, PasswordReset } from "../Password.js";
|
|
24
|
+
import { PasskeyCredentialId } from "../Passkey.js";
|
|
25
|
+
import type { FinishedPasskeyAuthentication, PasskeyAttestation, PasskeyAuthenticationStartInput, PasskeyAuthenticatorSelection, PasskeyCredentialManagementService, PasskeyOptionsService, PasskeyPublicKeyCredentialParameters, PasskeyRelyingParty, PasskeyUserVerification, PasskeyVerificationService } from "../Passkey.js";
|
|
26
|
+
import type { PasswordChangeInput, PasswordManagementService, PasswordLoginService, PasswordRegistrationService, PasswordResetService, PasswordResetStartInput, PasswordResetVerifyInput, PasswordSetInput, PasswordSignInInput, PasswordSignUpInput } from "../Password.js";
|
|
27
|
+
import type { RecoveryCodeGenerateForUserInput, RecoveryCodeManagementRevokeInput, RecoveryCodeManagementService, RecoveryCodeVerifyForUserInput } from "../RecoveryCode.js";
|
|
28
|
+
import type { RefreshTokenInfo, RefreshTokenManagementService, RefreshTokenRotateInput } from "../RefreshToken.js";
|
|
11
29
|
import { SessionCookie, Sessions } from "../Sessions.js";
|
|
12
|
-
import type { SessionCookieService, SessionsService } from "../Sessions.js";
|
|
13
|
-
import {
|
|
14
|
-
import type {
|
|
30
|
+
import type { SessionClaims, SessionCookieService, SessionCreateInput, SessionsService, ValidatedSession } from "../Sessions.js";
|
|
31
|
+
import { UserStore } from "../Storage.js";
|
|
32
|
+
import type { UserStoreService } from "../Storage.js";
|
|
33
|
+
import type { TotpAlgorithm, TotpEnrollmentConfirmInput, TotpEnrollmentStartInput, TotpFactorManagementService, TotpFactorManagementRevokeInput, TotpVerifyForUserInput } from "../Totp.js";
|
|
34
|
+
import type { TrustedDeviceCookieService, TrustedDeviceService } from "../TrustedDevice.js";
|
|
35
|
+
import { AuthBadRequestError, AuthEmailAlreadyRegisteredError, AuthInternalError, AuthInvalidCredentialsError, AuthPolicyDeniedError, AuthRateLimitedError, AuthSchemaErrorMiddleware, AuthUnauthenticatedError } from "./Errors.js";
|
|
36
|
+
import type { ApiKeyCreateBody, ApiKeyRevokeBody, EmailOtpStartBody, EmailOtpVerifyBody, EmailVerificationStartBody, EmailVerificationVerifyBody, LoginApprovalApproveBody, LoginApprovalFinalizeBody, LoginNotificationReportBody, LoginApprovalReviewStatusBody, JwtIntrospectBody, JwtRevokeBody, MagicLinkStartBody, MagicLinkVerifyBody, MfaOptionsBody, OAuthAccountUnlinkBody, OAuthAccountUnlinkResolutionBody, OAuthAuthorizationCallbackBody, OAuthAuthorizationStartBody, 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
37
|
import { AuthApiRateLimit, AuthOriginCheckMiddleware, AuthRateLimitMiddleware } from "./Security.js";
|
|
16
38
|
import type { AuthApiRateLimitService } from "./Security.js";
|
|
17
39
|
import { AuthHttp } from "./Transport.js";
|
|
18
|
-
import type { AuthHttpService } from "./Transport.js";
|
|
19
|
-
export declare const passwordSignInInput: (payload: Schema.Schema.Type<typeof PasswordSignInBody
|
|
20
|
-
export declare const passwordSignUpInput: (payload: Schema.Schema.Type<typeof PasswordSignUpBody
|
|
40
|
+
import type { AuthHttpService, LoginApprovalPendingCookieService } from "./Transport.js";
|
|
41
|
+
export declare const passwordSignInInput: (payload: Schema.Schema.Type<typeof PasswordSignInBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => PasswordSignInInput;
|
|
42
|
+
export declare const passwordSignUpInput: (payload: Schema.Schema.Type<typeof PasswordSignUpBody>, request?: LoginRequestContext) => PasswordSignUpInput;
|
|
43
|
+
export declare const passwordResetStartInput: (payload: Schema.Schema.Type<typeof PasswordResetStartBody>) => PasswordResetStartInput;
|
|
44
|
+
export declare const passwordResetVerifyInput: (payload: Schema.Schema.Type<typeof PasswordResetVerifyBody>) => PasswordResetVerifyInput;
|
|
45
|
+
export declare const passwordSetInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasswordSetBody>) => PasswordSetInput;
|
|
46
|
+
export declare const passwordChangeInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasswordChangeBody>) => PasswordChangeInput;
|
|
21
47
|
export declare const emailVerificationStartInput: (payload: Schema.Schema.Type<typeof EmailVerificationStartBody>) => EmailVerificationIssueInput;
|
|
22
48
|
export declare const emailVerificationVerifyInput: (payload: Schema.Schema.Type<typeof EmailVerificationVerifyBody>) => EmailVerificationVerifyInput;
|
|
49
|
+
export declare const emailOtpStartInput: (payload: Schema.Schema.Type<typeof EmailOtpStartBody>) => EmailOtpStartInput;
|
|
50
|
+
export declare const emailOtpVerifyInput: (payload: Schema.Schema.Type<typeof EmailOtpVerifyBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => EmailOtpVerifyInput;
|
|
51
|
+
export declare const magicLinkStartInput: (payload: Schema.Schema.Type<typeof MagicLinkStartBody>) => MagicLinkStartInput;
|
|
52
|
+
export declare const magicLinkVerifyInput: (payload: Schema.Schema.Type<typeof MagicLinkVerifyBody>, trustedDeviceToken?: Redacted.Redacted<string>, request?: LoginRequestContext) => MagicLinkVerifyInput;
|
|
53
|
+
export interface OAuthAuthorizationCodeVerifierStoreInput {
|
|
54
|
+
readonly payload: Schema.Schema.Type<typeof OAuthAuthorizationStartBody>;
|
|
55
|
+
readonly started: StartedOAuthAuthorization;
|
|
56
|
+
}
|
|
57
|
+
export interface OAuthAuthorizationStartHttpOptions {
|
|
58
|
+
readonly ttl?: Duration.Duration;
|
|
59
|
+
readonly storeCodeVerifier?: (input: OAuthAuthorizationCodeVerifierStoreInput) => Effect.Effect<void, unknown>;
|
|
60
|
+
}
|
|
61
|
+
export interface OAuthAuthorizationCallbackHttpOptions {
|
|
62
|
+
readonly provider: OAuthProviderConfig;
|
|
63
|
+
readonly codeVerifier: Redacted.Redacted<OAuthCodeVerifier | string>;
|
|
64
|
+
readonly redirectUri?: string;
|
|
65
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
66
|
+
readonly tokenParams?: Readonly<Record<string, string>>;
|
|
67
|
+
}
|
|
68
|
+
export type OAuthAuthorizationCallbackFieldValue = string | readonly string[] | null | undefined;
|
|
69
|
+
export interface OAuthAuthorizationCallbackSearchParams {
|
|
70
|
+
readonly get: (name: string) => string | null;
|
|
71
|
+
}
|
|
72
|
+
export type OAuthAuthorizationCallbackFields = OAuthAuthorizationCallbackSearchParams | Readonly<Record<string, OAuthAuthorizationCallbackFieldValue>>;
|
|
73
|
+
export interface OAuthAuthorizationCallbackPayloadInput {
|
|
74
|
+
readonly providerId: OAuthProviderId;
|
|
75
|
+
readonly fields: OAuthAuthorizationCallbackFields;
|
|
76
|
+
}
|
|
77
|
+
export declare const oauthAuthorizationStartInput: (payload: Schema.Schema.Type<typeof OAuthAuthorizationStartBody>, provider: OAuthProviderConfig, options?: OAuthAuthorizationStartHttpOptions) => OAuthAuthorizationStartInput;
|
|
78
|
+
export declare const oauthAuthorizationStartedHttpBody: (started: StartedOAuthAuthorization) => {
|
|
79
|
+
redirectUri: string;
|
|
80
|
+
scopes: readonly string[];
|
|
81
|
+
nonce?: import("../OAuth.js").OAuthNonce | undefined;
|
|
82
|
+
providerId: OAuthProviderId;
|
|
83
|
+
authorizationUrl: string;
|
|
84
|
+
state: import("../OAuth.js").OAuthStateToken;
|
|
85
|
+
challengeId: import("../Identifiers.js").ChallengeId;
|
|
86
|
+
expiresAt: UnixMillis;
|
|
87
|
+
codeChallenge: import("../OAuth.js").OAuthCodeChallenge;
|
|
88
|
+
codeChallengeMethod: "S256";
|
|
89
|
+
};
|
|
90
|
+
export declare const oauthAuthorizationCallbackQueryPayload: (input: OAuthAuthorizationCallbackPayloadInput) => Effect.Effect<Schema.Schema.Type<typeof OAuthAuthorizationCallbackBody>, AuthBadRequestError>;
|
|
91
|
+
export declare const oauthAuthorizationCallbackFormPostPayload: (input: OAuthAuthorizationCallbackPayloadInput) => Effect.Effect<Schema.Schema.Type<typeof OAuthAuthorizationCallbackBody>, AuthBadRequestError>;
|
|
92
|
+
export declare const oauthAuthorizationCallbackInput: (payload: Schema.Schema.Type<typeof OAuthAuthorizationCallbackBody>, options: OAuthAuthorizationCallbackHttpOptions) => Effect.Effect<OAuthCallbackInput, AuthBadRequestError>;
|
|
93
|
+
export interface OAuthAccountUnlinkStepUpHttpInput {
|
|
94
|
+
readonly payload: Schema.Schema.Type<typeof OAuthAccountUnlinkBody>;
|
|
95
|
+
readonly session: ValidatedSession;
|
|
96
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
97
|
+
}
|
|
98
|
+
export interface OAuthAccountUnlinkAfterAllowHttpInput extends OAuthAccountUnlinkStepUpHttpInput {
|
|
99
|
+
readonly decision: Extract<OAuthAccountUnlinkingResolution, {
|
|
100
|
+
readonly type: "allow";
|
|
101
|
+
}>;
|
|
102
|
+
}
|
|
103
|
+
export interface OAuthAccountUnlinkHttpOptions {
|
|
104
|
+
readonly stepUpSatisfied?: (input: OAuthAccountUnlinkStepUpHttpInput) => Effect.Effect<boolean, unknown>;
|
|
105
|
+
readonly unlinkAfterAllow?: (input: OAuthAccountUnlinkAfterAllowHttpInput) => Effect.Effect<void, unknown>;
|
|
106
|
+
}
|
|
107
|
+
export declare const oauthAccountUnlinkResolutionHttpBody: (resolution: OAuthAccountUnlinkingResolution, options?: {
|
|
108
|
+
readonly unlinked?: boolean;
|
|
109
|
+
}) => Schema.Schema.Type<typeof OAuthAccountUnlinkResolutionBody>;
|
|
110
|
+
export interface PasskeyRegistrationStartHttpOptions {
|
|
111
|
+
readonly relyingParty: PasskeyRelyingParty;
|
|
112
|
+
readonly timeout?: number;
|
|
113
|
+
readonly pubKeyCredParams?: readonly PasskeyPublicKeyCredentialParameters[];
|
|
114
|
+
readonly authenticatorSelection?: PasskeyAuthenticatorSelection;
|
|
115
|
+
readonly attestation?: PasskeyAttestation;
|
|
116
|
+
}
|
|
117
|
+
export interface PasskeyAuthenticationStartHttpOptions {
|
|
118
|
+
readonly relyingPartyId: string;
|
|
119
|
+
readonly timeout?: number;
|
|
120
|
+
readonly userVerification?: PasskeyUserVerification;
|
|
121
|
+
}
|
|
122
|
+
export interface PasskeyFinishHttpOptions {
|
|
123
|
+
readonly relyingPartyId: string;
|
|
124
|
+
readonly expectedOrigin: string | readonly string[];
|
|
125
|
+
readonly requireUserVerification?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface TotpEnrollmentStartHttpOptions {
|
|
128
|
+
readonly issuer: string;
|
|
129
|
+
readonly secretBytes?: number;
|
|
130
|
+
readonly algorithm?: TotpAlgorithm;
|
|
131
|
+
readonly digits?: number;
|
|
132
|
+
readonly period?: number;
|
|
133
|
+
}
|
|
134
|
+
export interface TotpCodeHttpOptions {
|
|
135
|
+
readonly window?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface RecoveryCodeGenerateHttpOptions {
|
|
138
|
+
readonly count?: number;
|
|
139
|
+
readonly length?: number;
|
|
140
|
+
readonly groupSize?: number;
|
|
141
|
+
}
|
|
142
|
+
export declare const passkeyRegistrationStartInput: (payload: Schema.Schema.Type<typeof PasskeyRegistrationStartBody>, options: PasskeyRegistrationStartHttpOptions) => {
|
|
143
|
+
metadata?: {
|
|
144
|
+
readonly [x: string]: unknown;
|
|
145
|
+
} | undefined;
|
|
146
|
+
attestation?: PasskeyAttestation | undefined;
|
|
147
|
+
authenticatorSelection?: PasskeyAuthenticatorSelection | undefined;
|
|
148
|
+
pubKeyCredParams?: readonly PasskeyPublicKeyCredentialParameters[] | undefined;
|
|
149
|
+
timeout?: number | undefined;
|
|
150
|
+
relyingParty: PasskeyRelyingParty;
|
|
151
|
+
userId: string & import("effect/Brand").Brand<"auth/UserId">;
|
|
152
|
+
userName: string;
|
|
153
|
+
userDisplayName: string;
|
|
154
|
+
};
|
|
155
|
+
export declare const passkeyAuthenticationStartInput: (payload: Schema.Schema.Type<typeof PasskeyAuthenticationStartBody>, options: PasskeyAuthenticationStartHttpOptions) => {
|
|
156
|
+
metadata?: {
|
|
157
|
+
readonly [x: string]: unknown;
|
|
158
|
+
} | undefined;
|
|
159
|
+
userVerification?: PasskeyUserVerification | undefined;
|
|
160
|
+
timeout?: number | undefined;
|
|
161
|
+
userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
|
|
162
|
+
relyingPartyId: string;
|
|
163
|
+
};
|
|
164
|
+
export declare const passkeyMfaStartInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasskeyMfaStartBody>, options: PasskeyAuthenticationStartHttpOptions) => PasskeyAuthenticationStartInput;
|
|
165
|
+
export declare const passkeyRegistrationFinishInput: (payload: Schema.Schema.Type<typeof PasskeyRegistrationFinishBody>, options: PasskeyFinishHttpOptions) => {
|
|
166
|
+
metadata?: {
|
|
167
|
+
readonly [x: string]: unknown;
|
|
168
|
+
} | undefined;
|
|
169
|
+
requireUserVerification?: boolean | undefined;
|
|
170
|
+
challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
|
|
171
|
+
userId: string & import("effect/Brand").Brand<"auth/UserId">;
|
|
172
|
+
response: {
|
|
173
|
+
readonly id: string;
|
|
174
|
+
readonly type: "public-key";
|
|
175
|
+
readonly response: {
|
|
176
|
+
readonly [x: string]: unknown;
|
|
177
|
+
};
|
|
178
|
+
readonly rawId?: string | undefined;
|
|
179
|
+
readonly authenticatorAttachment?: string | undefined;
|
|
180
|
+
readonly clientExtensionResults?: {
|
|
181
|
+
readonly [x: string]: unknown;
|
|
182
|
+
} | undefined;
|
|
183
|
+
};
|
|
184
|
+
relyingPartyId: string;
|
|
185
|
+
expectedOrigin: string | readonly string[];
|
|
186
|
+
};
|
|
187
|
+
export declare const passkeyAuthenticationFinishInput: (payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>, options: PasskeyFinishHttpOptions) => {
|
|
188
|
+
metadata?: {
|
|
189
|
+
readonly [x: string]: unknown;
|
|
190
|
+
} | undefined;
|
|
191
|
+
requireUserVerification?: boolean | undefined;
|
|
192
|
+
relyingPartyId: string;
|
|
193
|
+
expectedOrigin: string | readonly string[];
|
|
194
|
+
userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
|
|
195
|
+
challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
|
|
196
|
+
response: {
|
|
197
|
+
readonly id: string;
|
|
198
|
+
readonly type: "public-key";
|
|
199
|
+
readonly response: {
|
|
200
|
+
readonly [x: string]: unknown;
|
|
201
|
+
};
|
|
202
|
+
readonly rawId?: string | undefined;
|
|
203
|
+
readonly authenticatorAttachment?: string | undefined;
|
|
204
|
+
readonly clientExtensionResults?: {
|
|
205
|
+
readonly [x: string]: unknown;
|
|
206
|
+
} | undefined;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
export declare const passkeyMfaVerifyInput: (payload: Schema.Schema.Type<typeof PasskeyMfaVerifyBody>, options: PasskeyFinishHttpOptions) => {
|
|
210
|
+
metadata?: {
|
|
211
|
+
readonly [x: string]: unknown;
|
|
212
|
+
} | undefined;
|
|
213
|
+
requireUserVerification?: boolean | undefined;
|
|
214
|
+
relyingPartyId: string;
|
|
215
|
+
expectedOrigin: string | readonly string[];
|
|
216
|
+
userId?: (string & import("effect/Brand").Brand<"auth/UserId">) | undefined;
|
|
217
|
+
challengeId: string & import("effect/Brand").Brand<"auth/ChallengeId">;
|
|
218
|
+
response: {
|
|
219
|
+
readonly id: string;
|
|
220
|
+
readonly type: "public-key";
|
|
221
|
+
readonly response: {
|
|
222
|
+
readonly [x: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
readonly rawId?: string | undefined;
|
|
225
|
+
readonly authenticatorAttachment?: string | undefined;
|
|
226
|
+
readonly clientExtensionResults?: {
|
|
227
|
+
readonly [x: string]: unknown;
|
|
228
|
+
} | undefined;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
export declare const passkeyCredentialRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof PasskeyCredentialRevokeBody>) => {
|
|
232
|
+
reason?: string | undefined;
|
|
233
|
+
userId: UserId;
|
|
234
|
+
credentialId: PasskeyCredentialId;
|
|
235
|
+
};
|
|
236
|
+
export declare const totpEnrollmentStartInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpEnrollmentStartBody>, options: TotpEnrollmentStartHttpOptions) => TotpEnrollmentStartInput;
|
|
237
|
+
export declare const totpEnrollmentConfirmInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpEnrollmentConfirmBody>, options?: TotpCodeHttpOptions) => TotpEnrollmentConfirmInput;
|
|
238
|
+
export declare const totpVerifyInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpVerifyBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
|
|
239
|
+
export declare const totpFactorRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpFactorRevokeBody>) => TotpFactorManagementRevokeInput;
|
|
240
|
+
export declare const recoveryCodeGenerateInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeGenerateBody>, options?: RecoveryCodeGenerateHttpOptions) => RecoveryCodeGenerateForUserInput;
|
|
241
|
+
export declare const recoveryCodeVerifyInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeVerifyBody>) => RecoveryCodeVerifyForUserInput;
|
|
242
|
+
export declare const recoveryCodeRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeRevokeBody>) => RecoveryCodeManagementRevokeInput;
|
|
243
|
+
export declare const apiKeyCreateInput: (userId: UserId, payload: Schema.Schema.Type<typeof ApiKeyCreateBody>) => ApiKeyCreateForUserInput;
|
|
244
|
+
export declare const apiKeyRevokeInput: (userId: UserId, payload: Schema.Schema.Type<typeof ApiKeyRevokeBody>) => ApiKeyManagementRevokeInput;
|
|
245
|
+
export interface RefreshTokenRefreshHttpPolicyInput {
|
|
246
|
+
readonly now: UnixMillis;
|
|
247
|
+
}
|
|
248
|
+
export interface RefreshTokenAccessTokenHttpInput extends RefreshTokenRefreshHttpPolicyInput {
|
|
249
|
+
readonly refreshToken: RefreshTokenInfo;
|
|
250
|
+
readonly previousToken: RefreshTokenInfo;
|
|
251
|
+
}
|
|
252
|
+
export interface RefreshTokenRefreshHttpOptions {
|
|
253
|
+
readonly refreshTokenExpiresAt: (input: RefreshTokenRefreshHttpPolicyInput) => UnixMillis;
|
|
254
|
+
readonly accessToken: (input: RefreshTokenAccessTokenHttpInput) => JwtIssueInput;
|
|
255
|
+
}
|
|
256
|
+
export declare const refreshTokenRefreshInput: (payload: Schema.Schema.Type<typeof RefreshTokenRefreshBody>, now: UnixMillis, expiresAt: UnixMillis) => RefreshTokenRotateInput;
|
|
257
|
+
export interface JwtIntrospectionHttpOptions {
|
|
258
|
+
readonly issuer?: string;
|
|
259
|
+
readonly audience?: JwtAudience;
|
|
260
|
+
readonly clockTolerance?: Duration.Duration;
|
|
261
|
+
}
|
|
262
|
+
export declare const jwtIntrospectInput: (payload: Schema.Schema.Type<typeof JwtIntrospectBody>, options?: JwtIntrospectionHttpOptions) => JwtVerifyInput;
|
|
263
|
+
export declare const jwtRevokeInput: (payload: Schema.Schema.Type<typeof JwtRevokeBody>) => JwtRevokeJwtIdInput;
|
|
264
|
+
export declare const totpMfaVerifyInput: (payload: Schema.Schema.Type<typeof TotpMfaVerifyBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
|
|
265
|
+
export declare const totpMfaVerifyForFlowInput: (userId: UserId, payload: Schema.Schema.Type<typeof TotpMfaVerifyForFlowBody>, options?: TotpCodeHttpOptions) => TotpVerifyForUserInput;
|
|
266
|
+
export declare const recoveryCodeMfaVerifyInput: (payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyBody>) => RecoveryCodeVerifyForUserInput;
|
|
267
|
+
export declare const recoveryCodeMfaVerifyForFlowInput: (userId: UserId, payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyForFlowBody>) => RecoveryCodeVerifyForUserInput;
|
|
268
|
+
export interface LoginApprovalApproveInput {
|
|
269
|
+
readonly flowId: Schema.Schema.Type<typeof LoginApprovalApproveBody>["flowId"];
|
|
270
|
+
readonly approval: LoginApprovalVerifyInput;
|
|
271
|
+
readonly rememberDevice: boolean;
|
|
272
|
+
}
|
|
273
|
+
export declare const loginApprovalApproveInput: (payload: Schema.Schema.Type<typeof LoginApprovalApproveBody>) => LoginApprovalApproveInput;
|
|
274
|
+
export interface LoginApprovalStatusInput {
|
|
275
|
+
readonly flowId: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>["flowId"];
|
|
276
|
+
readonly approvalChallengeId: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>["approvalChallengeId"];
|
|
277
|
+
}
|
|
278
|
+
export declare const loginApprovalStatusInput: (payload: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>) => LoginApprovalStatusInput;
|
|
279
|
+
export interface LoginApprovalFinalizeHttpInput {
|
|
280
|
+
readonly flowId: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>["flowId"];
|
|
281
|
+
readonly approvalChallengeId: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>["approvalChallengeId"];
|
|
282
|
+
readonly rememberDevice: boolean;
|
|
283
|
+
}
|
|
284
|
+
export declare const loginApprovalFinalizeInput: (payload: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>) => LoginApprovalFinalizeHttpInput;
|
|
285
|
+
export declare const loginNotificationReportInput: (payload: Schema.Schema.Type<typeof LoginNotificationReportBody>) => LoginNotificationReportInput;
|
|
23
286
|
export type PasswordSignInHandlerRequest = {
|
|
24
287
|
readonly payload: Schema.Schema.Type<typeof PasswordSignInBody>;
|
|
288
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
25
289
|
};
|
|
26
290
|
export type PasswordSignUpHandlerRequest = {
|
|
27
291
|
readonly payload: Schema.Schema.Type<typeof PasswordSignUpBody>;
|
|
292
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
293
|
+
};
|
|
294
|
+
export type PasswordResetStartHandlerRequest = {
|
|
295
|
+
readonly payload: Schema.Schema.Type<typeof PasswordResetStartBody>;
|
|
296
|
+
};
|
|
297
|
+
export type PasswordResetVerifyHandlerRequest = {
|
|
298
|
+
readonly payload: Schema.Schema.Type<typeof PasswordResetVerifyBody>;
|
|
299
|
+
};
|
|
300
|
+
export type PasswordSetHandlerRequest = {
|
|
301
|
+
readonly payload: Schema.Schema.Type<typeof PasswordSetBody>;
|
|
302
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
303
|
+
};
|
|
304
|
+
export type PasswordChangeHandlerRequest = {
|
|
305
|
+
readonly payload: Schema.Schema.Type<typeof PasswordChangeBody>;
|
|
306
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
28
307
|
};
|
|
29
308
|
export type SessionHandlerRequest = {
|
|
30
309
|
readonly request: HttpServerRequest.HttpServerRequest;
|
|
31
310
|
};
|
|
311
|
+
export type SessionRevokeHandlerRequest = {
|
|
312
|
+
readonly payload: Schema.Schema.Type<typeof SessionRevokeBody>;
|
|
313
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
314
|
+
};
|
|
315
|
+
export type LoginNotificationReportHandlerRequest = {
|
|
316
|
+
readonly payload: Schema.Schema.Type<typeof LoginNotificationReportBody>;
|
|
317
|
+
};
|
|
32
318
|
export type EmailVerificationStartHandlerRequest = {
|
|
33
319
|
readonly payload: Schema.Schema.Type<typeof EmailVerificationStartBody>;
|
|
34
320
|
};
|
|
@@ -36,11 +322,144 @@ export type EmailVerificationVerifyHandlerRequest = {
|
|
|
36
322
|
readonly payload: Schema.Schema.Type<typeof EmailVerificationVerifyBody>;
|
|
37
323
|
readonly request: HttpServerRequest.HttpServerRequest;
|
|
38
324
|
};
|
|
325
|
+
export type EmailOtpStartHandlerRequest = {
|
|
326
|
+
readonly payload: Schema.Schema.Type<typeof EmailOtpStartBody>;
|
|
327
|
+
};
|
|
328
|
+
export type EmailOtpVerifyHandlerRequest = {
|
|
329
|
+
readonly payload: Schema.Schema.Type<typeof EmailOtpVerifyBody>;
|
|
330
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
331
|
+
};
|
|
332
|
+
export type MagicLinkStartHandlerRequest = {
|
|
333
|
+
readonly payload: Schema.Schema.Type<typeof MagicLinkStartBody>;
|
|
334
|
+
};
|
|
335
|
+
export type MagicLinkVerifyHandlerRequest = {
|
|
336
|
+
readonly payload: Schema.Schema.Type<typeof MagicLinkVerifyBody>;
|
|
337
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
338
|
+
};
|
|
339
|
+
export type OAuthAuthorizationStartHandlerRequest = {
|
|
340
|
+
readonly payload: Schema.Schema.Type<typeof OAuthAuthorizationStartBody>;
|
|
341
|
+
};
|
|
342
|
+
export type OAuthAccountUnlinkHandlerRequest = {
|
|
343
|
+
readonly payload: Schema.Schema.Type<typeof OAuthAccountUnlinkBody>;
|
|
344
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
345
|
+
};
|
|
346
|
+
export type PasskeyRegistrationStartHandlerRequest = {
|
|
347
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyRegistrationStartBody>;
|
|
348
|
+
};
|
|
349
|
+
export type PasskeyRegistrationFinishHandlerRequest = {
|
|
350
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyRegistrationFinishBody>;
|
|
351
|
+
};
|
|
352
|
+
export type PasskeyAuthenticationStartHandlerRequest = {
|
|
353
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationStartBody>;
|
|
354
|
+
};
|
|
355
|
+
export type PasskeyAuthenticationFinishHandlerRequest = {
|
|
356
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>;
|
|
357
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
358
|
+
};
|
|
359
|
+
export type PasskeyCredentialListHandlerRequest = {
|
|
360
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
361
|
+
};
|
|
362
|
+
export type PasskeyCredentialRevokeHandlerRequest = {
|
|
363
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyCredentialRevokeBody>;
|
|
364
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
365
|
+
};
|
|
366
|
+
export type TotpEnrollmentStartHandlerRequest = {
|
|
367
|
+
readonly payload: Schema.Schema.Type<typeof TotpEnrollmentStartBody>;
|
|
368
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
369
|
+
};
|
|
370
|
+
export type TotpEnrollmentConfirmHandlerRequest = {
|
|
371
|
+
readonly payload: Schema.Schema.Type<typeof TotpEnrollmentConfirmBody>;
|
|
372
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
373
|
+
};
|
|
374
|
+
export type TotpVerifyHandlerRequest = {
|
|
375
|
+
readonly payload: Schema.Schema.Type<typeof TotpVerifyBody>;
|
|
376
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
377
|
+
};
|
|
378
|
+
export type TotpFactorListHandlerRequest = {
|
|
379
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
380
|
+
};
|
|
381
|
+
export type TotpFactorRevokeHandlerRequest = {
|
|
382
|
+
readonly payload: Schema.Schema.Type<typeof TotpFactorRevokeBody>;
|
|
383
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
384
|
+
};
|
|
385
|
+
export type RecoveryCodeGenerateHandlerRequest = {
|
|
386
|
+
readonly payload: Schema.Schema.Type<typeof RecoveryCodeGenerateBody>;
|
|
387
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
388
|
+
};
|
|
389
|
+
export type RecoveryCodeVerifyHandlerRequest = {
|
|
390
|
+
readonly payload: Schema.Schema.Type<typeof RecoveryCodeVerifyBody>;
|
|
391
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
392
|
+
};
|
|
393
|
+
export type RecoveryCodeListHandlerRequest = {
|
|
394
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
395
|
+
};
|
|
396
|
+
export type RecoveryCodeRevokeHandlerRequest = {
|
|
397
|
+
readonly payload: Schema.Schema.Type<typeof RecoveryCodeRevokeBody>;
|
|
398
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
399
|
+
};
|
|
400
|
+
export type ApiKeyCreateHandlerRequest = {
|
|
401
|
+
readonly payload: Schema.Schema.Type<typeof ApiKeyCreateBody>;
|
|
402
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
403
|
+
};
|
|
404
|
+
export type ApiKeyListHandlerRequest = {
|
|
405
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
406
|
+
};
|
|
407
|
+
export type ApiKeyRevokeHandlerRequest = {
|
|
408
|
+
readonly payload: Schema.Schema.Type<typeof ApiKeyRevokeBody>;
|
|
409
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
410
|
+
};
|
|
411
|
+
export type RefreshTokenRefreshHandlerRequest = {
|
|
412
|
+
readonly payload: Schema.Schema.Type<typeof RefreshTokenRefreshBody>;
|
|
413
|
+
};
|
|
414
|
+
export type JwtIntrospectHandlerRequest = {
|
|
415
|
+
readonly payload: Schema.Schema.Type<typeof JwtIntrospectBody>;
|
|
416
|
+
};
|
|
417
|
+
export type JwtRevokeHandlerRequest = {
|
|
418
|
+
readonly payload: Schema.Schema.Type<typeof JwtRevokeBody>;
|
|
419
|
+
};
|
|
420
|
+
export type TotpMfaVerifyHandlerRequest = {
|
|
421
|
+
readonly payload: Schema.Schema.Type<typeof TotpMfaVerifyBody>;
|
|
422
|
+
};
|
|
423
|
+
export type TotpMfaVerifyForFlowHandlerRequest = {
|
|
424
|
+
readonly payload: Schema.Schema.Type<typeof TotpMfaVerifyForFlowBody>;
|
|
425
|
+
};
|
|
426
|
+
export type MfaOptionsHandlerRequest = {
|
|
427
|
+
readonly payload: Schema.Schema.Type<typeof MfaOptionsBody>;
|
|
428
|
+
};
|
|
429
|
+
export type RecoveryCodeMfaVerifyHandlerRequest = {
|
|
430
|
+
readonly payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyBody>;
|
|
431
|
+
};
|
|
432
|
+
export type RecoveryCodeMfaVerifyForFlowHandlerRequest = {
|
|
433
|
+
readonly payload: Schema.Schema.Type<typeof RecoveryCodeMfaVerifyForFlowBody>;
|
|
434
|
+
};
|
|
435
|
+
export type PasskeyMfaStartHandlerRequest = {
|
|
436
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyMfaStartBody>;
|
|
437
|
+
};
|
|
438
|
+
export type PasskeyMfaVerifyHandlerRequest = {
|
|
439
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyMfaVerifyBody>;
|
|
440
|
+
};
|
|
441
|
+
export interface PasskeyAuthenticationSessionContext {
|
|
442
|
+
readonly finished: FinishedPasskeyAuthentication;
|
|
443
|
+
readonly payload: Schema.Schema.Type<typeof PasskeyAuthenticationFinishBody>;
|
|
444
|
+
readonly request?: HttpServerRequest.HttpServerRequest;
|
|
445
|
+
}
|
|
446
|
+
export type LoginApprovalApproveHandlerRequest = {
|
|
447
|
+
readonly payload: Schema.Schema.Type<typeof LoginApprovalApproveBody>;
|
|
448
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
449
|
+
};
|
|
450
|
+
export type LoginApprovalStatusHandlerRequest = {
|
|
451
|
+
readonly payload: Schema.Schema.Type<typeof LoginApprovalReviewStatusBody>;
|
|
452
|
+
};
|
|
453
|
+
export type LoginApprovalFinalizeHandlerRequest = {
|
|
454
|
+
readonly payload: Schema.Schema.Type<typeof LoginApprovalFinalizeBody>;
|
|
455
|
+
readonly request: HttpServerRequest.HttpServerRequest;
|
|
456
|
+
};
|
|
39
457
|
export declare const makePasswordSignInHandler: (dependencies: {
|
|
40
458
|
readonly password: PasswordLoginService;
|
|
41
459
|
readonly authHttp: AuthHttpService;
|
|
42
460
|
readonly emailVerificationFlow?: EmailVerificationFlowService;
|
|
43
461
|
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
462
|
+
readonly trustedDeviceCookie?: TrustedDeviceCookieService;
|
|
44
463
|
}) => (args_0: PasswordSignInHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | import("./Transport.js").PasswordSignInHttpError, never>;
|
|
45
464
|
export declare const makePasswordSignUpHandler: (dependencies: {
|
|
46
465
|
readonly registration: PasswordRegistrationService;
|
|
@@ -48,6 +467,23 @@ export declare const makePasswordSignUpHandler: (dependencies: {
|
|
|
48
467
|
readonly emailVerificationFlow?: EmailVerificationFlowService;
|
|
49
468
|
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
50
469
|
}) => (args_0: PasswordSignUpHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | AuthEmailAlreadyRegisteredError | import("./Transport.js").PasswordSignUpHttpError, never>;
|
|
470
|
+
export declare const makePasswordResetStartHandler: (dependencies: {
|
|
471
|
+
readonly passwordReset: PasswordResetService;
|
|
472
|
+
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
473
|
+
}) => (args_0: PasswordResetStartHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthRateLimitedError | AuthInternalError, never>;
|
|
474
|
+
export declare const makePasswordResetVerifyHandler: (dependencies: {
|
|
475
|
+
readonly passwordReset: PasswordResetService;
|
|
476
|
+
}) => (args_0: PasswordResetVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError, never>;
|
|
477
|
+
export declare const makePasswordSetHandler: (dependencies: {
|
|
478
|
+
readonly passwordManagement: PasswordManagementService;
|
|
479
|
+
readonly sessions: SessionsService;
|
|
480
|
+
readonly sessionCookie: SessionCookieService;
|
|
481
|
+
}) => (args_0: PasswordSetHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
482
|
+
export declare const makePasswordChangeHandler: (dependencies: {
|
|
483
|
+
readonly passwordManagement: PasswordManagementService;
|
|
484
|
+
readonly sessions: SessionsService;
|
|
485
|
+
readonly sessionCookie: SessionCookieService;
|
|
486
|
+
}) => (args_0: PasswordChangeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
51
487
|
export declare const makeCurrentSessionHandler: (dependencies: {
|
|
52
488
|
readonly sessions: SessionsService;
|
|
53
489
|
readonly sessionCookie: SessionCookieService;
|
|
@@ -63,6 +499,44 @@ export declare const makeLogoutHandler: (dependencies: {
|
|
|
63
499
|
readonly sessionCookie: SessionCookieService;
|
|
64
500
|
readonly authHttp: AuthHttpService;
|
|
65
501
|
}) => (args_0: SessionHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthInternalError, never>;
|
|
502
|
+
export declare const makeListSessionsHandler: (dependencies: {
|
|
503
|
+
readonly sessions: SessionsService;
|
|
504
|
+
readonly sessionCookie: SessionCookieService;
|
|
505
|
+
}) => (args_0: SessionHandlerRequest) => Effect.Effect<{
|
|
506
|
+
sessions: {
|
|
507
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
508
|
+
longitude?: number | undefined;
|
|
509
|
+
latitude?: number | undefined;
|
|
510
|
+
city?: string | undefined;
|
|
511
|
+
region?: string | undefined;
|
|
512
|
+
country?: string | undefined;
|
|
513
|
+
userAgent?: string | undefined;
|
|
514
|
+
ip?: string | undefined;
|
|
515
|
+
claims?: SessionClaims | undefined;
|
|
516
|
+
current: boolean;
|
|
517
|
+
mfaVerifiedAt?: UnixMillis | undefined;
|
|
518
|
+
expiresAt: UnixMillis;
|
|
519
|
+
aal: import("../Sessions.js").AuthAssuranceLevel;
|
|
520
|
+
amr: readonly import("../Sessions.js").AuthMethodReference[];
|
|
521
|
+
lastSeenAt?: UnixMillis | undefined;
|
|
522
|
+
sessionId: import("../Identifiers.js").SessionId;
|
|
523
|
+
userId: UserId;
|
|
524
|
+
createdAt: UnixMillis;
|
|
525
|
+
authTime: UnixMillis;
|
|
526
|
+
}[];
|
|
527
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
528
|
+
export declare const makeRevokeSessionHandler: (dependencies: {
|
|
529
|
+
readonly sessions: SessionsService;
|
|
530
|
+
readonly sessionCookie: SessionCookieService;
|
|
531
|
+
readonly authHttp: AuthHttpService;
|
|
532
|
+
}) => (args_0: SessionRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
533
|
+
export declare const makeRevokeOtherSessionsHandler: (dependencies: {
|
|
534
|
+
readonly sessions: SessionsService;
|
|
535
|
+
readonly sessionCookie: SessionCookieService;
|
|
536
|
+
}) => (args_0: SessionHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
537
|
+
export declare const makeLoginNotificationReportHandler: (dependencies: {
|
|
538
|
+
readonly loginNotification?: LoginNotificationService;
|
|
539
|
+
}) => (args_0: LoginNotificationReportHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
66
540
|
export declare const makeEmailVerificationStartHandler: (dependencies: {
|
|
67
541
|
readonly emailVerificationFlow: EmailVerificationFlowService;
|
|
68
542
|
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
@@ -72,6 +546,408 @@ export declare const makeEmailVerificationVerifyHandler: (dependencies: {
|
|
|
72
546
|
readonly sessions: SessionsService;
|
|
73
547
|
readonly sessionCookie: SessionCookieService;
|
|
74
548
|
}) => (args_0: EmailVerificationVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
|
|
549
|
+
export declare const makeEmailOtpStartHandler: (dependencies: {
|
|
550
|
+
readonly emailOtp: EmailOtpLoginService;
|
|
551
|
+
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
552
|
+
}) => (args_0: EmailOtpStartHandlerRequest) => Effect.Effect<import("../EmailOtp.js").EmailOtpStarted, AuthRateLimitedError | AuthInternalError, never>;
|
|
553
|
+
export declare const makeEmailOtpVerifyHandler: (dependencies: {
|
|
554
|
+
readonly emailOtp: EmailOtpLoginService;
|
|
555
|
+
readonly authHttp: AuthHttpService;
|
|
556
|
+
readonly trustedDeviceCookie?: TrustedDeviceCookieService;
|
|
557
|
+
}) => (args_0: EmailOtpVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("./Transport.js").PasswordSignInHttpError, never>;
|
|
558
|
+
export declare const makeMagicLinkStartHandler: (dependencies: {
|
|
559
|
+
readonly magicLink: MagicLinkLoginService;
|
|
560
|
+
readonly authApiRateLimit?: AuthApiRateLimitService;
|
|
561
|
+
}) => (args_0: MagicLinkStartHandlerRequest) => Effect.Effect<{
|
|
562
|
+
email: Email;
|
|
563
|
+
expiresAt: UnixMillis;
|
|
564
|
+
}, AuthRateLimitedError | AuthInternalError, never>;
|
|
565
|
+
export declare const makeMagicLinkVerifyHandler: (dependencies: {
|
|
566
|
+
readonly magicLink: MagicLinkLoginService;
|
|
567
|
+
readonly authHttp: AuthHttpService;
|
|
568
|
+
readonly trustedDeviceCookie?: TrustedDeviceCookieService;
|
|
569
|
+
}) => (args_0: MagicLinkVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("./Transport.js").PasswordSignInHttpError, never>;
|
|
570
|
+
export declare const makeOAuthAuthorizationStartHandler: (dependencies: {
|
|
571
|
+
readonly oauthProviders: OAuthProvidersService;
|
|
572
|
+
readonly oauthState: OAuthStateService;
|
|
573
|
+
} & OAuthAuthorizationStartHttpOptions) => (args_0: OAuthAuthorizationStartHandlerRequest) => Effect.Effect<{
|
|
574
|
+
redirectUri: string;
|
|
575
|
+
scopes: readonly string[];
|
|
576
|
+
nonce?: import("../OAuth.js").OAuthNonce | undefined;
|
|
577
|
+
providerId: OAuthProviderId;
|
|
578
|
+
authorizationUrl: string;
|
|
579
|
+
state: import("../OAuth.js").OAuthStateToken;
|
|
580
|
+
challengeId: import("../Identifiers.js").ChallengeId;
|
|
581
|
+
expiresAt: UnixMillis;
|
|
582
|
+
codeChallenge: import("../OAuth.js").OAuthCodeChallenge;
|
|
583
|
+
codeChallengeMethod: "S256";
|
|
584
|
+
}, AuthBadRequestError | AuthInternalError, never>;
|
|
585
|
+
export declare const makeOAuthAccountUnlinkHandler: (dependencies: {
|
|
586
|
+
readonly oauthAccountUnlinking: OAuthAccountUnlinkingService;
|
|
587
|
+
readonly sessions: SessionsService;
|
|
588
|
+
readonly sessionCookie: SessionCookieService;
|
|
589
|
+
} & OAuthAccountUnlinkHttpOptions) => (args_0: OAuthAccountUnlinkHandlerRequest) => Effect.Effect<{
|
|
590
|
+
readonly type: "allow";
|
|
591
|
+
readonly reason: "owned-account";
|
|
592
|
+
readonly account: {
|
|
593
|
+
readonly accountId: string & import("effect/Brand").Brand<"auth/OAuthAccountId">;
|
|
594
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
595
|
+
readonly providerAccountId: string;
|
|
596
|
+
};
|
|
597
|
+
readonly remainingAccounts: readonly {
|
|
598
|
+
readonly accountId: string & import("effect/Brand").Brand<"auth/OAuthAccountId">;
|
|
599
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
600
|
+
readonly providerAccountId: string;
|
|
601
|
+
}[];
|
|
602
|
+
readonly unlinked: boolean;
|
|
603
|
+
} | {
|
|
604
|
+
readonly type: "requires-step-up";
|
|
605
|
+
readonly reason: "step-up-required";
|
|
606
|
+
readonly account: {
|
|
607
|
+
readonly accountId: string & import("effect/Brand").Brand<"auth/OAuthAccountId">;
|
|
608
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
609
|
+
readonly providerAccountId: string;
|
|
610
|
+
};
|
|
611
|
+
readonly remainingAccounts: readonly {
|
|
612
|
+
readonly accountId: string & import("effect/Brand").Brand<"auth/OAuthAccountId">;
|
|
613
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
614
|
+
readonly providerAccountId: string;
|
|
615
|
+
}[];
|
|
616
|
+
} | {
|
|
617
|
+
readonly type: "deny-not-found";
|
|
618
|
+
readonly reason: "provider-account-not-found";
|
|
619
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
620
|
+
readonly providerAccountId: string;
|
|
621
|
+
} | {
|
|
622
|
+
readonly type: "deny-not-owner";
|
|
623
|
+
readonly reason: "provider-account-linked-to-different-user";
|
|
624
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
625
|
+
readonly providerAccountId: string;
|
|
626
|
+
} | {
|
|
627
|
+
readonly type: "deny-last-account";
|
|
628
|
+
readonly reason: "last-linked-account";
|
|
629
|
+
readonly account: {
|
|
630
|
+
readonly accountId: string & import("effect/Brand").Brand<"auth/OAuthAccountId">;
|
|
631
|
+
readonly providerId: string & import("effect/Brand").Brand<"auth/OAuthProviderId">;
|
|
632
|
+
readonly providerAccountId: string;
|
|
633
|
+
};
|
|
634
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
635
|
+
export declare const makePasskeyRegistrationStartHandler: (dependencies: {
|
|
636
|
+
readonly passkeyOptions: PasskeyOptionsService;
|
|
637
|
+
} & PasskeyRegistrationStartHttpOptions) => (args_0: PasskeyRegistrationStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyRegistration, AuthInternalError, never>;
|
|
638
|
+
export declare const makePasskeyRegistrationFinishHandler: (dependencies: {
|
|
639
|
+
readonly passkeyVerification: PasskeyVerificationService;
|
|
640
|
+
} & PasskeyFinishHttpOptions) => (args_0: PasskeyRegistrationFinishHandlerRequest) => Effect.Effect<{
|
|
641
|
+
credentialId: PasskeyCredentialId;
|
|
642
|
+
}, AuthBadRequestError | AuthInternalError, never>;
|
|
643
|
+
export declare const makePasskeyAuthenticationStartHandler: (dependencies: {
|
|
644
|
+
readonly passkeyOptions: PasskeyOptionsService;
|
|
645
|
+
} & PasskeyAuthenticationStartHttpOptions) => (args_0: PasskeyAuthenticationStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyAuthentication, AuthInternalError, never>;
|
|
646
|
+
export declare const makePasskeyAuthenticationFinishHandler: (dependencies: {
|
|
647
|
+
readonly passkeyVerification: PasskeyVerificationService;
|
|
648
|
+
readonly sessions: SessionsService;
|
|
649
|
+
readonly authHttp: AuthHttpService;
|
|
650
|
+
readonly makeSessionInput: (context: PasskeyAuthenticationSessionContext) => SessionCreateInput;
|
|
651
|
+
} & PasskeyFinishHttpOptions) => (args_0: PasskeyAuthenticationFinishHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
|
|
652
|
+
export declare const makePasskeyCredentialListHandler: (dependencies: {
|
|
653
|
+
readonly passkeyCredentialManagement: PasskeyCredentialManagementService;
|
|
654
|
+
readonly sessions: SessionsService;
|
|
655
|
+
readonly sessionCookie: SessionCookieService;
|
|
656
|
+
}) => (args_0: PasskeyCredentialListHandlerRequest) => Effect.Effect<{
|
|
657
|
+
credentials: {
|
|
658
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
659
|
+
revokedAt?: UnixMillis | undefined;
|
|
660
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
661
|
+
createdAt: UnixMillis;
|
|
662
|
+
backedUp?: boolean | undefined;
|
|
663
|
+
transports?: readonly import("../Passkey.js").PasskeyTransport[] | undefined;
|
|
664
|
+
credentialId: PasskeyCredentialId;
|
|
665
|
+
}[];
|
|
666
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
667
|
+
export declare const makePasskeyCredentialRevokeHandler: (dependencies: {
|
|
668
|
+
readonly passkeyCredentialManagement: PasskeyCredentialManagementService;
|
|
669
|
+
readonly sessions: SessionsService;
|
|
670
|
+
readonly sessionCookie: SessionCookieService;
|
|
671
|
+
}) => (args_0: PasskeyCredentialRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
672
|
+
export declare const makeTotpEnrollmentStartHandler: (dependencies: {
|
|
673
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
674
|
+
readonly sessions: SessionsService;
|
|
675
|
+
readonly sessionCookie: SessionCookieService;
|
|
676
|
+
} & TotpEnrollmentStartHttpOptions) => (args_0: TotpEnrollmentStartHandlerRequest) => Effect.Effect<{
|
|
677
|
+
factor: {
|
|
678
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
679
|
+
revokedAt?: UnixMillis | undefined;
|
|
680
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
681
|
+
confirmedAt?: UnixMillis | undefined;
|
|
682
|
+
factorId: import("../Identifiers.js").CredentialId;
|
|
683
|
+
algorithm: TotpAlgorithm;
|
|
684
|
+
digits: number;
|
|
685
|
+
period: number;
|
|
686
|
+
createdAt: UnixMillis;
|
|
687
|
+
};
|
|
688
|
+
secret: import("../Totp.js").TotpSecret;
|
|
689
|
+
uri: string;
|
|
690
|
+
}, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
691
|
+
export declare const makeTotpEnrollmentConfirmHandler: (dependencies: {
|
|
692
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
693
|
+
readonly sessions: SessionsService;
|
|
694
|
+
readonly sessionCookie: SessionCookieService;
|
|
695
|
+
} & TotpCodeHttpOptions) => (args_0: TotpEnrollmentConfirmHandlerRequest) => Effect.Effect<{
|
|
696
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
697
|
+
revokedAt?: UnixMillis | undefined;
|
|
698
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
699
|
+
confirmedAt?: UnixMillis | undefined;
|
|
700
|
+
factorId: import("../Identifiers.js").CredentialId;
|
|
701
|
+
algorithm: TotpAlgorithm;
|
|
702
|
+
digits: number;
|
|
703
|
+
period: number;
|
|
704
|
+
createdAt: UnixMillis;
|
|
705
|
+
}, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
706
|
+
export declare const makeTotpVerifyHandler: (dependencies: {
|
|
707
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
708
|
+
readonly sessions: SessionsService;
|
|
709
|
+
readonly sessionCookie: SessionCookieService;
|
|
710
|
+
} & TotpCodeHttpOptions) => (args_0: TotpVerifyHandlerRequest) => Effect.Effect<{
|
|
711
|
+
delta?: number | undefined;
|
|
712
|
+
factor?: {
|
|
713
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
714
|
+
revokedAt?: UnixMillis | undefined;
|
|
715
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
716
|
+
confirmedAt?: UnixMillis | undefined;
|
|
717
|
+
factorId: import("../Identifiers.js").CredentialId;
|
|
718
|
+
algorithm: TotpAlgorithm;
|
|
719
|
+
digits: number;
|
|
720
|
+
period: number;
|
|
721
|
+
createdAt: UnixMillis;
|
|
722
|
+
} | undefined;
|
|
723
|
+
valid: boolean;
|
|
724
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
725
|
+
export declare const makeTotpFactorListHandler: (dependencies: {
|
|
726
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
727
|
+
readonly sessions: SessionsService;
|
|
728
|
+
readonly sessionCookie: SessionCookieService;
|
|
729
|
+
}) => (args_0: TotpFactorListHandlerRequest) => Effect.Effect<{
|
|
730
|
+
factors: {
|
|
731
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
732
|
+
revokedAt?: UnixMillis | undefined;
|
|
733
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
734
|
+
confirmedAt?: UnixMillis | undefined;
|
|
735
|
+
factorId: import("../Identifiers.js").CredentialId;
|
|
736
|
+
algorithm: TotpAlgorithm;
|
|
737
|
+
digits: number;
|
|
738
|
+
period: number;
|
|
739
|
+
createdAt: UnixMillis;
|
|
740
|
+
}[];
|
|
741
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
742
|
+
export declare const makeTotpFactorRevokeHandler: (dependencies: {
|
|
743
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
744
|
+
readonly sessions: SessionsService;
|
|
745
|
+
readonly sessionCookie: SessionCookieService;
|
|
746
|
+
}) => (args_0: TotpFactorRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
747
|
+
export declare const makeRecoveryCodeGenerateHandler: (dependencies: {
|
|
748
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
749
|
+
readonly sessions: SessionsService;
|
|
750
|
+
readonly sessionCookie: SessionCookieService;
|
|
751
|
+
} & RecoveryCodeGenerateHttpOptions) => (args_0: RecoveryCodeGenerateHandlerRequest) => Effect.Effect<{
|
|
752
|
+
codes: import("../RecoveryCode.js").RecoveryCode[];
|
|
753
|
+
records: {
|
|
754
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
755
|
+
revokedAt?: UnixMillis | undefined;
|
|
756
|
+
usedAt?: UnixMillis | undefined;
|
|
757
|
+
codeId: import("../Identifiers.js").CredentialId;
|
|
758
|
+
createdAt: UnixMillis;
|
|
759
|
+
}[];
|
|
760
|
+
}, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
761
|
+
export declare const makeRecoveryCodeVerifyHandler: (dependencies: {
|
|
762
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
763
|
+
readonly sessions: SessionsService;
|
|
764
|
+
readonly sessionCookie: SessionCookieService;
|
|
765
|
+
}) => (args_0: RecoveryCodeVerifyHandlerRequest) => Effect.Effect<{
|
|
766
|
+
code?: {
|
|
767
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
768
|
+
revokedAt?: UnixMillis | undefined;
|
|
769
|
+
usedAt?: UnixMillis | undefined;
|
|
770
|
+
codeId: import("../Identifiers.js").CredentialId;
|
|
771
|
+
createdAt: UnixMillis;
|
|
772
|
+
} | undefined;
|
|
773
|
+
valid: boolean;
|
|
774
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
775
|
+
export declare const makeRecoveryCodeListHandler: (dependencies: {
|
|
776
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
777
|
+
readonly sessions: SessionsService;
|
|
778
|
+
readonly sessionCookie: SessionCookieService;
|
|
779
|
+
}) => (args_0: RecoveryCodeListHandlerRequest) => Effect.Effect<{
|
|
780
|
+
codes: {
|
|
781
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
782
|
+
revokedAt?: UnixMillis | undefined;
|
|
783
|
+
usedAt?: UnixMillis | undefined;
|
|
784
|
+
codeId: import("../Identifiers.js").CredentialId;
|
|
785
|
+
createdAt: UnixMillis;
|
|
786
|
+
}[];
|
|
787
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
788
|
+
export declare const makeRecoveryCodeRevokeHandler: (dependencies: {
|
|
789
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
790
|
+
readonly sessions: SessionsService;
|
|
791
|
+
readonly sessionCookie: SessionCookieService;
|
|
792
|
+
}) => (args_0: RecoveryCodeRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
793
|
+
export declare const makeApiKeyCreateHandler: (dependencies: {
|
|
794
|
+
readonly apiKeyManagement: ApiKeyManagementService;
|
|
795
|
+
readonly sessions: SessionsService;
|
|
796
|
+
readonly sessionCookie: SessionCookieService;
|
|
797
|
+
}) => (args_0: ApiKeyCreateHandlerRequest) => Effect.Effect<{
|
|
798
|
+
secret: import("../ApiKey.js").ApiKeySecret;
|
|
799
|
+
key: {
|
|
800
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
801
|
+
revokedAt?: UnixMillis | undefined;
|
|
802
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
803
|
+
expiresAt?: UnixMillis | undefined;
|
|
804
|
+
keyId: ApiKeyId;
|
|
805
|
+
prefix: import("../ApiKey.js").ApiKeyPrefix;
|
|
806
|
+
scopes: readonly string[];
|
|
807
|
+
createdAt: UnixMillis;
|
|
808
|
+
};
|
|
809
|
+
}, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
810
|
+
export declare const makeApiKeyListHandler: (dependencies: {
|
|
811
|
+
readonly apiKeyManagement: ApiKeyManagementService;
|
|
812
|
+
readonly sessions: SessionsService;
|
|
813
|
+
readonly sessionCookie: SessionCookieService;
|
|
814
|
+
}) => (args_0: ApiKeyListHandlerRequest) => Effect.Effect<{
|
|
815
|
+
keys: {
|
|
816
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
817
|
+
revokedAt?: UnixMillis | undefined;
|
|
818
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
819
|
+
expiresAt?: UnixMillis | undefined;
|
|
820
|
+
keyId: ApiKeyId;
|
|
821
|
+
prefix: import("../ApiKey.js").ApiKeyPrefix;
|
|
822
|
+
scopes: readonly string[];
|
|
823
|
+
createdAt: UnixMillis;
|
|
824
|
+
}[];
|
|
825
|
+
}, AuthUnauthenticatedError | AuthInternalError, never>;
|
|
826
|
+
export declare const makeApiKeyRevokeHandler: (dependencies: {
|
|
827
|
+
readonly apiKeyManagement: ApiKeyManagementService;
|
|
828
|
+
readonly sessions: SessionsService;
|
|
829
|
+
readonly sessionCookie: SessionCookieService;
|
|
830
|
+
}) => (args_0: ApiKeyRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthUnauthenticatedError | AuthInternalError, never>;
|
|
831
|
+
export declare const makeRefreshTokenRefreshHandler: (dependencies: {
|
|
832
|
+
readonly refreshTokenManagement: RefreshTokenManagementService;
|
|
833
|
+
readonly jwtIssuer: JwtIssuerService;
|
|
834
|
+
} & RefreshTokenRefreshHttpOptions) => (args_0: RefreshTokenRefreshHandlerRequest) => Effect.Effect<{
|
|
835
|
+
refreshToken: string;
|
|
836
|
+
refreshTokenRecord: {
|
|
837
|
+
metadata?: Readonly<Record<string, unknown>> | undefined;
|
|
838
|
+
reuseDetectedAt?: UnixMillis | undefined;
|
|
839
|
+
revokedAt?: UnixMillis | undefined;
|
|
840
|
+
replacedById?: import("../RefreshToken.js").RefreshTokenId | undefined;
|
|
841
|
+
rotatedAt?: UnixMillis | undefined;
|
|
842
|
+
lastUsedAt?: UnixMillis | undefined;
|
|
843
|
+
tokenId: import("../RefreshToken.js").RefreshTokenId;
|
|
844
|
+
familyId: import("../RefreshToken.js").RefreshTokenFamilyId;
|
|
845
|
+
createdAt: UnixMillis;
|
|
846
|
+
expiresAt: UnixMillis;
|
|
847
|
+
};
|
|
848
|
+
accessTokenExpiresAt?: UnixMillis | undefined;
|
|
849
|
+
accessToken: import("../Jwt.js").JwtToken;
|
|
850
|
+
}, AuthInvalidCredentialsError | AuthInternalError, never>;
|
|
851
|
+
export declare const makeJwtIntrospectHandler: (dependencies: {
|
|
852
|
+
readonly jwtRevocation: JwtRevocationService;
|
|
853
|
+
} & JwtIntrospectionHttpOptions) => (args_0: JwtIntrospectHandlerRequest) => Effect.Effect<{
|
|
854
|
+
readonly active: true;
|
|
855
|
+
readonly header: {
|
|
856
|
+
readonly typ: "JWT";
|
|
857
|
+
readonly alg: "HS256" | "RS256" | "ES256" | "EdDSA";
|
|
858
|
+
readonly kid: string;
|
|
859
|
+
};
|
|
860
|
+
readonly claims: {
|
|
861
|
+
readonly [x: string]: unknown;
|
|
862
|
+
};
|
|
863
|
+
readonly key: {
|
|
864
|
+
readonly keyId: string;
|
|
865
|
+
readonly alg: "HS256" | "RS256" | "ES256" | "EdDSA";
|
|
866
|
+
readonly status: "active" | "retired" | "disabled";
|
|
867
|
+
readonly createdAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
|
|
868
|
+
readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
|
|
869
|
+
readonly metadata?: {
|
|
870
|
+
readonly [x: string]: unknown;
|
|
871
|
+
} | undefined;
|
|
872
|
+
};
|
|
873
|
+
readonly revoked: false;
|
|
874
|
+
readonly jwtId?: string | undefined;
|
|
875
|
+
readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
|
|
876
|
+
} | {
|
|
877
|
+
readonly active: false;
|
|
878
|
+
readonly reason: "expired" | "revoked" | "malformed" | "unsupported_alg" | "unknown_key" | "invalid_signature" | "not_yet_valid" | "issuer_mismatch" | "audience_mismatch";
|
|
879
|
+
readonly jwtId?: string | undefined;
|
|
880
|
+
readonly expiresAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
|
|
881
|
+
readonly revokedAt?: (number & import("effect/Brand").Brand<"auth/UnixMillis">) | undefined;
|
|
882
|
+
readonly revokedReason?: string | undefined;
|
|
883
|
+
}, AuthInternalError, never>;
|
|
884
|
+
export declare const makeJwtRevokeHandler: (dependencies: {
|
|
885
|
+
readonly jwtRevocation: JwtRevocationService;
|
|
886
|
+
}) => (args_0: JwtRevokeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInternalError, never>;
|
|
887
|
+
export declare const makeMfaOptionsHandler: (dependencies: {
|
|
888
|
+
readonly authFlowState: AuthFlowStateService;
|
|
889
|
+
readonly totpFactorManagement?: TotpFactorManagementService;
|
|
890
|
+
readonly recoveryCodeManagement?: RecoveryCodeManagementService;
|
|
891
|
+
readonly passkeyCredentialManagement?: PasskeyCredentialManagementService;
|
|
892
|
+
}) => (args_0: MfaOptionsHandlerRequest) => Effect.Effect<{
|
|
893
|
+
factors: {
|
|
894
|
+
readonly type: "totp" | "backup-code" | "passkey";
|
|
895
|
+
}[];
|
|
896
|
+
}, AuthBadRequestError | AuthInternalError, never>;
|
|
897
|
+
export declare const makeTotpMfaVerifyHandler: (dependencies: {
|
|
898
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
899
|
+
readonly authFlow: AuthFlowService;
|
|
900
|
+
readonly authHttp: AuthHttpService;
|
|
901
|
+
} & TotpCodeHttpOptions) => (args_0: TotpMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
902
|
+
export declare const makeTotpMfaVerifyForFlowHandler: (dependencies: {
|
|
903
|
+
readonly totpFactorManagement: TotpFactorManagementService;
|
|
904
|
+
readonly authFlowState: AuthFlowStateService;
|
|
905
|
+
readonly authFlow: AuthFlowService;
|
|
906
|
+
readonly authHttp: AuthHttpService;
|
|
907
|
+
} & TotpCodeHttpOptions) => (args_0: TotpMfaVerifyForFlowHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
908
|
+
export declare const makeRecoveryCodeMfaVerifyHandler: (dependencies: {
|
|
909
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
910
|
+
readonly authFlow: AuthFlowService;
|
|
911
|
+
readonly authHttp: AuthHttpService;
|
|
912
|
+
}) => (args_0: RecoveryCodeMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
913
|
+
export declare const makeRecoveryCodeMfaVerifyForFlowHandler: (dependencies: {
|
|
914
|
+
readonly recoveryCodeManagement: RecoveryCodeManagementService;
|
|
915
|
+
readonly authFlowState: AuthFlowStateService;
|
|
916
|
+
readonly authFlow: AuthFlowService;
|
|
917
|
+
readonly authHttp: AuthHttpService;
|
|
918
|
+
}) => (args_0: RecoveryCodeMfaVerifyForFlowHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthInvalidCredentialsError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
919
|
+
export declare const makePasskeyMfaStartHandler: (dependencies: {
|
|
920
|
+
readonly passkeyOptions: PasskeyOptionsService;
|
|
921
|
+
readonly authFlowState: AuthFlowStateService;
|
|
922
|
+
} & PasskeyAuthenticationStartHttpOptions) => (args_0: PasskeyMfaStartHandlerRequest) => Effect.Effect<import("../Passkey.js").StartedPasskeyAuthentication, AuthBadRequestError | AuthInternalError, never>;
|
|
923
|
+
export declare const makePasskeyMfaVerifyHandler: (dependencies: {
|
|
924
|
+
readonly passkeyVerification: PasskeyVerificationService;
|
|
925
|
+
readonly authFlow: AuthFlowService;
|
|
926
|
+
readonly authHttp: AuthHttpService;
|
|
927
|
+
} & PasskeyFinishHttpOptions) => (args_0: PasskeyMfaVerifyHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
928
|
+
export declare const makeLoginApprovalApproveHandler: (dependencies: {
|
|
929
|
+
readonly loginApproval: LoginApprovalService;
|
|
930
|
+
readonly authFlowState: AuthFlowStateService;
|
|
931
|
+
readonly authFlow: AuthFlowService;
|
|
932
|
+
readonly users: UserStoreService;
|
|
933
|
+
readonly authHttp: AuthHttpService;
|
|
934
|
+
readonly loginApprovalPendingCookie: LoginApprovalPendingCookieService;
|
|
935
|
+
readonly trustedDevice?: TrustedDeviceService;
|
|
936
|
+
readonly trustedDeviceCookie?: TrustedDeviceCookieService;
|
|
937
|
+
}) => (args_0: LoginApprovalApproveHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
938
|
+
export declare const makeLoginApprovalStatusHandler: (dependencies: {
|
|
939
|
+
readonly loginApprovalReview?: LoginApprovalReviewService;
|
|
940
|
+
}) => (args_0: LoginApprovalStatusHandlerRequest) => Effect.Effect<{
|
|
941
|
+
status: import("../LoginApproval.js").LoginApprovalReviewStatus | "expired";
|
|
942
|
+
expiresAt: UnixMillis;
|
|
943
|
+
}, AuthBadRequestError | AuthPolicyDeniedError | AuthInternalError, never>;
|
|
944
|
+
export declare const makeLoginApprovalFinalizeHandler: (dependencies: {
|
|
945
|
+
readonly loginApprovalFinalize?: LoginApprovalFinalizeService;
|
|
946
|
+
readonly authHttp: AuthHttpService;
|
|
947
|
+
readonly loginApprovalPendingCookie: LoginApprovalPendingCookieService;
|
|
948
|
+
readonly trustedDevice?: TrustedDeviceService;
|
|
949
|
+
readonly trustedDeviceCookie?: TrustedDeviceCookieService;
|
|
950
|
+
}) => (args_0: LoginApprovalFinalizeHandlerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, AuthPolicyDeniedError | AuthInternalError, never>;
|
|
75
951
|
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
952
|
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
77
953
|
readonly password: Schema.String;
|
|
@@ -80,6 +956,7 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
|
|
|
80
956
|
readonly expiresAt: Schema.Number;
|
|
81
957
|
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
82
958
|
readonly amr: Schema.$Array<Schema.String>;
|
|
959
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
83
960
|
readonly claims: Schema.optional<Schema.Struct<{
|
|
84
961
|
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
85
962
|
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
@@ -93,10 +970,18 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
|
|
|
93
970
|
}>, Schema.Struct<{
|
|
94
971
|
readonly type: Schema.Literal<"requires_email_verification">;
|
|
95
972
|
readonly flowId: Schema.String;
|
|
973
|
+
}>, Schema.Struct<{
|
|
974
|
+
readonly type: Schema.Literal<"requires_login_approval">;
|
|
975
|
+
readonly flowId: Schema.String;
|
|
976
|
+
readonly approvalChallengeId: Schema.String;
|
|
977
|
+
readonly channel: Schema.String;
|
|
978
|
+
readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
|
|
979
|
+
readonly sameDeviceRequired: Schema.Boolean;
|
|
980
|
+
readonly reason: Schema.String;
|
|
96
981
|
}>, Schema.Struct<{
|
|
97
982
|
readonly type: Schema.Literal<"requires_passkey_enrollment">;
|
|
98
983
|
readonly flowId: Schema.String;
|
|
99
|
-
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof
|
|
984
|
+
}>]>>, 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
985
|
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
101
986
|
readonly password: Schema.String;
|
|
102
987
|
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
@@ -106,6 +991,7 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
|
|
|
106
991
|
readonly expiresAt: Schema.Number;
|
|
107
992
|
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
108
993
|
readonly amr: Schema.$Array<Schema.String>;
|
|
994
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
109
995
|
readonly claims: Schema.optional<Schema.Struct<{
|
|
110
996
|
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
111
997
|
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
@@ -119,10 +1005,33 @@ declare const PasswordApi_base: HttpApiGroup.HttpApiGroup<"password", import("ef
|
|
|
119
1005
|
}>, Schema.Struct<{
|
|
120
1006
|
readonly type: Schema.Literal<"requires_email_verification">;
|
|
121
1007
|
readonly flowId: Schema.String;
|
|
1008
|
+
}>, Schema.Struct<{
|
|
1009
|
+
readonly type: Schema.Literal<"requires_login_approval">;
|
|
1010
|
+
readonly flowId: Schema.String;
|
|
1011
|
+
readonly approvalChallengeId: Schema.String;
|
|
1012
|
+
readonly channel: Schema.String;
|
|
1013
|
+
readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
|
|
1014
|
+
readonly sameDeviceRequired: Schema.Boolean;
|
|
1015
|
+
readonly reason: Schema.String;
|
|
122
1016
|
}>, Schema.Struct<{
|
|
123
1017
|
readonly type: Schema.Literal<"requires_passkey_enrollment">;
|
|
124
1018
|
readonly flowId: Schema.String;
|
|
125
|
-
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof
|
|
1019
|
+
}>]>>, 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<{
|
|
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<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<{
|
|
1025
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1026
|
+
readonly secret: Schema.String;
|
|
1027
|
+
readonly password: Schema.String;
|
|
1028
|
+
}>>, 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<{
|
|
1029
|
+
readonly password: Schema.String;
|
|
1030
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1031
|
+
}>>, 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<{
|
|
1032
|
+
readonly currentPassword: Schema.String;
|
|
1033
|
+
readonly newPassword: Schema.String;
|
|
1034
|
+
}>>, 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
1035
|
export declare class PasswordApi extends PasswordApi_base {
|
|
127
1036
|
}
|
|
128
1037
|
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 +1042,36 @@ declare const SessionApi_base: HttpApiGroup.HttpApiGroup<"session", import("effe
|
|
|
133
1042
|
readonly expiresAt: Schema.Number;
|
|
134
1043
|
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
135
1044
|
readonly amr: Schema.$Array<Schema.String>;
|
|
1045
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
136
1046
|
readonly claims: Schema.optional<Schema.Struct<{
|
|
137
1047
|
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
138
1048
|
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
139
1049
|
}>>;
|
|
1050
|
+
}>>, 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<{
|
|
1051
|
+
readonly sessions: Schema.$Array<Schema.Struct<{
|
|
1052
|
+
readonly sessionId: Schema.brand<Schema.String, "auth/SessionId">;
|
|
1053
|
+
readonly userId: Schema.brand<Schema.String, "auth/UserId">;
|
|
1054
|
+
readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1055
|
+
readonly authTime: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1056
|
+
readonly lastSeenAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1057
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1058
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1059
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1060
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1061
|
+
readonly current: Schema.Boolean;
|
|
1062
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1063
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1064
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1065
|
+
}>>;
|
|
1066
|
+
readonly ip: Schema.optional<Schema.String>;
|
|
1067
|
+
readonly userAgent: Schema.optional<Schema.String>;
|
|
1068
|
+
readonly country: Schema.optional<Schema.String>;
|
|
1069
|
+
readonly region: Schema.optional<Schema.String>;
|
|
1070
|
+
readonly city: Schema.optional<Schema.String>;
|
|
1071
|
+
readonly latitude: Schema.optional<Schema.Number>;
|
|
1072
|
+
readonly longitude: Schema.optional<Schema.Number>;
|
|
1073
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1074
|
+
}>>;
|
|
140
1075
|
}>>, 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
1076
|
readonly type: Schema.Literal<"authenticated">;
|
|
142
1077
|
readonly userId: Schema.String;
|
|
@@ -145,11 +1080,14 @@ declare const SessionApi_base: HttpApiGroup.HttpApiGroup<"session", import("effe
|
|
|
145
1080
|
readonly expiresAt: Schema.Number;
|
|
146
1081
|
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
147
1082
|
readonly amr: Schema.$Array<Schema.String>;
|
|
1083
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
148
1084
|
readonly claims: Schema.optional<Schema.Struct<{
|
|
149
1085
|
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
150
1086
|
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
151
1087
|
}>>;
|
|
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>,
|
|
1088
|
+
}>>, 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<{
|
|
1089
|
+
readonly sessionId: Schema.brand<Schema.String, "auth/SessionId">;
|
|
1090
|
+
}>>, 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
1091
|
export declare class SessionApi extends SessionApi_base {
|
|
154
1092
|
}
|
|
155
1093
|
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 +1101,419 @@ declare const EmailVerificationApi_base: HttpApiGroup.HttpApiGroup<"emailVerific
|
|
|
163
1101
|
}>>, 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
1102
|
export declare class EmailVerificationApi extends EmailVerificationApi_base {
|
|
165
1103
|
}
|
|
166
|
-
declare const
|
|
1104
|
+
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<{
|
|
1105
|
+
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
1106
|
+
readonly secret: Schema.optional<Schema.String>;
|
|
1107
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
1108
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1109
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1110
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1111
|
+
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
1112
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1113
|
+
}>>, 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<{
|
|
1114
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1115
|
+
readonly secret: Schema.String;
|
|
1116
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
|
|
1117
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1118
|
+
readonly expiresAt: Schema.Number;
|
|
1119
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1120
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1121
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1122
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1123
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1124
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1125
|
+
}>>;
|
|
1126
|
+
}>, Schema.Struct<{
|
|
1127
|
+
readonly type: Schema.Literal<"requires_mfa">;
|
|
1128
|
+
readonly flowId: Schema.String;
|
|
1129
|
+
readonly factors: Schema.$Array<Schema.Struct<{
|
|
1130
|
+
readonly type: Schema.String;
|
|
1131
|
+
}>>;
|
|
1132
|
+
}>, Schema.Struct<{
|
|
1133
|
+
readonly type: Schema.Literal<"requires_email_verification">;
|
|
1134
|
+
readonly flowId: Schema.String;
|
|
1135
|
+
}>, Schema.Struct<{
|
|
1136
|
+
readonly type: Schema.Literal<"requires_login_approval">;
|
|
1137
|
+
readonly flowId: Schema.String;
|
|
1138
|
+
readonly approvalChallengeId: Schema.String;
|
|
1139
|
+
readonly channel: Schema.String;
|
|
1140
|
+
readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
|
|
1141
|
+
readonly sameDeviceRequired: Schema.Boolean;
|
|
1142
|
+
readonly reason: Schema.String;
|
|
1143
|
+
}>, Schema.Struct<{
|
|
1144
|
+
readonly type: Schema.Literal<"requires_passkey_enrollment">;
|
|
1145
|
+
readonly flowId: Schema.String;
|
|
1146
|
+
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
|
|
1147
|
+
export declare class EmailOtpApi extends EmailOtpApi_base {
|
|
1148
|
+
}
|
|
1149
|
+
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<{
|
|
1150
|
+
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
1151
|
+
readonly secret: Schema.optional<Schema.String>;
|
|
1152
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
1153
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1154
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1155
|
+
readonly email: Schema.brand<Schema.String, "auth/Email">;
|
|
1156
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1157
|
+
}>>, 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<{
|
|
1158
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1159
|
+
readonly secret: Schema.String;
|
|
1160
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
|
|
1161
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1162
|
+
readonly expiresAt: Schema.Number;
|
|
1163
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1164
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1165
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1166
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1167
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1168
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1169
|
+
}>>;
|
|
1170
|
+
}>, Schema.Struct<{
|
|
1171
|
+
readonly type: Schema.Literal<"requires_mfa">;
|
|
1172
|
+
readonly flowId: Schema.String;
|
|
1173
|
+
readonly factors: Schema.$Array<Schema.Struct<{
|
|
1174
|
+
readonly type: Schema.String;
|
|
1175
|
+
}>>;
|
|
1176
|
+
}>, Schema.Struct<{
|
|
1177
|
+
readonly type: Schema.Literal<"requires_email_verification">;
|
|
1178
|
+
readonly flowId: Schema.String;
|
|
1179
|
+
}>, Schema.Struct<{
|
|
1180
|
+
readonly type: Schema.Literal<"requires_login_approval">;
|
|
1181
|
+
readonly flowId: Schema.String;
|
|
1182
|
+
readonly approvalChallengeId: Schema.String;
|
|
1183
|
+
readonly channel: Schema.String;
|
|
1184
|
+
readonly sessionBinding: Schema.Literals<readonly ["originating-device", "approval-device", "none"]>;
|
|
1185
|
+
readonly sameDeviceRequired: Schema.Boolean;
|
|
1186
|
+
readonly reason: Schema.String;
|
|
1187
|
+
}>, Schema.Struct<{
|
|
1188
|
+
readonly type: Schema.Literal<"requires_passkey_enrollment">;
|
|
1189
|
+
readonly flowId: Schema.String;
|
|
1190
|
+
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthPolicyDeniedError | typeof AuthRateLimitedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware | AuthRateLimitMiddleware, never>, false>;
|
|
1191
|
+
export declare class MagicLinkApi extends MagicLinkApi_base {
|
|
1192
|
+
}
|
|
1193
|
+
declare const OAuthApi_base: HttpApiGroup.HttpApiGroup<"oauth", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"startAuthorization", "POST", "/auth/oauth/start", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1194
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1195
|
+
readonly redirectUri: Schema.optional<Schema.String>;
|
|
1196
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1197
|
+
readonly authorizationParams: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1198
|
+
readonly codeVerifier: Schema.optional<Schema.String>;
|
|
1199
|
+
readonly includeNonce: Schema.optional<Schema.Boolean>;
|
|
1200
|
+
readonly nonce: Schema.optional<Schema.String>;
|
|
1201
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1202
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1203
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1204
|
+
readonly authorizationUrl: Schema.String;
|
|
1205
|
+
readonly state: Schema.String;
|
|
1206
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1207
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1208
|
+
readonly codeChallenge: Schema.String;
|
|
1209
|
+
readonly codeChallengeMethod: Schema.Literal<"S256">;
|
|
1210
|
+
readonly nonce: Schema.optional<Schema.String>;
|
|
1211
|
+
readonly redirectUri: Schema.String;
|
|
1212
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
1213
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"unlinkAccount", "POST", "/auth/oauth/unlink", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1214
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1215
|
+
readonly providerAccountId: Schema.String;
|
|
1216
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1217
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
|
|
1218
|
+
readonly type: Schema.Literal<"allow">;
|
|
1219
|
+
readonly reason: Schema.Literal<"owned-account">;
|
|
1220
|
+
readonly account: Schema.Struct<{
|
|
1221
|
+
readonly accountId: Schema.brand<Schema.String, "auth/OAuthAccountId">;
|
|
1222
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1223
|
+
readonly providerAccountId: Schema.String;
|
|
1224
|
+
}>;
|
|
1225
|
+
readonly remainingAccounts: Schema.$Array<Schema.Struct<{
|
|
1226
|
+
readonly accountId: Schema.brand<Schema.String, "auth/OAuthAccountId">;
|
|
1227
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1228
|
+
readonly providerAccountId: Schema.String;
|
|
1229
|
+
}>>;
|
|
1230
|
+
readonly unlinked: Schema.Boolean;
|
|
1231
|
+
}>, Schema.Struct<{
|
|
1232
|
+
readonly type: Schema.Literal<"requires-step-up">;
|
|
1233
|
+
readonly reason: Schema.Literal<"step-up-required">;
|
|
1234
|
+
readonly account: Schema.Struct<{
|
|
1235
|
+
readonly accountId: Schema.brand<Schema.String, "auth/OAuthAccountId">;
|
|
1236
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1237
|
+
readonly providerAccountId: Schema.String;
|
|
1238
|
+
}>;
|
|
1239
|
+
readonly remainingAccounts: Schema.$Array<Schema.Struct<{
|
|
1240
|
+
readonly accountId: Schema.brand<Schema.String, "auth/OAuthAccountId">;
|
|
1241
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1242
|
+
readonly providerAccountId: Schema.String;
|
|
1243
|
+
}>>;
|
|
1244
|
+
}>, Schema.Struct<{
|
|
1245
|
+
readonly type: Schema.Literal<"deny-not-found">;
|
|
1246
|
+
readonly reason: Schema.Literal<"provider-account-not-found">;
|
|
1247
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1248
|
+
readonly providerAccountId: Schema.String;
|
|
1249
|
+
}>, Schema.Struct<{
|
|
1250
|
+
readonly type: Schema.Literal<"deny-not-owner">;
|
|
1251
|
+
readonly reason: Schema.Literal<"provider-account-linked-to-different-user">;
|
|
1252
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1253
|
+
readonly providerAccountId: Schema.String;
|
|
1254
|
+
}>, Schema.Struct<{
|
|
1255
|
+
readonly type: Schema.Literal<"deny-last-account">;
|
|
1256
|
+
readonly reason: Schema.Literal<"last-linked-account">;
|
|
1257
|
+
readonly account: Schema.Struct<{
|
|
1258
|
+
readonly accountId: Schema.brand<Schema.String, "auth/OAuthAccountId">;
|
|
1259
|
+
readonly providerId: Schema.brand<Schema.String, "auth/OAuthProviderId">;
|
|
1260
|
+
readonly providerAccountId: Schema.String;
|
|
1261
|
+
}>;
|
|
1262
|
+
}>]>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthUnauthenticatedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
|
|
1263
|
+
export declare class OAuthApi extends OAuthApi_base {
|
|
1264
|
+
}
|
|
1265
|
+
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<{
|
|
1266
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1267
|
+
readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1268
|
+
readonly secret: Schema.optional<Schema.String>;
|
|
1269
|
+
readonly rememberDevice: Schema.optional<Schema.Boolean>;
|
|
1270
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1271
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1272
|
+
readonly expiresAt: Schema.Number;
|
|
1273
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1274
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1275
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1276
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1277
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1278
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1279
|
+
}>>;
|
|
1280
|
+
}>>, 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<{
|
|
1281
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1282
|
+
readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1283
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1284
|
+
readonly status: Schema.Literals<readonly ["pending", "approved", "denied", "expired"]>;
|
|
1285
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1286
|
+
}>>, 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<{
|
|
1287
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1288
|
+
readonly approvalChallengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1289
|
+
readonly rememberDevice: Schema.optional<Schema.Boolean>;
|
|
1290
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1291
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1292
|
+
readonly expiresAt: Schema.Number;
|
|
1293
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1294
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1295
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1296
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1297
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1298
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1299
|
+
}>>;
|
|
1300
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
|
|
1301
|
+
export declare class LoginApprovalApi extends LoginApprovalApi_base {
|
|
1302
|
+
}
|
|
1303
|
+
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<{
|
|
1304
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1305
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1306
|
+
readonly factors: Schema.$Array<Schema.Struct<{
|
|
1307
|
+
readonly type: Schema.Literals<readonly ["totp", "backup-code", "passkey"]>;
|
|
1308
|
+
}>>;
|
|
1309
|
+
}>>, 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<{
|
|
1310
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1311
|
+
readonly userId: Schema.brand<Schema.String, "auth/UserId">;
|
|
1312
|
+
readonly code: Schema.String;
|
|
1313
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1314
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1315
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1316
|
+
readonly expiresAt: Schema.Number;
|
|
1317
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1318
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1319
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1320
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1321
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1322
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1323
|
+
}>>;
|
|
1324
|
+
}>>, 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<{
|
|
1325
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1326
|
+
readonly code: Schema.String;
|
|
1327
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1328
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1329
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1330
|
+
readonly expiresAt: Schema.Number;
|
|
1331
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1332
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1333
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1334
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1335
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1336
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1337
|
+
}>>;
|
|
1338
|
+
}>>, 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<{
|
|
1339
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1340
|
+
readonly userId: Schema.brand<Schema.String, "auth/UserId">;
|
|
1341
|
+
readonly code: Schema.String;
|
|
1342
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1343
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1344
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1345
|
+
readonly expiresAt: Schema.Number;
|
|
1346
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1347
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1348
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1349
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1350
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1351
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1352
|
+
}>>;
|
|
1353
|
+
}>>, 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<{
|
|
1354
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1355
|
+
readonly code: Schema.String;
|
|
1356
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1357
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1358
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1359
|
+
readonly expiresAt: Schema.Number;
|
|
1360
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1361
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1362
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1363
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1364
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1365
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1366
|
+
}>>;
|
|
1367
|
+
}>>, 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<{
|
|
1368
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1369
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1370
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1371
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1372
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1373
|
+
readonly publicKey: Schema.Struct<{
|
|
1374
|
+
readonly challenge: Schema.String;
|
|
1375
|
+
readonly rpId: Schema.String;
|
|
1376
|
+
readonly timeout: Schema.optional<Schema.Number>;
|
|
1377
|
+
readonly allowCredentials: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1378
|
+
readonly type: Schema.Literal<"public-key">;
|
|
1379
|
+
readonly id: Schema.String;
|
|
1380
|
+
readonly transports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1381
|
+
}>>>;
|
|
1382
|
+
readonly userVerification: Schema.optional<Schema.Literals<readonly ["required", "preferred", "discouraged"]>>;
|
|
1383
|
+
}>;
|
|
1384
|
+
}>>, 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<{
|
|
1385
|
+
readonly flowId: Schema.brand<Schema.String, "auth/AuthFlowId">;
|
|
1386
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1387
|
+
readonly credential: Schema.Struct<{
|
|
1388
|
+
readonly id: Schema.String;
|
|
1389
|
+
readonly rawId: Schema.optional<Schema.String>;
|
|
1390
|
+
readonly type: Schema.Literal<"public-key">;
|
|
1391
|
+
readonly response: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
1392
|
+
readonly authenticatorAttachment: Schema.optional<Schema.String>;
|
|
1393
|
+
readonly clientExtensionResults: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1394
|
+
}>;
|
|
1395
|
+
readonly userId: Schema.optional<Schema.brand<Schema.String, "auth/UserId">>;
|
|
1396
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1397
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1398
|
+
readonly type: Schema.Literal<"authenticated">;
|
|
1399
|
+
readonly expiresAt: Schema.Number;
|
|
1400
|
+
readonly aal: Schema.Literals<readonly ["aal1", "aal2", "aal3"]>;
|
|
1401
|
+
readonly amr: Schema.$Array<Schema.String>;
|
|
1402
|
+
readonly mfaVerifiedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1403
|
+
readonly claims: Schema.optional<Schema.Struct<{
|
|
1404
|
+
readonly emailVerified: Schema.optional<Schema.Boolean>;
|
|
1405
|
+
readonly requirements: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1406
|
+
}>>;
|
|
1407
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthPolicyDeniedError | typeof AuthInternalError>, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware, never>, false>;
|
|
1408
|
+
export declare class MfaApi extends MfaApi_base {
|
|
1409
|
+
}
|
|
1410
|
+
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<{
|
|
1411
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1412
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1413
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1414
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1415
|
+
readonly secret: Schema.String;
|
|
1416
|
+
readonly key: Schema.Struct<{
|
|
1417
|
+
readonly keyId: Schema.String;
|
|
1418
|
+
readonly prefix: Schema.String;
|
|
1419
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
1420
|
+
readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1421
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1422
|
+
readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1423
|
+
readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1424
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1425
|
+
}>;
|
|
1426
|
+
}>>, 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<{
|
|
1427
|
+
readonly keys: Schema.$Array<Schema.Struct<{
|
|
1428
|
+
readonly keyId: Schema.String;
|
|
1429
|
+
readonly prefix: Schema.String;
|
|
1430
|
+
readonly scopes: Schema.$Array<Schema.String>;
|
|
1431
|
+
readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1432
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1433
|
+
readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1434
|
+
readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1435
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1436
|
+
}>>;
|
|
1437
|
+
}>>, 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<{
|
|
1438
|
+
readonly keyId: Schema.String;
|
|
1439
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1440
|
+
}>>, 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>;
|
|
1441
|
+
export declare class ApiKeyApi extends ApiKeyApi_base {
|
|
1442
|
+
}
|
|
1443
|
+
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<{
|
|
1444
|
+
readonly refreshToken: Schema.String;
|
|
1445
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1446
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Struct<{
|
|
1447
|
+
readonly accessToken: Schema.String;
|
|
1448
|
+
readonly accessTokenExpiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1449
|
+
readonly refreshToken: Schema.String;
|
|
1450
|
+
readonly refreshTokenRecord: Schema.Struct<{
|
|
1451
|
+
readonly tokenId: Schema.String;
|
|
1452
|
+
readonly familyId: Schema.String;
|
|
1453
|
+
readonly createdAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1454
|
+
readonly expiresAt: Schema.brand<Schema.Number, "auth/UnixMillis">;
|
|
1455
|
+
readonly lastUsedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1456
|
+
readonly rotatedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1457
|
+
readonly replacedById: Schema.optional<Schema.String>;
|
|
1458
|
+
readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1459
|
+
readonly reuseDetectedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1460
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1461
|
+
}>;
|
|
1462
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof AuthBadRequestError | typeof AuthInvalidCredentialsError | typeof AuthInternalError>, AuthSchemaErrorMiddleware, never>, false>;
|
|
1463
|
+
export declare class RefreshTokenApi extends RefreshTokenApi_base {
|
|
1464
|
+
}
|
|
1465
|
+
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<{
|
|
1466
|
+
readonly token: Schema.String;
|
|
1467
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<Schema.Union<readonly [Schema.Struct<{
|
|
1468
|
+
readonly active: Schema.Literal<true>;
|
|
1469
|
+
readonly header: Schema.Struct<{
|
|
1470
|
+
readonly typ: Schema.Literal<"JWT">;
|
|
1471
|
+
readonly alg: Schema.Literals<readonly ["HS256", "RS256", "ES256", "EdDSA"]>;
|
|
1472
|
+
readonly kid: Schema.String;
|
|
1473
|
+
}>;
|
|
1474
|
+
readonly claims: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
1475
|
+
readonly key: Schema.Struct<{
|
|
1476
|
+
readonly keyId: Schema.String;
|
|
1477
|
+
readonly alg: Schema.Literals<readonly ["HS256", "RS256", "ES256", "EdDSA"]>;
|
|
1478
|
+
readonly status: Schema.Literals<readonly ["active", "retired", "disabled"]>;
|
|
1479
|
+
readonly createdAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1480
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1481
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
1482
|
+
}>;
|
|
1483
|
+
readonly jwtId: Schema.optional<Schema.String>;
|
|
1484
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1485
|
+
readonly revoked: Schema.Literal<false>;
|
|
1486
|
+
}>, Schema.Struct<{
|
|
1487
|
+
readonly active: Schema.Literal<false>;
|
|
1488
|
+
readonly reason: Schema.Literals<readonly ["malformed", "unsupported_alg", "unknown_key", "invalid_signature", "expired", "not_yet_valid", "issuer_mismatch", "audience_mismatch", "revoked"]>;
|
|
1489
|
+
readonly jwtId: Schema.optional<Schema.String>;
|
|
1490
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1491
|
+
readonly revokedAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1492
|
+
readonly revokedReason: Schema.optional<Schema.String>;
|
|
1493
|
+
}>]>>, 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<{
|
|
1494
|
+
readonly jwtId: Schema.String;
|
|
1495
|
+
readonly expiresAt: Schema.optional<Schema.brand<Schema.Number, "auth/UnixMillis">>;
|
|
1496
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1497
|
+
}>>, 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>;
|
|
1498
|
+
export declare class JwtApi extends JwtApi_base {
|
|
1499
|
+
}
|
|
1500
|
+
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<{
|
|
1501
|
+
readonly challengeId: Schema.brand<Schema.String, "auth/ChallengeId">;
|
|
1502
|
+
readonly secret: Schema.String;
|
|
1503
|
+
}>>, 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>;
|
|
1504
|
+
export declare class SecurityApi extends SecurityApi_base {
|
|
1505
|
+
}
|
|
1506
|
+
declare const AuthApi_base: HttpApi.HttpApi<"AuthApi", typeof PasswordApi | typeof SessionApi | typeof EmailVerificationApi | typeof EmailOtpApi | typeof MagicLinkApi | typeof LoginApprovalApi | typeof SecurityApi>;
|
|
167
1507
|
export declare class AuthApi extends AuthApi_base {
|
|
168
1508
|
}
|
|
169
|
-
export declare const PasswordApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "password">, never,
|
|
1509
|
+
export declare const PasswordApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "password">, never, Sessions | SessionCookie | PasswordLogin | PasswordRegistration | PasswordReset | PasswordManagement | AuthSchemaErrorMiddleware | AuthHttp | EmailVerificationFlow | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
|
|
170
1510
|
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 |
|
|
172
|
-
export declare const
|
|
173
|
-
export declare const
|
|
1511
|
+
export declare const EmailVerificationApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "emailVerification">, never, Sessions | SessionCookie | AuthSchemaErrorMiddleware | EmailVerificationFlow | EmailVerification | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
|
|
1512
|
+
export declare const EmailOtpApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "emailOtp">, never, EmailOtpLogin | AuthSchemaErrorMiddleware | AuthHttp | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
|
|
1513
|
+
export declare const MagicLinkApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "magicLink">, never, MagicLinkLogin | AuthSchemaErrorMiddleware | AuthHttp | AuthApiRateLimit | AuthOriginCheckMiddleware | AuthRateLimitMiddleware>;
|
|
1514
|
+
export declare const LoginApprovalApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "loginApproval">, never, UserStore | LoginApproval | AuthFlowState | AuthFlow | AuthSchemaErrorMiddleware | AuthHttp | AuthOriginCheckMiddleware>;
|
|
1515
|
+
export declare const SecurityApiLive: Layer.Layer<HttpApiGroup.ApiGroup<"AuthApi", "security">, never, AuthSchemaErrorMiddleware | AuthOriginCheckMiddleware>;
|
|
1516
|
+
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>;
|
|
1517
|
+
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
1518
|
export { AuthResult };
|
|
175
1519
|
//# sourceMappingURL=Api.d.ts.map
|