@yielded/auth-persistence-drizzle 0.1.0-beta.1 → 0.1.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/D1.d.mts +27 -22
- package/dist/D1.mjs +10 -4
- package/dist/D1.mjs.map +1 -1
- package/dist/Libsql.d.mts +66 -61
- package/dist/Libsql.mjs +20 -15
- package/dist/Libsql.mjs.map +1 -1
- package/dist/Mysql2.d.mts +58 -46
- package/dist/Mysql2.mjs +13 -6
- package/dist/Mysql2.mjs.map +1 -1
- package/dist/Pglite.d.mts +43 -32
- package/dist/Pglite.mjs +12 -7
- package/dist/Pglite.mjs.map +1 -1
- package/dist/Postgres.d.mts +59 -48
- package/dist/Postgres.mjs +12 -7
- package/dist/Postgres.mjs.map +1 -1
- package/dist/SqliteBun.d.mts +58 -53
- package/dist/SqliteBun.mjs +20 -14
- package/dist/SqliteBun.mjs.map +1 -1
- package/dist/SqliteDo.d.mts +66 -60
- package/dist/SqliteDo.mjs +26 -14
- package/dist/SqliteDo.mjs.map +1 -1
- package/dist/SqliteNode.d.mts +58 -53
- package/dist/SqliteNode.mjs +20 -14
- package/dist/SqliteNode.mjs.map +1 -1
- package/dist/SqliteWasm.d.mts +66 -61
- package/dist/SqliteWasm.mjs +20 -14
- package/dist/SqliteWasm.mjs.map +1 -1
- package/dist/drizzle/d1-database.d.mts +11 -0
- package/dist/drizzle/d1-database.mjs +8 -0
- package/dist/drizzle/d1-database.mjs.map +1 -0
- package/dist/drizzle/d1-emails.d.mts +8 -7
- package/dist/drizzle/d1-emails.mjs +7 -4
- package/dist/drizzle/d1-emails.mjs.map +1 -1
- package/dist/drizzle/d1-identity.mjs +12 -9
- package/dist/drizzle/d1-identity.mjs.map +1 -1
- package/dist/drizzle/d1-oauth.d.mts +14 -13
- package/dist/drizzle/d1-oauth.mjs +7 -4
- package/dist/drizzle/d1-oauth.mjs.map +1 -1
- package/dist/drizzle/d1-passkey.d.mts +3 -14
- package/dist/drizzle/d1-passkey.mjs +2 -1
- package/dist/drizzle/d1-passkey.mjs.map +1 -1
- package/dist/drizzle/d1-password-prepared.d.mts +4 -3
- package/dist/drizzle/d1-password-prepared.mjs +3 -1
- package/dist/drizzle/d1-password-prepared.mjs.map +1 -1
- package/dist/drizzle/d1-passwords.d.mts +6 -5
- package/dist/drizzle/d1-passwords.mjs +5 -2
- package/dist/drizzle/d1-passwords.mjs.map +1 -1
- package/dist/drizzle/d1-phone.d.mts +3 -4
- package/dist/drizzle/d1-phone.mjs +2 -1
- package/dist/drizzle/d1-phone.mjs.map +1 -1
- package/dist/drizzle/d1-planning.d.mts +1 -1
- package/dist/drizzle/d1-proofs.d.mts +4 -3
- package/dist/drizzle/d1-proofs.mjs +3 -1
- package/dist/drizzle/d1-proofs.mjs.map +1 -1
- package/dist/drizzle/d1-sessions.d.mts +11 -10
- package/dist/drizzle/d1-sessions.mjs +15 -9
- package/dist/drizzle/d1-sessions.mjs.map +1 -1
- package/dist/drizzle/d1-totp.d.mts +3 -4
- package/dist/drizzle/d1-totp.mjs +2 -1
- package/dist/drizzle/d1-totp.mjs.map +1 -1
- package/dist/drizzle/email-registration.mjs +2 -1
- package/dist/drizzle/email-registration.mjs.map +1 -1
- package/dist/drizzle/email-target.d.mts +7 -6
- package/dist/drizzle/email-target.mjs +10 -10
- package/dist/drizzle/email-target.mjs.map +1 -1
- package/dist/drizzle/mysql-database.d.mts +8 -0
- package/dist/drizzle/mysql-database.mjs +8 -0
- package/dist/drizzle/mysql-database.mjs.map +1 -0
- package/dist/drizzle/mysql-emails.d.mts +7 -6
- package/dist/drizzle/mysql-emails.mjs +12 -8
- package/dist/drizzle/mysql-emails.mjs.map +1 -1
- package/dist/drizzle/mysql-identity.mjs +12 -9
- package/dist/drizzle/mysql-identity.mjs.map +1 -1
- package/dist/drizzle/mysql-password-prepared.d.mts +3 -2
- package/dist/drizzle/mysql-password-prepared.mjs +6 -2
- package/dist/drizzle/mysql-password-prepared.mjs.map +1 -1
- package/dist/drizzle/mysql-passwords.d.mts +6 -4
- package/dist/drizzle/mysql-passwords.mjs +11 -7
- package/dist/drizzle/mysql-passwords.mjs.map +1 -1
- package/dist/drizzle/mysql-proofs.d.mts +3 -2
- package/dist/drizzle/mysql-proofs.mjs +8 -4
- package/dist/drizzle/mysql-proofs.mjs.map +1 -1
- package/dist/drizzle/mysql-sessions.d.mts +11 -10
- package/dist/drizzle/mysql-sessions.mjs +16 -12
- package/dist/drizzle/mysql-sessions.mjs.map +1 -1
- package/dist/drizzle/native-database.mjs +10 -0
- package/dist/drizzle/native-database.mjs.map +1 -0
- package/dist/drizzle/oauth-connected-drivers.mjs +7 -5
- package/dist/drizzle/oauth-connected-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-connected-target.d.mts +6 -7
- package/dist/drizzle/oauth-connected-target.mjs +4 -5
- package/dist/drizzle/oauth-connected-target.mjs.map +1 -1
- package/dist/drizzle/oauth-drivers.mjs +8 -6
- package/dist/drizzle/oauth-drivers.mjs.map +1 -1
- package/dist/drizzle/oauth-target.d.mts +12 -11
- package/dist/drizzle/oauth-target.mjs +13 -12
- package/dist/drizzle/oauth-target.mjs.map +1 -1
- package/dist/drizzle/passkey-drivers.mjs +8 -6
- package/dist/drizzle/passkey-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-drivers.mjs +5 -3
- package/dist/drizzle/passkey-write-drivers.mjs.map +1 -1
- package/dist/drizzle/passkey-write-target.d.mts +1 -1
- package/dist/drizzle/password-prepared-sql.mjs +2 -1
- package/dist/drizzle/password-prepared-sql.mjs.map +1 -1
- package/dist/drizzle/password-prepared-target.d.mts +3 -2
- package/dist/drizzle/password-prepared-target.mjs +4 -3
- package/dist/drizzle/password-prepared-target.mjs.map +1 -1
- package/dist/drizzle/password-registration.mjs +2 -1
- package/dist/drizzle/password-registration.mjs.map +1 -1
- package/dist/drizzle/password-target.d.mts +5 -4
- package/dist/drizzle/password-target.mjs +8 -8
- package/dist/drizzle/password-target.mjs.map +1 -1
- package/dist/drizzle/pg-database.d.mts +9 -0
- package/dist/drizzle/pg-database.mjs +8 -0
- package/dist/drizzle/pg-database.mjs.map +1 -0
- package/dist/drizzle/pg-emails.d.mts +7 -6
- package/dist/drizzle/pg-emails.mjs +12 -8
- package/dist/drizzle/pg-emails.mjs.map +1 -1
- package/dist/drizzle/pg-identity.mjs +12 -9
- package/dist/drizzle/pg-identity.mjs.map +1 -1
- package/dist/drizzle/pg-password-prepared.d.mts +3 -2
- package/dist/drizzle/pg-password-prepared.mjs +6 -2
- package/dist/drizzle/pg-password-prepared.mjs.map +1 -1
- package/dist/drizzle/pg-passwords.d.mts +6 -4
- package/dist/drizzle/pg-passwords.mjs +11 -7
- package/dist/drizzle/pg-passwords.mjs.map +1 -1
- package/dist/drizzle/pg-proofs.d.mts +3 -2
- package/dist/drizzle/pg-proofs.mjs +8 -4
- package/dist/drizzle/pg-proofs.mjs.map +1 -1
- package/dist/drizzle/pg-sessions.d.mts +11 -10
- package/dist/drizzle/pg-sessions.mjs +16 -12
- package/dist/drizzle/pg-sessions.mjs.map +1 -1
- package/dist/drizzle/phone-target.d.mts +4 -3
- package/dist/drizzle/phone-target.mjs +12 -11
- package/dist/drizzle/phone-target.mjs.map +1 -1
- package/dist/drizzle/proof-target.d.mts +3 -2
- package/dist/drizzle/proof-target.mjs +5 -5
- package/dist/drizzle/proof-target.mjs.map +1 -1
- package/dist/drizzle/session-sql.d.mts +1 -0
- package/dist/drizzle/session-target.d.mts +10 -8
- package/dist/drizzle/session-target.mjs +11 -11
- package/dist/drizzle/session-target.mjs.map +1 -1
- package/dist/drizzle/sqlite-emails.mjs +9 -5
- package/dist/drizzle/sqlite-emails.mjs.map +1 -1
- package/dist/drizzle/sqlite-identity.mjs +14 -11
- package/dist/drizzle/sqlite-identity.mjs.map +1 -1
- package/dist/drizzle/sqlite-password-prepared.mjs +7 -3
- package/dist/drizzle/sqlite-password-prepared.mjs.map +1 -1
- package/dist/drizzle/sqlite-passwords.mjs +10 -6
- package/dist/drizzle/sqlite-passwords.mjs.map +1 -1
- package/dist/drizzle/sqlite-proofs.mjs +7 -3
- package/dist/drizzle/sqlite-proofs.mjs.map +1 -1
- package/dist/drizzle/sqlite-sessions.mjs +16 -12
- package/dist/drizzle/sqlite-sessions.mjs.map +1 -1
- package/dist/drizzle/standalone-guard.d.mts +2 -0
- package/dist/drizzle/standalone-guard.mjs +8 -4
- package/dist/drizzle/standalone-guard.mjs.map +1 -1
- package/dist/drizzle/totp-target.d.mts +4 -3
- package/dist/drizzle/totp-target.mjs +31 -28
- package/dist/drizzle/totp-target.mjs.map +1 -1
- package/package.json +1 -1
- package/src/D1.ts +37 -10
- package/src/Libsql.ts +45 -17
- package/src/Mysql2.ts +39 -13
- package/src/Pglite.ts +47 -13
- package/src/Postgres.ts +47 -13
- package/src/SqliteBun.ts +58 -30
- package/src/SqliteDo.ts +61 -19
- package/src/SqliteNode.ts +55 -28
- package/src/SqliteWasm.ts +55 -28
- package/src/drizzle/d1-database.ts +10 -0
- package/src/drizzle/d1-emails.ts +84 -84
- package/src/drizzle/d1-identity.ts +17 -20
- package/src/drizzle/d1-oauth.ts +19 -8
- package/src/drizzle/d1-passkey.ts +5 -1
- package/src/drizzle/d1-password-prepared.ts +38 -37
- package/src/drizzle/d1-passwords.ts +74 -76
- package/src/drizzle/d1-phone.ts +5 -1
- package/src/drizzle/d1-proofs.ts +29 -30
- package/src/drizzle/d1-sessions.ts +51 -38
- package/src/drizzle/d1-totp.ts +5 -1
- package/src/drizzle/email-registration.ts +6 -2
- package/src/drizzle/email-target.ts +17 -19
- package/src/drizzle/mysql-database.ts +8 -0
- package/src/drizzle/mysql-emails.ts +28 -16
- package/src/drizzle/mysql-identity.ts +18 -21
- package/src/drizzle/mysql-password-prepared.ts +10 -8
- package/src/drizzle/mysql-passwords.ts +21 -9
- package/src/drizzle/mysql-proofs.ts +16 -5
- package/src/drizzle/mysql-sessions.ts +40 -17
- package/src/drizzle/native-database.ts +22 -0
- package/src/drizzle/oauth-connected-drivers.ts +18 -6
- package/src/drizzle/oauth-connected-target.ts +16 -17
- package/src/drizzle/oauth-drivers.ts +26 -10
- package/src/drizzle/oauth-target.ts +30 -42
- package/src/drizzle/passkey-drivers.ts +21 -13
- package/src/drizzle/passkey-write-drivers.ts +11 -6
- package/src/drizzle/password-prepared-sql.ts +2 -4
- package/src/drizzle/password-prepared-target.ts +9 -6
- package/src/drizzle/password-registration.ts +7 -8
- package/src/drizzle/password-target.ts +19 -18
- package/src/drizzle/pg-database.ts +10 -0
- package/src/drizzle/pg-emails.ts +28 -16
- package/src/drizzle/pg-identity.ts +18 -22
- package/src/drizzle/pg-password-prepared.ts +10 -8
- package/src/drizzle/pg-passwords.ts +21 -9
- package/src/drizzle/pg-proofs.ts +16 -5
- package/src/drizzle/pg-sessions.ts +40 -17
- package/src/drizzle/phone-target.ts +22 -17
- package/src/drizzle/proof-target.ts +9 -12
- package/src/drizzle/session-target.ts +32 -50
- package/src/drizzle/sqlite-emails.ts +30 -13
- package/src/drizzle/sqlite-identity.ts +22 -42
- package/src/drizzle/sqlite-password-prepared.ts +23 -9
- package/src/drizzle/sqlite-passwords.ts +29 -15
- package/src/drizzle/sqlite-proofs.ts +28 -5
- package/src/drizzle/sqlite-sessions.ts +49 -23
- package/src/drizzle/standalone-guard.ts +18 -6
- package/src/drizzle/totp-target.ts +61 -60
- package/dist/drizzle/d1-identity.d.mts +0 -30
- package/dist/drizzle/mysql-identity.d.mts +0 -21
- package/dist/drizzle/pg-identity.d.mts +0 -22
package/dist/SqliteDo.d.mts
CHANGED
|
@@ -20,11 +20,17 @@ import "./index.mjs";
|
|
|
20
20
|
import { SuppliedService } from "./drizzle/SuppliedService.mjs";
|
|
21
21
|
import { TotpCoordinatorError } from "./drizzle/totp-target.mjs";
|
|
22
22
|
import { PhoneCoordinatorError } from "./drizzle/phone-target.mjs";
|
|
23
|
-
import {
|
|
24
|
-
import { Effect } from "effect";
|
|
23
|
+
import { NativeDatabase, PersistenceConfigurationError } from "@yielded/auth-persistence/Adapter";
|
|
24
|
+
import { Context, Effect, Layer } from "effect";
|
|
25
25
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
26
|
+
import { SqliteClient } from "@effect/sql-sqlite-do/SqliteClient";
|
|
26
27
|
import { EffectSQLiteDoDatabase } from "drizzle-orm/effect-sqlite-do";
|
|
27
28
|
//#region src/SqliteDo.d.ts
|
|
29
|
+
declare const Database_base: Context.ServiceClass<Database, "effect-auth/persistence-drizzle/SqliteDo/Database", EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>>;
|
|
30
|
+
/** The application-owned Drizzle database used to construct persistence services. */
|
|
31
|
+
export declare class Database extends Database_base {}
|
|
32
|
+
/** The SQL-client Layer must configure storage so Drizzle owns transactionSync. */
|
|
33
|
+
export declare const databaseLayer: Layer.Layer<Database, PersistenceConfigurationError, SqliteClient>;
|
|
28
34
|
/**
|
|
29
35
|
* Email mutations must own their outer transactionSync. Arbitrary raw Drizzle
|
|
30
36
|
* nesting is not detectable; owner bodies and mapping allocators stay runSync-compatible.
|
|
@@ -53,7 +59,7 @@ export declare const coordinateEmailAddress: {
|
|
|
53
59
|
readonly target: SuppliedService<TargetId, EmailRegistrationAuthority<Registration>>;
|
|
54
60
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
55
61
|
}, body: Effect.Effect<Out, E, NoInfer<TargetId | TxId>>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Email").EmailUnavailable | import("@yielded/auth/Hooks").HookConfigurationError | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
56
|
-
}, makeEmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(
|
|
62
|
+
}, makeEmailAddressServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(mapping: EmailAddressMapping<S, I, C, AC, M, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
57
63
|
emailAddressPersistence: {
|
|
58
64
|
readonly target: (input: {
|
|
59
65
|
readonly moduleId: string;
|
|
@@ -72,16 +78,16 @@ export declare const coordinateEmailAddress: {
|
|
|
72
78
|
readonly hasMore: boolean;
|
|
73
79
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
74
80
|
};
|
|
75
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(
|
|
81
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: EmailRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>, proofMapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, DrizzleTableModel<any>, any, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
76
82
|
registrationAuthority: EmailRegistrationAuthority<Registration>;
|
|
77
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(
|
|
83
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeEmailSignInServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, NativeId>(mapping: EmailSignInMapping<S, I, C, NativeId>) => Effect.Effect<{
|
|
78
84
|
emailSignInTargets: {
|
|
79
85
|
readonly lookup: (input: {
|
|
80
86
|
readonly moduleId: string;
|
|
81
87
|
readonly identifier: import("@yielded/auth/Identity").LoginIdentifier;
|
|
82
88
|
}) => Effect.Effect<import("effect/Option").Option<import("@yielded/auth/Email").EmailCredentialSnapshot>, import("@yielded/auth/Email").EmailUnavailable>;
|
|
83
89
|
};
|
|
84
|
-
}, never,
|
|
90
|
+
}, never, Database>;
|
|
85
91
|
/**
|
|
86
92
|
* Password mutations and registration must own their outer transactionSync.
|
|
87
93
|
* Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain
|
|
@@ -109,7 +115,7 @@ export declare const coordinatePasswordPersistence: {
|
|
|
109
115
|
readonly target: SuppliedService<TargetId, import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>>;
|
|
110
116
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
111
117
|
}, body: Effect.Effect<Out, E, NoInfer<TargetId | TxId>>): Effect.Effect<Out, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Password").PasswordUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
112
|
-
}, makePasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(
|
|
118
|
+
}, makePasswordPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, NativeId>(mapping: import("@yielded/auth-persistence/Adapter").PasswordPersistenceMapping<DrizzleTableModel<S>, DrizzleTableModel<I>, DrizzleTableModel<C>, DrizzleTableModel<AC>, DrizzleTableModel<A>, DrizzleTableModel<RS>, DrizzleTableModel<CE>, DrizzleTableModel<M>, NativeId, import("drizzle-orm").SQL<unknown>>, proofMapping?: ProofPersistenceMapping<any, any, any, any, any, any, any, any, any, any, any, any>) => Effect.Effect<{
|
|
113
119
|
passwordPersistence: {
|
|
114
120
|
readonly admitAttempt: <A_1>(input: {
|
|
115
121
|
readonly moduleId: string;
|
|
@@ -151,9 +157,9 @@ export declare const coordinatePasswordPersistence: {
|
|
|
151
157
|
readonly hasMore: boolean;
|
|
152
158
|
}, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Password").PasswordUnavailable>;
|
|
153
159
|
};
|
|
154
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(
|
|
160
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePasswordRegistrationServices: <Registration, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, Rq extends AnySQLiteTable, NativeId>(mapping: PasswordRegistrationMapping<Registration, S, I, C, AC, Rq, NativeId>) => Effect.Effect<{
|
|
155
161
|
registrationAuthority: import("@yielded/auth-persistence/Adapter").PasswordRegistrationAuthority<Registration>;
|
|
156
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
162
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
157
163
|
/**
|
|
158
164
|
* Proof mutations and coordinateProofPersistence must own their outermost
|
|
159
165
|
* transactionSync call. The installed driver cannot detect an arbitrary raw
|
|
@@ -169,7 +175,7 @@ export declare const coordinateProofPersistence: {
|
|
|
169
175
|
readonly mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<Aev>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>;
|
|
170
176
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
171
177
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/Proofs").ProofPersistence>>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Proofs").ProofUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
172
|
-
}, makeProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(
|
|
178
|
+
}, makeProofPersistenceServices: <Rq extends AnySQLiteTable, S extends AnySQLiteTable, G extends AnySQLiteTable, Cn extends AnySQLiteTable, Rs extends AnySQLiteTable, A extends AnySQLiteTable, F extends AnySQLiteTable, C extends AnySQLiteTable, Sub extends AnySQLiteTable, I extends AnySQLiteTable, Cr extends AnySQLiteTable, NativeId>(mapping: import("@yielded/auth-persistence/Adapter").ProofPersistenceMapping<DrizzleTableModel<Rq>, DrizzleTableModel<S>, DrizzleTableModel<G>, DrizzleTableModel<Cn>, DrizzleTableModel<Rs>, DrizzleTableModel<A>, DrizzleTableModel<F>, DrizzleTableModel<C>, DrizzleTableModel<Sub>, DrizzleTableModel<I>, DrizzleTableModel<Cr>, NativeId, import("drizzle-orm").SQL<unknown>>) => Effect.Effect<{
|
|
173
179
|
proofPersistence: {
|
|
174
180
|
readonly issue: <A_1>(input: {
|
|
175
181
|
readonly record: import("@yielded/auth/Proofs").ProofRecord;
|
|
@@ -219,7 +225,7 @@ export declare const coordinateProofPersistence: {
|
|
|
219
225
|
readonly limit: number;
|
|
220
226
|
}, prepare: import("@yielded/auth/Proofs").PrepareProofCommit<import("@yielded/auth/Proofs").ProofCleanupResult, A_1>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A_1>, import("@yielded/auth/Proofs").ProofUnavailable>;
|
|
221
227
|
};
|
|
222
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
228
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
223
229
|
/**
|
|
224
230
|
* Session mutation methods and coordinate* functions must own their outermost
|
|
225
231
|
* transactionSync call. The installed Drizzle driver exposes no context marker
|
|
@@ -271,7 +277,7 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
271
277
|
readonly repository: SuppliedService<RepositoryId, import("@yielded/auth/Sessions").SessionRepository>;
|
|
272
278
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
273
279
|
}, body: Effect.Effect<A, E, NoInfer<PersistenceId | RepositoryId | TxId>>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
274
|
-
}, makeAuthenticationAuthorityServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId>(
|
|
280
|
+
}, makeAuthenticationAuthorityServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId>(mapping: AuthenticationAuthorityMapping<Claims, S, C, F, P, NativeId>) => Effect.Effect<{
|
|
275
281
|
authenticationAuthority: {
|
|
276
282
|
readonly capture: (subjectId: import("@yielded/auth/Schema").SubjectId, credentialIds: ReadonlyArray<string>) => Effect.Effect<import("@yielded/auth/Sessions").AuthenticationRevision, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
277
283
|
readonly requirements: (evidence: import("@yielded/auth/Sessions").AuthenticationEvidence) => Effect.Effect<import("@yielded/auth/Sessions").AuthenticationRequirement, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
@@ -283,11 +289,11 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
283
289
|
readonly pending?: import("@yielded/auth/Sessions").PendingConsumption;
|
|
284
290
|
}, prepare: import("@yielded/auth/Sessions").PrepareSessionCommit<void, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/Sessions").StaleAuthentication | import("@yielded/auth/Sessions").PendingAuthenticationInvalid | import("@yielded/auth/Sessions").SessionUnavailable>;
|
|
285
291
|
};
|
|
286
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(
|
|
292
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makePendingAuthenticationServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, P extends AnySQLiteTable, F extends AnySQLiteTable, NativeId>(mapping: PendingAuthenticationMapping<Claims, S, C, P, F, NativeId>) => Effect.Effect<{
|
|
287
293
|
pendingAuthentication: import("@yielded/auth/Sessions").PendingAuthentication<Claims>;
|
|
288
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
294
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeSessionStepUpServices: <Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>, target: Context.Service<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>) => Effect.Effect<{
|
|
289
295
|
sessionStepUpPersistence: import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>;
|
|
290
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
296
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateSessionStepUp: {
|
|
291
297
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, Claims, Id, S extends AnySQLiteTable, C extends AnySQLiteTable, I extends AnySQLiteTable, Session extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId, A, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
292
298
|
readonly mapping: SessionStepUpMapping<NoInfer<Claims>, S, C, I, Session, T, NativeId, NativeSessionId>;
|
|
293
299
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
@@ -298,34 +304,34 @@ export declare const coordinateAuthenticationAuthority: {
|
|
|
298
304
|
readonly target: SuppliedService<Id, import("@yielded/auth/Sessions").SessionStepUpPersistence<Claims>>;
|
|
299
305
|
readonly transaction: SuppliedService<TxId, NoInfer<Parameters<Parameters<Database["transaction"]>[0]>[0]>, TxShape>;
|
|
300
306
|
}, body: Effect.Effect<A, E, NoInfer<Id | TxId>>): Effect.Effect<A, DatabaseError | E | import("@yielded/auth/Hooks").HookConfigurationError | import("@yielded/auth/Sessions").SessionUnavailable | import("effect/sql/SqlError").SqlError, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
301
|
-
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
307
|
+
}, makeSignedSessionValidityServices: <S extends AnySQLiteTable, T extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: SignedSessionValidityMapping<S, T, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
302
308
|
signedSessionValidity: import("@yielded/auth/Sessions").SignedSessionValidity;
|
|
303
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(
|
|
309
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeStatefulSessionServices: <Claims, S extends AnySQLiteTable, C extends AnySQLiteTable, Session extends AnySQLiteTable, F extends AnySQLiteTable, P extends AnySQLiteTable, NativeId, NativeSessionId>(mapping: StatefulSessionMapping<Claims, S, C, Session, F, P, NativeId, NativeSessionId>) => Effect.Effect<{
|
|
304
310
|
readonly statefulSessionPersistence: import("@yielded/auth/Sessions").StatefulSessionPersistence<Claims>;
|
|
305
311
|
readonly sessionRepository: import("@yielded/auth/Sessions").SessionRepository;
|
|
306
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
312
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
307
313
|
export declare const commitMode: "synchronous";
|
|
308
|
-
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(
|
|
314
|
+
export declare const makeIdentityServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, External extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: IdentityTables<Subject, Identifier, External, Request, NativeId>) => Effect.Effect<{
|
|
309
315
|
subjectProvisioner: {
|
|
310
316
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
311
317
|
};
|
|
312
318
|
externalIdentityMutation: {
|
|
313
319
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
314
320
|
};
|
|
315
|
-
}
|
|
316
|
-
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(
|
|
321
|
+
}, never, Database>;
|
|
322
|
+
export declare const makeSubjectProvisioningServices: <Subject extends AnySQLiteTable, Identifier extends AnySQLiteTable, Request extends AnySQLiteTable, NativeId>(mapping: SubjectProvisioningTables<Subject, Identifier, Request, NativeId>) => Effect.Effect<{
|
|
317
323
|
readonly subjectProvisioner: {
|
|
318
324
|
readonly provision: (input: import("@yielded/auth/Identity").SubjectProvisioningInput) => Effect.Effect<import("@yielded/auth/Identity").ProvisioningResult, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
319
325
|
};
|
|
320
|
-
}
|
|
321
|
-
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(
|
|
326
|
+
}, never, Database>;
|
|
327
|
+
export declare const makeExternalIdentityServices: <Subject extends AnySQLiteTable, External extends AnySQLiteTable, NativeId>(mapping: ExternalIdentityTables<Subject, External, NativeId>) => Effect.Effect<{
|
|
322
328
|
readonly externalIdentityMutation: {
|
|
323
329
|
readonly bind: (subjectId: import("@yielded/auth/Schema").SubjectId, identity: import("@yielded/auth/Identity").ExternalIdentity) => Effect.Effect<void, import("@yielded/auth/Identity").IdentityConflict | import("@yielded/auth/Identity").IdentityUnavailable>;
|
|
324
330
|
};
|
|
325
|
-
}
|
|
326
|
-
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(
|
|
331
|
+
}, never, Database>;
|
|
332
|
+
export declare const makePasswordPreparedPersistenceServices: <S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable = AnySQLiteTable, PC extends AnySQLiteTable = AnySQLiteTable, PM extends AnySQLiteTable = AnySQLiteTable, PSub extends AnySQLiteTable = AnySQLiteTable, PI extends AnySQLiteTable = AnySQLiteTable, PCr extends AnySQLiteTable = AnySQLiteTable, PNativeId = unknown>(mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>, proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined) => Effect.Effect<{
|
|
327
333
|
passwordPreparedPersistence: import("@yielded/auth/Password").PasswordPreparedPersistence;
|
|
328
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
334
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinatePasswordPreparedPersistence: {
|
|
329
335
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, S extends AnySQLiteTable, I extends AnySQLiteTable, C extends AnySQLiteTable, AC extends AnySQLiteTable, A extends AnySQLiteTable, RS extends AnySQLiteTable, CE extends AnySQLiteTable, M extends AnySQLiteTable, T extends AnySQLiteTable, B extends AnySQLiteTable, NativeId, PS extends AnySQLiteTable, PC extends AnySQLiteTable, PM extends AnySQLiteTable, PSub extends AnySQLiteTable, PI extends AnySQLiteTable, PCr extends AnySQLiteTable, PNativeId, Out, E, R, DatabaseError, DatabaseRequirements>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
330
336
|
readonly mapping: PasswordPreparedPersistenceMapping<S, I, C, AC, A, RS, CE, M, T, B, NativeId>;
|
|
331
337
|
readonly proofMapping?: PasswordPreparedProofMapping<PS, PC, PM, PSub, PI, PCr, PNativeId> | undefined;
|
|
@@ -353,7 +359,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
353
359
|
dialect: "sqlite";
|
|
354
360
|
}>, U extends AnySQLiteTable<{
|
|
355
361
|
dialect: "sqlite";
|
|
356
|
-
}>, N>(
|
|
362
|
+
}>, N>(mapping: OAuthAccountsMapping<S, O, C, AC, F, TA, U, N>) => Effect.Effect<{
|
|
357
363
|
oauthAccountsPersistence: {
|
|
358
364
|
readonly capture: (input: {
|
|
359
365
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -363,8 +369,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
363
369
|
readonly flow: import("@yielded/auth/OAuth").OAuthLinkPendingFlow;
|
|
364
370
|
readonly authorization: import("@yielded/auth/OAuth").OAuthActionAuthorization;
|
|
365
371
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<{
|
|
366
|
-
readonly _tag: "Rejected";
|
|
367
|
-
} | {
|
|
368
372
|
readonly _tag: "Issued";
|
|
369
373
|
readonly flow: {
|
|
370
374
|
readonly context: {
|
|
@@ -420,6 +424,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
420
424
|
};
|
|
421
425
|
readonly retentionUntilMillis: number;
|
|
422
426
|
};
|
|
427
|
+
} | {
|
|
428
|
+
readonly _tag: "Rejected";
|
|
423
429
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
424
430
|
readonly preflight: (input: import("@yielded/auth/OAuth").OAuthLinkAccess) => Effect.Effect<import("@yielded/auth/OAuth").OAuthLinkPendingFlow | undefined, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
425
431
|
readonly claim: <A>(input: {
|
|
@@ -503,8 +509,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
503
509
|
readonly _tag: "Cancelled";
|
|
504
510
|
} | {
|
|
505
511
|
readonly _tag: "Ambiguous";
|
|
506
|
-
} | {
|
|
507
|
-
readonly _tag: "Conflict";
|
|
508
512
|
} | {
|
|
509
513
|
readonly _tag: "Linked";
|
|
510
514
|
readonly credential: {
|
|
@@ -526,6 +530,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
526
530
|
};
|
|
527
531
|
};
|
|
528
532
|
readonly changed: boolean;
|
|
533
|
+
} | {
|
|
534
|
+
readonly _tag: "Conflict";
|
|
529
535
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
530
536
|
readonly inspectUnlink: (input: {
|
|
531
537
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -603,7 +609,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
603
609
|
readonly hasMore: boolean;
|
|
604
610
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
605
611
|
};
|
|
606
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
612
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthSignInServices: <S extends AnySQLiteTable<{
|
|
607
613
|
dialect: "sqlite";
|
|
608
614
|
}>, O extends AnySQLiteTable<{
|
|
609
615
|
dialect: "sqlite";
|
|
@@ -613,7 +619,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
613
619
|
dialect: "sqlite";
|
|
614
620
|
}>, F extends AnySQLiteTable<{
|
|
615
621
|
dialect: "sqlite";
|
|
616
|
-
}>, N>(
|
|
622
|
+
}>, N>(mapping: OAuthSignInMapping<S, O, C, AC, F, N>) => Effect.Effect<{
|
|
617
623
|
oauthSignInPersistence: {
|
|
618
624
|
readonly issue: <A>(input: import("@yielded/auth/OAuth").OAuthPendingFlow, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthIssueDecision, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
619
625
|
readonly claim: <A>(input: {
|
|
@@ -645,7 +651,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
645
651
|
readonly hasMore: boolean;
|
|
646
652
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
647
653
|
};
|
|
648
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
654
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationIntentServices: <S extends AnySQLiteTable<{
|
|
649
655
|
dialect: "sqlite";
|
|
650
656
|
}>, O extends AnySQLiteTable<{
|
|
651
657
|
dialect: "sqlite";
|
|
@@ -659,7 +665,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
659
665
|
dialect: "sqlite";
|
|
660
666
|
}>, I extends AnySQLiteTable<{
|
|
661
667
|
dialect: "sqlite";
|
|
662
|
-
}>, N>(
|
|
668
|
+
}>, N>(mapping: OAuthRegistrationIntentMapping<S, O, C, AC, F, TA, I, N>) => Effect.Effect<{
|
|
663
669
|
oauthRegistrationIntents: {
|
|
664
670
|
readonly settle: <A>(input: {
|
|
665
671
|
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
@@ -668,7 +674,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
668
674
|
readonly nowMillis: number;
|
|
669
675
|
}, prepare: import("@yielded/auth/OAuth").PrepareOAuthCommit<import("@yielded/auth/OAuth").OAuthRegistrationSettlement, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
670
676
|
};
|
|
671
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
677
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthRegistrationServices: <Registration, S extends AnySQLiteTable<{
|
|
672
678
|
dialect: "sqlite";
|
|
673
679
|
}>, O extends AnySQLiteTable<{
|
|
674
680
|
dialect: "sqlite";
|
|
@@ -682,9 +688,9 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
682
688
|
dialect: "sqlite";
|
|
683
689
|
}>, R extends AnySQLiteTable<{
|
|
684
690
|
dialect: "sqlite";
|
|
685
|
-
}>, N>(
|
|
691
|
+
}>, N>(mapping: OAuthRegistrationMapping<Registration, S, O, C, AC, TA, I, R, N>) => Effect.Effect<{
|
|
686
692
|
registrationAuthority: OAuthRegistrationAuthority<Registration>;
|
|
687
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
693
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthRegistration: {
|
|
688
694
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, TargetId, Registration, S extends AnySQLiteTable<{
|
|
689
695
|
dialect: "sqlite";
|
|
690
696
|
}>, O extends AnySQLiteTable<{
|
|
@@ -856,7 +862,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
856
862
|
dialect: "sqlite";
|
|
857
863
|
}>, N, J extends AnySQLiteTable<{
|
|
858
864
|
dialect: "sqlite";
|
|
859
|
-
}> = never>(
|
|
865
|
+
}> = never>(mapping: OAuthConnectedMapping<S, AC, T, O, F, G, C, H, UA, DC, N, J>) => Effect.Effect<{
|
|
860
866
|
oauthConnectedPersistence: {
|
|
861
867
|
readonly claimSignIn: <A>(input: {
|
|
862
868
|
readonly claim: import("@yielded/auth/OAuth").OAuthClaim;
|
|
@@ -876,6 +882,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
876
882
|
readonly _tag: "Cancelled";
|
|
877
883
|
} | {
|
|
878
884
|
readonly _tag: "Ambiguous";
|
|
885
|
+
} | {
|
|
886
|
+
readonly _tag: "Conflict";
|
|
879
887
|
} | {
|
|
880
888
|
readonly _tag: "Connected";
|
|
881
889
|
readonly grant: {
|
|
@@ -945,8 +953,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
945
953
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
946
954
|
};
|
|
947
955
|
};
|
|
948
|
-
} | {
|
|
949
|
-
readonly _tag: "Conflict";
|
|
950
956
|
} | {
|
|
951
957
|
readonly _tag: "Busy";
|
|
952
958
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1222,6 +1228,8 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1222
1228
|
readonly _tag: "Cancelled";
|
|
1223
1229
|
} | {
|
|
1224
1230
|
readonly _tag: "Ambiguous";
|
|
1231
|
+
} | {
|
|
1232
|
+
readonly _tag: "Conflict";
|
|
1225
1233
|
} | {
|
|
1226
1234
|
readonly _tag: "Connected";
|
|
1227
1235
|
readonly grant: {
|
|
@@ -1291,8 +1299,6 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1291
1299
|
readonly ciphertext: import("effect/Redacted").Redacted<string>;
|
|
1292
1300
|
};
|
|
1293
1301
|
};
|
|
1294
|
-
} | {
|
|
1295
|
-
readonly _tag: "Conflict";
|
|
1296
1302
|
} | {
|
|
1297
1303
|
readonly _tag: "Busy";
|
|
1298
1304
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
@@ -1712,7 +1718,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1712
1718
|
readonly hasMore: boolean;
|
|
1713
1719
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable, never>;
|
|
1714
1720
|
};
|
|
1715
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1721
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, makeOAuthConnectedRevocationServices: <T extends AnySQLiteTable<{
|
|
1716
1722
|
dialect: "sqlite";
|
|
1717
1723
|
}>, O extends AnySQLiteTable<{
|
|
1718
1724
|
dialect: "sqlite";
|
|
@@ -1726,7 +1732,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1726
1732
|
dialect: "sqlite";
|
|
1727
1733
|
}>, J extends AnySQLiteTable<{
|
|
1728
1734
|
dialect: "sqlite";
|
|
1729
|
-
}>, N>(
|
|
1735
|
+
}>, N>(mapping: OAuthConnectedRevocationMapping<T, O, F, G, C, H, J, N>) => Effect.Effect<{
|
|
1730
1736
|
oauthConnectedRevocations: {
|
|
1731
1737
|
readonly claim: <A>(input: {
|
|
1732
1738
|
readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
|
|
@@ -1820,7 +1826,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1820
1826
|
readonly settled: boolean;
|
|
1821
1827
|
}, A>) => Effect.Effect<import("@yielded/auth/Hooks").PreparedCommit<A>, import("@yielded/auth/OAuth").OAuthUnavailable>;
|
|
1822
1828
|
};
|
|
1823
|
-
}, never, import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1829
|
+
}, never, Database | import("@yielded/auth/Hooks").LifecycleHooks>, coordinateOAuthConnected: {
|
|
1824
1830
|
<D extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1825
1831
|
dialect: "sqlite";
|
|
1826
1832
|
}>, AC extends AnySQLiteTable<{
|
|
@@ -1915,7 +1921,7 @@ export declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
|
|
|
1915
1921
|
} ? Parameters<Parameters<D["transaction"]>[0]>[0] : never>, TxShape>;
|
|
1916
1922
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/OAuth").OAuthConnectedRevocations>>): Effect.Effect<A, DatabaseError | OAuthCoordinatorError<E>, DatabaseRequirements | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
1917
1923
|
};
|
|
1918
|
-
export declare const makePasskeyCredentialServices: <
|
|
1924
|
+
export declare const makePasskeyCredentialServices: <S extends AnySQLiteTable<{
|
|
1919
1925
|
dialect: "sqlite";
|
|
1920
1926
|
}>, C extends AnySQLiteTable<{
|
|
1921
1927
|
dialect: "sqlite";
|
|
@@ -1925,7 +1931,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1925
1931
|
dialect: "sqlite";
|
|
1926
1932
|
}>, H extends AnySQLiteTable<{
|
|
1927
1933
|
dialect: "sqlite";
|
|
1928
|
-
}>, N, RSetup = never>(
|
|
1934
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyCredentialMapping<S, C, F, O, H, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyCredentialServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | Exclude<RSetup, NativeDatabase>>, makePasskeyPersistenceServices: <S extends AnySQLiteTable<{
|
|
1929
1935
|
dialect: "sqlite";
|
|
1930
1936
|
}>, C extends AnySQLiteTable<{
|
|
1931
1937
|
dialect: "sqlite";
|
|
@@ -1943,7 +1949,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1943
1949
|
dialect: "sqlite";
|
|
1944
1950
|
}>, Charge extends AnySQLiteTable<{
|
|
1945
1951
|
dialect: "sqlite";
|
|
1946
|
-
}>, N, RSetup = never>(
|
|
1952
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyPersistenceMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, Flow, Admission, Charge, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyPersistenceServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyEnrollmentContextServices: <S extends AnySQLiteTable<{
|
|
1947
1953
|
dialect: "sqlite";
|
|
1948
1954
|
}>, C extends AnySQLiteTable<{
|
|
1949
1955
|
dialect: "sqlite";
|
|
@@ -1955,7 +1961,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1955
1961
|
dialect: "sqlite";
|
|
1956
1962
|
}>, M extends AnySQLiteTable<{
|
|
1957
1963
|
dialect: "sqlite";
|
|
1958
|
-
}>, N, RSetup = never>(
|
|
1964
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyEnrollmentContextMapping<PasskeyCredentialMapping<S, C, F, O, H, N>, M, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyEnrollmentContextServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationCeremonyServices: <M extends AnySQLiteTable<{
|
|
1959
1965
|
dialect: "sqlite";
|
|
1960
1966
|
}>, Flow extends AnySQLiteTable<{
|
|
1961
1967
|
dialect: "sqlite";
|
|
@@ -1967,7 +1973,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
1967
1973
|
dialect: "sqlite";
|
|
1968
1974
|
}>, H extends AnySQLiteTable<{
|
|
1969
1975
|
dialect: "sqlite";
|
|
1970
|
-
}>, RSetup = never>(
|
|
1976
|
+
}>, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationCeremonyMapping<M, Flow, Admission, Charge, Intent, H>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationCeremonyServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyPersistence: {
|
|
1971
1977
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
1972
1978
|
dialect: "sqlite";
|
|
1973
1979
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2049,7 +2055,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2049
2055
|
readonly transaction: (...args: any[]) => any;
|
|
2050
2056
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2051
2057
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2052
|
-
}, makePasskeyManagementServices: <
|
|
2058
|
+
}, makePasskeyManagementServices: <S extends AnySQLiteTable<{
|
|
2053
2059
|
dialect: "sqlite";
|
|
2054
2060
|
}>, C extends AnySQLiteTable<{
|
|
2055
2061
|
dialect: "sqlite";
|
|
@@ -2069,7 +2075,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2069
2075
|
dialect: "sqlite";
|
|
2070
2076
|
}>, Command extends AnySQLiteTable<{
|
|
2071
2077
|
dialect: "sqlite";
|
|
2072
|
-
}>, N, RSetup = never>(
|
|
2078
|
+
}>, N, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyManagementMapping<S, C, F, O, H, M, Flow, Admission, Charge, Command, N>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyManagementServices, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, makePasskeyRegistrationServices: <S extends AnySQLiteTable<{
|
|
2073
2079
|
dialect: "sqlite";
|
|
2074
2080
|
}>, C extends AnySQLiteTable<{
|
|
2075
2081
|
dialect: "sqlite";
|
|
@@ -2089,7 +2095,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2089
2095
|
dialect: "sqlite";
|
|
2090
2096
|
}>, Intent extends AnySQLiteTable<{
|
|
2091
2097
|
dialect: "sqlite";
|
|
2092
|
-
}>, N, Value, RSetup = never>(
|
|
2098
|
+
}>, N, Value, RSetup = never>(mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>) => Effect.Effect<import("@yielded/auth-persistence/Adapter").PasskeyRegistrationServices<Value>, import("@yielded/auth/Passkey").PasskeyConfigurationError | import("@yielded/auth-persistence/Adapter").PersistenceMappingError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePasskeyManagement: {
|
|
2093
2099
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2094
2100
|
dialect: "sqlite";
|
|
2095
2101
|
}>, C extends AnySQLiteTable<{
|
|
@@ -2163,7 +2169,7 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2163
2169
|
dialect: "sqlite";
|
|
2164
2170
|
}>, N, Value, A, E, R, AuthorityId, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2165
2171
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
|
|
2166
|
-
readonly authority:
|
|
2172
|
+
readonly authority: Context.Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
|
|
2167
2173
|
readonly transaction?: never;
|
|
2168
2174
|
}, body: Effect.Effect<A, E, NoInfer<AuthorityId | import("@yielded/auth/Passkey").PasskeyPersistence>>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2169
2175
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
@@ -2188,19 +2194,19 @@ export declare const makePasskeyCredentialServices: <Database extends EffectSQLi
|
|
|
2188
2194
|
dialect: "sqlite";
|
|
2189
2195
|
}>, N, Value, A, E, R, AuthorityId, TxId, TxShape, RSetup = never, DatabaseError = never, DatabaseRequirements = never>(acquire: Effect.Effect<Database, DatabaseError, DatabaseRequirements>, options: {
|
|
2190
2196
|
readonly mapping: import("@yielded/auth-persistence/Adapter").PasskeyMappingSource<PasskeyRegistrationMapping<S, C, F, O, H, M, Flow, Admission, Charge, Intent, N, Value>, RSetup>;
|
|
2191
|
-
readonly authority:
|
|
2197
|
+
readonly authority: Context.Key<AuthorityId, import("@yielded/auth-persistence/Adapter").PasskeyRegistrationWriter<Value>>;
|
|
2192
2198
|
readonly transaction: SuppliedService<TxId, NoInfer<Database extends {
|
|
2193
2199
|
readonly transaction: (...args: any[]) => any;
|
|
2194
2200
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2195
2201
|
}, body: Effect.Effect<A, E, NoInfer<AuthorityId | TxId | import("@yielded/auth/Passkey").PasskeyPersistence>>): Effect.Effect<A, DatabaseError | import("@yielded/auth-persistence/Adapter").PasskeyCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2196
2202
|
};
|
|
2197
|
-
export declare const makeTotpPersistenceServices: <
|
|
2203
|
+
export declare const makeTotpPersistenceServices: <S extends AnySQLiteTable<{
|
|
2198
2204
|
dialect: "sqlite";
|
|
2199
2205
|
}>, F extends AnySQLiteTable<{
|
|
2200
2206
|
dialect: "sqlite";
|
|
2201
2207
|
}>, C extends AnySQLiteTable<{
|
|
2202
2208
|
dialect: "sqlite";
|
|
2203
|
-
}>, N, RSetup = never>(
|
|
2209
|
+
}>, N, RSetup = never>(mapping: TotpMappingSource<TotpMapping<S, F, C, N>, RSetup>) => Effect.Effect<TotpPersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/Totp").TotpConfigurationError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinateTotpPersistence: {
|
|
2204
2210
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2205
2211
|
dialect: "sqlite";
|
|
2206
2212
|
}>, F extends AnySQLiteTable<{
|
|
@@ -2224,7 +2230,7 @@ export declare const makeTotpPersistenceServices: <Database extends EffectSQLite
|
|
|
2224
2230
|
} ? Parameters<Parameters<Database["transaction"]>[0]>[0] : never>, TxShape>;
|
|
2225
2231
|
}, body: Effect.Effect<A, E, NoInfer<TxId | import("@yielded/auth/Totp").TotpPersistence>>): Effect.Effect<A, DatabaseError | TotpCoordinatorError<E>, DatabaseRequirements | RSetup | import("@yielded/auth/Hooks").LifecycleHooks>;
|
|
2226
2232
|
};
|
|
2227
|
-
export declare const makePhonePersistenceServices: <
|
|
2233
|
+
export declare const makePhonePersistenceServices: <S extends AnySQLiteTable<{
|
|
2228
2234
|
dialect: "sqlite";
|
|
2229
2235
|
}>, I extends AnySQLiteTable<{
|
|
2230
2236
|
dialect: "sqlite";
|
|
@@ -2232,7 +2238,7 @@ export declare const makePhonePersistenceServices: <Database extends EffectSQLit
|
|
|
2232
2238
|
dialect: "sqlite";
|
|
2233
2239
|
}>, C extends AnySQLiteTable<{
|
|
2234
2240
|
dialect: "sqlite";
|
|
2235
|
-
}>, N, RSetup = never>(
|
|
2241
|
+
}>, N, RSetup = never>(mapping: PhoneMappingSource<PhoneMapping<S, I, C, F, N>, RSetup>) => Effect.Effect<PhonePersistenceServices, import("@yielded/auth-persistence/Adapter").PersistenceMappingError | import("@yielded/auth/PhoneOtp").PhoneConfigurationError, Database | import("@yielded/auth/Hooks").LifecycleHooks | Exclude<RSetup, NativeDatabase>>, coordinatePhonePersistence: {
|
|
2236
2242
|
<Database extends EffectSQLiteDoDatabase<import("drizzle-orm").TablesRelationalConfig>, S extends AnySQLiteTable<{
|
|
2237
2243
|
dialect: "sqlite";
|
|
2238
2244
|
}>, I extends AnySQLiteTable<{
|
package/dist/SqliteDo.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { passwordPreparedPersistenceLayer } from "./drizzle/password-prepared-target.mjs";
|
|
2
|
+
import { nativeDatabase } from "./drizzle/native-database.mjs";
|
|
2
3
|
import { makeTotpTarget } from "./drizzle/totp-target.mjs";
|
|
3
4
|
import { makePasskeyTarget } from "./drizzle/passkey-drivers.mjs";
|
|
4
5
|
import { makePhoneTarget } from "./drizzle/phone-target.mjs";
|
|
@@ -9,16 +10,27 @@ import { makeSqliteProofTarget, sqliteProofConfiguration } from "./drizzle/sqlit
|
|
|
9
10
|
import { makeSqliteSessionTarget, sqliteSessionConfiguration } from "./drizzle/sqlite-sessions.mjs";
|
|
10
11
|
import { makeSqlitePasswordPreparedTarget } from "./drizzle/sqlite-password-prepared.mjs";
|
|
11
12
|
import { makeOAuthTarget } from "./drizzle/oauth-drivers.mjs";
|
|
12
|
-
import {
|
|
13
|
+
import { NativeDatabase, PersistenceConfigurationError } from "@yielded/auth-persistence/Adapter";
|
|
14
|
+
import { Context, Effect, Layer } from "effect";
|
|
15
|
+
import { SqliteClient } from "@effect/sql-sqlite-do/SqliteClient";
|
|
16
|
+
import { makeWithDefaults } from "drizzle-orm/effect-sqlite-do";
|
|
13
17
|
//#region src/SqliteDo.ts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
/** The application-owned Drizzle database used to construct persistence services. */
|
|
19
|
+
var Database = class extends Context.Service()("effect-auth/persistence-drizzle/SqliteDo/Database") {};
|
|
20
|
+
/** The SQL-client Layer must configure storage so Drizzle owns transactionSync. */
|
|
21
|
+
const databaseLayer = Layer.effect(Database, Effect.gen(function* () {
|
|
22
|
+
const storage = (yield* SqliteClient).config.storage;
|
|
23
|
+
if (storage === void 0) return yield* PersistenceConfigurationError.make({ reason: "SqliteDo requires a SQL client configured with storage for synchronous transactions" });
|
|
24
|
+
return yield* makeWithDefaults({ storage });
|
|
25
|
+
}));
|
|
26
|
+
const sessionTarget = makeSqliteSessionTarget(Database, sqliteSessionConfiguration("synchronous", Effect.void));
|
|
27
|
+
const proofTarget = makeSqliteProofTarget(Database, sqliteProofConfiguration("synchronous", Effect.void));
|
|
28
|
+
const passwordTarget = makeSqlitePasswordTarget(Database, sqlitePasswordConfiguration("synchronous", Effect.void, Effect.void));
|
|
17
29
|
/**
|
|
18
30
|
* Email mutations must own their outer transactionSync. Arbitrary raw Drizzle
|
|
19
31
|
* nesting is not detectable; owner bodies and mapping allocators stay runSync-compatible.
|
|
20
32
|
*/
|
|
21
|
-
const { coordinateEmailAddress, coordinateEmailRegistration, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices } = makeSqliteEmailTarget(sqliteEmailConfiguration("synchronous", Effect.void, Effect.void));
|
|
33
|
+
const { coordinateEmailAddress, coordinateEmailRegistration, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices } = makeSqliteEmailTarget(Database, sqliteEmailConfiguration("synchronous", Effect.void, Effect.void));
|
|
22
34
|
/**
|
|
23
35
|
* Password mutations and registration must own their outer transactionSync.
|
|
24
36
|
* Arbitrary raw Drizzle nesting is not detectable; owner bodies must remain
|
|
@@ -41,35 +53,35 @@ const { coordinateProofPersistence, makeProofPersistenceServices } = proofTarget
|
|
|
41
53
|
*/
|
|
42
54
|
const { coordinateAuthenticationAuthority, coordinatePendingAuthentication, coordinateSignedSessionValidity, coordinateStatefulSessions, makeAuthenticationAuthorityServices, makePendingAuthenticationServices, makeSessionStepUpServices, coordinateSessionStepUp, makeSignedSessionValidityServices, makeStatefulSessionServices } = sessionTarget;
|
|
43
55
|
const commitMode = "synchronous";
|
|
44
|
-
const makeIdentityServices = (
|
|
45
|
-
const makeSubjectProvisioningServices = (
|
|
46
|
-
const makeExternalIdentityServices = (
|
|
47
|
-
const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } = makeSqlitePasswordPreparedTarget(sqlitePasswordConfiguration("synchronous", Effect.void, Effect.void));
|
|
48
|
-
const { makeOAuthAccountsServices, makeOAuthSignInServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, coordinateOAuthRegistration, coordinateOAuthSignIn, coordinateOAuthRegistrationIntents, coordinateOAuthAccounts, makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordinateOAuthConnected, coordinateOAuthConnectedRevocations } = makeOAuthTarget({
|
|
56
|
+
const makeIdentityServices = (mapping) => makeSqliteIdentityServices(mapping, "synchronous").pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
57
|
+
const makeSubjectProvisioningServices = (mapping) => makeSqliteSubjectProvisioningServices(mapping, "synchronous").pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
58
|
+
const makeExternalIdentityServices = (mapping) => makeSqliteExternalIdentityServices(mapping).pipe(Effect.provideServiceEffect(NativeDatabase, nativeDatabase(Database)));
|
|
59
|
+
const { makePasswordPreparedPersistenceServices, coordinatePasswordPreparedPersistence } = makeSqlitePasswordPreparedTarget(Database, sqlitePasswordConfiguration("synchronous", Effect.void, Effect.void));
|
|
60
|
+
const { makeOAuthAccountsServices, makeOAuthSignInServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, coordinateOAuthRegistration, coordinateOAuthSignIn, coordinateOAuthRegistrationIntents, coordinateOAuthAccounts, makeOAuthConnectedServices, makeOAuthConnectedRevocationServices, coordinateOAuthConnected, coordinateOAuthConnectedRevocations } = makeOAuthTarget(Database, {
|
|
49
61
|
mode: "synchronous",
|
|
50
62
|
dialect: "sqlite",
|
|
51
63
|
locking: false,
|
|
52
64
|
standaloneGuard: () => Effect.void
|
|
53
65
|
});
|
|
54
|
-
const { makePasskeyCredentialServices, makePasskeyPersistenceServices, makePasskeyEnrollmentContextServices, makePasskeyRegistrationCeremonyServices, coordinatePasskeyPersistence, coordinatePasskeyRegistrationCeremony, makePasskeyManagementServices, makePasskeyRegistrationServices, coordinatePasskeyManagement, coordinatePasskeyRegistration } = makePasskeyTarget({
|
|
66
|
+
const { makePasskeyCredentialServices, makePasskeyPersistenceServices, makePasskeyEnrollmentContextServices, makePasskeyRegistrationCeremonyServices, coordinatePasskeyPersistence, coordinatePasskeyRegistrationCeremony, makePasskeyManagementServices, makePasskeyRegistrationServices, coordinatePasskeyManagement, coordinatePasskeyRegistration } = makePasskeyTarget(Database, {
|
|
55
67
|
mode: "synchronous",
|
|
56
68
|
dialect: "sqlite",
|
|
57
69
|
locking: false,
|
|
58
70
|
standaloneGuard: () => Effect.void
|
|
59
71
|
});
|
|
60
|
-
const { makeTotpPersistenceServices, coordinateTotpPersistence } = makeTotpTarget({
|
|
72
|
+
const { makeTotpPersistenceServices, coordinateTotpPersistence } = makeTotpTarget(Database, {
|
|
61
73
|
mode: "synchronous",
|
|
62
74
|
dialect: "sqlite",
|
|
63
75
|
locking: false,
|
|
64
76
|
standaloneGuard: () => Effect.void
|
|
65
77
|
});
|
|
66
|
-
const { makePhonePersistenceServices, coordinatePhonePersistence } = makePhoneTarget({
|
|
78
|
+
const { makePhonePersistenceServices, coordinatePhonePersistence } = makePhoneTarget(Database, {
|
|
67
79
|
mode: "synchronous",
|
|
68
80
|
dialect: "sqlite",
|
|
69
81
|
locking: false,
|
|
70
82
|
standaloneGuard: () => Effect.void
|
|
71
83
|
});
|
|
72
84
|
//#endregion
|
|
73
|
-
export { commitMode, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, makeAuthenticationAuthorityServices, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
85
|
+
export { Database, commitMode, coordinateAuthenticationAuthority, coordinateEmailAddress, coordinateEmailRegistration, coordinateOAuthAccounts, coordinateOAuthConnected, coordinateOAuthConnectedRevocations, coordinateOAuthRegistration, coordinateOAuthRegistrationIntents, coordinateOAuthSignIn, coordinatePasskeyManagement, coordinatePasskeyPersistence, coordinatePasskeyRegistration, coordinatePasskeyRegistrationCeremony, coordinatePasswordPersistence, coordinatePasswordPreparedPersistence, coordinatePasswordRegistration, coordinatePendingAuthentication, coordinatePhonePersistence, coordinateProofPersistence, coordinateSessionStepUp, coordinateSignedSessionValidity, coordinateStatefulSessions, coordinateTotpPersistence, databaseLayer, makeAuthenticationAuthorityServices, makeEmailAddressServices, makeEmailRegistrationServices, makeEmailSignInServices, makeExternalIdentityServices, makeIdentityServices, makeOAuthAccountsServices, makeOAuthConnectedRevocationServices, makeOAuthConnectedServices, makeOAuthRegistrationIntentServices, makeOAuthRegistrationServices, makeOAuthSignInServices, makePasskeyCredentialServices, makePasskeyEnrollmentContextServices, makePasskeyManagementServices, makePasskeyPersistenceServices, makePasskeyRegistrationCeremonyServices, makePasskeyRegistrationServices, makePasswordPersistenceServices, makePasswordPreparedPersistenceServices, makePasswordRegistrationServices, makePendingAuthenticationServices, makePhonePersistenceServices, makeProofPersistenceServices, makeSessionStepUpServices, makeSignedSessionValidityServices, makeStatefulSessionServices, makeSubjectProvisioningServices, makeTotpPersistenceServices, passwordPreparedPersistenceLayer };
|
|
74
86
|
|
|
75
87
|
//# sourceMappingURL=SqliteDo.mjs.map
|