@effect-auth/core 0.1.0-alpha.1 → 0.1.0-alpha.13
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 +790 -73
- 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 +335 -1
- package/dist/AuditLog.d.ts.map +1 -1
- package/dist/AuditLog.js +318 -1
- package/dist/AuditLog.js.map +1 -1
- package/dist/AuthConfig.d.ts +42 -0
- package/dist/AuthConfig.d.ts.map +1 -0
- package/dist/AuthConfig.js +43 -0
- package/dist/AuthConfig.js.map +1 -0
- package/dist/AuthFlow.d.ts +462 -36
- package/dist/AuthFlow.d.ts.map +1 -1
- package/dist/AuthFlow.js +657 -5
- package/dist/AuthFlow.js.map +1 -1
- package/dist/AuthKernel.d.ts +3 -0
- package/dist/AuthKernel.d.ts.map +1 -0
- package/dist/AuthKernel.js +9 -0
- package/dist/AuthKernel.js.map +1 -0
- package/dist/Challenge.d.ts +24 -4
- package/dist/Challenge.d.ts.map +1 -1
- package/dist/Challenge.js +167 -1
- package/dist/Challenge.js.map +1 -1
- package/dist/Client.d.ts +449 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +985 -0
- package/dist/Client.js.map +1 -0
- package/dist/Crypto.d.ts +6 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +62 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/DomainVerification.d.ts +200 -0
- package/dist/DomainVerification.d.ts.map +1 -0
- package/dist/DomainVerification.js +304 -0
- package/dist/DomainVerification.js.map +1 -0
- package/dist/EffectQbSqliteStorage.d.ts +985 -0
- package/dist/EffectQbSqliteStorage.d.ts.map +1 -0
- package/dist/EffectQbSqliteStorage.js +2824 -0
- package/dist/EffectQbSqliteStorage.js.map +1 -0
- package/dist/EmailOtp.d.ts +120 -0
- package/dist/EmailOtp.d.ts.map +1 -0
- package/dist/EmailOtp.js +286 -0
- package/dist/EmailOtp.js.map +1 -0
- package/dist/EmailVerification.d.ts +121 -0
- package/dist/EmailVerification.d.ts.map +1 -0
- package/dist/EmailVerification.js +200 -0
- package/dist/EmailVerification.js.map +1 -0
- package/dist/HttpApi/Api.d.ts +2410 -0
- package/dist/HttpApi/Api.d.ts.map +1 -0
- package/dist/HttpApi/Api.js +3026 -0
- package/dist/HttpApi/Api.js.map +1 -0
- package/dist/HttpApi/Endpoints.d.ts +1073 -0
- package/dist/HttpApi/Endpoints.d.ts.map +1 -0
- package/dist/HttpApi/Endpoints.js +428 -0
- package/dist/HttpApi/Endpoints.js.map +1 -0
- package/dist/HttpApi/Errors.d.ts +114 -0
- package/dist/HttpApi/Errors.d.ts.map +1 -0
- package/dist/HttpApi/Errors.js +230 -0
- package/dist/HttpApi/Errors.js.map +1 -0
- package/dist/HttpApi/Schemas.d.ts +1254 -0
- package/dist/HttpApi/Schemas.d.ts.map +1 -0
- package/dist/HttpApi/Schemas.js +862 -0
- package/dist/HttpApi/Schemas.js.map +1 -0
- package/dist/HttpApi/Security.d.ts +159 -0
- package/dist/HttpApi/Security.d.ts.map +1 -0
- package/dist/HttpApi/Security.js +530 -0
- package/dist/HttpApi/Security.js.map +1 -0
- package/dist/HttpApi/Transport.d.ts +65 -0
- package/dist/HttpApi/Transport.d.ts.map +1 -0
- package/dist/HttpApi/Transport.js +311 -0
- package/dist/HttpApi/Transport.js.map +1 -0
- package/dist/HttpApi/index.d.ts +8 -0
- package/dist/HttpApi/index.d.ts.map +1 -0
- package/dist/HttpApi/index.js +7 -0
- package/dist/HttpApi/index.js.map +1 -0
- package/dist/HttpApi.d.ts +2 -0
- package/dist/HttpApi.d.ts.map +1 -0
- package/dist/HttpApi.js +2 -0
- package/dist/HttpApi.js.map +1 -0
- package/dist/Identifiers.d.ts +3 -0
- package/dist/Identifiers.d.ts.map +1 -1
- package/dist/Identifiers.js +2 -0
- package/dist/Identifiers.js.map +1 -1
- package/dist/IncidentAction.d.ts +80 -0
- package/dist/IncidentAction.d.ts.map +1 -0
- package/dist/IncidentAction.js +158 -0
- package/dist/IncidentAction.js.map +1 -0
- package/dist/Internal.d.ts +7 -0
- package/dist/Internal.d.ts.map +1 -0
- package/dist/Internal.js +12 -0
- package/dist/Internal.js.map +1 -0
- package/dist/Jwt.d.ts +281 -0
- package/dist/Jwt.d.ts.map +1 -0
- package/dist/Jwt.js +721 -0
- package/dist/Jwt.js.map +1 -0
- 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 +344 -0
- package/dist/LoginRisk.d.ts.map +1 -0
- package/dist/LoginRisk.js +484 -0
- package/dist/LoginRisk.js.map +1 -0
- package/dist/MachineAuth.d.ts +73 -0
- package/dist/MachineAuth.d.ts.map +1 -0
- package/dist/MachineAuth.js +147 -0
- package/dist/MachineAuth.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 +147 -0
- package/dist/Mailer.d.ts.map +1 -0
- package/dist/Mailer.js +208 -0
- package/dist/Mailer.js.map +1 -0
- package/dist/OAuth.d.ts +1890 -0
- package/dist/OAuth.d.ts.map +1 -0
- package/dist/OAuth.js +3063 -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/PasskeySimpleWebAuthn.d.ts +11 -0
- package/dist/PasskeySimpleWebAuthn.d.ts.map +1 -0
- package/dist/PasskeySimpleWebAuthn.js +181 -0
- package/dist/PasskeySimpleWebAuthn.js.map +1 -0
- package/dist/Password.d.ts +237 -0
- package/dist/Password.d.ts.map +1 -0
- package/dist/Password.js +641 -0
- package/dist/Password.js.map +1 -0
- package/dist/Policy.d.ts +7 -4
- package/dist/Policy.d.ts.map +1 -1
- package/dist/Policy.js +28 -5
- package/dist/Policy.js.map +1 -1
- package/dist/Privacy.d.ts +15 -0
- package/dist/Privacy.d.ts.map +1 -1
- package/dist/Privacy.js +58 -1
- package/dist/Privacy.js.map +1 -1
- package/dist/RateLimiter.d.ts +104 -0
- package/dist/RateLimiter.d.ts.map +1 -0
- package/dist/RateLimiter.js +118 -0
- package/dist/RateLimiter.js.map +1 -0
- 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/Retention.d.ts +98 -0
- package/dist/Retention.d.ts.map +1 -0
- package/dist/Retention.js +204 -0
- package/dist/Retention.js.map +1 -0
- package/dist/SecurityTimeline.d.ts +78 -0
- package/dist/SecurityTimeline.d.ts.map +1 -0
- package/dist/SecurityTimeline.js +461 -0
- package/dist/SecurityTimeline.js.map +1 -0
- package/dist/Sessions.d.ts +123 -11
- package/dist/Sessions.d.ts.map +1 -1
- package/dist/Sessions.js +534 -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 +73 -5
- package/dist/Storage.d.ts.map +1 -1
- package/dist/Storage.js +11 -1
- package/dist/Storage.js.map +1 -1
- package/dist/StorageMigrations.d.ts +23 -1
- package/dist/StorageMigrations.d.ts.map +1 -1
- package/dist/StorageMigrations.js +462 -2
- package/dist/StorageMigrations.js.map +1 -1
- package/dist/Testing.d.ts +9 -1
- package/dist/Testing.d.ts.map +1 -1
- package/dist/Testing.js +30 -2
- package/dist/Testing.js.map +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 +127 -0
- package/dist/TrustedDevice.d.ts.map +1 -0
- package/dist/TrustedDevice.js +252 -0
- package/dist/TrustedDevice.js.map +1 -0
- package/dist/WaitUntil.d.ts.map +1 -1
- package/dist/WaitUntil.js +1 -1
- package/dist/WaitUntil.js.map +1 -1
- package/dist/Webhook.d.ts +380 -0
- package/dist/Webhook.d.ts.map +1 -0
- package/dist/Webhook.js +592 -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/alchemy/cloudflare/RateLimitDurableObject.d.ts +34 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.js +30 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.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/cloudflare/RateLimitDurableObject.d.ts +50 -0
- package/dist/cloudflare/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/cloudflare/RateLimitDurableObject.js +51 -0
- package/dist/cloudflare/RateLimitDurableObject.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/RateLimitDurableObject.d.ts +32 -0
- package/dist/internal/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/internal/RateLimitDurableObject.js +80 -0
- package/dist/internal/RateLimitDurableObject.js.map +1 -0
- package/migrations/0002_auth_password.sql +25 -0
- 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/migrations/0012_auth_oauth_provider_token_vault.sql +20 -0
- package/migrations/0013_auth_security_timeline.sql +16 -0
- package/migrations/0014_auth_webhook_outbox.sql +16 -0
- package/migrations/0015_auth_webhook_replay.sql +7 -0
- package/migrations/0016_auth_login_risk_history.sql +23 -0
- package/migrations/0017_auth_audit_log.sql +17 -0
- package/migrations/0018_auth_domain_verification.sql +18 -0
- package/migrations/0019_auth_oauth_authorization_code.sql +17 -0
- package/migrations/0020_auth_oauth_provider_mode_token.sql +24 -0
- package/migrations/0021_auth_oauth_client_secret.sql +14 -0
- package/migrations/0022_auth_oauth_client.sql +15 -0
- package/migrations/0023_auth_oauth_consent.sql +15 -0
- package/package.json +162 -26
- package/dist/D1Kysely.d.ts +0 -40
- package/dist/D1Kysely.d.ts.map +0 -1
- package/dist/D1Kysely.js +0 -75
- package/dist/D1Kysely.js.map +0 -1
- package/dist/KyselyStorage.d.ts +0 -41
- package/dist/KyselyStorage.d.ts.map +0 -1
- package/dist/KyselyStorage.js +0 -176
- package/dist/KyselyStorage.js.map +0 -1
|
@@ -0,0 +1,985 @@
|
|
|
1
|
+
import { Layer } from "effect";
|
|
2
|
+
import { Executor, Query, Scalar, Table } from "effect-qb/sqlite";
|
|
3
|
+
import { AuditLogStore } from "./AuditLog.js";
|
|
4
|
+
import type { AuditLogStoreService, AuthAuditEvent } from "./AuditLog.js";
|
|
5
|
+
import { ApiKeyStore } from "./ApiKey.js";
|
|
6
|
+
import type { ApiKeyMarkUsedInput, ApiKeyRecord, ApiKeyRevokeInput, ApiKeyStoreService } from "./ApiKey.js";
|
|
7
|
+
import { DomainVerificationStore } from "./DomainVerification.js";
|
|
8
|
+
import type { DomainVerificationRecord, DomainVerificationStoreMarkVerifiedInput, DomainVerificationStoreRevokeInput, DomainVerificationStoreService } from "./DomainVerification.js";
|
|
9
|
+
import { UnixMillis } from "./Identifiers.js";
|
|
10
|
+
import { JwtRevocationStore } from "./Jwt.js";
|
|
11
|
+
import type { JwtRevocationRecord, JwtRevocationStoreService } from "./Jwt.js";
|
|
12
|
+
import { LoginApprovalReviewStore } from "./LoginApproval.js";
|
|
13
|
+
import type { LoginApprovalReviewRecord, LoginApprovalReviewStoreService, LoginApprovalReviewerId } from "./LoginApproval.js";
|
|
14
|
+
import { LoginRiskHistory } from "./LoginRisk.js";
|
|
15
|
+
import type { LoginRiskHistoryRecordInput, LoginRiskHistoryService } from "./LoginRisk.js";
|
|
16
|
+
import { OAuthAccountStore, OAuthAuthorizationCodeStore, OAuthClientStore, OAuthConsentStore, OAuthClientSecretStore, OAuthProviderModeTokenStore, OAuthProviderTokenVault } from "./OAuth.js";
|
|
17
|
+
import type { OAuthAccountRecord, OAuthAccountStoreService, OAuthAccountUnlinkInput, OAuthAuthorizationCodeRecord, OAuthAuthorizationCodeStoreMarkConsumedInput, OAuthAuthorizationCodeStoreService, OAuthClientRecord, OAuthClientStoreService, OAuthConsentRecord, OAuthConsentRevokeInput, OAuthConsentStoreService, OAuthClientSecretRecord, OAuthClientSecretStoreMarkUsedInput, OAuthClientSecretStoreRevokeInput, OAuthClientSecretStoreService, OAuthProviderModeTokenRecord, OAuthProviderModeTokenStoreRevokeInput, OAuthProviderModeTokenStoreRotateInput, OAuthProviderModeTokenStoreService, OAuthProviderTokenVaultMarkRevokedInput, OAuthProviderTokenVaultRecord, OAuthProviderTokenVaultService } from "./OAuth.js";
|
|
18
|
+
import { PasskeyCredentialStore } from "./Passkey.js";
|
|
19
|
+
import type { PasskeyCredentialRecord, PasskeyCredentialRevokeInput, PasskeyCredentialStoreService, PasskeyCredentialUpdateSignCountInput } from "./Passkey.js";
|
|
20
|
+
import { RecoveryCodeStore } from "./RecoveryCode.js";
|
|
21
|
+
import type { RecoveryCodeMarkUsedInput, RecoveryCodeRecord, RecoveryCodeRevokeInput, RecoveryCodeStoreService } from "./RecoveryCode.js";
|
|
22
|
+
import { RefreshTokenStore } from "./RefreshToken.js";
|
|
23
|
+
import type { RefreshTokenMarkReuseDetectedInput, RefreshTokenRecord, RefreshTokenRevokeFamilyInput, RefreshTokenRevokeInput, RefreshTokenRotateStoreInput, RefreshTokenStoreService } from "./RefreshToken.js";
|
|
24
|
+
import { SecurityTimelineStore } from "./SecurityTimeline.js";
|
|
25
|
+
import type { SecurityTimelineEvent, SecurityTimelineStoreService } from "./SecurityTimeline.js";
|
|
26
|
+
import type { AuthMethodReference } from "./Sessions.js";
|
|
27
|
+
import { CredentialStore, SessionStore, UserStore, VerificationStore } from "./Storage.js";
|
|
28
|
+
import type { CredentialStoreService, NewPasswordCredentialRow, NewSessionRow, NewUserRow, NewVerificationRow, PasswordCredentialRow, PasswordCredentialUpdatePasswordInput, SessionRefreshStoreInput, SessionRevokeAllForUserStoreInput, SessionRevokeStoreInput, SessionRotateStoreInput, SessionRow, SessionStoreService, SessionUpdateClaimsStoreInput, UserMarkEmailVerifiedInput, UserRow, UserStoreService, VerificationConsumeInput, VerificationRow, VerificationStoreService } from "./Storage.js";
|
|
29
|
+
import { TotpFactorStore } from "./Totp.js";
|
|
30
|
+
import type { TotpFactorConfirmInput, TotpFactorMarkUsedInput, TotpFactorRecord, TotpFactorRevokeInput, TotpFactorStoreService } from "./Totp.js";
|
|
31
|
+
import { TrustedDeviceStore } from "./TrustedDevice.js";
|
|
32
|
+
import type { TrustedDeviceRecord, TrustedDeviceStoreService, TrustedDeviceStoreUpsertInput } from "./TrustedDevice.js";
|
|
33
|
+
import { WebhookOutboxStore, WebhookReplayStore } from "./Webhook.js";
|
|
34
|
+
import type { WebhookOutboxMarkDeadLetteredInput, WebhookOutboxMarkDeliveredInput, WebhookOutboxMarkFailedInput, WebhookOutboxRecord, WebhookOutboxStoreService, WebhookReplayClaimInput, WebhookReplayStoreService } from "./Webhook.js";
|
|
35
|
+
export interface D1EffectQbResult<Row extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>> {
|
|
36
|
+
readonly success?: boolean;
|
|
37
|
+
readonly error?: string;
|
|
38
|
+
readonly results?: readonly Row[];
|
|
39
|
+
}
|
|
40
|
+
export interface D1EffectQbPreparedStatementLike {
|
|
41
|
+
readonly bind: (...values: readonly unknown[]) => D1EffectQbPreparedStatementLike;
|
|
42
|
+
readonly all: <Row extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>>() => Promise<D1EffectQbResult<Row>>;
|
|
43
|
+
}
|
|
44
|
+
export interface D1EffectQbDatabaseLike {
|
|
45
|
+
readonly prepare: (sql: string) => D1EffectQbPreparedStatementLike;
|
|
46
|
+
}
|
|
47
|
+
declare const D1EffectQbError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
48
|
+
readonly _tag: "D1EffectQbError";
|
|
49
|
+
} & Readonly<A>;
|
|
50
|
+
export declare class D1EffectQbError extends D1EffectQbError_base<{
|
|
51
|
+
readonly message: string;
|
|
52
|
+
readonly cause?: unknown;
|
|
53
|
+
}> {
|
|
54
|
+
}
|
|
55
|
+
export interface EffectQbAuthUserSelectedRow {
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly email: string;
|
|
58
|
+
readonly emailVerified: boolean | number | string | null;
|
|
59
|
+
readonly createdAt: number;
|
|
60
|
+
readonly updatedAt: number;
|
|
61
|
+
readonly disabledAt: number | null;
|
|
62
|
+
readonly metadata: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface EffectQbAuthCredentialSelectedRow {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly userId: string;
|
|
67
|
+
readonly type: string;
|
|
68
|
+
readonly passwordHash: string | null;
|
|
69
|
+
readonly createdAt: number;
|
|
70
|
+
readonly updatedAt: number;
|
|
71
|
+
readonly revokedAt: number | null;
|
|
72
|
+
readonly metadata: unknown;
|
|
73
|
+
}
|
|
74
|
+
export interface EffectQbAuthSessionSelectedRow {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly userId: string;
|
|
77
|
+
readonly secretHash: string;
|
|
78
|
+
readonly createdAt: number;
|
|
79
|
+
readonly expiresAt: number;
|
|
80
|
+
readonly authTime: number;
|
|
81
|
+
readonly aal: string;
|
|
82
|
+
readonly amr: string | readonly AuthMethodReference[];
|
|
83
|
+
readonly mfaVerifiedAt: number | null;
|
|
84
|
+
readonly metadata: unknown;
|
|
85
|
+
readonly revokedAt: number | null;
|
|
86
|
+
readonly lastSeenAt: number | null;
|
|
87
|
+
readonly rotatedAt: number | null;
|
|
88
|
+
}
|
|
89
|
+
export interface EffectQbAuthVerificationSelectedRow {
|
|
90
|
+
readonly id: string;
|
|
91
|
+
readonly type: string;
|
|
92
|
+
readonly subject: string;
|
|
93
|
+
readonly secretHash: string | null;
|
|
94
|
+
readonly createdAt: number;
|
|
95
|
+
readonly expiresAt: number;
|
|
96
|
+
readonly metadata: unknown;
|
|
97
|
+
readonly consumedAt: number | null;
|
|
98
|
+
}
|
|
99
|
+
export interface EffectQbAuthAuditLogSelectedRow {
|
|
100
|
+
readonly id: string | null;
|
|
101
|
+
readonly type: string;
|
|
102
|
+
readonly userId: string | null;
|
|
103
|
+
readonly actorUserId: string | null;
|
|
104
|
+
readonly occurredAt: number;
|
|
105
|
+
readonly requestIpHash: string | null;
|
|
106
|
+
readonly requestUserAgentHash: string | null;
|
|
107
|
+
readonly event: unknown;
|
|
108
|
+
readonly createdAt: number;
|
|
109
|
+
}
|
|
110
|
+
export interface EffectQbAuthLoginApprovalReviewSelectedRow {
|
|
111
|
+
readonly approvalChallengeId: string;
|
|
112
|
+
readonly flowId: string;
|
|
113
|
+
readonly userId: string;
|
|
114
|
+
readonly channel: string;
|
|
115
|
+
readonly reason: string;
|
|
116
|
+
readonly sessionBinding: string;
|
|
117
|
+
readonly sameDeviceRequired: boolean | number | string | null;
|
|
118
|
+
readonly status: string;
|
|
119
|
+
readonly createdAt: number;
|
|
120
|
+
readonly expiresAt: number;
|
|
121
|
+
readonly reviewedAt: number | null;
|
|
122
|
+
readonly reviewedBy: string | null;
|
|
123
|
+
readonly deniedReason: string | null;
|
|
124
|
+
readonly risk: unknown;
|
|
125
|
+
readonly metadata: unknown;
|
|
126
|
+
readonly reviewMetadata: unknown;
|
|
127
|
+
}
|
|
128
|
+
export interface EffectQbAuthLoginRiskHistorySelectedRow {
|
|
129
|
+
readonly id: string;
|
|
130
|
+
readonly userId: string;
|
|
131
|
+
readonly occurredAt: number;
|
|
132
|
+
readonly outcome: string;
|
|
133
|
+
readonly method: string;
|
|
134
|
+
readonly amr: string | readonly AuthMethodReference[];
|
|
135
|
+
readonly aal: string;
|
|
136
|
+
readonly deviceStatus: string;
|
|
137
|
+
readonly deviceKey: string | null;
|
|
138
|
+
readonly locationKey: string | null;
|
|
139
|
+
readonly country: string | null;
|
|
140
|
+
readonly region: string | null;
|
|
141
|
+
readonly latitudeMicro: number | null;
|
|
142
|
+
readonly longitudeMicro: number | null;
|
|
143
|
+
readonly riskLevel: string | null;
|
|
144
|
+
readonly createdAt: number;
|
|
145
|
+
}
|
|
146
|
+
export interface EffectQbAuthTrustedDeviceSelectedRow {
|
|
147
|
+
readonly userId: string;
|
|
148
|
+
readonly tokenHash: string;
|
|
149
|
+
readonly createdAt: number;
|
|
150
|
+
readonly lastSeenAt: number;
|
|
151
|
+
readonly expiresAt: number;
|
|
152
|
+
readonly metadata: unknown;
|
|
153
|
+
}
|
|
154
|
+
export interface EffectQbAuthPasskeyCredentialSelectedRow {
|
|
155
|
+
readonly id: string;
|
|
156
|
+
readonly userId: string;
|
|
157
|
+
readonly credentialId: string;
|
|
158
|
+
readonly publicKey: string;
|
|
159
|
+
readonly signCount: number;
|
|
160
|
+
readonly transports: unknown;
|
|
161
|
+
readonly backedUp: boolean | number | string | null;
|
|
162
|
+
readonly createdAt: number;
|
|
163
|
+
readonly lastUsedAt: number | null;
|
|
164
|
+
readonly revokedAt: number | null;
|
|
165
|
+
readonly metadata: unknown;
|
|
166
|
+
}
|
|
167
|
+
export interface EffectQbAuthTotpFactorSelectedRow {
|
|
168
|
+
readonly id: string;
|
|
169
|
+
readonly userId: string;
|
|
170
|
+
readonly secret: string;
|
|
171
|
+
readonly algorithm: string;
|
|
172
|
+
readonly digits: number;
|
|
173
|
+
readonly period: number;
|
|
174
|
+
readonly createdAt: number;
|
|
175
|
+
readonly confirmedAt: number | null;
|
|
176
|
+
readonly lastUsedAt: number | null;
|
|
177
|
+
readonly revokedAt: number | null;
|
|
178
|
+
readonly metadata: unknown;
|
|
179
|
+
}
|
|
180
|
+
export interface EffectQbAuthRecoveryCodeSelectedRow {
|
|
181
|
+
readonly id: string;
|
|
182
|
+
readonly userId: string;
|
|
183
|
+
readonly codeHash: string;
|
|
184
|
+
readonly createdAt: number;
|
|
185
|
+
readonly usedAt: number | null;
|
|
186
|
+
readonly revokedAt: number | null;
|
|
187
|
+
readonly metadata: unknown;
|
|
188
|
+
}
|
|
189
|
+
export interface EffectQbAuthApiKeySelectedRow {
|
|
190
|
+
readonly id: string;
|
|
191
|
+
readonly userId: string;
|
|
192
|
+
readonly prefix: string;
|
|
193
|
+
readonly secretHash: string;
|
|
194
|
+
readonly scopes: unknown;
|
|
195
|
+
readonly createdAt: number;
|
|
196
|
+
readonly expiresAt: number | null;
|
|
197
|
+
readonly lastUsedAt: number | null;
|
|
198
|
+
readonly revokedAt: number | null;
|
|
199
|
+
readonly metadata: unknown;
|
|
200
|
+
}
|
|
201
|
+
export interface EffectQbAuthRefreshTokenSelectedRow {
|
|
202
|
+
readonly id: string;
|
|
203
|
+
readonly familyId: string;
|
|
204
|
+
readonly userId: string;
|
|
205
|
+
readonly secretHash: string;
|
|
206
|
+
readonly createdAt: number;
|
|
207
|
+
readonly expiresAt: number;
|
|
208
|
+
readonly lastUsedAt: number | null;
|
|
209
|
+
readonly rotatedAt: number | null;
|
|
210
|
+
readonly replacedById: string | null;
|
|
211
|
+
readonly revokedAt: number | null;
|
|
212
|
+
readonly reuseDetectedAt: number | null;
|
|
213
|
+
readonly metadata: unknown;
|
|
214
|
+
}
|
|
215
|
+
export interface EffectQbAuthJwtRevocationSelectedRow {
|
|
216
|
+
readonly jwtId: string;
|
|
217
|
+
readonly revokedAt: number;
|
|
218
|
+
readonly expiresAt: number | null;
|
|
219
|
+
readonly reason: string | null;
|
|
220
|
+
}
|
|
221
|
+
export interface EffectQbAuthOAuthAccountSelectedRow {
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly providerId: string;
|
|
224
|
+
readonly providerAccountId: string;
|
|
225
|
+
readonly userId: string;
|
|
226
|
+
readonly email: string | null;
|
|
227
|
+
readonly emailVerified: boolean | number | string | null;
|
|
228
|
+
readonly createdAt: number;
|
|
229
|
+
readonly updatedAt: number;
|
|
230
|
+
readonly unlinkedAt: number | null;
|
|
231
|
+
readonly metadata: unknown;
|
|
232
|
+
}
|
|
233
|
+
export interface EffectQbAuthOAuthProviderTokenVaultSelectedRow {
|
|
234
|
+
readonly accountId: string;
|
|
235
|
+
readonly userId: string;
|
|
236
|
+
readonly providerId: string;
|
|
237
|
+
readonly providerAccountId: string;
|
|
238
|
+
readonly accessTokenCiphertext: string;
|
|
239
|
+
readonly refreshTokenCiphertext: string | null;
|
|
240
|
+
readonly idTokenCiphertext: string | null;
|
|
241
|
+
readonly tokenType: string;
|
|
242
|
+
readonly scopes: unknown;
|
|
243
|
+
readonly expiresAt: number | null;
|
|
244
|
+
readonly updatedAt: number;
|
|
245
|
+
readonly revokedAt: number | null;
|
|
246
|
+
readonly revocationReason: string | null;
|
|
247
|
+
}
|
|
248
|
+
export interface EffectQbAuthOAuthClientSelectedRow {
|
|
249
|
+
readonly id: string;
|
|
250
|
+
readonly type: string;
|
|
251
|
+
readonly status: string;
|
|
252
|
+
readonly name: string | null;
|
|
253
|
+
readonly redirectUris: unknown;
|
|
254
|
+
readonly allowedGrantTypes: unknown;
|
|
255
|
+
readonly allowedResponseTypes: unknown;
|
|
256
|
+
readonly allowedScopes: unknown;
|
|
257
|
+
readonly createdAt: number | null;
|
|
258
|
+
readonly updatedAt: number | null;
|
|
259
|
+
readonly metadata: unknown;
|
|
260
|
+
}
|
|
261
|
+
export interface EffectQbAuthOAuthConsentSelectedRow {
|
|
262
|
+
readonly id: string;
|
|
263
|
+
readonly userId: string;
|
|
264
|
+
readonly clientId: string;
|
|
265
|
+
readonly scopes: unknown;
|
|
266
|
+
readonly grantedAt: number;
|
|
267
|
+
readonly expiresAt: number | null;
|
|
268
|
+
readonly revokedAt: number | null;
|
|
269
|
+
readonly metadata: unknown;
|
|
270
|
+
}
|
|
271
|
+
export interface EffectQbAuthOAuthAuthorizationCodeSelectedRow {
|
|
272
|
+
readonly codeHash: string;
|
|
273
|
+
readonly clientId: string;
|
|
274
|
+
readonly subject: string;
|
|
275
|
+
readonly redirectUri: string;
|
|
276
|
+
readonly scopes: unknown;
|
|
277
|
+
readonly codeChallenge: string | null;
|
|
278
|
+
readonly codeChallengeMethod: string | null;
|
|
279
|
+
readonly issuedAt: number;
|
|
280
|
+
readonly expiresAt: number;
|
|
281
|
+
readonly consumedAt: number | null;
|
|
282
|
+
readonly metadata: unknown;
|
|
283
|
+
}
|
|
284
|
+
export interface EffectQbAuthOAuthClientSecretSelectedRow {
|
|
285
|
+
readonly prefix: string;
|
|
286
|
+
readonly clientId: string;
|
|
287
|
+
readonly secretHash: string;
|
|
288
|
+
readonly authenticationMethods: unknown;
|
|
289
|
+
readonly createdAt: number;
|
|
290
|
+
readonly expiresAt: number | null;
|
|
291
|
+
readonly lastUsedAt: number | null;
|
|
292
|
+
readonly revokedAt: number | null;
|
|
293
|
+
readonly metadata: unknown;
|
|
294
|
+
}
|
|
295
|
+
export interface EffectQbAuthOAuthProviderModeTokenSelectedRow {
|
|
296
|
+
readonly tokenHash: string;
|
|
297
|
+
readonly tokenType: string;
|
|
298
|
+
readonly clientId: string;
|
|
299
|
+
readonly subject: string;
|
|
300
|
+
readonly scopes: unknown;
|
|
301
|
+
readonly issuedAt: number;
|
|
302
|
+
readonly expiresAt: number;
|
|
303
|
+
readonly issuer: string | null;
|
|
304
|
+
readonly audience: unknown;
|
|
305
|
+
readonly jwtId: string | null;
|
|
306
|
+
readonly revokedAt: number | null;
|
|
307
|
+
readonly revocationReason: string | null;
|
|
308
|
+
readonly rotatedAt: number | null;
|
|
309
|
+
readonly replacedByTokenHash: string | null;
|
|
310
|
+
readonly metadata: unknown;
|
|
311
|
+
}
|
|
312
|
+
export interface EffectQbAuthDomainVerificationSelectedRow {
|
|
313
|
+
readonly id: string;
|
|
314
|
+
readonly ownerId: string;
|
|
315
|
+
readonly domain: string;
|
|
316
|
+
readonly proofMethod: string;
|
|
317
|
+
readonly proofToken: string;
|
|
318
|
+
readonly status: string;
|
|
319
|
+
readonly createdAt: number;
|
|
320
|
+
readonly expiresAt: number;
|
|
321
|
+
readonly verifiedAt: number | null;
|
|
322
|
+
readonly revokedAt: number | null;
|
|
323
|
+
readonly lastCheckedAt: number | null;
|
|
324
|
+
readonly metadata: unknown;
|
|
325
|
+
}
|
|
326
|
+
export interface EffectQbAuthSecurityTimelineSelectedRow {
|
|
327
|
+
readonly id: string;
|
|
328
|
+
readonly userId: string;
|
|
329
|
+
readonly type: string;
|
|
330
|
+
readonly category: string;
|
|
331
|
+
readonly severity: string;
|
|
332
|
+
readonly occurredAt: number;
|
|
333
|
+
readonly summary: string;
|
|
334
|
+
readonly actor: unknown;
|
|
335
|
+
readonly request: unknown;
|
|
336
|
+
readonly metadata: unknown;
|
|
337
|
+
}
|
|
338
|
+
export interface EffectQbAuthWebhookOutboxSelectedRow {
|
|
339
|
+
readonly id: string;
|
|
340
|
+
readonly endpointKey: string;
|
|
341
|
+
readonly event: unknown;
|
|
342
|
+
readonly status: string;
|
|
343
|
+
readonly attempts: number;
|
|
344
|
+
readonly nextAttemptAt: number;
|
|
345
|
+
readonly createdAt: number;
|
|
346
|
+
readonly updatedAt: number;
|
|
347
|
+
readonly deliveredAt: number | null;
|
|
348
|
+
readonly lastError: string | null;
|
|
349
|
+
}
|
|
350
|
+
export interface EffectQbAuthWebhookReplaySelectedRow {
|
|
351
|
+
readonly id: string;
|
|
352
|
+
readonly expiresAt: number;
|
|
353
|
+
readonly createdAt: number;
|
|
354
|
+
}
|
|
355
|
+
declare const authSqliteTablesTypeId: unique symbol;
|
|
356
|
+
export interface AuthSqliteTableNames {
|
|
357
|
+
readonly user?: string;
|
|
358
|
+
readonly credential?: string;
|
|
359
|
+
readonly session?: string;
|
|
360
|
+
readonly verification?: string;
|
|
361
|
+
readonly auditLog?: string;
|
|
362
|
+
readonly loginApprovalReview?: string;
|
|
363
|
+
readonly loginRiskHistory?: string;
|
|
364
|
+
readonly trustedDevice?: string;
|
|
365
|
+
readonly passkeyCredential?: string;
|
|
366
|
+
readonly totpFactor?: string;
|
|
367
|
+
readonly recoveryCode?: string;
|
|
368
|
+
readonly apiKey?: string;
|
|
369
|
+
readonly refreshToken?: string;
|
|
370
|
+
readonly jwtRevocation?: string;
|
|
371
|
+
readonly oauthAccount?: string;
|
|
372
|
+
readonly oauthClient?: string;
|
|
373
|
+
readonly oauthConsent?: string;
|
|
374
|
+
readonly oauthAuthorizationCode?: string;
|
|
375
|
+
readonly oauthClientSecret?: string;
|
|
376
|
+
readonly oauthProviderModeToken?: string;
|
|
377
|
+
readonly oauthProviderTokenVault?: string;
|
|
378
|
+
readonly domainVerification?: string;
|
|
379
|
+
readonly securityTimeline?: string;
|
|
380
|
+
readonly webhookOutbox?: string;
|
|
381
|
+
readonly webhookReplay?: string;
|
|
382
|
+
}
|
|
383
|
+
type EffectQbSqliteTable = Table.AnyTable;
|
|
384
|
+
type EffectQbInsertInput<TableValue extends EffectQbSqliteTable> = Query.MutationInputOf<Table.InsertOf<TableValue>>;
|
|
385
|
+
type EffectQbUpdateInput<TableValue extends EffectQbSqliteTable> = Query.MutationInputOf<Table.UpdateOf<TableValue>>;
|
|
386
|
+
type EffectQbSqliteExpression = Scalar.Scalar<unknown, Scalar.DbType.Any & {
|
|
387
|
+
readonly dialect: "sqlite";
|
|
388
|
+
}, Scalar.Nullability, "sqlite", Scalar.ScalarKind, Scalar.BindingId, string>;
|
|
389
|
+
type EffectQbSelection = Readonly<Record<string, EffectQbSqliteExpression>>;
|
|
390
|
+
export interface EffectQbAuthUserTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
391
|
+
readonly table: TableValue;
|
|
392
|
+
readonly select: EffectQbSelection & {
|
|
393
|
+
readonly id: EffectQbSqliteExpression;
|
|
394
|
+
readonly email: EffectQbSqliteExpression;
|
|
395
|
+
readonly emailVerified: EffectQbSqliteExpression;
|
|
396
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
397
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
398
|
+
readonly disabledAt: EffectQbSqliteExpression;
|
|
399
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
400
|
+
};
|
|
401
|
+
readonly insert: (row: NewUserRow) => EffectQbInsertInput<TableValue>;
|
|
402
|
+
readonly markEmailVerified: (input: UserMarkEmailVerifiedInput) => EffectQbUpdateInput<TableValue>;
|
|
403
|
+
readonly decode?: (row: EffectQbAuthUserSelectedRow) => UserRow;
|
|
404
|
+
}
|
|
405
|
+
export interface EffectQbAuthCredentialTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
406
|
+
readonly table: TableValue;
|
|
407
|
+
readonly select: EffectQbSelection & {
|
|
408
|
+
readonly id: EffectQbSqliteExpression;
|
|
409
|
+
readonly userId: EffectQbSqliteExpression;
|
|
410
|
+
readonly type: EffectQbSqliteExpression;
|
|
411
|
+
readonly passwordHash: EffectQbSqliteExpression;
|
|
412
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
413
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
414
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
415
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
416
|
+
};
|
|
417
|
+
readonly insertPassword: (row: NewPasswordCredentialRow) => EffectQbInsertInput<TableValue>;
|
|
418
|
+
readonly updatePassword: (input: PasswordCredentialUpdatePasswordInput) => EffectQbUpdateInput<TableValue>;
|
|
419
|
+
readonly decodePassword?: (row: EffectQbAuthCredentialSelectedRow) => PasswordCredentialRow;
|
|
420
|
+
}
|
|
421
|
+
export type EffectQbSessionRevokeInput = SessionRevokeStoreInput | SessionRevokeAllForUserStoreInput;
|
|
422
|
+
export interface EffectQbAuthSessionTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
423
|
+
readonly table: TableValue;
|
|
424
|
+
readonly select: EffectQbSelection & {
|
|
425
|
+
readonly id: EffectQbSqliteExpression;
|
|
426
|
+
readonly userId: EffectQbSqliteExpression;
|
|
427
|
+
readonly secretHash: EffectQbSqliteExpression;
|
|
428
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
429
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
430
|
+
readonly authTime: EffectQbSqliteExpression;
|
|
431
|
+
readonly aal: EffectQbSqliteExpression;
|
|
432
|
+
readonly amr: EffectQbSqliteExpression;
|
|
433
|
+
readonly mfaVerifiedAt: EffectQbSqliteExpression;
|
|
434
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
435
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
436
|
+
readonly lastSeenAt: EffectQbSqliteExpression;
|
|
437
|
+
readonly rotatedAt: EffectQbSqliteExpression;
|
|
438
|
+
};
|
|
439
|
+
readonly insert: (row: NewSessionRow) => EffectQbInsertInput<TableValue>;
|
|
440
|
+
readonly refresh: (input: SessionRefreshStoreInput) => EffectQbUpdateInput<TableValue>;
|
|
441
|
+
readonly rotate: (input: SessionRotateStoreInput) => EffectQbUpdateInput<TableValue>;
|
|
442
|
+
readonly updateClaims: (row: SessionRow, input: SessionUpdateClaimsStoreInput) => EffectQbUpdateInput<TableValue>;
|
|
443
|
+
readonly revoke: (input: EffectQbSessionRevokeInput) => EffectQbUpdateInput<TableValue>;
|
|
444
|
+
readonly decode?: (row: EffectQbAuthSessionSelectedRow) => SessionRow;
|
|
445
|
+
}
|
|
446
|
+
export interface EffectQbAuthVerificationTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
447
|
+
readonly table: TableValue;
|
|
448
|
+
readonly select: EffectQbSelection & {
|
|
449
|
+
readonly id: EffectQbSqliteExpression;
|
|
450
|
+
readonly type: EffectQbSqliteExpression;
|
|
451
|
+
readonly subject: EffectQbSqliteExpression;
|
|
452
|
+
readonly secretHash: EffectQbSqliteExpression;
|
|
453
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
454
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
455
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
456
|
+
readonly consumedAt: EffectQbSqliteExpression;
|
|
457
|
+
};
|
|
458
|
+
readonly insert: (row: NewVerificationRow) => EffectQbInsertInput<TableValue>;
|
|
459
|
+
readonly consume: (input: VerificationConsumeInput) => EffectQbUpdateInput<TableValue>;
|
|
460
|
+
readonly decode?: (row: EffectQbAuthVerificationSelectedRow) => VerificationRow;
|
|
461
|
+
}
|
|
462
|
+
export interface EffectQbAuthAuditLogTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
463
|
+
readonly table: TableValue;
|
|
464
|
+
readonly select: EffectQbSelection & {
|
|
465
|
+
readonly id: EffectQbSqliteExpression;
|
|
466
|
+
readonly type: EffectQbSqliteExpression;
|
|
467
|
+
readonly userId: EffectQbSqliteExpression;
|
|
468
|
+
readonly actorUserId: EffectQbSqliteExpression;
|
|
469
|
+
readonly occurredAt: EffectQbSqliteExpression;
|
|
470
|
+
readonly requestIpHash: EffectQbSqliteExpression;
|
|
471
|
+
readonly requestUserAgentHash: EffectQbSqliteExpression;
|
|
472
|
+
readonly event: EffectQbSqliteExpression;
|
|
473
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
474
|
+
};
|
|
475
|
+
readonly insert: (event: AuthAuditEvent, createdAt: UnixMillis) => EffectQbInsertInput<TableValue>;
|
|
476
|
+
readonly decode?: (row: EffectQbAuthAuditLogSelectedRow) => AuthAuditEvent;
|
|
477
|
+
}
|
|
478
|
+
export interface EffectQbAuthLoginApprovalReviewTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
479
|
+
readonly table: TableValue;
|
|
480
|
+
readonly select: EffectQbSelection & {
|
|
481
|
+
readonly approvalChallengeId: EffectQbSqliteExpression;
|
|
482
|
+
readonly flowId: EffectQbSqliteExpression;
|
|
483
|
+
readonly userId: EffectQbSqliteExpression;
|
|
484
|
+
readonly channel: EffectQbSqliteExpression;
|
|
485
|
+
readonly reason: EffectQbSqliteExpression;
|
|
486
|
+
readonly sessionBinding: EffectQbSqliteExpression;
|
|
487
|
+
readonly sameDeviceRequired: EffectQbSqliteExpression;
|
|
488
|
+
readonly status: EffectQbSqliteExpression;
|
|
489
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
490
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
491
|
+
readonly reviewedAt: EffectQbSqliteExpression;
|
|
492
|
+
readonly reviewedBy: EffectQbSqliteExpression;
|
|
493
|
+
readonly deniedReason: EffectQbSqliteExpression;
|
|
494
|
+
readonly risk: EffectQbSqliteExpression;
|
|
495
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
496
|
+
readonly reviewMetadata: EffectQbSqliteExpression;
|
|
497
|
+
};
|
|
498
|
+
readonly insertPending: (row: LoginApprovalReviewRecord) => EffectQbInsertInput<TableValue>;
|
|
499
|
+
readonly approve: (input: {
|
|
500
|
+
readonly reviewedAt: UnixMillis;
|
|
501
|
+
readonly reviewedBy?: LoginApprovalReviewerId;
|
|
502
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
503
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
504
|
+
readonly deny: (input: {
|
|
505
|
+
readonly reviewedAt: UnixMillis;
|
|
506
|
+
readonly reviewedBy?: LoginApprovalReviewerId;
|
|
507
|
+
readonly reason?: string;
|
|
508
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
509
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
510
|
+
readonly decode?: (row: EffectQbAuthLoginApprovalReviewSelectedRow) => LoginApprovalReviewRecord;
|
|
511
|
+
}
|
|
512
|
+
export interface EffectQbAuthLoginRiskHistoryTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
513
|
+
readonly table: TableValue;
|
|
514
|
+
readonly select: EffectQbSelection & {
|
|
515
|
+
readonly id: EffectQbSqliteExpression;
|
|
516
|
+
readonly userId: EffectQbSqliteExpression;
|
|
517
|
+
readonly occurredAt: EffectQbSqliteExpression;
|
|
518
|
+
readonly outcome: EffectQbSqliteExpression;
|
|
519
|
+
readonly method: EffectQbSqliteExpression;
|
|
520
|
+
readonly amr: EffectQbSqliteExpression;
|
|
521
|
+
readonly aal: EffectQbSqliteExpression;
|
|
522
|
+
readonly deviceStatus: EffectQbSqliteExpression;
|
|
523
|
+
readonly deviceKey: EffectQbSqliteExpression;
|
|
524
|
+
readonly locationKey: EffectQbSqliteExpression;
|
|
525
|
+
readonly country: EffectQbSqliteExpression;
|
|
526
|
+
readonly region: EffectQbSqliteExpression;
|
|
527
|
+
readonly latitudeMicro: EffectQbSqliteExpression;
|
|
528
|
+
readonly longitudeMicro: EffectQbSqliteExpression;
|
|
529
|
+
readonly riskLevel: EffectQbSqliteExpression;
|
|
530
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
531
|
+
};
|
|
532
|
+
readonly insert: (row: LoginRiskHistoryRecordInput & {
|
|
533
|
+
readonly createdAt: UnixMillis;
|
|
534
|
+
}) => EffectQbInsertInput<TableValue>;
|
|
535
|
+
readonly decode?: (row: EffectQbAuthLoginRiskHistorySelectedRow) => LoginRiskHistoryRecordInput & {
|
|
536
|
+
readonly createdAt: UnixMillis;
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
export interface EffectQbAuthTrustedDeviceTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
540
|
+
readonly table: TableValue;
|
|
541
|
+
readonly select: EffectQbSelection & {
|
|
542
|
+
readonly userId: EffectQbSqliteExpression;
|
|
543
|
+
readonly tokenHash: EffectQbSqliteExpression;
|
|
544
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
545
|
+
readonly lastSeenAt: EffectQbSqliteExpression;
|
|
546
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
547
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
548
|
+
};
|
|
549
|
+
readonly insert: (input: TrustedDeviceStoreUpsertInput, createdAt: UnixMillis) => EffectQbInsertInput<TableValue>;
|
|
550
|
+
readonly update: (input: TrustedDeviceStoreUpsertInput, existing: TrustedDeviceRecord) => EffectQbUpdateInput<TableValue>;
|
|
551
|
+
readonly decode?: (row: EffectQbAuthTrustedDeviceSelectedRow) => TrustedDeviceRecord;
|
|
552
|
+
}
|
|
553
|
+
export interface EffectQbAuthPasskeyCredentialTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
554
|
+
readonly table: TableValue;
|
|
555
|
+
readonly select: EffectQbSelection & {
|
|
556
|
+
readonly id: EffectQbSqliteExpression;
|
|
557
|
+
readonly userId: EffectQbSqliteExpression;
|
|
558
|
+
readonly credentialId: EffectQbSqliteExpression;
|
|
559
|
+
readonly publicKey: EffectQbSqliteExpression;
|
|
560
|
+
readonly signCount: EffectQbSqliteExpression;
|
|
561
|
+
readonly transports: EffectQbSqliteExpression;
|
|
562
|
+
readonly backedUp: EffectQbSqliteExpression;
|
|
563
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
564
|
+
readonly lastUsedAt: EffectQbSqliteExpression;
|
|
565
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
566
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
567
|
+
};
|
|
568
|
+
readonly insert: (row: PasskeyCredentialRecord) => EffectQbInsertInput<TableValue>;
|
|
569
|
+
readonly updateSignCount: (input: PasskeyCredentialUpdateSignCountInput) => EffectQbUpdateInput<TableValue>;
|
|
570
|
+
readonly revoke: (input: PasskeyCredentialRevokeInput, row: PasskeyCredentialRecord) => EffectQbUpdateInput<TableValue>;
|
|
571
|
+
readonly decode?: (row: EffectQbAuthPasskeyCredentialSelectedRow) => PasskeyCredentialRecord;
|
|
572
|
+
}
|
|
573
|
+
export interface EffectQbAuthTotpFactorTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
574
|
+
readonly table: TableValue;
|
|
575
|
+
readonly select: EffectQbSelection & {
|
|
576
|
+
readonly id: EffectQbSqliteExpression;
|
|
577
|
+
readonly userId: EffectQbSqliteExpression;
|
|
578
|
+
readonly secret: EffectQbSqliteExpression;
|
|
579
|
+
readonly algorithm: EffectQbSqliteExpression;
|
|
580
|
+
readonly digits: EffectQbSqliteExpression;
|
|
581
|
+
readonly period: EffectQbSqliteExpression;
|
|
582
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
583
|
+
readonly confirmedAt: EffectQbSqliteExpression;
|
|
584
|
+
readonly lastUsedAt: EffectQbSqliteExpression;
|
|
585
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
586
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
587
|
+
};
|
|
588
|
+
readonly insert: (row: TotpFactorRecord) => EffectQbInsertInput<TableValue>;
|
|
589
|
+
readonly confirm: (input: TotpFactorConfirmInput) => EffectQbUpdateInput<TableValue>;
|
|
590
|
+
readonly markUsed: (input: TotpFactorMarkUsedInput) => EffectQbUpdateInput<TableValue>;
|
|
591
|
+
readonly revoke: (input: TotpFactorRevokeInput, row: TotpFactorRecord) => EffectQbUpdateInput<TableValue>;
|
|
592
|
+
readonly decode?: (row: EffectQbAuthTotpFactorSelectedRow) => TotpFactorRecord;
|
|
593
|
+
}
|
|
594
|
+
export interface EffectQbAuthRecoveryCodeTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
595
|
+
readonly table: TableValue;
|
|
596
|
+
readonly select: EffectQbSelection & {
|
|
597
|
+
readonly id: EffectQbSqliteExpression;
|
|
598
|
+
readonly userId: EffectQbSqliteExpression;
|
|
599
|
+
readonly codeHash: EffectQbSqliteExpression;
|
|
600
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
601
|
+
readonly usedAt: EffectQbSqliteExpression;
|
|
602
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
603
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
604
|
+
};
|
|
605
|
+
readonly insert: (row: RecoveryCodeRecord) => EffectQbInsertInput<TableValue>;
|
|
606
|
+
readonly markUsed: (input: RecoveryCodeMarkUsedInput) => EffectQbUpdateInput<TableValue>;
|
|
607
|
+
readonly revoke: (input: RecoveryCodeRevokeInput, row: RecoveryCodeRecord) => EffectQbUpdateInput<TableValue>;
|
|
608
|
+
readonly decode?: (row: EffectQbAuthRecoveryCodeSelectedRow) => RecoveryCodeRecord;
|
|
609
|
+
}
|
|
610
|
+
export interface EffectQbAuthApiKeyTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
611
|
+
readonly table: TableValue;
|
|
612
|
+
readonly select: EffectQbSelection & {
|
|
613
|
+
readonly id: EffectQbSqliteExpression;
|
|
614
|
+
readonly userId: EffectQbSqliteExpression;
|
|
615
|
+
readonly prefix: EffectQbSqliteExpression;
|
|
616
|
+
readonly secretHash: EffectQbSqliteExpression;
|
|
617
|
+
readonly scopes: EffectQbSqliteExpression;
|
|
618
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
619
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
620
|
+
readonly lastUsedAt: EffectQbSqliteExpression;
|
|
621
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
622
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
623
|
+
};
|
|
624
|
+
readonly insert: (row: ApiKeyRecord) => EffectQbInsertInput<TableValue>;
|
|
625
|
+
readonly markUsed: (input: ApiKeyMarkUsedInput) => EffectQbUpdateInput<TableValue>;
|
|
626
|
+
readonly revoke: (input: ApiKeyRevokeInput, row: ApiKeyRecord) => EffectQbUpdateInput<TableValue>;
|
|
627
|
+
readonly decode?: (row: EffectQbAuthApiKeySelectedRow) => ApiKeyRecord;
|
|
628
|
+
}
|
|
629
|
+
export interface EffectQbAuthRefreshTokenTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
630
|
+
readonly table: TableValue;
|
|
631
|
+
readonly select: EffectQbSelection & {
|
|
632
|
+
readonly id: EffectQbSqliteExpression;
|
|
633
|
+
readonly familyId: EffectQbSqliteExpression;
|
|
634
|
+
readonly userId: EffectQbSqliteExpression;
|
|
635
|
+
readonly secretHash: EffectQbSqliteExpression;
|
|
636
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
637
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
638
|
+
readonly lastUsedAt: EffectQbSqliteExpression;
|
|
639
|
+
readonly rotatedAt: EffectQbSqliteExpression;
|
|
640
|
+
readonly replacedById: EffectQbSqliteExpression;
|
|
641
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
642
|
+
readonly reuseDetectedAt: EffectQbSqliteExpression;
|
|
643
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
644
|
+
};
|
|
645
|
+
readonly insert: (row: RefreshTokenRecord) => EffectQbInsertInput<TableValue>;
|
|
646
|
+
readonly rotate: (input: RefreshTokenRotateStoreInput) => EffectQbUpdateInput<TableValue>;
|
|
647
|
+
readonly markReuseDetected: (input: RefreshTokenMarkReuseDetectedInput) => EffectQbUpdateInput<TableValue>;
|
|
648
|
+
readonly revoke: (input: RefreshTokenRevokeInput, row: RefreshTokenRecord) => EffectQbUpdateInput<TableValue>;
|
|
649
|
+
readonly revokeFamily: (input: RefreshTokenRevokeFamilyInput, row: RefreshTokenRecord) => EffectQbUpdateInput<TableValue>;
|
|
650
|
+
readonly decode?: (row: EffectQbAuthRefreshTokenSelectedRow) => RefreshTokenRecord;
|
|
651
|
+
}
|
|
652
|
+
export interface EffectQbAuthJwtRevocationTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
653
|
+
readonly table: TableValue;
|
|
654
|
+
readonly select: EffectQbSelection & {
|
|
655
|
+
readonly jwtId: EffectQbSqliteExpression;
|
|
656
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
657
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
658
|
+
readonly reason: EffectQbSqliteExpression;
|
|
659
|
+
};
|
|
660
|
+
readonly insert: (record: JwtRevocationRecord) => EffectQbInsertInput<TableValue>;
|
|
661
|
+
readonly update: (record: JwtRevocationRecord) => EffectQbUpdateInput<TableValue>;
|
|
662
|
+
readonly decode?: (row: EffectQbAuthJwtRevocationSelectedRow) => JwtRevocationRecord;
|
|
663
|
+
}
|
|
664
|
+
export interface EffectQbAuthOAuthAccountTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
665
|
+
readonly table: TableValue;
|
|
666
|
+
readonly select: EffectQbSelection & {
|
|
667
|
+
readonly id: EffectQbSqliteExpression;
|
|
668
|
+
readonly providerId: EffectQbSqliteExpression;
|
|
669
|
+
readonly providerAccountId: EffectQbSqliteExpression;
|
|
670
|
+
readonly userId: EffectQbSqliteExpression;
|
|
671
|
+
readonly email: EffectQbSqliteExpression;
|
|
672
|
+
readonly emailVerified: EffectQbSqliteExpression;
|
|
673
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
674
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
675
|
+
readonly unlinkedAt: EffectQbSqliteExpression;
|
|
676
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
677
|
+
};
|
|
678
|
+
readonly insert: (row: OAuthAccountRecord) => EffectQbInsertInput<TableValue>;
|
|
679
|
+
readonly unlink: (input: OAuthAccountUnlinkInput, row: OAuthAccountRecord) => EffectQbUpdateInput<TableValue>;
|
|
680
|
+
readonly decode?: (row: EffectQbAuthOAuthAccountSelectedRow) => OAuthAccountRecord;
|
|
681
|
+
}
|
|
682
|
+
export interface EffectQbAuthOAuthProviderTokenVaultTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
683
|
+
readonly table: TableValue;
|
|
684
|
+
readonly select: EffectQbSelection & {
|
|
685
|
+
readonly accountId: EffectQbSqliteExpression;
|
|
686
|
+
readonly userId: EffectQbSqliteExpression;
|
|
687
|
+
readonly providerId: EffectQbSqliteExpression;
|
|
688
|
+
readonly providerAccountId: EffectQbSqliteExpression;
|
|
689
|
+
readonly accessTokenCiphertext: EffectQbSqliteExpression;
|
|
690
|
+
readonly refreshTokenCiphertext: EffectQbSqliteExpression;
|
|
691
|
+
readonly idTokenCiphertext: EffectQbSqliteExpression;
|
|
692
|
+
readonly tokenType: EffectQbSqliteExpression;
|
|
693
|
+
readonly scopes: EffectQbSqliteExpression;
|
|
694
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
695
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
696
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
697
|
+
readonly revocationReason: EffectQbSqliteExpression;
|
|
698
|
+
};
|
|
699
|
+
readonly insert: (row: OAuthProviderTokenVaultRecord) => EffectQbInsertInput<TableValue>;
|
|
700
|
+
readonly update: (row: OAuthProviderTokenVaultRecord) => EffectQbUpdateInput<TableValue>;
|
|
701
|
+
readonly markRevoked: (input: OAuthProviderTokenVaultMarkRevokedInput) => EffectQbUpdateInput<TableValue>;
|
|
702
|
+
readonly decode?: (row: EffectQbAuthOAuthProviderTokenVaultSelectedRow) => OAuthProviderTokenVaultRecord;
|
|
703
|
+
}
|
|
704
|
+
export interface EffectQbAuthOAuthClientTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
705
|
+
readonly table: TableValue;
|
|
706
|
+
readonly select: EffectQbSelection & {
|
|
707
|
+
readonly id: EffectQbSqliteExpression;
|
|
708
|
+
readonly type: EffectQbSqliteExpression;
|
|
709
|
+
readonly status: EffectQbSqliteExpression;
|
|
710
|
+
readonly name: EffectQbSqliteExpression;
|
|
711
|
+
readonly redirectUris: EffectQbSqliteExpression;
|
|
712
|
+
readonly allowedGrantTypes: EffectQbSqliteExpression;
|
|
713
|
+
readonly allowedResponseTypes: EffectQbSqliteExpression;
|
|
714
|
+
readonly allowedScopes: EffectQbSqliteExpression;
|
|
715
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
716
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
717
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
718
|
+
};
|
|
719
|
+
readonly insert: (record: OAuthClientRecord) => EffectQbInsertInput<TableValue>;
|
|
720
|
+
readonly update: (record: OAuthClientRecord) => EffectQbUpdateInput<TableValue>;
|
|
721
|
+
readonly decode?: (row: EffectQbAuthOAuthClientSelectedRow) => OAuthClientRecord;
|
|
722
|
+
}
|
|
723
|
+
export interface EffectQbAuthOAuthConsentTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
724
|
+
readonly table: TableValue;
|
|
725
|
+
readonly select: EffectQbSelection & {
|
|
726
|
+
readonly id: EffectQbSqliteExpression;
|
|
727
|
+
readonly userId: EffectQbSqliteExpression;
|
|
728
|
+
readonly clientId: EffectQbSqliteExpression;
|
|
729
|
+
readonly scopes: EffectQbSqliteExpression;
|
|
730
|
+
readonly grantedAt: EffectQbSqliteExpression;
|
|
731
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
732
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
733
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
734
|
+
};
|
|
735
|
+
readonly insert: (record: OAuthConsentRecord) => EffectQbInsertInput<TableValue>;
|
|
736
|
+
readonly update: (record: OAuthConsentRecord) => EffectQbUpdateInput<TableValue>;
|
|
737
|
+
readonly revoke: (input: OAuthConsentRevokeInput, row: OAuthConsentRecord) => EffectQbUpdateInput<TableValue>;
|
|
738
|
+
readonly decode?: (row: EffectQbAuthOAuthConsentSelectedRow) => OAuthConsentRecord;
|
|
739
|
+
}
|
|
740
|
+
export interface EffectQbAuthOAuthAuthorizationCodeTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
741
|
+
readonly table: TableValue;
|
|
742
|
+
readonly select: EffectQbSelection & {
|
|
743
|
+
readonly codeHash: EffectQbSqliteExpression;
|
|
744
|
+
readonly clientId: EffectQbSqliteExpression;
|
|
745
|
+
readonly subject: EffectQbSqliteExpression;
|
|
746
|
+
readonly redirectUri: EffectQbSqliteExpression;
|
|
747
|
+
readonly scopes: EffectQbSqliteExpression;
|
|
748
|
+
readonly codeChallenge: EffectQbSqliteExpression;
|
|
749
|
+
readonly codeChallengeMethod: EffectQbSqliteExpression;
|
|
750
|
+
readonly issuedAt: EffectQbSqliteExpression;
|
|
751
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
752
|
+
readonly consumedAt: EffectQbSqliteExpression;
|
|
753
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
754
|
+
};
|
|
755
|
+
readonly insert: (record: OAuthAuthorizationCodeRecord) => EffectQbInsertInput<TableValue>;
|
|
756
|
+
readonly update: (record: OAuthAuthorizationCodeRecord) => EffectQbUpdateInput<TableValue>;
|
|
757
|
+
readonly markConsumed: (input: OAuthAuthorizationCodeStoreMarkConsumedInput) => EffectQbUpdateInput<TableValue>;
|
|
758
|
+
readonly decode?: (row: EffectQbAuthOAuthAuthorizationCodeSelectedRow) => OAuthAuthorizationCodeRecord;
|
|
759
|
+
}
|
|
760
|
+
export interface EffectQbAuthOAuthClientSecretTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
761
|
+
readonly table: TableValue;
|
|
762
|
+
readonly select: EffectQbSelection & {
|
|
763
|
+
readonly prefix: EffectQbSqliteExpression;
|
|
764
|
+
readonly clientId: EffectQbSqliteExpression;
|
|
765
|
+
readonly secretHash: EffectQbSqliteExpression;
|
|
766
|
+
readonly authenticationMethods: EffectQbSqliteExpression;
|
|
767
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
768
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
769
|
+
readonly lastUsedAt: EffectQbSqliteExpression;
|
|
770
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
771
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
772
|
+
};
|
|
773
|
+
readonly insert: (record: OAuthClientSecretRecord) => EffectQbInsertInput<TableValue>;
|
|
774
|
+
readonly update: (record: OAuthClientSecretRecord) => EffectQbUpdateInput<TableValue>;
|
|
775
|
+
readonly markUsed: (input: OAuthClientSecretStoreMarkUsedInput) => EffectQbUpdateInput<TableValue>;
|
|
776
|
+
readonly revoke: (input: OAuthClientSecretStoreRevokeInput, row: OAuthClientSecretRecord) => EffectQbUpdateInput<TableValue>;
|
|
777
|
+
readonly decode?: (row: EffectQbAuthOAuthClientSecretSelectedRow) => OAuthClientSecretRecord;
|
|
778
|
+
}
|
|
779
|
+
export interface EffectQbAuthOAuthProviderModeTokenTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
780
|
+
readonly table: TableValue;
|
|
781
|
+
readonly select: EffectQbSelection & {
|
|
782
|
+
readonly tokenHash: EffectQbSqliteExpression;
|
|
783
|
+
readonly tokenType: EffectQbSqliteExpression;
|
|
784
|
+
readonly clientId: EffectQbSqliteExpression;
|
|
785
|
+
readonly subject: EffectQbSqliteExpression;
|
|
786
|
+
readonly scopes: EffectQbSqliteExpression;
|
|
787
|
+
readonly issuedAt: EffectQbSqliteExpression;
|
|
788
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
789
|
+
readonly issuer: EffectQbSqliteExpression;
|
|
790
|
+
readonly audience: EffectQbSqliteExpression;
|
|
791
|
+
readonly jwtId: EffectQbSqliteExpression;
|
|
792
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
793
|
+
readonly revocationReason: EffectQbSqliteExpression;
|
|
794
|
+
readonly rotatedAt: EffectQbSqliteExpression;
|
|
795
|
+
readonly replacedByTokenHash: EffectQbSqliteExpression;
|
|
796
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
797
|
+
};
|
|
798
|
+
readonly insert: (record: OAuthProviderModeTokenRecord) => EffectQbInsertInput<TableValue>;
|
|
799
|
+
readonly update: (record: OAuthProviderModeTokenRecord) => EffectQbUpdateInput<TableValue>;
|
|
800
|
+
readonly revoke: (input: OAuthProviderModeTokenStoreRevokeInput, row: OAuthProviderModeTokenRecord) => EffectQbUpdateInput<TableValue>;
|
|
801
|
+
readonly rotate: (input: OAuthProviderModeTokenStoreRotateInput) => EffectQbUpdateInput<TableValue>;
|
|
802
|
+
readonly decode?: (row: EffectQbAuthOAuthProviderModeTokenSelectedRow) => OAuthProviderModeTokenRecord;
|
|
803
|
+
}
|
|
804
|
+
export interface EffectQbAuthDomainVerificationTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
805
|
+
readonly table: TableValue;
|
|
806
|
+
readonly select: EffectQbSelection & {
|
|
807
|
+
readonly id: EffectQbSqliteExpression;
|
|
808
|
+
readonly ownerId: EffectQbSqliteExpression;
|
|
809
|
+
readonly domain: EffectQbSqliteExpression;
|
|
810
|
+
readonly proofMethod: EffectQbSqliteExpression;
|
|
811
|
+
readonly proofToken: EffectQbSqliteExpression;
|
|
812
|
+
readonly status: EffectQbSqliteExpression;
|
|
813
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
814
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
815
|
+
readonly verifiedAt: EffectQbSqliteExpression;
|
|
816
|
+
readonly revokedAt: EffectQbSqliteExpression;
|
|
817
|
+
readonly lastCheckedAt: EffectQbSqliteExpression;
|
|
818
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
819
|
+
};
|
|
820
|
+
readonly insert: (record: DomainVerificationRecord) => EffectQbInsertInput<TableValue>;
|
|
821
|
+
readonly update: (record: DomainVerificationRecord) => EffectQbUpdateInput<TableValue>;
|
|
822
|
+
readonly markVerified: (input: DomainVerificationStoreMarkVerifiedInput) => EffectQbUpdateInput<TableValue>;
|
|
823
|
+
readonly revoke: (input: DomainVerificationStoreRevokeInput, row: DomainVerificationRecord) => EffectQbUpdateInput<TableValue>;
|
|
824
|
+
readonly decode?: (row: EffectQbAuthDomainVerificationSelectedRow) => DomainVerificationRecord;
|
|
825
|
+
}
|
|
826
|
+
export interface EffectQbAuthSecurityTimelineTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
827
|
+
readonly table: TableValue;
|
|
828
|
+
readonly select: EffectQbSelection & {
|
|
829
|
+
readonly id: EffectQbSqliteExpression;
|
|
830
|
+
readonly userId: EffectQbSqliteExpression;
|
|
831
|
+
readonly type: EffectQbSqliteExpression;
|
|
832
|
+
readonly category: EffectQbSqliteExpression;
|
|
833
|
+
readonly severity: EffectQbSqliteExpression;
|
|
834
|
+
readonly occurredAt: EffectQbSqliteExpression;
|
|
835
|
+
readonly summary: EffectQbSqliteExpression;
|
|
836
|
+
readonly actor: EffectQbSqliteExpression;
|
|
837
|
+
readonly request: EffectQbSqliteExpression;
|
|
838
|
+
readonly metadata: EffectQbSqliteExpression;
|
|
839
|
+
};
|
|
840
|
+
readonly insert: (event: SecurityTimelineEvent) => EffectQbInsertInput<TableValue>;
|
|
841
|
+
readonly decode?: (row: EffectQbAuthSecurityTimelineSelectedRow) => SecurityTimelineEvent;
|
|
842
|
+
}
|
|
843
|
+
export interface EffectQbAuthWebhookOutboxTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
844
|
+
readonly table: TableValue;
|
|
845
|
+
readonly select: EffectQbSelection & {
|
|
846
|
+
readonly id: EffectQbSqliteExpression;
|
|
847
|
+
readonly endpointKey: EffectQbSqliteExpression;
|
|
848
|
+
readonly event: EffectQbSqliteExpression;
|
|
849
|
+
readonly status: EffectQbSqliteExpression;
|
|
850
|
+
readonly attempts: EffectQbSqliteExpression;
|
|
851
|
+
readonly nextAttemptAt: EffectQbSqliteExpression;
|
|
852
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
853
|
+
readonly updatedAt: EffectQbSqliteExpression;
|
|
854
|
+
readonly deliveredAt: EffectQbSqliteExpression;
|
|
855
|
+
readonly lastError: EffectQbSqliteExpression;
|
|
856
|
+
};
|
|
857
|
+
readonly insert: (record: WebhookOutboxRecord) => EffectQbInsertInput<TableValue>;
|
|
858
|
+
readonly markDelivered: (input: WebhookOutboxMarkDeliveredInput & {
|
|
859
|
+
readonly deliveredAt: UnixMillis;
|
|
860
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
861
|
+
readonly markFailed: (input: WebhookOutboxMarkFailedInput & {
|
|
862
|
+
readonly failedAt: UnixMillis;
|
|
863
|
+
readonly attempts: number;
|
|
864
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
865
|
+
readonly markDeadLettered: (input: WebhookOutboxMarkDeadLetteredInput & {
|
|
866
|
+
readonly deadLetteredAt: UnixMillis;
|
|
867
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
868
|
+
readonly decode?: (row: EffectQbAuthWebhookOutboxSelectedRow) => WebhookOutboxRecord;
|
|
869
|
+
}
|
|
870
|
+
export interface EffectQbAuthWebhookReplayTable<TableValue extends EffectQbSqliteTable = EffectQbSqliteTable> {
|
|
871
|
+
readonly table: TableValue;
|
|
872
|
+
readonly select: EffectQbSelection & {
|
|
873
|
+
readonly id: EffectQbSqliteExpression;
|
|
874
|
+
readonly expiresAt: EffectQbSqliteExpression;
|
|
875
|
+
readonly createdAt: EffectQbSqliteExpression;
|
|
876
|
+
};
|
|
877
|
+
readonly insert: (input: WebhookReplayClaimInput & {
|
|
878
|
+
readonly now: UnixMillis;
|
|
879
|
+
}) => EffectQbInsertInput<TableValue>;
|
|
880
|
+
readonly update: (input: WebhookReplayClaimInput & {
|
|
881
|
+
readonly now: UnixMillis;
|
|
882
|
+
}) => EffectQbUpdateInput<TableValue>;
|
|
883
|
+
}
|
|
884
|
+
export interface EffectQbAuthTablesInput {
|
|
885
|
+
readonly user: EffectQbAuthUserTable;
|
|
886
|
+
readonly credential: EffectQbAuthCredentialTable;
|
|
887
|
+
readonly session: EffectQbAuthSessionTable;
|
|
888
|
+
readonly verification: EffectQbAuthVerificationTable;
|
|
889
|
+
readonly auditLog: EffectQbAuthAuditLogTable;
|
|
890
|
+
readonly loginApprovalReview: EffectQbAuthLoginApprovalReviewTable;
|
|
891
|
+
readonly loginRiskHistory: EffectQbAuthLoginRiskHistoryTable;
|
|
892
|
+
readonly trustedDevice: EffectQbAuthTrustedDeviceTable;
|
|
893
|
+
readonly passkeyCredential: EffectQbAuthPasskeyCredentialTable;
|
|
894
|
+
readonly totpFactor: EffectQbAuthTotpFactorTable;
|
|
895
|
+
readonly recoveryCode: EffectQbAuthRecoveryCodeTable;
|
|
896
|
+
readonly apiKey: EffectQbAuthApiKeyTable;
|
|
897
|
+
readonly refreshToken: EffectQbAuthRefreshTokenTable;
|
|
898
|
+
readonly jwtRevocation: EffectQbAuthJwtRevocationTable;
|
|
899
|
+
readonly oauthAccount: EffectQbAuthOAuthAccountTable;
|
|
900
|
+
readonly oauthClient: EffectQbAuthOAuthClientTable;
|
|
901
|
+
readonly oauthConsent: EffectQbAuthOAuthConsentTable;
|
|
902
|
+
readonly oauthAuthorizationCode: EffectQbAuthOAuthAuthorizationCodeTable;
|
|
903
|
+
readonly oauthClientSecret: EffectQbAuthOAuthClientSecretTable;
|
|
904
|
+
readonly oauthProviderModeToken: EffectQbAuthOAuthProviderModeTokenTable;
|
|
905
|
+
readonly oauthProviderTokenVault: EffectQbAuthOAuthProviderTokenVaultTable;
|
|
906
|
+
readonly domainVerification: EffectQbAuthDomainVerificationTable;
|
|
907
|
+
readonly securityTimeline: EffectQbAuthSecurityTimelineTable;
|
|
908
|
+
readonly webhookOutbox: EffectQbAuthWebhookOutboxTable;
|
|
909
|
+
readonly webhookReplay: EffectQbAuthWebhookReplayTable;
|
|
910
|
+
}
|
|
911
|
+
export interface AuthSqliteTables extends EffectQbAuthTablesInput {
|
|
912
|
+
readonly [authSqliteTablesTypeId]: typeof authSqliteTablesTypeId;
|
|
913
|
+
}
|
|
914
|
+
export interface EffectQbSqliteLoginRiskHistoryOptions {
|
|
915
|
+
readonly recentWindowMillis?: number;
|
|
916
|
+
readonly historyWindowMillis?: number;
|
|
917
|
+
readonly impossibleTravelWindowMillis?: number;
|
|
918
|
+
readonly impossibleTravelKmh?: number;
|
|
919
|
+
}
|
|
920
|
+
export interface EffectQbSqliteAuthStorageOptions {
|
|
921
|
+
readonly tables?: AuthSqliteTables;
|
|
922
|
+
readonly loginRiskHistory?: EffectQbSqliteLoginRiskHistoryOptions;
|
|
923
|
+
}
|
|
924
|
+
export interface EffectQbSqliteStorageStores {
|
|
925
|
+
readonly userStore: UserStoreService;
|
|
926
|
+
readonly credentialStore: CredentialStoreService;
|
|
927
|
+
readonly sessionStore: SessionStoreService;
|
|
928
|
+
readonly verificationStore: VerificationStoreService;
|
|
929
|
+
readonly auditLogStore: AuditLogStoreService;
|
|
930
|
+
readonly loginApprovalReviewStore: LoginApprovalReviewStoreService;
|
|
931
|
+
readonly loginRiskHistoryStore: LoginRiskHistoryService;
|
|
932
|
+
readonly trustedDeviceStore: TrustedDeviceStoreService;
|
|
933
|
+
readonly passkeyCredentialStore: PasskeyCredentialStoreService;
|
|
934
|
+
readonly totpFactorStore: TotpFactorStoreService;
|
|
935
|
+
readonly recoveryCodeStore: RecoveryCodeStoreService;
|
|
936
|
+
readonly apiKeyStore: ApiKeyStoreService;
|
|
937
|
+
readonly refreshTokenStore: RefreshTokenStoreService;
|
|
938
|
+
readonly jwtRevocationStore: JwtRevocationStoreService;
|
|
939
|
+
readonly oauthAccountStore: OAuthAccountStoreService;
|
|
940
|
+
readonly oauthClientStore: OAuthClientStoreService;
|
|
941
|
+
readonly oauthConsentStore: OAuthConsentStoreService;
|
|
942
|
+
readonly oauthAuthorizationCodeStore: OAuthAuthorizationCodeStoreService;
|
|
943
|
+
readonly oauthClientSecretStore: OAuthClientSecretStoreService;
|
|
944
|
+
readonly oauthProviderModeTokenStore: OAuthProviderModeTokenStoreService;
|
|
945
|
+
readonly oauthProviderTokenVault: OAuthProviderTokenVaultService;
|
|
946
|
+
readonly domainVerificationStore: DomainVerificationStoreService;
|
|
947
|
+
readonly securityTimelineStore: SecurityTimelineStoreService;
|
|
948
|
+
readonly webhookOutboxStore: WebhookOutboxStoreService;
|
|
949
|
+
readonly webhookReplayStore: WebhookReplayStoreService;
|
|
950
|
+
}
|
|
951
|
+
type EffectQbSqliteExecutor = Executor.QueryExecutor<never>;
|
|
952
|
+
export declare const defineEffectQbAuthTables: <const Tables extends EffectQbAuthTablesInput>(tables: Tables) => AuthSqliteTables & Tables;
|
|
953
|
+
export declare const makeAuthSqliteTables: (names?: AuthSqliteTableNames) => AuthSqliteTables;
|
|
954
|
+
export declare const authSqliteTables: AuthSqliteTables;
|
|
955
|
+
export declare const makeEffectQbSqliteUserStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => UserStoreService;
|
|
956
|
+
export declare const makeEffectQbSqliteCredentialStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => CredentialStoreService;
|
|
957
|
+
export declare const makeEffectQbSqliteSessionStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => SessionStoreService;
|
|
958
|
+
export declare const makeEffectQbSqliteVerificationStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => VerificationStoreService;
|
|
959
|
+
export declare const makeEffectQbSqliteAuditLogStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => AuditLogStoreService;
|
|
960
|
+
export declare const makeEffectQbSqliteLoginApprovalReviewStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => LoginApprovalReviewStoreService;
|
|
961
|
+
export declare const makeEffectQbSqliteLoginRiskHistoryStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => LoginRiskHistoryService;
|
|
962
|
+
export declare const makeEffectQbSqliteTrustedDeviceStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => TrustedDeviceStoreService;
|
|
963
|
+
export declare const makeEffectQbSqlitePasskeyCredentialStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => PasskeyCredentialStoreService;
|
|
964
|
+
export declare const makeEffectQbSqliteTotpFactorStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => TotpFactorStoreService;
|
|
965
|
+
export declare const makeEffectQbSqliteRecoveryCodeStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => RecoveryCodeStoreService;
|
|
966
|
+
export declare const makeEffectQbSqliteApiKeyStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => ApiKeyStoreService;
|
|
967
|
+
export declare const makeEffectQbSqliteRefreshTokenStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => RefreshTokenStoreService;
|
|
968
|
+
export declare const makeEffectQbSqliteJwtRevocationStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => JwtRevocationStoreService;
|
|
969
|
+
export declare const makeEffectQbSqliteOAuthAccountStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthAccountStoreService;
|
|
970
|
+
export declare const makeEffectQbSqliteOAuthClientStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthClientStoreService;
|
|
971
|
+
export declare const makeEffectQbSqliteOAuthConsentStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthConsentStoreService;
|
|
972
|
+
export declare const makeEffectQbSqliteOAuthAuthorizationCodeStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthAuthorizationCodeStoreService;
|
|
973
|
+
export declare const makeEffectQbSqliteOAuthClientSecretStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthClientSecretStoreService;
|
|
974
|
+
export declare const makeEffectQbSqliteOAuthProviderModeTokenStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthProviderModeTokenStoreService;
|
|
975
|
+
export declare const makeEffectQbSqliteOAuthProviderTokenVault: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => OAuthProviderTokenVaultService;
|
|
976
|
+
export declare const makeEffectQbSqliteDomainVerificationStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => DomainVerificationStoreService;
|
|
977
|
+
export declare const makeEffectQbSqliteSecurityTimelineStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => SecurityTimelineStoreService;
|
|
978
|
+
export declare const makeEffectQbSqliteWebhookOutboxStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => WebhookOutboxStoreService;
|
|
979
|
+
export declare const makeEffectQbSqliteWebhookReplayStore: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => WebhookReplayStoreService;
|
|
980
|
+
export declare const makeEffectQbSqliteStorage: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => EffectQbSqliteStorageStores;
|
|
981
|
+
export declare const EffectQbSqliteAuthStorageLive: (executor: EffectQbSqliteExecutor, options?: EffectQbSqliteAuthStorageOptions) => Layer.Layer<ApiKeyStore | RefreshTokenStore | UserStore | CredentialStore | SessionStore | VerificationStore | LoginRiskHistory | LoginApprovalReviewStore | TrustedDeviceStore | PasskeyCredentialStore | AuditLogStore | JwtRevocationStore | OAuthClientStore | OAuthConsentStore | OAuthClientSecretStore | OAuthAuthorizationCodeStore | OAuthProviderModeTokenStore | OAuthProviderTokenVault | OAuthAccountStore | RecoveryCodeStore | SecurityTimelineStore | TotpFactorStore | DomainVerificationStore | WebhookOutboxStore | WebhookReplayStore, never, never>;
|
|
982
|
+
export declare const makeD1EffectQbSqliteExecutor: (database: D1EffectQbDatabaseLike) => EffectQbSqliteExecutor;
|
|
983
|
+
export declare const D1EffectQbSqliteAuthStorageLive: (database: D1EffectQbDatabaseLike, options?: EffectQbSqliteAuthStorageOptions) => Layer.Layer<ApiKeyStore | RefreshTokenStore | UserStore | CredentialStore | SessionStore | VerificationStore | LoginRiskHistory | LoginApprovalReviewStore | TrustedDeviceStore | PasskeyCredentialStore | AuditLogStore | JwtRevocationStore | OAuthClientStore | OAuthConsentStore | OAuthClientSecretStore | OAuthAuthorizationCodeStore | OAuthProviderModeTokenStore | OAuthProviderTokenVault | OAuthAccountStore | RecoveryCodeStore | SecurityTimelineStore | TotpFactorStore | DomainVerificationStore | WebhookOutboxStore | WebhookReplayStore, never, never>;
|
|
984
|
+
export {};
|
|
985
|
+
//# sourceMappingURL=EffectQbSqliteStorage.d.ts.map
|